Class: HerokuFormationValidator::Plugins::Addons
- Inherits:
-
Object
- Object
- HerokuFormationValidator::Plugins::Addons
- Defined in:
- lib/heroku_formation_validator/plugins/addons.rb
Class Method Summary collapse
Class Method Details
.run(heroku_api, app, values) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/heroku_formation_validator/plugins/addons.rb', line 4 def self.run(heroku_api, app, values) errors = [] addons = heroku_api.addons(app) values.each do |expected_addon| if !addons.detect{|addon| addon["plan"]["name"] == expected_addon} errors << "\"#{expected_addon}\" is not installed" end end errors end |