bullet 8.0.6 → 8.0.8
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/CHANGELOG.md +9 -0
- data/lib/bullet/ext/object.rb +3 -3
- data/lib/bullet/version.rb +1 -1
- data/lib/bullet.rb +4 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac2296e419c6f32f6ed2e2dbe92a344884d1197b8287bb6c67783a1587c31c72
|
4
|
+
data.tar.gz: 523f4b66265e7ca8b4d67b19ecd13a547f7ad55acbdbd8190ec1e48a1cb4993e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 463b978de4299a651821f4bf66ce219ba3def30f32d8fbb790086d10b869526578c2f5b441a1c0c5d368c03906e833a86b5ed88cda1a2f983e5769c04bf7efb2
|
7
|
+
data.tar.gz: 5ab230e714c07790210516fbb760007fbbb49875a4021950b8e5d2c8ab77e132240f632ee50a62ee25dc58f629663f6d9802bee626d870d456284e3d4130ed3e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
## Next Release
|
2
2
|
|
3
|
+
## 8.0.8 (05/30/2025)
|
4
|
+
|
5
|
+
* Add middleware after initializers
|
6
|
+
* Fix bullet composite primary key retrieval
|
7
|
+
|
8
|
+
## 8.0.7 (05/15/2025)
|
9
|
+
|
10
|
+
* Try to insert `Bullet::Rack` properly
|
11
|
+
|
3
12
|
## 8.0.6 (05/07/2025)
|
4
13
|
|
5
14
|
* Add CSP nonce for footer styles as well
|
data/lib/bullet/ext/object.rb
CHANGED
@@ -26,10 +26,10 @@ module Bullet
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def bullet_join_potential_composite_primary_key(primary_keys)
|
29
|
-
return
|
29
|
+
return read_attribute(primary_keys) unless primary_keys.is_a?(Enumerable)
|
30
30
|
|
31
|
-
primary_keys.map { |primary_key|
|
32
|
-
.join(',')
|
31
|
+
primary_keys.map { |primary_key| read_attribute primary_key }
|
32
|
+
.compact.join(',')
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
data/lib/bullet/version.rb
CHANGED
data/lib/bullet.rb
CHANGED
@@ -23,14 +23,11 @@ module Bullet
|
|
23
23
|
|
24
24
|
if defined?(Rails::Railtie)
|
25
25
|
class BulletRailtie < Rails::Railtie
|
26
|
-
initializer 'bullet.add_middleware' do |app|
|
27
|
-
|
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
|
26
|
+
initializer 'bullet.add_middleware', after: :load_config_initializers do |app|
|
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.
|
4
|
+
version: 8.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: 1.3.6
|
114
114
|
requirements: []
|
115
|
-
rubygems_version: 3.6.
|
115
|
+
rubygems_version: 3.6.9
|
116
116
|
specification_version: 4
|
117
117
|
summary: help to kill N+1 queries and unused eager loading.
|
118
118
|
test_files: []
|