lib/memolog/init.rb in memolog-0.3.4 vs lib/memolog/init.rb in memolog-0.3.5

- old
+ new

@@ -8,18 +8,18 @@ init_sidekiq_middleware! end def init_rails_middleware! return unless Memolog.config.middlewares.include?(:rails) - return unless Object.const_defined?("Rails") - return if Object.const_defined?("Sidekiq") && Sidekiq.server? + return unless Object.const_defined?(:Rails) + return if Object.const_defined?(:Sidekiq) && Sidekiq.server? Rails.application.middleware.insert_before(0, Memolog::RailsMiddleware) end def init_sidekiq_middleware! return unless Memolog.config.middlewares.include?(:sidekiq) - return unless Object.const_defined?("Sidekiq") + return unless Object.const_defined?(:Sidekiq) Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.prepend(Memolog::SidekiqMiddleware) end