lib/sidekiq/cron/web.rb in sidekiq-cron-2.0.0.rc1 vs lib/sidekiq/cron/web.rb in sidekiq-cron-2.0.0.rc2

- old
+ new

@@ -1,7 +1,17 @@ require "sidekiq/cron/web_extension" require "sidekiq/cron/job" +require "sidekiq/cron/namespace" if defined?(Sidekiq::Web) - Sidekiq::Web.register Sidekiq::Cron::WebExtension - Sidekiq::Web.tabs["Cron"] = "cron" + if Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new('7.3.0') + Sidekiq::Web.register( + Sidekiq::Cron::WebExtension, # Class which contains the HTTP actions, required + name: "cron", # the name of the extension, used to namespace assets + tab: "Cron", # labels(s) of the UI tabs + index: "cron", # index route(s) for each tab + ) + else + Sidekiq::Web.register Sidekiq::Cron::WebExtension + Sidekiq::Web.tabs["Cron"] = "cron" + end end