bullet 8.0.6 → 8.0.7

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: f00b664af513340b8b094dfa967a2dbd2c3a72edfcb0031532dd4ba38a1fb4b2
4
- data.tar.gz: 76b42f07c889542a50cc75a52d52fef26bf8647721d3c9913eb4f1dbb21db9a0
3
+ metadata.gz: 7ed7921469ed264816680bf580bd37cc8e9033287d90a86c65bb4d486fb789f3
4
+ data.tar.gz: a0c0ca44bc16b3673b3c7ea14f03a12dee3c73fc72084ee959ef19839bbd4f68
5
5
  SHA512:
6
- metadata.gz: db329cba6757c1ec372a7a7b6a8a9aa4a92fd5c63ce1a0e92cd43c89abd852768a83eddd95873a1cdeb2155abfa899d4c385df2a670b326c3eaa8736398a996e
7
- data.tar.gz: 35c6df4a0e0aefd934c1038f2dc5faa7978cbe7b81e482ea0ca931045d4b445a67d33d0c69d603830111cee46f9bf5128a9824277de7ef3dc347c10eae5d84ea
6
+ metadata.gz: 354d9bd9b4d126ef45edf063184e7c9d612aa243caa7c2044a67f665f625a40e7c23ca61efcfe70193823689499bb6bb868022647770c8ed9dba60f9dff3e26f
7
+ data.tar.gz: f19a948e75f612a65143fb069559c4691d12a73bb8cd0b45699b4b80e372565d39ed0c193eabcdc4d8e289cefaa3f0845f380d2509b4d6f69a32d57392339840
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Next Release
2
2
 
3
+ ## 8.0.7 (05/15/2025)
4
+
5
+ * Try to insert `Bullet::Rack` properly
6
+
3
7
  ## 8.0.6 (05/07/2025)
4
8
 
5
9
  * Add CSP nonce for footer styles as well
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bullet
4
- VERSION = '8.0.6'
4
+ VERSION = '8.0.7'
5
5
  end
data/lib/bullet.rb CHANGED
@@ -24,13 +24,10 @@ module Bullet
24
24
  if defined?(Rails::Railtie)
25
25
  class BulletRailtie < Rails::Railtie
26
26
  initializer 'bullet.add_middleware' do |app|
27
- # I don't find a way to detect if the middleware is already in the stack,
28
- # so I'm using the api_only flag.
29
- # If it is true, ActionDispatch::ContentSecurityPolicy::Middleware is not in the stack.
30
- if app.config.api_only || !defined?(ActionDispatch::ContentSecurityPolicy::Middleware)
31
- app.middleware.use Bullet::Rack
32
- else
27
+ if defined?(ActionDispatch::ContentSecurityPolicy::Middleware) && Rails.application.config.content_security_policy && !app.config.api_only
33
28
  app.middleware.insert_before ActionDispatch::ContentSecurityPolicy::Middleware, Bullet::Rack
29
+ else
30
+ app.middleware.use Bullet::Rack
34
31
  end
35
32
  end
36
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.6
4
+ version: 8.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang