From e224002a6973eb20a1664586771d9e9b93bea533 Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Mon, 6 Nov 2023 10:10:35 +0100 Subject: [PATCH] Update resque-scheduler for Ruby 3 support REDMINE-19438 --- README.md | 4 ++-- lib/generators/pageflow/resque/templates/resque.rake | 2 +- lib/generators/pageflow/resque/templates/resque.rb | 2 +- lib/generators/pageflow/routes/routes_generator.rb | 2 +- pageflow.gemspec | 2 +- spec/generators/pageflow/routes/routes_generator_spec.rb | 4 ++-- spec/support/pageflow-support.gemspec | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 89d54120cf..b5ebdced4a 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,8 @@ for details. # The install generator sets up Resque as Active Job backend gem 'resque', '~> 1.25' - gem 'resque-scheduler', '~> 2.5' - gem 'ar_after_transaction', '~> 0.5.0' + gem 'resque-scheduler', '~> 4.10' + gem 'ar_after_transaction', '~> 0.8.0' gem 'redis', '~> 3.0' gem 'redis-namespace', '~> 1.5' diff --git a/lib/generators/pageflow/resque/templates/resque.rake b/lib/generators/pageflow/resque/templates/resque.rake index 4b0b1d6744..0a50e3cb72 100644 --- a/lib/generators/pageflow/resque/templates/resque.rake +++ b/lib/generators/pageflow/resque/templates/resque.rake @@ -1,5 +1,5 @@ require 'resque/tasks' -require 'resque_scheduler/tasks' +require 'resque/scheduler/tasks' namespace :resque do # Tell resque to initialize the rails app in worker processes diff --git a/lib/generators/pageflow/resque/templates/resque.rb b/lib/generators/pageflow/resque/templates/resque.rb index b182095831..cd71373d2b 100644 --- a/lib/generators/pageflow/resque/templates/resque.rb +++ b/lib/generators/pageflow/resque/templates/resque.rb @@ -1,5 +1,5 @@ require 'resque' -require 'resque_scheduler' +require 'resque-scheduler' # Change to use your favorite method of configuration. Consider the # dotenv gem to setup your environment with a .env file. diff --git a/lib/generators/pageflow/routes/routes_generator.rb b/lib/generators/pageflow/routes/routes_generator.rb index bd0862e725..5509b7b7bd 100644 --- a/lib/generators/pageflow/routes/routes_generator.rb +++ b/lib/generators/pageflow/routes/routes_generator.rb @@ -18,7 +18,7 @@ def add_route end def require_resque_server - prepend_to_file 'config/routes.rb', "require 'resque/server'\nrequire 'resque_scheduler/server'\n\n" + prepend_to_file 'config/routes.rb', "require 'resque/server'\nrequire 'resque/scheduler/server'\n\n" end end end diff --git a/pageflow.gemspec b/pageflow.gemspec index 4a67b1b710..7c48ed3f72 100644 --- a/pageflow.gemspec +++ b/pageflow.gemspec @@ -172,7 +172,7 @@ Gem::Specification.new do |s| # Resque as default Active Job backend s.add_development_dependency 'resque', '~> 1.25' - s.add_development_dependency 'resque-scheduler', '~> 2.5' + s.add_development_dependency 'resque-scheduler', '~> 4.10' if Pageflow::RailsVersion.experimental? s.add_development_dependency 'ar_after_transaction', '~> 0.8.0' diff --git a/spec/generators/pageflow/routes/routes_generator_spec.rb b/spec/generators/pageflow/routes/routes_generator_spec.rb index 69e93907c7..97e010c260 100644 --- a/spec/generators/pageflow/routes/routes_generator_spec.rb +++ b/spec/generators/pageflow/routes/routes_generator_spec.rb @@ -32,10 +32,10 @@ module Generators expect(routes).to contain("require 'resque/server'") end - it 'requires resque_scheduler/server' do + it 'requires resque/scheduler/server' do run_generator - expect(routes).to contain("require 'resque_scheduler/server'") + expect(routes).to contain("require 'resque/scheduler/server'") end end end diff --git a/spec/support/pageflow-support.gemspec b/spec/support/pageflow-support.gemspec index a1d1a0bd4c..6314827083 100644 --- a/spec/support/pageflow-support.gemspec +++ b/spec/support/pageflow-support.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'bootsnap', '~> 1.0' s.add_runtime_dependency 'resque', '~> 1.25' - s.add_runtime_dependency 'resque-scheduler', '~> 2.5' + s.add_runtime_dependency 'resque-scheduler', '~> 4.10' if Pageflow::RailsVersion.experimental? s.add_runtime_dependency 'ar_after_transaction', '~> 0.8.0'