Skip to content
Extraits de code Groupes Projets
Valider e1fb5846 rédigé par Raphael Sofaer's avatar Raphael Sofaer
Parcourir les fichiers

Use the example config file if travis

parent 91b9bab5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -5,7 +5,17 @@ require 'uri' ...@@ -5,7 +5,17 @@ require 'uri'
class AppConfig < Settingslogic 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 namespace Rails.env
def self.load! def self.load!
...@@ -53,10 +63,6 @@ HELP ...@@ -53,10 +63,6 @@ HELP
File.exists?(File.join(Rails.root, "config", "app.yml")) || (File.exists?(File.join(Rails.root, "config", "app_config.yml"))) File.exists?(File.join(Rails.root, "config", "app.yml")) || (File.exists?(File.join(Rails.root, "config", "app_config.yml")))
end end
def self.travis?
ENV["TRAVIS"]
end
def self.normalize_pod_url def self.normalize_pod_url
unless self[:pod_url] =~ /^(https?:\/\/)/ # starts with http:// or https:// unless self[:pod_url] =~ /^(https?:\/\/)/ # starts with http:// or https://
self[:pod_url] = "http://#{self[:pod_url]}" self[:pod_url] = "http://#{self[:pod_url]}"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter