gemrat
gemrat copied to clipboard
A few things I would like to improve
- --force option would add a gem to the Gemfile whether it's detected or not. Alternatively, it would update/overwrite the line that already specifies the gem. One of the problems I ran into is that some gems in my Gemfile aren't qualified with versions, which I personally prefer for any non-development dependencies. I kind of want to use gemrat to simply append the version, but it doesn't let me do that.
- Use Bundler's API instead of regex to detect the presence of gems. I think this would be less brittle, but I was wondering if you had a rationale for not going this way. I implemented this in a fork yesterday and specs passed. There is also presently a bug where a commented out gem in a Gemfile will be detected, which is what originally prompted me to use Bundler's API instead of grep.
- Add gems to a group, e.g.
gemrat guard --group development. I would really like for this to be able to throw the gem in agroup :development doblock as opposed togem 'guard', group: :development, although I'm not sure how easy this would be.
Thoughts?
Regarding 1: --force sounds like a good option to have assuming that it updates/overwrites a gem version. I don't like the idea of adding a gem that's already been declared but if it simply updates the version, that seems fine.
2: The regex route was taken for the sake of getting something up and running quickly. I haven't explored the option of using Bundler's API but I would like to hear more about the benefits and how an implementation might look. I checked out your fork but I didn't see any commits on top of mine. Maybe they haven't been pushed yet.
3: Implementing groups was something that we (other contributors and I) were exploring and would definitely like to add.
Thanks for the suggestions. I spend most of my time in Node these days but I would be happy to review any pull requests for the features that you have suggested.
Regarding 1, I would also note that if you run gemrat on a gem that already exists, it will prompt the user to update the version. The proposed --force option would skip this step.
Sorry I hadn't pushed my branch yet. There's still artifacts of the grep approach but using the Bundler API seems to be working.
https://github.com/Eleo/gemrat/tree/features/dick_tracy
I have no idea why I named the branch that.
Thanks. Gave it a once over, going to need some more time to review things.
On Fri, Aug 30, 2013 at 11:13 AM, Elliott Mason [email protected]:
Sorry I hadn't pushed my branch yet. There's still artifacts of the grep approach but using the Bundler API seems to be working.
https://github.com/Eleo/gemrat/tree/features/dick_tracy
I have no idea why I named the branch that.
— Reply to this email directly or view it on GitHubhttps://github.com/DruRly/gemrat/issues/18#issuecomment-23567985 .
Dru Riley * * Website: *http://www.drurly.com/ *Twitter: *https://twitter.com/DruRly *LinkedIn: http://www.linkedin.com/in/drurly
can't wait to see groups option implemented
Would love the groups option to be added.
Doesn't look like it, but is the groups option a thing yet?