Skip to content

Commit

Permalink
Make zeitwerk ok with our test app generator
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Sep 9, 2024
1 parent 527b1c1 commit 9e934d1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/riiif/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ class Engine < ::Rails::Engine

# Set to true to use kdu for jp2000 source images
config.kakadu_enabled = false

config.before_configuration do
# see https://github.com/fxn/zeitwerk#for_gem
# We put a generator into LOCAL APP lib/generators, so tell
# zeitwerk to ignore the whole directory? If we're using a recent
# enough version of Rails to have zeitwerk config
#
# See: https://github.com/cbeer/engine_cart/issues/117
Rails.autoloaders.main.ignore(Rails.root.join('lib', 'generators')) if Rails.try(:autoloaders).try(:main).respond_to?(:ignore)
end
end
end

0 comments on commit 9e934d1

Please sign in to comment.