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

Do not add gem if it already exists #2

Closed ghost closed 11 years ago

ghost commented 11 years ago

there is a feature request on reddit - gemrat <group> <gem> i could implement it if you are interested

DruRly commented 11 years ago

Thanks for the pull. Could you add some tests?

ghost commented 11 years ago

mm, actually i updated gemrat_spec.rb with a new spec

DruRly commented 11 years ago

Ahhh I see. Sorry about that. I'll review it. Thanks!

moonglum commented 11 years ago

I think it would be even nicer, if it would update the version of the bundled gem if it's already in there:

Gem 'sinatra' already installed in version 1.4.2 Found 1.4.3 on Rubygems, updated in your Gemfile

...and just ignore it, if it's the same version :smile:

DruRly commented 11 years ago

@moonglum I like your suggestion. It communicates exactly what's going on. Having a confirmation step would also be nice. Confirming that the developer would indeed like to update the existing gem. She/he may not know that it's already there.

moonglum commented 11 years ago

Yep :+1:

DruRly commented 11 years ago

This has been added in https://github.com/DruRly/gemrat/pull/12. Along with update confirmations :grinning:

moonglum commented 11 years ago

Awesome :milky_way: