Skip to content

Commit

Permalink
Update resque-scheduler for Ruby 3 support
Browse files Browse the repository at this point in the history
REDMINE-19438
  • Loading branch information
tf committed Nov 6, 2023
1 parent f08a9ff commit e224002
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/pageflow/resque/templates/resque.rake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/pageflow/resque/templates/resque.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/pageflow/routes/routes_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pageflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions spec/generators/pageflow/routes/routes_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/support/pageflow-support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e224002

Please sign in to comment.