Commit 910cc523 authored by Shane Becker's avatar Shane Becker

rename config/app_config.yml to config/app.yml in accordance to The Redundant...

rename config/app_config.yml to config/app.yml in accordance to The Redundant Rendundacy Act of 2011
parent 6cda0bf9
......@@ -5,6 +5,7 @@ public/images/ball_small.png
public/images/ball.png
# Configuration files
config/app_config.yml
config/app.yml
config/fb_config.yml
config/oauth_keys.yml
config/initializers/secret_token.rb
......
......@@ -71,12 +71,12 @@ default:
#google analytics key, if false, it won't include the javascript
google_a_site: false
#piwik integration if not set, no javascript included
piwik_id:
piwik_id:
# the site url in raw format (e.g. pikwik.examplehost.com)
piwik_url:
piwik_url:
#cloudfiles username and api-key, used for backups
cloudfiles_username: 'example'
......
......@@ -21,7 +21,7 @@ set :deploy_via, :checkout
namespace :deploy do
task :symlink_config_files do
run "ln -s -f #{shared_path}/config/database.yml #{current_path}/config/database.yml"
run "ln -s -f #{shared_path}/config/app_config.yml #{current_path}/config/app_config.yml"
run "ln -s -f #{shared_path}/config/app.yml #{current_path}/config/app.yml"
run "ln -s -f #{shared_path}/config/oauth_keys.yml #{current_path}/config/oauth_keys.yml"
end
......
......@@ -3,10 +3,10 @@
# the COPYRIGHT file.
#
# Sets up AppConfig. Unless stated below, each entry is a the string in
# the file app_config.yml, as applicable for current environment.
# the file app.yml, as applicable for current environment.
#
# Specific items
# * pod_url: As in app_config.yml, normalized with a trailing /.
# * pod_url: As in app.yml, normalized with a trailing /.
# * pod_uri: An uri object derived from pod_url.
require File.join(Rails.root, 'lib', 'app_config')
......
......@@ -13,9 +13,9 @@ def create
#set pod url
username = backer_info[backer_number]['username'].gsub(/ /,'').downcase
set_app_config username unless File.exists?(Rails.root.join('config', 'app_config.yml'))
set_app_config username unless File.exists?(Rails.root.join('config', 'app.yml'))
require File.join(File.dirname(__FILE__), "..", "..", "config", "initializers", "_load_app_config.rb")
require File.join(File.dirname(__FILE__), "..", "..", "config", "initializers", "_load_app.rb")
# Create seed user
user = User.build(:email => "#{username}@#{username}.joindiaspora.com",
......@@ -36,11 +36,11 @@ def create
end
def set_app_config username
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
current_config = YAML.load(File.read(Rails.root.join('config', 'app.yml.example')))
current_config[Rails.env.to_s] ||= {}
current_config[Rails.env.to_s]['pod_url'] = "http://#{username}.joindiaspora.com/"
current_config['default']['pod_url'] = "http://#{username}.joindiaspora.com/"
file = File.new(Rails.root.join('..','..','shared','app_config.yml'),'w')
file = File.new(Rails.root.join('..','..','shared','app.yml'),'w')
file.write(current_config.to_yaml)
file.close
end
......@@ -6,17 +6,17 @@ require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")
require File.join(File.dirname(__FILE__), "..", "..", "spec", "helper_methods")
def set_app_config username
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
current_config = YAML.load(File.read(Rails.root.join('config', 'app.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"
file = File.new(Rails.root.join('config','app_config.yml'),'w')
file = File.new(Rails.root.join('config','app.yml'),'w')
file.write(current_config.to_yaml)
file.close
end
username = "tom"
set_app_config username unless File.exists?(Rails.root.join('config', 'app_config.yml'))
set_app_config username unless File.exists?(Rails.root.join('config', 'app.yml'))
require Rails.root.join('config', "initializers", "_load_app_config.rb")
include HelperMethods
......
......@@ -6,16 +6,16 @@ require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")
require File.join(File.dirname(__FILE__), "..", "..", "spec", "helper_methods")
def set_app_config username
current_config = YAML.load(File.read(Rails.root.join('config', 'app_config.yml.example')))
current_config = YAML.load(File.read(Rails.root.join('config', 'app.yml.example')))
current_config[Rails.env.to_s] ||= {}
current_config[Rails.env.to_s]['pod_url'] = "http://#{username}.joindiaspora.com/"
current_config['default']['pod_url'] = "http://#{username}.joindiaspora.com/"
file = File.new(Rails.root.join('..','..','shared','app_config.yml'),'w')
file = File.new(Rails.root.join('..','..','shared','app.yml'),'w')
file.write(current_config.to_yaml)
file.close
end
set_app_config "tom" unless File.exists?(Rails.root.join('config', 'app_config.yml'))
set_app_config "tom" unless File.exists?(Rails.root.join('config', 'app.yml'))
require 'config/initializers/_load_app_config.rb'
include HelperMethods
......
......@@ -28,17 +28,17 @@ class AppConfig
def self.load_config_for_environment(env)
if File.exist? "#{Rails.root}/config/app_config.yml.example"
all_envs = load_config_yaml "#{Rails.root}/config/app_config.yml.example"
all_envs = load_config_yaml "#{Rails.root}/config/app.yml.example"
else
$stderr.puts "ERROR: Why have you deleted config/app_config.yml.example?"
$stderr.puts "ERROR: Why have you deleted config/app.yml.example?"
all_envs = {}
end
if File.exist? "#{Rails.root}/config/app_config.yml"
all_envs_custom = load_config_yaml "#{Rails.root}/config/app_config.yml"
if File.exist? "#{Rails.root}/config/app.yml"
all_envs_custom = load_config_yaml "#{Rails.root}/config/app.yml"
all_envs.deep_merge!(all_envs_custom)
else
unless Rails.env == "development" || Rails.env == "test"
$stderr.puts "WARNING: No config/app_config.yml found! Look at config/app_config.yml.example for help."
$stderr.puts "WARNING: No config/app.yml found! Look at config/app_config.yml.example for help."
end
end
......@@ -68,7 +68,7 @@ class AppConfig
def self.check_pod_uri
if self.config_vars[:pod_uri].host == "example.org" && Rails.env != "test"
puts "WARNING: Please modify your app_config.yml to have a proper pod_url!"
puts "WARNING: Please modify your app.yml to have a proper pod_url!"
end
end
......
......@@ -112,7 +112,7 @@
<li>
<h2>Configure your <abbr class="helpful" title="A Diaspora installation">pod</abbr></h2>
<img src='images/icons/cog.png'/>
<p>Look at <code class="helpful" title='General pod configuration (location to upload photos, SSL certs, etc.)'>config/app_config.yml.example</code> and <code class="helpful" title="mySQL username/password">config/database.yml.example</code> for help.</p>
<p>Look at <code class="helpful" title='General pod configuration (location to upload photos, SSL certs, etc.)'>config/app.yml.example</code> and <code class="helpful" title="mySQL username/password">config/database.yml.example</code> for help.</p>
</li>
<li>
......
......@@ -138,8 +138,8 @@ fi
# Check if config files exists
if [ ! -e 'config/app_config.yml' ]; then
echo "FATAL: config/app_config.yml is missing! Copy over config/app_config.yml.example to config/app_config.yml and edit it properly!" >&2
if [ ! -e 'config/app.yml' ]; then
echo "FATAL: config/app.yml is missing! Copy over config/app.yml.example to config/app.yml and edit it properly!" >&2
exit 67
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment