set ENV['HEROKU'] explicitly in the heroku:config task
This commit is contained in:
parent
ba63c028e6
commit
57079ef5cd
2 changed files with 4 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ require 'uri'
|
|||
class AppConfig < Settingslogic
|
||||
|
||||
def self.source_file_name
|
||||
return ENV.to_hash if ENV["STACK"] # Using Heroku
|
||||
return ENV.to_hash if ENV["HEROKU"] # Using Heroku
|
||||
|
||||
if Rails.env == 'test' || ENV["CI"] || Rails.env.include?("integration")
|
||||
File.join(Rails.root, "config", "application.yml.example")
|
||||
|
|
@ -18,7 +18,7 @@ class AppConfig < Settingslogic
|
|||
namespace Rails.env
|
||||
|
||||
def self.load!
|
||||
unless ENV["STACK"]
|
||||
unless ENV["HEROKU"]
|
||||
if no_config_file? && !have_old_config_file?
|
||||
$stderr.puts <<-HELP
|
||||
******** You haven't set up your Diaspora settings file. **********
|
||||
|
|
@ -54,7 +54,7 @@ Please do the following:
|
|||
Process.exit(1)
|
||||
end
|
||||
|
||||
if !ENV["STACK"] && no_cert_file_in_prod?
|
||||
if !ENV["HEROKU"] && no_cert_file_in_prod?
|
||||
$stderr.puts <<-HELP
|
||||
******** Diaspora does not know where your SSL-CA-Certificates file is. **********
|
||||
Please add the root certificate bundle (this is operating system specific) to application.yml. Defaults:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace :heroku do
|
|||
CONFIG = YAML.load_file('config/application.yml')['production'] rescue {}
|
||||
command = "heroku config:add"
|
||||
CONFIG.each {|key, val| command << " #{key}=#{val} " if val }
|
||||
command << " HEROKU=true "
|
||||
system command
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue