|
27 | 27 | require "active_support/rails"
|
28 | 28 | require "zeitwerk"
|
29 | 29 |
|
| 30 | +lib = File.dirname(__FILE__) |
30 | 31 | Zeitwerk::Loader.for_gem.tap do |loader|
|
31 | 32 | loader.ignore(
|
32 |
| - "#{__dir__}/rails", # Contains generators, templates, docs, etc. |
33 |
| - "#{__dir__}/action_cable/gem_version.rb", |
34 |
| - "#{__dir__}/action_cable/version.rb", |
35 |
| - "#{__dir__}/action_cable/deprecator.rb", |
| 33 | + "#{lib}/rails", # Contains generators, templates, docs, etc. |
| 34 | + "#{lib}/action_cable/gem_version.rb", |
| 35 | + "#{lib}/action_cable/version.rb", |
| 36 | + "#{lib}/action_cable/deprecator.rb", |
36 | 37 | )
|
37 | 38 |
|
38 | 39 | loader.do_not_eager_load(
|
39 |
| - "#{__dir__}/action_cable/subscription_adapter", # Adapters are required and loaded on demand. |
40 |
| - "#{__dir__}/action_cable/test_helper.rb", |
41 |
| - Dir["#{__dir__}/action_cable/**/test_case.rb"] |
| 40 | + "#{lib}/action_cable/subscription_adapter", # Adapters are required and loaded on demand. |
| 41 | + "#{lib}/action_cable/test_helper.rb", |
| 42 | + Dir["#{lib}/action_cable/**/test_case.rb"] |
42 | 43 | )
|
43 | 44 |
|
44 | 45 | loader.inflector.inflect("postgresql" => "PostgreSQL")
|
|
0 commit comments