magick-feature-flags 0.9.30 → 0.9.32

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb9bcda0a4271667f1c38b05707c0bf2754409ed693fd4f10de5448ba8276246
4
- data.tar.gz: 73ef6455912bd350a3936718b854dec45661e05bf2bb3ed3dc0066b876e6ebd0
3
+ metadata.gz: 569716421c0b2750ca21203df7f29b3110cba2d02344ec6cf93224d8d4c8ff07
4
+ data.tar.gz: 61765b4d07852b6f2563b574969d5c4e8ae4b35206f98ed2cce9a8f2e151acd8
5
5
  SHA512:
6
- metadata.gz: 34045077b8297e0828b7dfad04b213b6f3d2dde554eb317181c3f29b580033b3953aee26745962641cb8c71d4a7cf660f1b91ef63ae48bb240379c25fed874da
7
- data.tar.gz: 3fb552336b31c7f2e85b0e61cc98b0d3266e68a60d1b45d1ebd3f652d140b63bfe2ef5d8410cf830ca9c600dc3e5e9af68f907879913b1f56f3e9bb494c64464
6
+ metadata.gz: f36f551cf9d88e3ca262f856d89859eb117626e1ee00a5396464100f2f742d0f70e19ea297082d8dcc55cb4da14c2a06b79f06246393f57193fe51c9c9334baf
7
+ data.tar.gz: 62400cc86de0bdb7110c206abb1f7a9f24290d20569df7de7d6190e145f759bc5083ac536b22a1beae9cf1e08b04b1e8ae46fe1abeaaa330b84a098049eecfc0
@@ -16,14 +16,14 @@ module Magick
16
16
 
17
17
  engine_name 'magick_admin_ui'
18
18
 
19
- # Ensure the engine doesn't interfere with Warden/Devise middleware
20
- # Rails engines by default inherit middleware from the main app, which is what we want
21
- # We explicitly don't add, modify, or override any middleware that could affect Warden/Devise
22
- # The engine should work alongside existing authentication middleware without modification
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
23
23
 
24
- # Critical: Don't add any middleware that could interfere with Warden/Devise
25
- # The engine must use the main app's middleware stack to avoid breaking authentication
26
- # Rails engines inherit middleware by default, so we don't need to do anything special
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
27
27
 
28
28
  # Rails engines automatically detect app/views and app/controllers directories
29
29
  # With isolate_namespace, views should be at:
data/lib/magick/config.rb CHANGED
@@ -196,9 +196,14 @@ module Magick
196
196
  Magick.warn_on_deprecated = warn_on_deprecated
197
197
 
198
198
  # Load optional components if enabled
199
+ # Delay Admin UI loading until after Warden/Devise is set up to avoid interference
199
200
  return unless @enable_admin_ui && defined?(Rails)
200
201
 
201
- require_relative '../magick/admin_ui' unless defined?(Magick::AdminUI)
202
+ # Load Admin UI in an initializer that runs after Warden/Devise setup
203
+ # This prevents the engine from interfering with authentication middleware
204
+ Rails.application.config.after_initialize do
205
+ require_relative '../magick/admin_ui' unless defined?(Magick::AdminUI)
206
+ end
202
207
  end
203
208
 
204
209
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magick
4
- VERSION = '0.9.30'
4
+ VERSION = '0.9.32'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magick-feature-flags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.30
4
+ version: 0.9.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Lobanov