Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow config the gemfile directory instead of bundler.d/ #38

Open
Whirlwind opened this issue Mar 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Whirlwind
Copy link

I have some projects and they use same gemfiles, but other not.
Now, the bundler-inject only search the gemfile in:

global - ~/.bundler.d/*.rb
project - $PROJECT_DIR/bundler.d/*.rb

I want to set a configuration to custom the bundler.d/, eg: ~/ios_project/gemfiles and ~/ruby_project/gemfiles.

@Whirlwind Whirlwind added the enhancement New feature or request label Mar 5, 2024
@kbrock
Copy link
Member

kbrock commented Mar 5, 2024

To solve this, we link the foreign Gemfile in our Gemfile.
Example: https://github.com/ManageIQ/manageiq-api/blob/master/Gemfile#L12, though you can find this code in pretty much all the ManageIQ/manageiq-provider-* entries.

The correct link gets setup here: https://github.com/ManageIQ/manageiq-api/blob/master/bin/before_install#L16

$ cd project
$ MANAGEIQ_REPO=~/src/manageiq ./bin/setup # ln -s ~/src/manageiq spec/manageiq
$ tail -2 Gemfile

eval_gemfile(File.expand_path("spec/manageiq/Gemfile", __dir__))

It is stored in the before_install for use by travis. It has since been migrated to github actions.


not sure if git submodules or an ignored .bundler.d and a symbolic link / git checkout a single file from a common repository would work for you.

@Fryguy
Copy link
Member

Fryguy commented Mar 5, 2024

@Whirlwind Yeah, I think eval_gemfile is more the way to go. bundler-inject is more about overriding things in existing Gemfiles, but it sounds like your request is more to completely use a different Gemfile base.

@Fryguy Fryguy self-assigned this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants