Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow user to override ~/.bundle with environment variables #6024
What was the end-user problem that led to this PR?
As in #4333, users wanted a way to make Bundler respect the XDG specification.
What was your diagnosis of the problem?
What is your fix for the problem, implemented in this PR?
Allow users to configure
Why did you choose this fix out of the possible options?
Unlike #5787, This solution is not specific to the XDG specification. Users have all kinds of setups, and this is a very general system for allowing them to configure their development machines however they need. It tries to keep all files created by Bundler in the same place (as per #5787 (comment)), but allows the user to override that convention if they really want to and they know what they are doing.
If they want to use XDG for everything, they can do it by explicitly setting the
To me, this solution strikes the right balance between "fine-grained control for power users" and "simple, sane defaults for everyone else".
Please let me know if my tests can be improved. My only Ruby experience so far has been writing Homebrew formulas and configuring Jekyll, so I'm sure I have a lot to learn.
Thanks for opening a pull request and helping make Bundler better! Someone from the Bundler team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality.
We use Travis CI to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of Travis CI in the PR status window below.
If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #bundler channel on Slack.
For more information about contributing to the Bundler project feel free to review our CONTRIBUTING guide
Sep 18, 2017
referenced this pull request
Sep 18, 2017
@gwerbin The discussion above (mainly the env var fallbacks table) seemed to imply that the vars all indicate directories.
The code seems to indicate that
Is this the case? Can this be documented somewhere?
As you can see, I didn't change anything that was previously stored under
It would have been more correct if I had written:
In the documentation it's implied but not explicitly stated that
@gwerbin cool. Since this feature was significantly driven by (but not solely by) the XDG request, I was easily mislead by the directories vs files. Was having an issue with
Anyway, thanks for the clarification.
Welp, I've found my problem!!! This apparently hasn't been released yet? I figured that since it was merged in September, and both 1.16.0 and 1.16.1 were released in October, December respectively, that this would have been included.
Does anyone have any rough ideas on when this might land?