copiousfreetime / stickler

a tool to organize and maintain an internal gem distribution server
MIT License
143 stars 29 forks source link

added functionality to permit get the latest version of a gem #29

Closed tiagolnobre closed 10 years ago

tiagolnobre commented 11 years ago

I had an issue when using stickler with puppet trying to get puppet to install the latest version of a gem, with this feature i can get the latest version of a gem a get it to be installed by puppet.

I think is a useful functionality to use with puppet.

copiousfreetime commented 10 years ago

This sounds reasonable, and i'm trying to understand your use case. You are using stickler last-version <gemname> as test in puppet to see what the latest version is so you can see if puppet should install a new version of the gem? Could you get the same effect if you just used gem list -r <gemname> and parsed the output?

tiagolnobre commented 10 years ago

Yeah the gem list -r <gemname> gives the same result but not like the stickler last-version <gemname> it will need some parsing. The problem is that puppet doesn't know how to get the latest version if you don't specify it manually like 0.0.12, if you use ensure => latest in puppet it something get you versions like '0.0.60.0.7' .

copiousfreetime commented 10 years ago

Alright, sounds reasonable, I'll merge this in soon.

tiagolnobre commented 10 years ago

Great, thanks :)

copiousfreetime commented 10 years ago

this will go into the next version

copiousfreetime commented 10 years ago

I did some mucking around with this to bring it in line the other commands and normalized it to 'latest-version'

copiousfreetime commented 10 years ago

this is now included with the released 2.4 version