not overwriting app config if it already exists
This commit is contained in:
parent
606a6bb43a
commit
a60287348d
3 changed files with 7 additions and 3 deletions
|
|
@ -13,7 +13,8 @@ def create
|
||||||
|
|
||||||
#set pod url
|
#set pod url
|
||||||
username = backer_info[backer_number]['username'].gsub(/ /,'').downcase
|
username = backer_info[backer_number]['username'].gsub(/ /,'').downcase
|
||||||
set_app_config username
|
set_app_config username unless File.exists?(Rails.root.join('config', 'app_config.yml'))
|
||||||
|
|
||||||
require File.join(File.dirname(__FILE__), "..", "..", "config", "initializers", "_load_app_config.rb")
|
require File.join(File.dirname(__FILE__), "..", "..", "config", "initializers", "_load_app_config.rb")
|
||||||
|
|
||||||
# Create seed user
|
# Create seed user
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,9 @@ def set_app_config username
|
||||||
end
|
end
|
||||||
|
|
||||||
username = "tom"
|
username = "tom"
|
||||||
set_app_config username
|
set_app_config username unless File.exists?(Rails.root.join('config', 'app_config.yml'))
|
||||||
|
|
||||||
|
require Rails.root.join('config', "initializers", "_load_app_config.rb")
|
||||||
|
|
||||||
# Create seed user
|
# Create seed user
|
||||||
user = User.build( :email => "tom@tom.joindiaspora.com",
|
user = User.build( :email => "tom@tom.joindiaspora.com",
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ def set_app_config username
|
||||||
file.close
|
file.close
|
||||||
end
|
end
|
||||||
|
|
||||||
set_app_config "tom"
|
set_app_config "tom" unless File.exists?(Rails.root.join('config', 'app_config.yml'))
|
||||||
|
|
||||||
require 'config/initializers/_load_app_config.rb'
|
require 'config/initializers/_load_app_config.rb'
|
||||||
|
|
||||||
# Create seed user
|
# Create seed user
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue