-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Jest tests #2
Comments
@dev-cprice how much have you battle-tested this on "real" Gemfiles? I'm adding Bundler support to Renovate and trying to decide whether to parse Gemfiles by calling out to ruby/bundler via child_process, or a Node.js parser like this. |
@rarkins I've run it against gemfiles with multiple groups and 10-100 dependencies. It seems to work fine so far, but now that I have some free time I can better test it. |
@rarkins unfortunately though, as it stands it only really works for non-nested groups, so something a little complicated like the rails Gemfile will not be parsed properly |
@dev-cprice thanks for the reply. Do you mean this type of nested group?
For Renovate we only care ultimately about (a) the A quick question for you, do you know if there are any "genuine" syntaxes for Gemfile where the gem name and version won't be on the same line? e.g. won't be like this:
? |
Also, do you know if there’s any restrictions on the levels or order of nesting? Eg platforms first, then group names, etc? Or is there no practical limit if you wanted to create weird nesting for fun? |
@rarkins I'm not aware of any gemfiles where the name and version aren't on the same line. According to the bundler docs,
So, each line is essentially a method call in Ruby.. they could be multi-line, but I haven't necessarily come across any in practice. And yes, from your example, that's what I mean by nested groups. I guess it isn't really nested groups, but more like nested blocks. Groups within blocks, I suppose. For my use case so far, it's just been to find all gems and their versions/sources and assume that they're on the same line. I definitely plan on making it more robust to support more advanced features, like platform blocks, etc. |
Setup Jest and add test coverage for all methods.
The text was updated successfully, but these errors were encountered: