blt04 / puppet-rvm

A puppet module for installing and using RVM (Ruby Version Manager)
Other
242 stars 280 forks source link

Simpler regex for installed gem version detection. #79

Closed joerx closed 11 years ago

joerx commented 11 years ago

The current regex used for checking if a gem is already installed fails for some gems, e.g. rails 4.0.0.rc1 - due to the 'rc1' suffix the version number is not matched.

I don't really see the point of using a regex as complex as was used for this. If all you want to do is split the gem name (sequence of word chars followed by whitespace) and gem version (everything inside brackets following the gem name) I figure a much simpler and thus more robust regex would do.

Maybe I'm missing something, otherwise I'd propose the simplified pattern in my commit.