diff --git a/.gitignore b/.gitignore index ea96347f86c..7cedbc51df0 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/config/app_config.yml.example b/config/app.yml.example similarity index 99% rename from config/app_config.yml.example rename to config/app.yml.example index 0e986fdc30b..ce5feaaa3b1 100644 --- a/config/app_config.yml.example +++ b/config/app.yml.example @@ -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' diff --git a/config/deploy.rb b/config/deploy.rb index 39052bb6c4c..1994ef2cf2c 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -21,7 +21,7 @@ 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 diff --git a/config/initializers/_load_app_config.rb b/config/initializers/_load_app_config.rb index 0e3420534ee..3b5aa3d7cd0 100644 --- a/config/initializers/_load_app_config.rb +++ b/config/initializers/_load_app_config.rb @@ -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') diff --git a/db/seeds/backer.rb b/db/seeds/backer.rb index b27d1c67426..0419aa777ea 100644 --- a/db/seeds/backer.rb +++ b/db/seeds/backer.rb @@ -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 diff --git a/db/seeds/dev.rb b/db/seeds/dev.rb index e9d3215f99f..64066f4ebc8 100644 --- a/db/seeds/dev.rb +++ b/db/seeds/dev.rb @@ -6,17 +6,17 @@ 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 diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb index 69f8c8102e7..31bc2bc8c79 100644 --- a/db/seeds/tom.rb +++ b/db/seeds/tom.rb @@ -6,16 +6,16 @@ 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 diff --git a/lib/app_config.rb b/lib/app_config.rb index 8577adfc442..c0cbd67888d 100644 --- a/lib/app_config.rb +++ b/lib/app_config.rb @@ -28,17 +28,17 @@ def self.configure_for_environment(env) 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 @@ def self.normalize_pod_url 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 diff --git a/public/default.html b/public/default.html index dbf7bd3efb0..3a1692ef03e 100644 --- a/public/default.html +++ b/public/default.html @@ -112,7 +112,7 @@

You're about to change the Internet. Let's get you set up, shall we?

  • Configure your pod

    -

    Look at config/app_config.yml.example and config/database.yml.example for help.

    +

    Look at config/app.yml.example and config/database.yml.example for help.

  • diff --git a/script/server b/script/server index 6122f1642c2..32cf17a8794 100755 --- a/script/server +++ b/script/server @@ -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