Last active
August 29, 2015 14:26
-
-
Save cbetta/5a8d7e0eacd0014bce1d to your computer and use it in GitHub Desktop.
Get the latest version of a gem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias latest='function _latest(){ curl -s "https://rubygems.org/api/v1/versions/$1/latest.json" | cut -d"\"" -f 4 };_latest' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ latest rails | |
4.2.3 |
What about using gem builtin command? e.g. gem list -r '^rails$'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, this is super handy.
I modified your script for Hex (Elixir)