findbug 0.3.1 → 0.3.2

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: 1c29bc5c8718f46a269d9987839af57928d7aab2c0b3451f08edd4683729f381
4
- data.tar.gz: fd9771ef2dee52d0b50fa1b5226c401b15ce85e3c4481e15684907d5756b83db
3
+ metadata.gz: c6be157fb43d73577d48e404ce60565bb9673318fb35c00591a4cd070890793d
4
+ data.tar.gz: 2ab1e58a35a8a02997f1f56427d8a62bdce9d99b45270bdcfe1c7529e492081e
5
5
  SHA512:
6
- metadata.gz: '018370d27b3517272c7ecf1c1f392c2d3abbcd54b92d223227ad200f39232f534a0ecc875fc79019bad2bf7e48fdbe9b81ac51326fdfdc9854fa6da2f8c9149d'
7
- data.tar.gz: 64bb0554fd369ed717dd17b3c05fdfc7ae5fb275c461491ee85a19dcae91938e07e371941bc21940def52d69426f2d1bc6397300a365b3d1782555642ed18387
6
+ metadata.gz: b8ed796ca72ce63cce24145fb2654f234b7e8d0c3391405d5ab110473f456f5df849f121503d6e33c25e3e538da3f06194baf82a3d9994a132afa7c01c6ac790
7
+ data.tar.gz: 28e59dc8442a8a88498e709e575bc2a561d02b44455d729136f8bc50e06340a77a274c4de119611d00788f6b5dc11140fc3b0a91a2c1abf4b83fac00a1916c58
@@ -1,11 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rails/engine"
4
+ require "active_record"
4
5
 
5
6
  # Calculate the gem root path once at load time
6
7
  # __dir__ is lib/findbug, so we go up two levels to get the gem root
7
8
  FINDBUG_GEM_ROOT = File.expand_path("../..", __dir__)
8
9
 
10
+ # Require models early so they're available for multi-tenant gems (Apartment)
11
+ # that resolve excluded_models during boot via Object.const_get.
12
+ # This must happen before Apartment's initializer runs.
13
+ require_relative "../../app/models/findbug/error_event"
14
+ require_relative "../../app/models/findbug/performance_event"
15
+
9
16
  # Require controllers (needed for routing)
10
17
  require_relative "../../app/controllers/findbug/application_controller"
11
18
  require_relative "../../app/controllers/findbug/dashboard_controller"
@@ -73,14 +80,6 @@ module Findbug
73
80
  end
74
81
  end
75
82
 
76
- # Load models after ActiveRecord is ready
77
- # This is important for multi-tenant setups (Apartment) where excluded_models
78
- # are resolved early in the boot process
79
- initializer "findbug.load_models", after: :load_config_initializers do
80
- require_relative "../../app/models/findbug/error_event"
81
- require_relative "../../app/models/findbug/performance_event"
82
- end
83
-
84
83
  # NOTE: We intentionally do NOT add session/flash middleware here.
85
84
  # Adding middleware to API-mode apps would change their behavior
86
85
  # (e.g., showing HTML error pages instead of JSON).
@@ -2,6 +2,10 @@
2
2
 
3
3
  require "rails/railtie"
4
4
 
5
+ # Load the engine early so models are available for multi-tenant gems (Apartment)
6
+ # that resolve excluded_models during boot via Object.const_get.
7
+ require_relative "engine"
8
+
5
9
  module Findbug
6
10
  # Railtie hooks Findbug into the Rails boot process.
7
11
  #
@@ -117,7 +121,7 @@ module Findbug
117
121
  app.config.after_initialize do
118
122
  next unless Findbug.config.web_enabled?
119
123
 
120
- require_relative "engine"
124
+ # Engine is already loaded at top of railtie.rb for Apartment compatibility
121
125
 
122
126
  # Add routes programmatically
123
127
  # This is equivalent to `mount Findbug::Engine => "/findbug"` in routes.rb
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Findbug
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: findbug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soumit Das