lib/tasks/pipeline_setup.rake in heroku_ops-0.0.2 vs lib/tasks/pipeline_setup.rake in heroku_ops-0.0.4
- old
+ new
@@ -1,14 +1,14 @@
def base_app_name
"#{Rails.application.class.parent_name.underscore.gsub('_','-')}"
end
-def app_name_for_env(env)
+def app_name_from_environment(env)
case env.downcase
when "production"
- "#{base_app_name}-production"
+ ENV['HEROKU_APPNAME_PRODUCTION'] || "#{Rails.application.class.parent_name.underscore.gsub('_','-')}-production"
when "staging"
- "#{base_app_name}-staging"
+ ENV['HEROKU_APPNAME_STAGING'] || "#{Rails.application.class.parent_name.underscore.gsub('_','-')}-staging"
end
end
def create_addons_for_appname(appname)
sh "heroku addons:create heroku-postgresql:hobby-dev -a #{appname}"