From 7f26a8202556db3a584f1360950a671d2a60a1ea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 25 Jun 2026 17:49:34 +0200 Subject: Upgrade to Rails 5.2.8.1 on Ruby 2.5.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump rails 4.2.11.3 → 5.2.8.1, ruby 2.4.10 → 2.5.8 - Upgrade acts-as-taggable-on ~> 3.5 → ~> 6.0 - Upgrade exception_notification ~> 4.4 → ~> 4.5 - Upgrade globalize ~> 5.0 → ~> 5.2.0 - Upgrade pg ~> 0.17 → ~> 1.0 - Upgrade sass-rails ~> 4.0 → ~> 5.0 - Upgrade libxml-ruby to ~> 3.2 (5.x requires Ruby 3.2+) - Pin awesome_nested_set ~> 3.4.0 (3.9 has lft/rgt update bug) - Add rails-controller-testing gem - Add assets initializer for jquery precompile - Add acts_as_taggable missing indexes migration - Set eager_load, serve_static_files, active_record settings --- .bundle/config | 2 + .ruby-gemset | 2 +- .ruby-version | 2 +- Gemfile | 17 +- Gemfile.lock | 246 ++++++++++++--------- config/environments/test.rb | 3 +- config/initializers/assets.rb | 1 + ...dexes_on_taggings.acts_as_taggable_on_engine.rb | 23 ++ 8 files changed, 185 insertions(+), 111 deletions(-) create mode 100644 .bundle/config create mode 100644 config/initializers/assets.rb create mode 100644 db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 0000000..71be015 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,2 @@ +--- +BUNDLE_BUNDLER_VERSION: "2.3.27" diff --git a/.ruby-gemset b/.ruby-gemset index c100f88..48fed33 100644 --- a/.ruby-gemset +++ b/.ruby-gemset @@ -1 +1 @@ -rails3-upgrade +rails5-upgrade diff --git a/.ruby-version b/.ruby-version index 5304f06..56b1397 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.4.10 +ruby-2.5.8 diff --git a/Gemfile b/Gemfile index f00395b..b43b986 100644 --- a/Gemfile +++ b/Gemfile @@ -1,18 +1,18 @@ source 'https://rubygems.org' -gem 'rails', '4.2.11.3' +gem 'rails', '5.2.8.1' -gem 'pg', '~> 0.17.0' +gem 'pg', '~> 1.0' -gem 'acts-as-taggable-on', '~> 3.5' -gem 'awesome_nested_set', '~> 3.1' +gem 'acts-as-taggable-on', '~> 6.0' +gem 'awesome_nested_set', '~> 3.4.0' gem 'acts_as_list' -gem 'globalize', '~> 5.0' +gem 'globalize', '~> 5.2.0' gem 'routing-filter', '~> 0.6' gem 'paperclip', '~> 3.5' gem 'will_paginate', '~> 3.0' -gem 'exception_notification' -gem 'libxml-ruby', :require => 'xml' +gem 'exception_notification', '~> 4.5' +gem 'libxml-ruby', '~> 3.2', :require => 'xml' gem 'nokogiri', '~> 1.10.10' gem 'loofah', '~> 2.20.0' @@ -22,13 +22,14 @@ gem 'jquery-rails' gem 'unicorn', '~> 1.1' group :assets do - gem 'sass-rails', '~> 4.0' + gem 'sass-rails', '~> 5.0' gem 'coffee-rails', '~> 4.0' gem 'uglifier', '>= 1.0.3' end group :test do gem 'test-unit', '~> 3.5' + gem 'rails-controller-testing' end gem 'chaos_calendar', :git => 'https://github.com/erdgeist/chaoscalendar.git', diff --git a/Gemfile.lock b/Gemfile.lock index 6350f67..74b71e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/erdgeist/chaoscalendar.git - revision: a1a84e0a1b05f2b64ea7fefb5fa159fccf43abce + revision: 0a46bdf537e691f06e8e486e035866682f77f511 branch: erdgeist-ruby1.9 specs: chaos_calendar (0.1.3) @@ -8,47 +8,55 @@ GIT GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.11.3) - actionpack (= 4.2.11.3) - actionview (= 4.2.11.3) - activejob (= 4.2.11.3) + actioncable (5.2.8.1) + actionpack (= 5.2.8.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.8.1) + actionpack (= 5.2.8.1) + actionview (= 5.2.8.1) + activejob (= 5.2.8.1) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.11.3) - actionview (= 4.2.11.3) - activesupport (= 4.2.11.3) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) + actionpack (5.2.8.1) + actionview (= 5.2.8.1) + activesupport (= 5.2.8.1) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.11.3) - activesupport (= 4.2.11.3) + actionview (5.2.8.1) + activesupport (= 5.2.8.1) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (4.2.11.3) - activesupport (= 4.2.11.3) - globalid (>= 0.3.0) - activemodel (4.2.11.3) - activesupport (= 4.2.11.3) - builder (~> 3.1) - activerecord (4.2.11.3) - activemodel (= 4.2.11.3) - activesupport (= 4.2.11.3) - arel (~> 6.0) - activesupport (4.2.11.3) - i18n (~> 0.7) + activejob (5.2.8.1) + activesupport (= 5.2.8.1) + globalid (>= 0.3.6) + activemodel (5.2.8.1) + activesupport (= 5.2.8.1) + activerecord (5.2.8.1) + activemodel (= 5.2.8.1) + activesupport (= 5.2.8.1) + arel (>= 9.0) + activestorage (5.2.8.1) + actionpack (= 5.2.8.1) + activerecord (= 5.2.8.1) + marcel (~> 1.0.0) + activesupport (5.2.8.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) + acts-as-taggable-on (6.5.0) + activerecord (>= 5.0, < 6.1) acts_as_list (1.1.0) activerecord (>= 4.2) - arel (6.0.4) - awesome_nested_set (3.9.0) - activerecord (>= 4.0.0, < 8.2) + arel (9.0.0) + awesome_nested_set (3.4.0) + activerecord (>= 4.0.0, < 7.0) + base64 (0.3.0) builder (3.3.0) climate_control (0.2.0) cocaine (0.5.8) @@ -62,31 +70,39 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.3.7) crass (1.0.6) - erubis (2.7.0) - exception_notification (4.4.3) - actionmailer (>= 4.0, < 7) - activesupport (>= 4.0, < 7) - execjs (2.9.0) - globalid (0.4.2) - activesupport (>= 4.2.0) - globalize (5.3.1) - activemodel (>= 4.2, < 6.1) - activerecord (>= 4.2, < 6.1) + digest (3.2.1) + erubi (1.13.1) + exception_notification (4.6.0) + actionmailer (>= 5.2, < 9) + activesupport (>= 5.2, < 9) + execjs (2.10.1) + ffi (1.17.4) + globalid (1.1.0) + activesupport (>= 5.0) + globalize (5.2.0) + activemodel (>= 4.2, < 5.3) + activerecord (>= 4.2, < 5.3) request_store (~> 1.0) - hike (1.2.3) - i18n (0.9.5) + i18n (1.14.8) concurrent-ruby (~> 1.0) + io-wait (0.3.1) jquery-rails (4.6.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - libxml-ruby (3.1.0) - logger (1.5.3) + libxml-ruby (3.2.4) + logger (1.7.0) loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + method_source (1.1.0) mime-types (3.7.0) logger mime-types-data (~> 3.2025, >= 3.2025.0507) @@ -94,7 +110,20 @@ GEM mini_mime (1.1.2) mini_portile2 (2.4.0) minitest (5.15.0) - multi_json (1.15.0) + net-imap (0.2.2) + digest + net-protocol + strscan + net-pop (0.1.2) + net-protocol + net-protocol (0.1.2) + io-wait + timeout + net-smtp (0.3.0) + digest + net-protocol + timeout + nio4r (2.7.3) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) paperclip (3.5.4) @@ -102,94 +131,113 @@ GEM activesupport (>= 3.0.0) cocaine (~> 0.5.3) mime-types - pg (0.17.1) + pg (1.5.9) power_assert (3.0.1) - rack (1.6.13) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.11.3) - actionmailer (= 4.2.11.3) - actionpack (= 4.2.11.3) - actionview (= 4.2.11.3) - activejob (= 4.2.11.3) - activemodel (= 4.2.11.3) - activerecord (= 4.2.11.3) - activesupport (= 4.2.11.3) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.11.3) - sprockets-rails - rails-deprecated_sanitizer (1.0.4) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.9) - activesupport (>= 4.2.0, < 5.0) - nokogiri (~> 1.6) - rails-deprecated_sanitizer (>= 1.0.1) + rack (2.2.23) + rack-test (2.2.0) + rack (>= 1.3) + rails (5.2.8.1) + actioncable (= 5.2.8.1) + actionmailer (= 5.2.8.1) + actionpack (= 5.2.8.1) + actionview (= 5.2.8.1) + activejob (= 5.2.8.1) + activemodel (= 5.2.8.1) + activerecord (= 5.2.8.1) + activestorage (= 5.2.8.1) + activesupport (= 5.2.8.1) + bundler (>= 1.3.0) + railties (= 5.2.8.1) + sprockets-rails (>= 2.0.0) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) rails-html-sanitizer (1.4.4) loofah (~> 2.19, >= 2.19.1) - railties (4.2.11.3) - actionpack (= 4.2.11.3) - activesupport (= 4.2.11.3) + railties (5.2.8.1) + actionpack (= 5.2.8.1) + activesupport (= 5.2.8.1) + method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) + thor (>= 0.19.0, < 2.0) rake (13.4.2) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) request_store (1.7.0) rack (>= 1.4) routing-filter (0.6.3) actionpack (>= 4.2) activesupport (>= 4.2) - sass (3.2.19) - sass-rails (4.0.5) - railties (>= 4.0.0, < 5.0) - sass (~> 3.2.2) - sprockets (~> 2.8, < 3.0) - sprockets-rails (~> 2.0) - sprockets (2.12.5) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.1.0) + railties (>= 5.2.0) + sass (~> 3.1) sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sprockets (3.7.5) + base64 + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + strscan (3.1.8) test-unit (3.7.8) power_assert thor (1.2.2) thread_safe (0.3.6) - tilt (1.4.1) + tilt (2.7.0) + timeout (0.4.0) tzinfo (1.2.11) thread_safe (~> 0.1) uglifier (4.2.1) execjs (>= 0.3.0, < 3) unicorn (1.1.7) rack + websocket-driver (0.8.2) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) will_paginate (3.3.1) PLATFORMS ruby DEPENDENCIES - acts-as-taggable-on (~> 3.5) + acts-as-taggable-on (~> 6.0) acts_as_list - awesome_nested_set (~> 3.1) + awesome_nested_set (~> 3.4.0) chaos_calendar! coffee-rails (~> 4.0) - exception_notification - globalize (~> 5.0) + exception_notification (~> 4.5) + globalize (~> 5.2.0) jquery-rails - libxml-ruby + libxml-ruby (~> 3.2) loofah (~> 2.20.0) nokogiri (~> 1.10.10) paperclip (~> 3.5) - pg (~> 0.17.0) - rails (= 4.2.11.3) + pg (~> 1.0) + rails (= 5.2.8.1) + rails-controller-testing rails-html-sanitizer (~> 1.4.4) routing-filter (~> 0.6) - sass-rails (~> 4.0) + sass-rails (~> 5.0) test-unit (~> 3.5) uglifier (>= 1.0.3) unicorn (~> 1.1) will_paginate (~> 3.0) BUNDLED WITH - 1.17.3 + 2.3.27 diff --git a/config/environments/test.rb b/config/environments/test.rb index 3b2413e..858bebb 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -15,9 +15,8 @@ Cccms::Application.configure do config.active_support.deprecation = :log config.active_support.test_order = :sorted - config.active_record.raise_in_transactional_callbacks = true - config.eager_load = false config.serve_static_files = true config.static_cache_control = "public, max-age=3600" + config.assets.compile = true end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 0000000..938e89d --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1 @@ +Rails.application.config.assets.precompile += %w( jquery.js jquery_ujs.js ) diff --git a/db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb b/db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb new file mode 100644 index 0000000..7c39589 --- /dev/null +++ b/db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb @@ -0,0 +1,23 @@ +# This migration comes from acts_as_taggable_on_engine (originally 6) +if ActiveRecord.gem_version >= Gem::Version.new('5.0') + class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end +else + class AddMissingIndexesOnTaggings < ActiveRecord::Migration; end +end +AddMissingIndexesOnTaggings.class_eval do + def change + add_index ActsAsTaggableOn.taggings_table, :tag_id unless index_exists? ActsAsTaggableOn.taggings_table, :tag_id + add_index ActsAsTaggableOn.taggings_table, :taggable_id unless index_exists? ActsAsTaggableOn.taggings_table, :taggable_id + add_index ActsAsTaggableOn.taggings_table, :taggable_type unless index_exists? ActsAsTaggableOn.taggings_table, :taggable_type + add_index ActsAsTaggableOn.taggings_table, :tagger_id unless index_exists? ActsAsTaggableOn.taggings_table, :tagger_id + add_index ActsAsTaggableOn.taggings_table, :context unless index_exists? ActsAsTaggableOn.taggings_table, :context + + unless index_exists? ActsAsTaggableOn.taggings_table, [:tagger_id, :tagger_type] + add_index ActsAsTaggableOn.taggings_table, [:tagger_id, :tagger_type] + end + + unless index_exists? ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' + add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' + end + end +end -- cgit v1.3