rubyconfig / config

Easiest way to add multi-environment yaml settings to Rails, Sinatra, Padrino and other Ruby projects.
Other
2.11k stars 231 forks source link

Only load `Railtie` integration if `Rails::Railtie` is defined #319

Closed Morriar closed 2 years ago

Morriar commented 2 years ago

As pointed by the Rails documentation, creating Railties should explicitly ensure that Rails::Railtie is defined.

There could be non-rails application use-cases where Rails is defined, yet Rails::Railtie is not loaded.

We looked into how to add a new test for this use-case but couldn't figure a simple way to load Rails without Railtie. Any idea how to do it? Or are we happy with the change without test?

pkuczynski commented 2 years ago

@cjlarose what do you think? I think we can merge it without the test...