File tree Expand file tree Collapse file tree 6 files changed +10
-6
lines changed
forest_admin_agent/lib/forest_admin_agent/facades
forest_admin_rails/lib/forest_admin_rails
forest_admin_rpc_agent/lib Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def self.datasource
1212 end
1313
1414 def self . logger
15- instance . resolve ( :logger )
15+ instance & .resolve ( :logger )
1616 end
1717
1818 def self . config_from_cache
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ class Engine < ::Rails::Engine
2525 extend ActiveSupport ::Concern
2626
2727 initializer 'forest_admin_rails.add_autoload_paths' , before : :set_autoload_paths do |app |
28- app . config . autoload_paths << Rails . root . join ( 'lib' )
28+ lib_path = Rails . root . join ( 'lib' )
29+ app . config . autoload_paths << lib_path unless app . config . autoload_paths . frozen?
2930 end
3031
3132 initializer 'forest_admin_rails.error_subscribe' do
Original file line number Diff line number Diff line change 77require 'zeitwerk'
88
99loader = Zeitwerk ::Loader . for_gem
10+ loader . ignore ( "#{ __dir__ } /forest_admin_rpc_agent/extensions/sinatra_extension.rb" )
1011loader . setup
1112
1213module ForestAdminRpcAgent
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ class Engine < ::Rails::Engine
33 isolate_namespace ForestAdminRpcAgent
44
55 initializer 'forest_admin_rpc_agent.add_autoload_paths' , before : :set_autoload_paths do |app |
6- app . config . autoload_paths << Rails . root . join ( 'lib' )
6+ lib_path = Rails . root . join ( 'lib' )
7+ app . config . autoload_paths << lib_path unless app . config . autoload_paths . frozen?
78 end
89
910 config . after_initialize do
Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ def self.registered(app)
2020 puts "Registering #{ route_class } "
2121 route_class . registered ( app )
2222 else
23- ForestAdminAgent ::Facades ::Container . logger . log ( 'warn' ,
24- "Skipping #{ route_class } (does not respond to :registered)" )
23+ ForestAdminAgent ::Facades ::Container . logger &.log (
24+ 'warn' , "Skipping #{ route_class } (does not respond to :registered)"
25+ )
2526 end
2627 end
2728 end
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def self.datasource
1212 end
1313
1414 def self . logger
15- instance . resolve ( :logger )
15+ instance & .resolve ( :logger )
1616 end
1717
1818 def self . config_from_cache
You can’t perform that action at this time.
0 commit comments