diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30db51a0..32956b2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,15 +26,11 @@ jobs: fail-fast: false matrix: ruby-version: - - 3.2 - 3.3 - 3.4 - 4.0 database: [ mysql, postgres, sqlite ] - gemfile: [ rails_7_1, rails_7_2, rails_8_0, rails_8_1, rails_main ] - exclude: - - ruby-version: "3.2" - gemfile: rails_main + gemfile: [ rails_8_0, rails_8_1, rails_main ] services: mysql: image: mysql:8.0.31 diff --git a/Appraisals b/Appraisals index 303c1cc7..9d4398f5 100644 --- a/Appraisals +++ b/Appraisals @@ -1,13 +1,5 @@ # frozen_string_literal: true -appraise "rails-7-1" do - gem "railties", "~> 7.1.0" -end - -appraise "rails-7-2" do - gem "railties", "~> 7.2.0" -end - appraise "rails-8-0" do gem "railties", "~> 8.0.0" end diff --git a/Gemfile.lock b/Gemfile.lock index 20ce2779..905f0d13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,61 +2,60 @@ PATH remote: . specs: solid_queue (1.5.0) - activejob (>= 7.1) - activerecord (>= 7.1) + activejob (>= 8.0) + activerecord (>= 8.0) concurrent-ruby (>= 1.3.1) fugit (~> 1.11) - railties (>= 7.1) + railties (>= 8.0) thor (>= 1.3.1) GEM remote: https://rubygems.org/ specs: - actionpack (7.1.5.2) - actionview (= 7.1.5.2) - activesupport (= 7.1.5.2) + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) nokogiri (>= 1.8.5) - racc rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actionview (7.1.5.2) - activesupport (= 7.1.5.2) + useragent (~> 0.16) + actionview (8.1.3) + activesupport (= 8.1.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.5.2) - activesupport (= 7.1.5.2) + activejob (8.1.3) + activesupport (= 8.1.3) globalid (>= 0.3.6) - activemodel (7.1.5.2) - activesupport (= 7.1.5.2) - activerecord (7.1.5.2) - activemodel (= 7.1.5.2) - activesupport (= 7.1.5.2) + activemodel (8.1.3) + activesupport (= 8.1.3) + activerecord (8.1.3) + activemodel (= 8.1.3) + activesupport (= 8.1.3) timeout (>= 0.4.0) - activesupport (7.1.5.2) + activesupport (8.1.3) base64 - benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) - mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) appraisal (2.5.0) bundler rake thor (>= 0.14.0) ast (2.4.2) base64 (0.3.0) - benchmark (0.4.1) bigdecimal (3.3.1) builder (3.3.0) concurrent-ruby (1.3.5) @@ -90,7 +89,6 @@ GEM minitest (5.26.0) mocha (2.1.0) ruby2_keywords (>= 0.0.5) - mutex_m (0.3.0) mysql2 (0.5.6) nio4r (2.7.4) nokogiri (1.18.9-aarch64-linux-gnu) @@ -128,13 +126,14 @@ GEM 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 (7.1.5.2) - actionpack (= 7.1.5.2) - activesupport (= 7.1.5.2) - irb + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) @@ -181,11 +180,14 @@ GEM stringio (3.1.2) thor (1.3.2) timeout (0.4.3) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.3) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) + uri (1.1.1) + useragent (0.16.11) zeitwerk (2.6.0) PLATFORMS diff --git a/README.md b/README.md index 02614847..6f6e7c70 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,12 @@ Solid Queue can be used with SQL databases such as MySQL, PostgreSQL, or SQLite, ## Installation -Solid Queue is configured by default in new Rails 8 applications. If you're running an earlier version, you can add it manually following these steps: +Solid Queue is configured by default in new Rails 8 applications. If your application doesn't have it configured (for example, because it was created on an earlier version of Rails), you can add it manually following these steps: 1. `bundle add solid_queue` 2. `bin/rails solid_queue:install` -(Note: The minimum supported version of Rails is 7.1 and Ruby is 3.2.) +(Note: The minimum supported version of Rails is 8.0 and Ruby is 3.3.) This will configure Solid Queue as the production Active Job backend, create the configuration files `config/queue.yml` and `config/recurring.yml`, and create the `db/queue_schema.rb`. It'll also create a `bin/jobs` executable wrapper that you can use to start Solid Queue. diff --git a/UPGRADING.md b/UPGRADING.md index 544a6482..6c8198cf 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -1,3 +1,6 @@ +# Upgrading to version 2.0.x +Ruby 3.2 and Rails 7.1 and 7.2 are no longer supported, as they have all reached end-of-life. Solid Queue now requires Ruby 3.3 and Rails 8.0 or newer. If you're on older versions, Bundler will continue to resolve solid_queue 1.5.x for you, but you won't receive any new versions until you upgrade. + # Upgrading to version 1.5.x Ruby 3.1 is no longer supported, as it reached end-of-life in March 2025. Solid Queue now requires Ruby 3.2 or newer. If you're still on Ruby 3.1, Bundler will continue to resolve solid_queue 1.4.x for you, but you won't receive any new versions until you upgrade Ruby. diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile deleted file mode 100644 index 036d9836..00000000 --- a/gemfiles/rails_7_1.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "railties", "~> 7.1.0" - -gemspec path: "../" diff --git a/gemfiles/rails_7_2.gemfile b/gemfiles/rails_7_2.gemfile deleted file mode 100644 index 23b503f0..00000000 --- a/gemfiles/rails_7_2.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "railties", "~> 7.2.0" - -gemspec path: "../" diff --git a/lib/active_job/queue_adapters/solid_queue_adapter.rb b/lib/active_job/queue_adapters/solid_queue_adapter.rb index f7e23a1c..2eee3fe9 100644 --- a/lib/active_job/queue_adapters/solid_queue_adapter.rb +++ b/lib/active_job/queue_adapters/solid_queue_adapter.rb @@ -7,7 +7,7 @@ module QueueAdapters # To use it set the queue_adapter config to +:solid_queue+. # # Rails.application.config.active_job.queue_adapter = :solid_queue - class SolidQueueAdapter < (Rails::VERSION::MAJOR == 7 && Rails::VERSION::MINOR == 1 ? Object : AbstractAdapter) + class SolidQueueAdapter < AbstractAdapter class_attribute :stopping, default: false, instance_writer: false, instance_predicate: false SolidQueue.on_worker_stop { self.stopping = true } diff --git a/solid_queue.gemspec b/solid_queue.gemspec index 425a5adc..36148084 100644 --- a/solid_queue.gemspec +++ b/solid_queue.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |spec| Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "README.md", "UPGRADING.md"] end - spec.required_ruby_version = '>= 3.2' + spec.required_ruby_version = '>= 3.3' - rails_version = ">= 7.1" + rails_version = ">= 8.0" spec.add_dependency "activerecord", rails_version spec.add_dependency "activejob", rails_version spec.add_dependency "railties", rails_version