Skip to content

Commit

Permalink
Merge pull request #202 from fxn/patch-1
Browse files Browse the repository at this point in the history
Update Zeitwerk setup
  • Loading branch information
splittingred authored Feb 15, 2024
2 parents 8ea05f6 + 3f6ba0c commit 1cd0700
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/gruf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@

# use Zeitwerk to lazily autoload all the files in the lib directory
require 'zeitwerk'
loader = ::Zeitwerk::Loader.new
loader.tag = File.basename(__FILE__, '.rb')
loader.inflector = ::Zeitwerk::GemInflector.new(__FILE__)
loader.ignore("#{__dir__}/gruf/integrations/rails/railtie.rb")
loader.ignore("#{__dir__}/gruf/controllers/health_controller.rb")
loader.push_dir(__dir__)
loader = Zeitwerk::Loader.for_gem
lib = File.dirname(__FILE__)
loader.ignore("#{lib}/gruf/integrations/rails/railtie.rb")
loader.ignore("#{lib}/gruf/controllers/health_controller.rb")
loader.setup

require_relative 'gruf/integrations/rails/railtie' if defined?(::Rails)
Expand Down

0 comments on commit 1cd0700

Please sign in to comment.