Use the example config file if travis
This commit is contained in:
parent
91b9bab52d
commit
e1fb5846b6
1 changed files with 11 additions and 5 deletions
|
|
@ -5,7 +5,17 @@ require 'uri'
|
|||
|
||||
class AppConfig < Settingslogic
|
||||
|
||||
source File.join(Rails.root, "config", "application.yml")
|
||||
def self.travis?
|
||||
ENV["TRAVIS"]
|
||||
end
|
||||
|
||||
def self.source_file_name
|
||||
file_name = "application.yml"
|
||||
file_name << ".example" if travis?
|
||||
File.join(Rails.root, "config", file_name)
|
||||
end
|
||||
|
||||
source source_file_name
|
||||
namespace Rails.env
|
||||
|
||||
def self.load!
|
||||
|
|
@ -53,10 +63,6 @@ HELP
|
|||
File.exists?(File.join(Rails.root, "config", "app.yml")) || (File.exists?(File.join(Rails.root, "config", "app_config.yml")))
|
||||
end
|
||||
|
||||
def self.travis?
|
||||
ENV["TRAVIS"]
|
||||
end
|
||||
|
||||
def self.normalize_pod_url
|
||||
unless self[:pod_url] =~ /^(https?:\/\/)/ # starts with http:// or https://
|
||||
self[:pod_url] = "http://#{self[:pod_url]}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue