Skip to content

Commit

Permalink
Drop support for Rails 5.x (#2201)
Browse files Browse the repository at this point in the history
Rails 5.0 and 5.1 already reached end-of-life, and 5.2 will reach it
next week. Time to drop support for them.

Additionally, removed gemfiles/sass_3_4.gemfile, which was a
leftover from #1197

https://guides.rubyonrails.org/maintenance_policy.html#severe-security-issues
#1197
  • Loading branch information
pablobm authored Aug 8, 2022
1 parent ba1861e commit 7b3c6ac
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 257 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ jobs:
- shared_steps
# Run the tests against the versions of Rails that support Ruby 2.7
- run: bundle exec appraisal install
- run: bundle exec appraisal rails50 rspec
- run: bundle exec appraisal rails51 rspec
- run: bundle exec appraisal rails52 rspec
- run: bundle exec appraisal rails60 rspec
- run: bundle exec appraisal rails61 rspec
- run: bundle exec appraisal rails70 rspec
Expand Down
32 changes: 0 additions & 32 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
appraise "rails50" do
gem "actionpack", "~> 5.0.0"
gem "actionview", "~> 5.0.0"
gem "activerecord", "~> 5.0.0"
gem "pg", "0.21.0"

group :development, :test do
gem "rspec-rails"
end
end

appraise "rails51" do
gem "actionpack", "~> 5.1.0"
gem "actionview", "~> 5.1.0"
gem "activerecord", "~> 5.1.0"
gem "pg", "0.21.0"

group :development, :test do
gem "rspec-rails"
end
end

appraise "rails52" do
gem "actionpack", "~> 5.2.0"
gem "actionview", "~> 5.2.0"
gem "activerecord", "~> 5.2.0"

group :development, :test do
gem "rspec-rails"
end
end

appraise "rails60" do
gem "rails", "~> 6.0.3.4"
end
Expand Down
6 changes: 1 addition & 5 deletions app/helpers/administrate/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ module ApplicationHelper
SINGULAR_COUNT = 1

def application_title
if Rails::VERSION::MAJOR <= 5
Rails.application.class.parent_name.titlecase
else
Rails.application.class.module_parent_name.titlecase
end
Rails.application.class.module_parent_name.titlecase
end

def render_field(field, locals = {})
Expand Down
52 changes: 0 additions & 52 deletions gemfiles/rails50.gemfile

This file was deleted.

52 changes: 0 additions & 52 deletions gemfiles/rails51.gemfile

This file was deleted.

52 changes: 0 additions & 52 deletions gemfiles/rails52.gemfile

This file was deleted.

47 changes: 0 additions & 47 deletions gemfiles/sass_3_4.gemfile

This file was deleted.

10 changes: 1 addition & 9 deletions spec/example_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ class Application < Rails::Application
end

config.action_controller.action_on_unpermitted_parameters = :raise

if Rails::VERSION::MAJOR < 5
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
end

if Rails::VERSION::MAJOR >= 5
config.active_record.time_zone_aware_types = %i(datetime time)
end
config.active_record.time_zone_aware_types = %i(datetime time)

# Opt-out of FLoC: https://amifloced.org/
config.action_dispatch.
Expand Down
5 changes: 0 additions & 5 deletions spec/example_app/config/initializers/disable_xml_params.rb

This file was deleted.

0 comments on commit 7b3c6ac

Please sign in to comment.