Closed leemhenson closed 8 years ago
Yeah. Within the railtie we probably don't need to try to load bits or rails that aren't already loaded either. Would you mind making that change and then fixing the specs that test the tie to require the needed gems.
Thanks!
On February 3, 2016 at 4:40:48 PM, lee henson (notifications@github.com) wrote:
Hi. I'm using api_auth in a rack/activerecord app, but I don't want to load any other bits of rails if at all possible. The api_auth/railtie forces a bunch of things to be loaded that I don't want. I think it's fair
to skip all that if Rails isn't even defined. What do you think?
You can view, comment on, or merge this pull request online at:
https://github.com/mgomes/api_auth/pull/96 Commit Summary
- only load railtie if rails is present
File Changes
- M lib/api_auth.rb https://github.com/mgomes/api_auth/pull/96/files#diff-0 (2)
Patch Links:
— Reply to this email directly or view it on GitHub https://github.com/mgomes/api_auth/pull/96.
Ok, railtie
can be safely require
d because it itself doesn't now require
any Rails components. The spec_helper
now loads Rails et al before loading api_auth, which means railtie
can hook into the appropriate classes.
Thanks so much!
Hi. I'm using api_auth in a rack/activerecord app, but I don't want to load any other bits of rails if at all possible. The
api_auth/railtie
forces a bunch of things to be loaded that I don't want. I think it's fair to skip all that if Rails isn't even defined. What do you think?