diff --git a/app/models/app_config.rb b/app/models/app_config.rb index 148c1ba7d..e31e4dbb7 100644 --- a/app/models/app_config.rb +++ b/app/models/app_config.rb @@ -6,7 +6,7 @@ require 'uri' class AppConfig < Settingslogic def self.source_file_name - if Rails.env == 'test' || ENV["CI"] || Rails.env.include?("integration") || ENV["HEROKU"].present? + if Rails.env == 'test' || ENV["CI"] || Rails.env.include?("integration") || ENV["HEROKU"] File.join(Rails.root, "config", "application.yml.example") else File.join(Rails.root, "config", "application.yml") @@ -16,7 +16,7 @@ class AppConfig < Settingslogic namespace Rails.env def self.load! - unless ENV["HEROKU"].present? + unless ENV["HEROKU"] if no_config_file? && !have_old_config_file? $stderr.puts <<-HELP ******** You haven't set up your Diaspora settings file. ********** @@ -52,7 +52,7 @@ Please do the following: Process.exit(1) end - if !ENV["HEROKU"].present? && 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: @@ -134,9 +134,9 @@ HELP def self.pod_uri if @@pod_uri.nil? begin - @@pod_uri = Addressable::URI.parse(self.pod_url) + @@pod_uri = Addressable::URI.parse(self[:pod_url]) rescue - puts "WARNING: pod url " + self.pod_url + " is not a legal URI" + puts "WARNING: pod url " + self[:pod_url] + " is not a legal URI" end end return @@pod_uri