rubygems/rubygems — Issue #269: Allow a quick way to ensure correct installed/uninstalled/version state for a gem
Author: donv
Created: 2012-01-29 10:52:41+00:00
State: open

Hi!

I miss a way to ensure the installed/uninstalled/version state of a gem while changing as little as possible in the setup and still receive a return code of 0 from ruby gems.

```gem install --no-reinstall [-v desired-version] ```

should install the gem if not installed, and do nothing if the gem is installed. In both cases a 0 should be received as a return code. Similarly

```gem uninstall --ignore-missing [-v unwanted-version] ```

should uninstall the gem if it was installed and do nothing if it wasn't installed. In both cases it should return 0 as return code.

Actually, I wouldn't mind if this behavior was the default, and install would require a switch to re-install a gem.

Have a nice day!