From b63a8571524e1e505c93c97c2bdb1c352f845064 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Mon, 17 Oct 2016 11:16:26 -0700 Subject: [PATCH] class attributes must inherit or we break Pro UI extensions --- Changes.md | 3 +++ lib/sidekiq/web.rb | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Changes.md b/Changes.md index e572460e..ffecd698 100644 --- a/Changes.md +++ b/Changes.md @@ -5,6 +5,9 @@ HEAD - Allow disabling of Sidekiq::Web's cookie session to handle the case where the app provides a session already [#3180] +```ruby +Sidekiq::Web.set :sessions, false +``` - Fix Web UI sharding support broken in 4.2.2. [#3169] - Relax rack-protection version to >= 1.5.0 diff --git a/lib/sidekiq/web.rb b/lib/sidekiq/web.rb index 2011abdd..aae1ccce 100644 --- a/lib/sidekiq/web.rb +++ b/lib/sidekiq/web.rb @@ -80,6 +80,13 @@ module Sidekiq attr_writer :locales, :views end + def self.inherited(child) + child.app_url = self.app_url + child.session_secret = self.session_secret + child.redis_pool = self.redis_pool + child.sessions = self.sessions + end + def settings self.class.settings end