6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/jumpup/heroku/env.rb', line 6
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,
deploy_branch: Jumpup::Heroku.configuration.deploy_branch,
deploy_to_production_branch: Jumpup::Heroku.configuration.deploy_to_production_branch,
}.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
|