artsy/garner — pull request #33 by fancyremarker (2013-06-14 16:47:14+00:00)
Title: Add a :caller_root option to Garner::Config

to: @joeyAghion

#### Summary
* Use Garner::Config.caller_root to normalize `:caller` values generated by the `Caller` context key strategy, for client apps that may be running from different places in the filesystem.

I chose to default `:caller_root` to `Rails.root` if available; otherwise I try to find the nearest ancestor directory containing a `Gemfile`. This seems arbitrary, but I suspect it covers > 95% of use cases. If neither of these root paths is available, we just continue to expose the behavior in #29, so it isn't a regression.

The very use of `caller` still seems a bit strange, but since it's worked reasonably well up to now with the exception of #29, I think it's worth keeping... thoughts?

[Fixes #29]

PS: Can you merge #32 before this? I want to release that as 0.4.0, and this as part of 0.4.1.