Skip to content

Commit

Permalink
Remove support for Rails 6.1. 6.1 is now EOL.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewn617 authored and etiennebarrie committed Jan 22, 2025
1 parent c95d481 commit 81cf45a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 53 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
gemfile:
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
- gemfiles/rails_7_2.gemfile
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "debug"
gem "mocha"
gem "puma"
if !@rails_gem_requirement
gem "rails", ">= 6.1"
gem "rails", ">= 7.0"
ruby ">= 3.2.0"
else
# causes Dependabot to ignore the next line and update the previous gem "rails"
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ PATH
remote: .
specs:
maintenance_tasks (2.10.1)
actionpack (>= 6.1)
activejob (>= 6.1)
activerecord (>= 6.1)
actionpack (>= 7.0)
activejob (>= 7.0)
activerecord (>= 7.0)
csv
job-iteration (>= 1.3.6)
railties (>= 6.1)
railties (>= 7.0)
zeitwerk (>= 2.6.2)

GEM
Expand Down Expand Up @@ -287,7 +287,7 @@ DEPENDENCIES
maintenance_tasks!
mocha
puma
rails (>= 6.1)
rails (>= 7.0)
rubocop
rubocop-shopify
selenium-webdriver
Expand Down
6 changes: 1 addition & 5 deletions app/models/maintenance_tasks/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ class Run < ApplicationRecord
]
COMPLETED_STATUSES = [:succeeded, :errored, :cancelled]

if Rails.gem_version >= Gem::Version.new("7.0.alpha")
enum :status, STATUSES.to_h { |status| [status, status.to_s] }
else
enum status: STATUSES.to_h { |status| [status, status.to_s] }
end
enum :status, STATUSES.to_h { |status| [status, status.to_s] }

after_save :instrument_status_change

Expand Down
6 changes: 0 additions & 6 deletions gemfiles/rails_6_1.gemfile

This file was deleted.

2 changes: 0 additions & 2 deletions lib/maintenance_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
require "job-iteration"
require "maintenance_tasks/engine"

require "patches/active_record_batch_enumerator"

# The engine's namespace module. It provides isolation between the host
# application's code and the engine-specific code. Top-level engine constants
# and variables are defined under this module.
Expand Down
24 changes: 0 additions & 24 deletions lib/patches/active_record_batch_enumerator.rb

This file was deleted.

2 changes: 1 addition & 1 deletion maintenance_tasks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = ["maintenance_tasks"]

minimum_rails_version = "6.1"
minimum_rails_version = "7.0"
spec.add_dependency("actionpack", ">= #{minimum_rails_version}")
spec.add_dependency("activejob", ">= #{minimum_rails_version}")
spec.add_dependency("activerecord", ">= #{minimum_rails_version}")
Expand Down
9 changes: 1 addition & 8 deletions test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@
# warning in Ruby 2.7.
Capybara::Selenium::Driver.load_selenium

if Rails::VERSION::MAJOR < 7
Selenium::WebDriver.logger.ignore(:browser_options)
if Rails::VERSION::MINOR < 1
require "action_dispatch/system_testing/browser"
# prevent Rails from adding --headless at the end of the arguments, overriding --headless=new
ActionDispatch::SystemTesting::Browser.redefine_method(:options) { capabilities }
end
elsif Rails.gem_version < Gem::Version.new("7.1")
if Rails.gem_version < Gem::Version.new("7.1")
Selenium::WebDriver.logger.ignore(:capabilities)
end

Expand Down

0 comments on commit 81cf45a

Please sign in to comment.