bullet 8.0.7 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ed7921469ed264816680bf580bd37cc8e9033287d90a86c65bb4d486fb789f3
4
- data.tar.gz: a0c0ca44bc16b3673b3c7ea14f03a12dee3c73fc72084ee959ef19839bbd4f68
3
+ metadata.gz: ac2296e419c6f32f6ed2e2dbe92a344884d1197b8287bb6c67783a1587c31c72
4
+ data.tar.gz: 523f4b66265e7ca8b4d67b19ecd13a547f7ad55acbdbd8190ec1e48a1cb4993e
5
5
  SHA512:
6
- metadata.gz: 354d9bd9b4d126ef45edf063184e7c9d612aa243caa7c2044a67f665f625a40e7c23ca61efcfe70193823689499bb6bb868022647770c8ed9dba60f9dff3e26f
7
- data.tar.gz: f19a948e75f612a65143fb069559c4691d12a73bb8cd0b45699b4b80e372565d39ed0c193eabcdc4d8e289cefaa3f0845f380d2509b4d6f69a32d57392339840
6
+ metadata.gz: 463b978de4299a651821f4bf66ce219ba3def30f32d8fbb790086d10b869526578c2f5b441a1c0c5d368c03906e833a86b5ed88cda1a2f983e5769c04bf7efb2
7
+ data.tar.gz: 5ab230e714c07790210516fbb760007fbbb49875a4021950b8e5d2c8ab77e132240f632ee50a62ee25dc58f629663f6d9802bee626d870d456284e3d4130ed3e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
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
+
3
8
  ## 8.0.7 (05/15/2025)
4
9
 
5
10
  * Try to insert `Bullet::Rack` properly
@@ -26,10 +26,10 @@ module Bullet
26
26
  private
27
27
 
28
28
  def bullet_join_potential_composite_primary_key(primary_keys)
29
- return send(primary_keys) unless primary_keys.is_a?(Enumerable)
29
+ return read_attribute(primary_keys) unless primary_keys.is_a?(Enumerable)
30
30
 
31
- primary_keys.map { |primary_key| send 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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bullet
4
- VERSION = '8.0.7'
4
+ VERSION = '8.0.8'
5
5
  end
data/lib/bullet.rb CHANGED
@@ -23,7 +23,7 @@ module Bullet
23
23
 
24
24
  if defined?(Rails::Railtie)
25
25
  class BulletRailtie < Rails::Railtie
26
- initializer 'bullet.add_middleware' do |app|
26
+ initializer 'bullet.add_middleware', after: :load_config_initializers do |app|
27
27
  if defined?(ActionDispatch::ContentSecurityPolicy::Middleware) && Rails.application.config.content_security_policy && !app.config.api_only
28
28
  app.middleware.insert_before ActionDispatch::ContentSecurityPolicy::Middleware, Bullet::Rack
29
29
  else
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.7
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.7
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: []