magick-feature-flags 0.9.31 → 0.9.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/magick/admin_ui/engine.rb +8 -11
- data/lib/magick/config.rb +2 -0
- data/lib/magick/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5a00b216a8309fb592dd86b9ac4ec11c6cd958790864833ac7a023e06f26517
|
|
4
|
+
data.tar.gz: 0c6178010b7a588386fce54e089f43d630968bb41376ce94a4665383be183853
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 974ca2a2cafe3a28fbb6bbe7416eb54b668a4923b3c500bba2b7772c4d70286283a3b49852042a037289ed2e6114debdd88a67436c0df527a4969ed545997ea3
|
|
7
|
+
data.tar.gz: df5455d68e3d95581c48717e09021618a19d5e3b6e323a4fe25515191e67fcd1c92a7a8f69e2db2b55043dd90c6cf7b1fb0a038e258af3aac7b1da8ad9d5e8aa
|
|
@@ -12,21 +12,18 @@ end
|
|
|
12
12
|
module Magick
|
|
13
13
|
module AdminUI
|
|
14
14
|
class Engine < ::Rails::Engine
|
|
15
|
-
|
|
16
|
-
# isolate_namespace can create a separate middleware stack that breaks Warden authentication
|
|
17
|
-
# Instead, we'll rely on the namespace in routes and controllers to keep things organized
|
|
18
|
-
# isolate_namespace Magick::AdminUI
|
|
15
|
+
isolate_namespace Magick::AdminUI
|
|
19
16
|
|
|
20
17
|
engine_name 'magick_admin_ui'
|
|
21
18
|
|
|
22
|
-
#
|
|
23
|
-
# Rails engines
|
|
24
|
-
#
|
|
25
|
-
#
|
|
19
|
+
# Critical fix: Prevent the engine from interfering with Warden/Devise
|
|
20
|
+
# Rails engines with isolate_namespace create their own middleware stack
|
|
21
|
+
# This can break Warden/Devise in the main app if not handled correctly
|
|
22
|
+
# We ensure the engine doesn't modify the main app's middleware or request handling
|
|
26
23
|
|
|
27
|
-
#
|
|
28
|
-
# The engine
|
|
29
|
-
#
|
|
24
|
+
# Don't add any middleware that could interfere
|
|
25
|
+
# The engine will use its own middleware stack (due to isolate_namespace)
|
|
26
|
+
# but this shouldn't affect the main app's middleware stack
|
|
30
27
|
|
|
31
28
|
# Rails engines automatically detect app/views and app/controllers directories
|
|
32
29
|
# With isolate_namespace, views should be at:
|
data/lib/magick/config.rb
CHANGED
|
@@ -198,6 +198,8 @@ module Magick
|
|
|
198
198
|
# Load optional components if enabled
|
|
199
199
|
return unless @enable_admin_ui && defined?(Rails)
|
|
200
200
|
|
|
201
|
+
# Load Admin UI - routes need to be drawn during initialization, not after
|
|
202
|
+
# The engine's isolate_namespace should prevent interference with Warden/Devise
|
|
201
203
|
require_relative '../magick/admin_ui' unless defined?(Magick::AdminUI)
|
|
202
204
|
end
|
|
203
205
|
|
data/lib/magick/version.rb
CHANGED