module Jumpup module Heroku class Env def self.all if Jumpup::Heroku.configuration.valid? { app: Jumpup::Heroku.configuration.app, staging_app: Jumpup::Heroku.configuration.staging_app, production_app: Jumpup::Heroku.configuration.production_app, run_database_tasks: Jumpup::Heroku.configuration.run_database_tasks, host: Jumpup::Heroku.configuration.host }.delete_if { |k, v| v.nil? } else error_message = 'Check your `/config/initializers/jumpup-heroku.rb` and ' \ 'confirm you have defined only `app` or `staging_app` and `production_app` together ' \ 'more info here https://github.com/Helabs/jumpup-heroku' raise ConfigurationError, error_message end end end end end