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
|
class AppConfig < Settingslogic
|
||||||
|
|
||||||
def self.source_file_name
|
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")
|
if Rails.env == 'test' || ENV["CI"] || Rails.env.include?("integration")
|
||||||
File.join(Rails.root, "config", "application.yml.example")
|
File.join(Rails.root, "config", "application.yml.example")
|
||||||
|
|
@ -18,7 +18,7 @@ class AppConfig < Settingslogic
|
||||||
namespace Rails.env
|
namespace Rails.env
|
||||||
|
|
||||||
def self.load!
|
def self.load!
|
||||||
unless ENV["STACK"]
|
unless ENV["HEROKU"]
|
||||||
if no_config_file? && !have_old_config_file?
|
if no_config_file? && !have_old_config_file?
|
||||||
$stderr.puts <<-HELP
|
$stderr.puts <<-HELP
|
||||||
******** You haven't set up your Diaspora settings file. **********
|
******** You haven't set up your Diaspora settings file. **********
|
||||||
|
|
@ -54,7 +54,7 @@ Please do the following:
|
||||||
Process.exit(1)
|
Process.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if !ENV["STACK"] && no_cert_file_in_prod?
|
if !ENV["HEROKU"] && no_cert_file_in_prod?
|
||||||
$stderr.puts <<-HELP
|
$stderr.puts <<-HELP
|
||||||
******** Diaspora does not know where your SSL-CA-Certificates file is. **********
|
******** 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:
|
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 {}
|
CONFIG = YAML.load_file('config/application.yml')['production'] rescue {}
|
||||||
command = "heroku config:add"
|
command = "heroku config:add"
|
||||||
CONFIG.each {|key, val| command << " #{key}=#{val} " if val }
|
CONFIG.each {|key, val| command << " #{key}=#{val} " if val }
|
||||||
|
command << " HEROKU=true "
|
||||||
system command
|
system command
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue