-
Notifications
You must be signed in to change notification settings - Fork 1
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
Same as bundler-inject? #4
Comments
Hi @Fryguy, this work is heavily inspired by bundler-inject, but serves slightly different purpose. We needed a tool that would allow to use a published dependency and allow to override its transient dependencies, allowing to remove them or update the version requirements. Such functionality is available in dependency management tools for other languages but not for ruby. This is mainly needed when your dependency is abandoned and no one maintains its dependencies which may contain CVEs. Also can help when you have a conflicting versions of transient dependencies, like one of your dependency requires gem x in version < 2 and another in version > 2. Another case is when your dependency has broad functionality and you don't need all of that, like Chef and support for windows when targeting linux only. |
Ah, thanks for the details. Sounds like the use case is similar to npm overrides?
Only if the override requires code changes would the code need to be available. The If the gem does need to be modified, then the modified version would need to be available somewhere and published. It could be vendored alongside your code, but it could also just be a git fork or packaged to a custom rubygems instance. Since rubygems doesn't support namespacing, I don't think you could publish into rubygems.org (I wish there was an option to So, I think you could use bundler inject for your purposes, where you would persist a file into the bundler.d directory, but admittedly that does start blurring the lines between dev and prod use cases. Have you opened an issue in rubygems discussing an overrides directive? (or perhaps there's already an open issue - I didn't check) Considering it's in other package managers, there's strong evidence of its utility, and the security aspects you described help give weight to the argument. |
Oh, I forgot to mention, we do want to support overriding transitive dependencies, but there's just a bug right now (this one). So, if that helps your use case, we'd be happy to accept a PR to fix that. I just haven't been able to figure it out (nor do I have cycles for it at the moment). |
Hi all. I noticed this new bundler plugin, and was curious if this offered the same functionality as bundler-inject? Seems similar.
The text was updated successfully, but these errors were encountered: