Commit 85ae40bca7d821d9edb9304e6855a6dcb8dbdb4b

Authored by Joenio Costa
Committed by Daniela Feitosa
1 parent 1217170d

Removing noosfero.yml from repository

(ActionItem1820)
config/initializers/load_config.rb
1 -NOOSFERO_CONF = YAML.load_file("#{RAILS_ROOT}/config/noosfero.yml")[RAILS_ENV] 1 +file = "#{RAILS_ROOT}/config/noosfero.yml"
  2 +NOOSFERO_CONF = File.exists?(file) ? YAML.load_file(file)[RAILS_ENV] || {} : {}
config/noosfero.yml
@@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
1 -development: &DEVELOPMENT  
2 - mail_enabled: true  
3 - webmail_url: "http://localhost.localdomain/"  
4 - addthis_enabled: true  
5 - addthis_pub: your-user-name  
6 - addthis_logo: http://localhost:3000/images/logo-200x50.png  
7 - addthis_options: favorites, email, digg, delicious, technorati, slashdot, twitter, more  
8 - gravatar: wavatar  
9 - googlemaps_initial_zoom: 4  
10 -  
11 -test: &TEST  
12 - <<: *DEVELOPMENT  
13 -  
14 -production:  
config/noosfero.yml.dist 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +development:
  2 + mail_enabled: true
  3 + webmail_url: "http://localhost.localdomain/"
  4 + addthis_enabled: true
  5 + addthis_pub: your-user-name
  6 + addthis_logo: http://localhost:3000/images/logo-200x50.png
  7 + addthis_options: favorites, email, digg, delicious, technorati, slashdot, twitter, more
  8 + gravatar: wavatar
  9 + googlemaps_initial_zoom: 4
  10 +
  11 +test:
  12 +
  13 +production:
test/unit/load_config_test.rb
@@ -2,11 +2,7 @@ require File.dirname(__FILE__) + &#39;/../test_helper&#39; @@ -2,11 +2,7 @@ require File.dirname(__FILE__) + &#39;/../test_helper&#39;
2 2
3 class LoadConfigTest < Test::Unit::TestCase 3 class LoadConfigTest < Test::Unit::TestCase
4 4
5 - should 'ensure YAML file exists' do  
6 - assert File.exists?("#{RAILS_ROOT}/config/noosfero.yml")  
7 - end  
8 -  
9 - should 'ensure YAML file was loaded' do 5 + should 'ensure NOOSFERO_CONF was defined' do
10 assert NOOSFERO_CONF 6 assert NOOSFERO_CONF
11 assert_kind_of Hash, NOOSFERO_CONF 7 assert_kind_of Hash, NOOSFERO_CONF
12 end 8 end