DG IZ; example extension convention for app_config
This commit is contained in:
parent
6dd7911c8c
commit
8941975224
5 changed files with 6 additions and 6 deletions
|
|
@ -8,10 +8,10 @@ end
|
|||
|
||||
if File.exist? "#{Rails.root}/config/app_config.yml"
|
||||
all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml"
|
||||
all_envs = load_config_yaml "#{Rails.root}/config/app_config_example.yml" unless all_envs
|
||||
all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml.example" unless all_envs
|
||||
else
|
||||
puts "WARNING: No config/app_config.yml found! Look at config/app_config_example.yml for help."
|
||||
all_envs = load_config_yaml "#{Rails.root}/config/app_config_example.yml"
|
||||
puts "WARNING: No config/app_config.yml found! Look at config/app_config.yml.example for help."
|
||||
all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml.example"
|
||||
end
|
||||
|
||||
if all_envs[Rails.env.to_s]
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def create
|
|||
end
|
||||
|
||||
def set_app_config username
|
||||
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config_example.yml')))
|
||||
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
|
||||
current_config[Rails.env.to_s] ||= {}
|
||||
current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
|
||||
current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
require 'config/environment'
|
||||
|
||||
def set_app_config username
|
||||
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config_example.yml')))
|
||||
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
|
||||
current_config[Rails.env.to_s] ||= {}
|
||||
current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
|
||||
current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
require 'config/environment'
|
||||
|
||||
def set_app_config username
|
||||
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config_example.yml')))
|
||||
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
|
||||
current_config[Rails.env.to_s] ||= {}
|
||||
current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
|
||||
current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
|
||||
|
|
|
|||
Loading…
Reference in a new issue