DruRly / gemrat

Save Time. Add the latest version of gems to your Gemfile from the command line.
http://bit.ly/18O9sNO
MIT License
170 stars 12 forks source link

A few things I would like to improve #18

Open ghost opened 10 years ago

ghost commented 10 years ago
  1. --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.
  2. 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.
  3. 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 a group :development do block as opposed to gem 'guard', group: :development, although I'm not sure how easy this would be.

Thoughts?

DruRly commented 10 years ago

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.

DruRly commented 10 years ago

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.

ghost commented 10 years ago

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.

DruRly commented 10 years ago

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 notifications@github.comwrote:

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

lfender6445 commented 9 years ago

can't wait to see groups option implemented

sarahquigley commented 7 years ago

Would love the groups option to be added.

benjaminws commented 7 years ago

Doesn't look like it, but is the groups option a thing yet?