From ece62b9eb3e2f3995715c32608f1de91d98a22be Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 29 Nov 2023 23:20:31 -0500 Subject: Rails engine no longer needed --- rails/app/assets/config/lingo_manifest.js | 2 - rails/app/assets/images/lingo/.keep | 0 rails/app/assets/images/lingo/header.png | Bin 1213722 -> 0 bytes rails/app/assets/stylesheets/lingo/application.css | 15 ------ rails/app/assets/stylesheets/lingo/main.css.scss | 55 --------------------- rails/app/controllers/concerns/.keep | 0 .../controllers/lingo/application_controller.rb | 5 -- rails/app/controllers/lingo/scores_controller.rb | 25 ---------- rails/app/helpers/lingo/application_helper.rb | 4 -- rails/app/helpers/lingo/scores_helper.rb | 4 -- rails/app/jobs/lingo/application_job.rb | 4 -- rails/app/mailers/lingo/application_mailer.rb | 6 --- rails/app/models/concerns/.keep | 0 rails/app/models/lingo/application_record.rb | 5 -- rails/app/models/lingo/score.rb | 4 -- .../app/views/layouts/lingo/application.html.haml | 9 ---- rails/app/views/lingo/scores/index.html.haml | 14 ------ 17 files changed, 152 deletions(-) delete mode 100644 rails/app/assets/config/lingo_manifest.js delete mode 100644 rails/app/assets/images/lingo/.keep delete mode 100644 rails/app/assets/images/lingo/header.png delete mode 100644 rails/app/assets/stylesheets/lingo/application.css delete mode 100644 rails/app/assets/stylesheets/lingo/main.css.scss delete mode 100644 rails/app/controllers/concerns/.keep delete mode 100644 rails/app/controllers/lingo/application_controller.rb delete mode 100644 rails/app/controllers/lingo/scores_controller.rb delete mode 100644 rails/app/helpers/lingo/application_helper.rb delete mode 100644 rails/app/helpers/lingo/scores_helper.rb delete mode 100644 rails/app/jobs/lingo/application_job.rb delete mode 100644 rails/app/mailers/lingo/application_mailer.rb delete mode 100644 rails/app/models/concerns/.keep delete mode 100644 rails/app/models/lingo/application_record.rb delete mode 100644 rails/app/models/lingo/score.rb delete mode 100644 rails/app/views/layouts/lingo/application.html.haml delete mode 100644 rails/app/views/lingo/scores/index.html.haml (limited to 'rails/app') diff --git a/rails/app/assets/config/lingo_manifest.js b/rails/app/assets/config/lingo_manifest.js deleted file mode 100644 index 32c12fb..0000000 --- a/rails/app/assets/config/lingo_manifest.js +++ /dev/null @@ -1,2 +0,0 @@ -//= link_directory ../stylesheets/lingo .css -//= link lingo/header.png diff --git a/rails/app/assets/images/lingo/.keep b/rails/app/assets/images/lingo/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/rails/app/assets/images/lingo/header.png b/rails/app/assets/images/lingo/header.png deleted file mode 100644 index 9384865..0000000 Binary files a/rails/app/assets/images/lingo/header.png and /dev/null differ diff --git a/rails/app/assets/stylesheets/lingo/application.css b/rails/app/assets/stylesheets/lingo/application.css deleted file mode 100644 index 0ebd7fe..0000000 --- a/rails/app/assets/stylesheets/lingo/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/rails/app/assets/stylesheets/lingo/main.css.scss b/rails/app/assets/stylesheets/lingo/main.css.scss deleted file mode 100644 index a65cd94..0000000 --- a/rails/app/assets/stylesheets/lingo/main.css.scss +++ /dev/null @@ -1,55 +0,0 @@ -body { - background-color: black; - color: white; - font-family: sans-serif; -} - -#header { - width: 100%; - - img { - max-width: 80%; - margin: 0 auto; - display: block; - } -} - -h2 { - text-align: center; -} - -#scores { - margin: 0 auto; - border-spacing: 0px; - tr { - &.even { - background-color: gray; - } - &.odd { - background-color: purple; - } - th { - text-align: left; - padding-left: 0.5em; - padding-bottom: 0.5em; - } - td { - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - border-collapse: collapse; - &:first-child { - padding-left: 1em; - } - img { - width: 2em; - } - &.score-pfp { - width: 2em; - } - &.score-value { - text-align: center; - } - } - } -} \ No newline at end of file diff --git a/rails/app/controllers/concerns/.keep b/rails/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/rails/app/controllers/lingo/application_controller.rb b/rails/app/controllers/lingo/application_controller.rb deleted file mode 100644 index 08b728f..0000000 --- a/rails/app/controllers/lingo/application_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Lingo - class ApplicationController < ActionController::Base - protect_from_forgery with: :exception - end -end diff --git a/rails/app/controllers/lingo/scores_controller.rb b/rails/app/controllers/lingo/scores_controller.rb deleted file mode 100644 index 59bbd9d..0000000 --- a/rails/app/controllers/lingo/scores_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Lingo - class ScoresController < ApplicationController - skip_before_action :verify_authenticity_token, only: [:update] - - def index - @scores = Score.order(score: :desc) - end - - def update - if params[:secret_code] != Lingo.secret_code then - head :unauthorized - else - score = Score.find_or_create_by(user_id: params[:user_id]) do |score| - score.score = 0 - end - score.username = params[:username] - score.avatar_url = CGI.unescape(params[:avatar_url]) - score.score += 1 - score.save! - - head :created - end - end - end -end diff --git a/rails/app/helpers/lingo/application_helper.rb b/rails/app/helpers/lingo/application_helper.rb deleted file mode 100644 index 4d30003..0000000 --- a/rails/app/helpers/lingo/application_helper.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Lingo - module ApplicationHelper - end -end diff --git a/rails/app/helpers/lingo/scores_helper.rb b/rails/app/helpers/lingo/scores_helper.rb deleted file mode 100644 index 53b0031..0000000 --- a/rails/app/helpers/lingo/scores_helper.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Lingo - module ScoresHelper - end -end diff --git a/rails/app/jobs/lingo/application_job.rb b/rails/app/jobs/lingo/application_job.rb deleted file mode 100644 index 1dfcb44..0000000 --- a/rails/app/jobs/lingo/application_job.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Lingo - class ApplicationJob < ActiveJob::Base - end -end diff --git a/rails/app/mailers/lingo/application_mailer.rb b/rails/app/mailers/lingo/application_mailer.rb deleted file mode 100644 index b86b722..0000000 --- a/rails/app/mailers/lingo/application_mailer.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Lingo - class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" - layout "mailer" - end -end diff --git a/rails/app/models/concerns/.keep b/rails/app/models/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/rails/app/models/lingo/application_record.rb b/rails/app/models/lingo/application_record.rb deleted file mode 100644 index 21a1824..0000000 --- a/rails/app/models/lingo/application_record.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Lingo - class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true - end -end diff --git a/rails/app/models/lingo/score.rb b/rails/app/models/lingo/score.rb deleted file mode 100644 index 6df7dfb..0000000 --- a/rails/app/models/lingo/score.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Lingo - class Score < ApplicationRecord - end -end diff --git a/rails/app/views/layouts/lingo/application.html.haml b/rails/app/views/layouts/lingo/application.html.haml deleted file mode 100644 index 6731e5a..0000000 --- a/rails/app/views/layouts/lingo/application.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -!!! 5 -%html - %head - %title LINGO Bot Scoreboard - = stylesheet_link_tag "lingo/application", media: "all" - = csrf_meta_tags - %body - #header= image_tag "lingo/header.png" - #content= yield diff --git a/rails/app/views/lingo/scores/index.html.haml b/rails/app/views/lingo/scores/index.html.haml deleted file mode 100644 index afcd0c7..0000000 --- a/rails/app/views/lingo/scores/index.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -%h2 Bot Puzzles Scoreboard -%table#scores - %tr.scores-header - %th - %th{colspan: 2} Player - %th Score - - @scores.each_with_index do |score,index| - %tr{class: cycle("even", "odd")} - %td.score-index #{index+1}. - %td.score-pfp - - if !score.avatar_url.nil? - = image_tag score.avatar_url - %td.score-name= score.username - %td.score-value= score.score -- cgit 1.4.1