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

Support Ruby/Bundler #932

Closed
rarkins opened this issue Oct 13, 2017 · 14 comments
Closed

Support Ruby/Bundler #932

rarkins opened this issue Oct 13, 2017 · 14 comments
Labels
help wanted Help is needed or welcomed on this issue priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Oct 13, 2017

This issue is for building up (a) support (please +1 if you would like to see Ruby support) and (b) requirements, e.g. helping suggest what scope is required and what APIs can be used.

@rarkins rarkins added type:feature Feature (new functionality) needs-requirements priority-4-low Low priority, unlikely to be done unless it becomes important to more people labels Oct 13, 2017
@rarkins rarkins added the help wanted Help is needed or welcomed on this issue label Oct 20, 2017
@aergonaut
Copy link

I'd love to help out with this, but I'm not sure where to start! Which of the existing package manager integrations would be a good place to start looking?

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 4, 2018

@aergonaut Thanks for the offer! The Renovate codebase could do with a little refactoring to make it even easier to add new languages, but I can guide you in the meantime.

We use lib/manager for storing package manager logic, and lib/datasource for looking up registries.

A good reference one to look at is Docker in both those dirs.

Until now, it has been possible for us to implement version and lookup logic completely with JS, but for Ruby there may be the need for us to call out to bundler via a child process instead of attempting to reimplement it's resolution logic.

I can start a base branch for Ruby so you don't have to start from absolute scratch.

@aergonaut
Copy link

Thanks @rarkins. It would be great if you could start a base branch!

Yeah, I would think calling out to Bundler would be the easiest way to implement updating. As a first idea, we could run bundle update GEM and then inspect the diff in the lockfile to figure out what was updated.

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 4, 2018

@aergonaut please check out https://github.com/renovateapp/renovate/tree/feat/932-ruby and feel free to ping me here or in gitter with any questions

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others and removed priority-4-low Low priority, unlikely to be done unless it becomes important to more people labels Jul 17, 2018
@Mayeu
Copy link

Mayeu commented Sep 28, 2018

Any news on this? I was kind of surprised that Renovate does not support a language as widespread as ruby :)

@zephraph
Copy link
Contributor

@yuki24 maybe we can pair on this at some point? It'd be extremely useful.

@yuki24
Copy link

yuki24 commented Nov 20, 2018

I'd be happy to help add support for Ruby.

@bjeanes
Copy link

bjeanes commented Nov 20, 2018

For people looking for a solution in the meantime or who want to take a look at some prior art, https://github.com/envato/unwrappr may be of some interest.

@rarkins
Copy link
Collaborator Author

rarkins commented Nov 20, 2018

I've committed a "skeleton" for Ruby support into master branch. The best next step would be if someone can submit a PR filling in https://github.com/renovatebot/renovate/blob/master/lib/manager/bundler/readme.md

You can find completed examples for buildkite and composer already. Composer is probably the better example to use.

At a high level, we'll need to do this:

  • Add extract, update, and artifacts functions for Bundler
  • Add a new rubygems datasource for looking up packages and versions
  • Add a new "versioning" for ruby, to adapt to its range syntax. Looks like one may already be available and just needs a minimal wrapper: https://github.com/snyk/ruby-semver

@rarkins rarkins changed the title Support Ruby Support Ruby/Bundler Jan 12, 2019
@rarkins
Copy link
Collaborator Author

rarkins commented Jan 12, 2019

Ruby Bundler in Renovate support is now ready to enter "alpha" stage. If you are interested in helping get it through beta -> GA stages as quickly as possible by testing it out, please let me know!

The PR to establish alpha support is here: #3058

It's already capable of parsing the entire Rails Gemfile and even found an upgrade: renovate-tests/rails#3

@bjeanes
Copy link

bjeanes commented Jan 12, 2019

@rarkins 🖐

We currently use Renovate for Docker+NPM and dependabot for Ruby. I'd happily be an alpha tester and run it instead of or side-by-side with dependabot.

@renovate-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 13.175.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rarkins
Copy link
Collaborator Author

rarkins commented Jan 14, 2019

Bundler support is now merged to master and live in the hosted Renovate App. You can see details on how to opt-in to testing it on the blog: https://renovatebot.com/blog/ruby-bundler-support

In short, it should detect all Gemfiles, see if any versions or ranges need updating, and submit PRs if so, with updated Gemfile.lock. If you have success or problems trying it out, please let me know.

@Mayeu
Copy link

Mayeu commented Jan 14, 2019

This is awesome 🙏

Thank you all for the hard work!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Help is needed or welcomed on this issue priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants