Created
December 23, 2013 08:34
-
-
Save tommi-lew/8093509 to your computer and use it in GitHub Desktop.
Get Heroku apps and output their ruby versions.
This file contains 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
#!/usr/bin/env rvm-auto-ruby | |
heroku_apps = `heroku apps` | |
heroku_apps = heroku_apps.split("\n") | |
heroku_apps.shift | |
heroku_apps.map! {|item| item.split(" ")[0] } | |
heroku_apps.each do |app| | |
ruby_version = `heroku run "ruby -v" -a #{app}` | |
p "#{app}: #{ruby_version.split("\n")[1]}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment