-
-
Save kamilhism/4509057 to your computer and use it in GitHub Desktop.
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
| `heroku list`.split("\n").each do |app| | |
| app = app.strip | |
| # Some "heroku apps" lines have === formatting for grouping. They're not apps. | |
| next if app[0..2] == "===" | |
| # Some are appended by owner emails | |
| app = app.split(" ")[0].to_s.strip | |
| # Blank lines can be ommitted. | |
| next if app == "" | |
| rails_path = `heroku run bundle show rails --app #{app}`.split("\n")[-1] | |
| rails_version_number = rails_path.split("rails-")[1] | |
| unless ["3.2.11", "3.1.10", "3.0.19", "2.3.15"].include?(rails_version_number) or rails_version_number == "" | |
| puts "Uh oh! #{app_name} has #{rails_version_number}." | |
| else | |
| puts "..." | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment