Following up from my comment here: b9f2810
Would be interested to hear if you had any thoughts on a different place to put it in the long chain of slots you can slip it into, but this seems to work fine and my understanding of the problem this gem strives to solve is that sooner is better.
Apologies if I missed something, but I couldn't find anything on the before_configuration method you were trying to use, maybe it might work as config.before_configuration? I think using initializer is more standard though.
Fix initializer usage to run as soon as possible
before_configuration was throwing NoMethodError
See https://github.com/rails/rails/blob/master/railties/lib/rails/application.rb#L44 and https://github.com/rails/rails/blob/master/railties/lib/rails/railtie/configuration.rb#L51-L54
The problem is that it needs to run even before step 3, which I think unfortunately means that on require is our best option.
Ok fair enough, it feels strange to have something do it's final purpose right when you require it, but I think it just comes down to practicality... I guess if someone actually had a reason why they would not want it to run that early they could just do require: false in their Gemfile and require it later. I'll go ahead and close the PR, thanks for the explanation though.