Skip to content

Commit

Permalink
Upgrade Rails to v7.1 & update gems (mostly only minor versions) (#609)
Browse files Browse the repository at this point in the history
* Upgrade Rails to v7.1 and run `bundle update`

See the upgrade guide here:
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html

* Use older version of `html-parser` for `thredded`

See thredded/thredded#979

* Use new `config.autoload_lib` in Rails 7.1

See https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#config-autoload-lib-and-config-autoload-lib-once

Eager loading is on by default for production.

* Remove unused app environment variables usage

The file `config/app_environment_variables.rb` does not exist in our
codebase anymore.

* Run `bin/rails app:update` to update configurations

* Add new framework defaults for Rails 7.1 file

* Update `listen` gem version

This was done because `bin/rails app:update` failed with:
** Execute app:update:active_storage
       rails  active_storage:update
bin/rails aborted!
Gem::LoadError: can't activate listen (~> 3.5), already activated listen-3.0.8.
Make sure all dependencies are added to Gemfile.

* Add TODO note for upcoming serialize change

* Reduce new framework defaults list

* Add migrations introduced by rails update task

* Remove unneeded ActiveStorage migrations

* Remove defaults for sha-256 as we are unaffected

* Use new Rails 7.1 defaults

* Fix TODO rubocop warning

* Update bundler version to 2.5.9

You can do so locally via `bundle update --bundler`

* Remove unnecessary entries in `Gemfile.lock`

Performed automatically via `bundle install`.

* Address `Passing the coder as positional arg` deprecation

This is a followup to rails/rails#47463

* add yaml coder explicitly for serializing arrays

* Migrate from globalize to mobility due to serialization warnings

* Update gem lockfile to include `mobility`

`bundle install` also removed globalize automatically for us.

* Add `I18nLocaleAccessors` as replacement for `globalize_attribute_names`

* Remove obsolete comment regarding `globalize`

* Fix Rails `secrets` deprecation warning (Devise)

This is due to heartcombo/devise#5644.

* Use `install_folder` in cypress on rails

`cypress_folder` is deprecated as config option

---------

Co-authored-by: fosterfarrell9 <[email protected]>
  • Loading branch information
Splines and fosterfarrell9 authored Apr 26, 2024
1 parent 2497d48 commit e41797f
Show file tree
Hide file tree
Showing 31 changed files with 470 additions and 372 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ coverage
/public/uploads

# Ignore environment variables
/config/app_environment_variables.rb
completed_initial_run
/public/uploads.zip
/public/pdfcomprezzor/pdfcomprezzor.wasm
Expand Down
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.1.4"

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem "rails", "~> 7.0.4.3"
gem "rails", "~> 7.1.3"
# Use dalli for caching to memcached in production
gem "dalli", ">= 2.7"
# Ruby wrapper for UglifyJS JavaScript compressor
Expand Down Expand Up @@ -70,14 +70,14 @@ gem "erubis"
gem "exception_handler", "~> 0.8.0.0"
gem "faraday", "~> 1.8"
gem "fuzzy-string-match"
gem "globalize"
gem "globalize-accessors"
gem "html-pipeline", "~> 2.14"
gem "jquery-rails"
gem "jquery-ui-rails"
gem "js-routes", "1.4.9"
gem "kaminari"
gem "kaminari-i18n"
gem "kramdown-parser-gfm"
gem "mobility"
gem "net-smtp"
gem "pg"
gem "premailer-rails"
Expand All @@ -104,9 +104,9 @@ gem "trix-rails", require: "trix"
gem "webpacker", "~> 5.x"

group :development, :docker_development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem "listen", ">= 3.0.5", "< 3.2"
gem "listen", "~> 3.9"
gem "rails-erd"
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem "web-console", ">= 3.3.0"
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem "marcel"
Expand Down
Loading

0 comments on commit e41797f

Please sign in to comment.