Skip to content

Commit

Permalink
Avoid loading Railtie if SKIP_CONSULT is truthy (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
aharpervc authored Apr 4, 2023
1 parent 4a90ccf commit 1d31855
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/consult.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ def consul_token
end
end

require 'consult/rails/engine' if defined?(Rails)
if defined?(Rails) && !%w[1 true].include?(ENV['SKIP_CONSULT'].to_s.downcase)
require 'consult/rails/engine'
end

0 comments on commit 1d31855

Please sign in to comment.