mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
polish
This commit is contained in:
parent
df002c1576
commit
e4d09527c4
3 changed files with 6 additions and 1 deletions
|
@ -233,7 +233,6 @@ module Sidekiq
|
|||
require File.expand_path("#{options[:require]}/config/environment.rb")
|
||||
|
||||
if ::Rails::VERSION::MAJOR > 4 && ::Rails.env.development?
|
||||
logger.debug "Enabling Rails 5+ code reloading, so hot!"
|
||||
Sidekiq.options[:reloader] = Sidekiq::Rails::Reloader.new
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,6 +37,7 @@ module Sidekiq
|
|||
|
||||
class Reloader
|
||||
def initialize(app = ::Rails.application)
|
||||
Sidekiq.logger.debug "Enabling Rails 5+ development code reloading, so hot!"
|
||||
@app = app
|
||||
end
|
||||
|
||||
|
@ -45,6 +46,10 @@ module Sidekiq
|
|||
yield
|
||||
end
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<Sidekiq::Rails::Reloader @app=#{@app.class.name}>"
|
||||
end
|
||||
end
|
||||
end if defined?(::Rails)
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'pry'
|
||||
gem 'sidekiq', :path => '..'
|
||||
gem 'rails', '5.0.0.beta4'
|
||||
gem 'rack', '2.0.0.alpha'
|
||||
|
|
Loading…
Add table
Reference in a new issue