fix pod_uri bug in app_config
This commit is contained in:
parent
084ed0e838
commit
4da9425480
1 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue