mcordell / grape_token_auth

Token auth for grape apps
MIT License
52 stars 19 forks source link

require dep tree is imprevisible #24

Closed frobichaud closed 8 years ago

frobichaud commented 8 years ago

When deploying, we encountered the following issues:

`forgiving_load_missing_constant': uninitialized constant GrapeTokenAuth::ResourceCrudBase (NameError)
    from /grape_token_auth/resource/resource_updater.rb:2:in `<module:GrapeTokenAuth>

This happens because

Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |path| require path }

might not return an alphabetical ordered list of files.

See https://github.com/frobichaud/grape_token_auth/commit/2107423bf6d2f10d3684e1aabd8daa4f6e71da0b and https://github.com/frobichaud/grape_token_auth/commit/022fb770339c7cba4ac77dc8eda59465d0e104e3

mcordell commented 8 years ago

I'm probably going to change it to explicitly load the files, will fix ASAP.