From 111d0b1415967748f4da92dd63fd877c0ff31223 Mon Sep 17 00:00:00 2001 From: Ian Alden Date: Wed, 10 Jan 2024 17:07:34 -0700 Subject: [PATCH 1/3] Tweaks to getter functions --- Gemfile.lock | 4 ++++ lib/tasks/get_latest.rake | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2c35a46..873fd3a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,8 +100,11 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.8) + nokogiri (1.13.10-arm64-darwin) + racc (~> 1.4) nokogiri (1.13.10-x64-mingw-ucrt) racc (~> 1.4) + pg (1.4.5) pg (1.4.5-x64-mingw-ucrt) puma (6.0.0) nio4r (~> 2.0) @@ -152,6 +155,7 @@ GEM zeitwerk (2.6.6) PLATFORMS + arm64-darwin-23 x64-mingw-ucrt DEPENDENCIES diff --git a/lib/tasks/get_latest.rake b/lib/tasks/get_latest.rake index 37d5667..8e527a4 100644 --- a/lib/tasks/get_latest.rake +++ b/lib/tasks/get_latest.rake @@ -60,13 +60,8 @@ qdiv = q.css('div').first if(!qdiv.nil?) - qdivMouseover = qdiv.attr('onmouseover') - #=========== Set Answer ============= - answermatch = /ponse">(.*)<\/e/.match(qdivMouseover) - var_answer = answermatch.captures[0].to_s - - #puts var_answer - var_question = q.css('.clue_text').text() + var_question = q.css('.clue_text[1]').text() + var_answer = q.css('.correct_response').text() index = q.xpath('count(preceding-sibling::*)').to_i var_category = categoryArr[index] var_value = q.css('.clue_value').text[/[0-9\.]+/] From 22ecf27378fa809d31444b4db87b30db527987b0 Mon Sep 17 00:00:00 2001 From: Ian Alden Date: Tue, 30 Jan 2024 16:53:11 -0700 Subject: [PATCH 2/3] Restore Gemfile pre-PR --- Gemfile.lock | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 873fd3a..2c35a46 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,11 +100,8 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.8) - nokogiri (1.13.10-arm64-darwin) - racc (~> 1.4) nokogiri (1.13.10-x64-mingw-ucrt) racc (~> 1.4) - pg (1.4.5) pg (1.4.5-x64-mingw-ucrt) puma (6.0.0) nio4r (~> 2.0) @@ -155,7 +152,6 @@ GEM zeitwerk (2.6.6) PLATFORMS - arm64-darwin-23 x64-mingw-ucrt DEPENDENCIES From 912123b0572b13ec753858196e2b09b651ac7491 Mon Sep 17 00:00:00 2001 From: Ian Alden Date: Thu, 3 Apr 2025 11:30:24 -0600 Subject: [PATCH 3/3] Modernize for Ruby 3.4.1 and Rails 8.0.1 --- Gemfile | 4 +- Gemfile.lock | 271 +++++++++++++++++------------ config/application.rb | 3 - config/boot.rb | 2 +- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- config/environments/test.rb | 2 +- 7 files changed, 161 insertions(+), 125 deletions(-) diff --git a/Gemfile b/Gemfile index bddeb57..8bce4a2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -ruby "3.1.2" +ruby "3.4.1" -gem 'rails', '7.0.3.1' +gem 'rails', '8.0.1' gem 'rack-cors' #gem 'sprockets', '~>3.0' diff --git a/Gemfile.lock b/Gemfile.lock index 2c35a46..85e0eaa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,158 +1,197 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.3.1) - actionpack (= 7.0.3.1) - activesupport (= 7.0.3.1) + actioncable (8.0.1) + actionpack (= 8.0.1) + activesupport (= 8.0.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.3.1) - actionpack (= 7.0.3.1) - activejob (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.0.3.1) - actionpack (= 7.0.3.1) - actionview (= 7.0.3.1) - activejob (= 7.0.3.1) - activesupport (= 7.0.3.1) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.3.1) - actionview (= 7.0.3.1) - activesupport (= 7.0.3.1) - rack (~> 2.0, >= 2.2.0) + zeitwerk (~> 2.6) + actionmailbox (8.0.1) + actionpack (= 8.0.1) + activejob (= 8.0.1) + activerecord (= 8.0.1) + activestorage (= 8.0.1) + activesupport (= 8.0.1) + mail (>= 2.8.0) + actionmailer (8.0.1) + actionpack (= 8.0.1) + actionview (= 8.0.1) + activejob (= 8.0.1) + activesupport (= 8.0.1) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.0.1) + actionview (= 8.0.1) + activesupport (= 8.0.1) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.3.1) - actionpack (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.0.1) + actionpack (= 8.0.1) + activerecord (= 8.0.1) + activestorage (= 8.0.1) + activesupport (= 8.0.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.3.1) - activesupport (= 7.0.3.1) + actionview (8.0.1) + activesupport (= 8.0.1) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.3.1) - activesupport (= 7.0.3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.0.1) + activesupport (= 8.0.1) globalid (>= 0.3.6) - activemodel (7.0.3.1) - activesupport (= 7.0.3.1) - activerecord (7.0.3.1) - activemodel (= 7.0.3.1) - activesupport (= 7.0.3.1) - activestorage (7.0.3.1) - actionpack (= 7.0.3.1) - activejob (= 7.0.3.1) - activerecord (= 7.0.3.1) - activesupport (= 7.0.3.1) + activemodel (8.0.1) + activesupport (= 8.0.1) + activerecord (8.0.1) + activemodel (= 8.0.1) + activesupport (= 8.0.1) + timeout (>= 0.4.0) + activestorage (8.0.1) + actionpack (= 8.0.1) + activejob (= 8.0.1) + activerecord (= 8.0.1) + activesupport (= 8.0.1) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.3.1) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (8.0.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - builder (3.2.4) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.9) + builder (3.3.0) chronic (0.10.2) - concurrent-ruby (1.1.10) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) crass (1.0.6) - date (3.3.2) - erubi (1.11.0) + date (3.4.1) + drb (2.2.1) + erubi (1.13.1) figaro (1.2.0) thor (>= 0.14.0, < 2) - globalid (1.0.0) - activesupport (>= 5.0) - i18n (1.12.0) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.7) concurrent-ruby (~> 1.0) - loofah (2.19.1) + io-console (0.8.0) + irb (1.15.2) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + logger (1.7.0) + loofah (2.24.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.8.0) + nokogiri (>= 1.12.0) + mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) - method_source (1.0.0) - mini_mime (1.1.2) - minitest (5.16.3) - net-imap (0.3.2) + marcel (1.0.4) + mini_mime (1.1.5) + minitest (5.25.5) + net-imap (0.5.6) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.5.1) net-protocol - nio4r (2.5.8) - nokogiri (1.13.10-x64-mingw-ucrt) + nio4r (2.7.4) + nokogiri (1.18.7-arm64-darwin) racc (~> 1.4) - pg (1.4.5-x64-mingw-ucrt) - puma (6.0.0) + pg (1.5.9) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date + stringio + puma (6.6.0) nio4r (~> 2.0) - racc (1.6.1) - rack (2.2.4) - rack-attack (6.6.1) - rack (>= 1.0, < 3) - rack-cors (1.1.1) + racc (1.8.1) + rack (3.1.12) + rack-attack (6.7.0) + rack (>= 1.0, < 4) + rack-cors (2.0.2) rack (>= 2.0.0) - rack-test (2.0.2) + rack-session (2.1.0) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) rack (>= 1.3) - rails (7.0.3.1) - actioncable (= 7.0.3.1) - actionmailbox (= 7.0.3.1) - actionmailer (= 7.0.3.1) - actionpack (= 7.0.3.1) - actiontext (= 7.0.3.1) - actionview (= 7.0.3.1) - activejob (= 7.0.3.1) - activemodel (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + rackup (2.2.1) + rack (>= 3) + rails (8.0.1) + actioncable (= 8.0.1) + actionmailbox (= 8.0.1) + actionmailer (= 8.0.1) + actionpack (= 8.0.1) + actiontext (= 8.0.1) + actionview (= 8.0.1) + activejob (= 8.0.1) + activemodel (= 8.0.1) + activerecord (= 8.0.1) + activestorage (= 8.0.1) + activesupport (= 8.0.1) bundler (>= 1.15.0) - railties (= 7.0.3.1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 8.0.1) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.4.4) - loofah (~> 2.19, >= 2.19.1) - railties (7.0.3.1) - actionpack (= 7.0.3.1) - activesupport (= 7.0.3.1) - method_source + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (8.0.1) + actionpack (= 8.0.1) + activesupport (= 8.0.1) + irb (~> 1.13) + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) - rake (13.0.6) - thor (1.2.1) - timeout (0.3.1) - tzinfo (2.0.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.2.1) + rdoc (6.13.1) + psych (>= 4.0.0) + reline (0.6.0) + io-console (~> 0.5) + securerandom (0.4.1) + stringio (3.1.6) + thor (1.3.2) + timeout (0.4.3) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2022.7) + tzinfo-data (1.2025.2) tzinfo (>= 1.0.0) - websocket-driver (0.7.5) + uri (1.0.3) + useragent (0.16.11) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.6) + zeitwerk (2.7.2) PLATFORMS - x64-mingw-ucrt + arm64-darwin-24 DEPENDENCIES chronic @@ -162,11 +201,11 @@ DEPENDENCIES puma rack-attack rack-cors - rails (= 7.0.3.1) + rails (= 8.0.1) tzinfo-data RUBY VERSION - ruby 3.1.2p20 + ruby 3.4.1 BUNDLED WITH - 2.3.18 + 2.6.7 diff --git a/config/application.rb b/config/application.rb index 0331f9c..f3973a9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -36,9 +36,6 @@ class Application < Rails::Application # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de - #needed for rails 6.1+ - config.active_record.legacy_connection_handling = false - # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" diff --git a/config/boot.rb b/config/boot.rb index 4489e58..f2830ae 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -3,4 +3,4 @@ # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environments/development.rb b/config/environments/development.rb index 6f89fc6..5590759 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -34,7 +34,7 @@ # # Expands the lines which load the assets # config.assets.debug = true - # config.eager_load = false + config.eager_load = false diff --git a/config/environments/production.rb b/config/environments/production.rb index d01cfc5..62ef095 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -28,7 +28,7 @@ # # Generate digests for assets URLs # config.assets.digest = true - # config.eager_load = true; + config.eager_load = true; # config.assets.precompile = [/^[-_a-zA-Z0-9]*\..*/] diff --git a/config/environments/test.rb b/config/environments/test.rb index ae2df47..c3c2412 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -30,6 +30,6 @@ # Print deprecation notices to the stderr config.active_support.deprecation = :stderr - config.eager_load = true + config.eager_load = false end