diff --git a/app/views/comments/index.html.haml b/app/views/comments/index.html.haml
index 135215419..540773b41 100644
--- a/app/views/comments/index.html.haml
+++ b/app/views/comments/index.html.haml
@@ -15,6 +15,6 @@
= will_paginate @comments
%p
- Subscribe to the #{Growstuff::Application.config.site_name}
+ Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']}
= succeed "." do
= link_to "comments RSS feed", comments_path(:format => 'rss')
diff --git a/app/views/comments/index.rss.haml b/app/views/comments/index.rss.haml
index 2d76b788b..d04f5be76 100644
--- a/app/views/comments/index.rss.haml
+++ b/app/views/comments/index.rss.haml
@@ -1,7 +1,7 @@
%rss{:version => 2.0}
%channel
- %title #{Growstuff::Application.config.site_name} - Recent comments on all posts
+ %title #{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on all posts
%link= comments_url
- @comments.each do |comment|
%item
diff --git a/app/views/crops/_index_card.html.haml b/app/views/crops/_index_card.html.haml
index 640a3bcda..7fd64bd4f 100644
--- a/app/views/crops/_index_card.html.haml
+++ b/app/views/crops/_index_card.html.haml
@@ -13,7 +13,7 @@
%b
Planted
= pluralize(crop.plantings.size, "time")
- by #{Growstuff::Application.config.site_name} members
+ by #{ENV['GROWSTUFF_SITE_NAME']} members
- if can? :create, Planting
= link_to 'Plant this', new_planting_path(:params => { :crop_id => crop.id }), :class => 'btn btn-primary'
diff --git a/app/views/crops/index.html.haml b/app/views/crops/index.html.haml
index e12edd656..2431bc9b6 100644
--- a/app/views/crops/index.html.haml
+++ b/app/views/crops/index.html.haml
@@ -1,7 +1,7 @@
- content_for :title, "Crops"
%p
- #{Growstuff::Application.config.site_name} tracks who's growing what, where.
+ #{ENV['GROWSTUFF_SITE_NAME']} tracks who's growing what, where.
View any crop page to see which of our members have planted it and find
information on how to grow it yourself.
diff --git a/app/views/crops/index.rss.haml b/app/views/crops/index.rss.haml
index f74aff653..0766a5348 100644
--- a/app/views/crops/index.rss.haml
+++ b/app/views/crops/index.rss.haml
@@ -1,7 +1,7 @@
%rss{:version => 2.0}
%channel
- %title #{Growstuff::Application.config.site_name} - Recently added crops
+ %title #{ENV['GROWSTUFF_SITE_NAME']} - Recently added crops
%link= crops_url
- @crops.each do |crop|
%item
diff --git a/app/views/crops/show.html.haml b/app/views/crops/show.html.haml
index 8f67d98d4..a8aeb5c93 100644
--- a/app/views/crops/show.html.haml
+++ b/app/views/crops/show.html.haml
@@ -30,7 +30,7 @@
= @crop.name.titleize
has been planted
= pluralize(@crop.plantings.size, "time")
- by #{Growstuff::Application.config.site_name} members.
+ by #{ENV['GROWSTUFF_SITE_NAME']} members.
- else
Nobody is growing this yet. You could be the first!
diff --git a/app/views/devise/mailer/confirmation_instructions.html.haml b/app/views/devise/mailer/confirmation_instructions.html.haml
index f336d874e..6a82d732a 100644
--- a/app/views/devise/mailer/confirmation_instructions.html.haml
+++ b/app/views/devise/mailer/confirmation_instructions.html.haml
@@ -1,4 +1,4 @@
-- site_name = Growstuff::Application.config.site_name
+- site_name = ENV['GROWSTUFF_SITE_NAME']
%p Hello #{@resource.login_name},
%p
diff --git a/app/views/devise/mailer/reset_password_instructions.html.haml b/app/views/devise/mailer/reset_password_instructions.html.haml
index 95aa0ee09..d8efdd93e 100644
--- a/app/views/devise/mailer/reset_password_instructions.html.haml
+++ b/app/views/devise/mailer/reset_password_instructions.html.haml
@@ -1,4 +1,4 @@
-- site_name = Growstuff::Application.config.site_name
+- site_name = ENV['GROWSTUFF_SITE_NAME']
%p Hello #{@resource.login_name},
%p
diff --git a/app/views/devise/mailer/unlock_instructions.html.haml b/app/views/devise/mailer/unlock_instructions.html.haml
index 91177fd55..cb6580971 100644
--- a/app/views/devise/mailer/unlock_instructions.html.haml
+++ b/app/views/devise/mailer/unlock_instructions.html.haml
@@ -1,4 +1,4 @@
-- site_name = Growstuff::Application.config.site_name
+- site_name = ENV['GROWSTUFF_SITE_NAME']
%p Hello #{@resource.login_name},
%p
diff --git a/app/views/devise/registrations/_newsletter_blurb.html.haml b/app/views/devise/registrations/_newsletter_blurb.html.haml
index a731d6724..3ba06ba71 100644
--- a/app/views/devise/registrations/_newsletter_blurb.html.haml
+++ b/app/views/devise/registrations/_newsletter_blurb.html.haml
@@ -1,4 +1,4 @@
-The #{Growstuff::Application.config.site_name} newsletter is sent out
+The #{ENV['GROWSTUFF_SITE_NAME']} newsletter is sent out
every few weeks. Check out our
= link_to 'past newsletters', 'http://blog.growstuff.org/category/newsletter/'
if you want to see the sort of thing we'll send you. Of course, we'll never spam you
diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml
index 28dfdb223..746cb55ba 100644
--- a/app/views/devise/registrations/edit.html.haml
+++ b/app/views/devise/registrations/edit.html.haml
@@ -24,7 +24,7 @@
.control-group
.controls
= f.check_box :newsletter
- Subscribe to the #{Growstuff::Application.config.site_name} newsletter
+ Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter
.help-inline
= render :partial => 'newsletter_blurb'
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 58d93f902..3d43274d6 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -34,7 +34,7 @@
.control-group
.controls
= f.check_box :newsletter, :checked => true
- Subscribe to the #{Growstuff::Application.config.site_name} newsletter
+ Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter
.help-inline
= render :partial => 'newsletter_blurb'
diff --git a/app/views/harvests/index.html.haml b/app/views/harvests/index.html.haml
index 7e5fa486a..bbc96c20e 100644
--- a/app/views/harvests/index.html.haml
+++ b/app/views/harvests/index.html.haml
@@ -1,7 +1,7 @@
- content_for :title, @owner ? "#{@owner}'s harvests" : "Everyone's harvests"
%p
- #{Growstuff::Application.config.site_name} helps you track what you're
+ #{ENV['GROWSTUFF_SITE_NAME']} helps you track what you're
harvesting from your home garden and see how productive it is.
%p
diff --git a/app/views/home/_blurb.html.haml b/app/views/home/_blurb.html.haml
index 58ab419a3..0655e2a66 100644
--- a/app/views/home/_blurb.html.haml
+++ b/app/views/home/_blurb.html.haml
@@ -1,11 +1,11 @@
.span12
-%h1= Growstuff::Application.config.site_name
+%h1= ENV['GROWSTUFF_SITE_NAME']
.row-fluid
.span8.info
%p
- #{Growstuff::Application.config.site_name} is a community of food gardeners.
+ #{ENV['GROWSTUFF_SITE_NAME']} is a community of food gardeners.
We're building an open source platform to help you learn about
growing food, track what you plant and harvest, and swap
seeds and produce with other gardeners near you.
diff --git a/app/views/home/_open.html.haml b/app/views/home/_open.html.haml
index d86b4b9ab..419233c1b 100644
--- a/app/views/home/_open.html.haml
+++ b/app/views/home/_open.html.haml
@@ -1,7 +1,7 @@
%h2 Open Source
%p
- #{Growstuff::Application.config.site_name} is open source software,
+ #{ENV['GROWSTUFF_SITE_NAME']} is open source software,
which means that we share this website's code for free with our
community and the world. We believe that openness,
sustainability, and social good go hand in hand. You can read more
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml
index d98bcc4a0..5d06907cc 100644
--- a/app/views/home/index.html.haml
+++ b/app/views/home/index.html.haml
@@ -4,7 +4,7 @@
%h1
Welcome to
= succeed "," do
- = Growstuff::Application.config.site_name
+ = ENV['GROWSTUFF_SITE_NAME']
= current_member
= render :partial => 'stats'
%p
diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
index 34cd95a00..416ff02b3 100644
--- a/app/views/layouts/_header.html.haml
+++ b/app/views/layouts/_header.html.haml
@@ -5,7 +5,7 @@
%span.icon-bar
%span.icon-bar
%span.icon-bar
- %a.brand(href=root_path)= Growstuff::Application.config.site_name
+ %a.brand(href=root_path)= ENV['GROWSTUFF_SITE_NAME']
.nav-collapse.collapse
%ul.nav
%li= link_to "Crops", crops_path
diff --git a/app/views/layouts/_meta.html.haml b/app/views/layouts/_meta.html.haml
index edd940210..3c28d0cbe 100644
--- a/app/views/layouts/_meta.html.haml
+++ b/app/views/layouts/_meta.html.haml
@@ -3,13 +3,13 @@
- if (content_for?(:member_rss_login_name) && content_for(:member_rss_slug))
- = auto_discovery_link_tag(:rss, { :controller => "/members", :action => 'show', :format => "rss", :id => yield(:member_rss_slug) }, { :title => "#{ Growstuff::Application.config.site_name }- #{yield(:member_rss_login_name)}'s posts" })
- = auto_discovery_link_tag(:rss, { :controller => "/posts", :format => "rss" }, { :title => "#{ Growstuff::Application.config.site_name } - Recent posts from all members" })
- = auto_discovery_link_tag(:rss, { :controller => "/crops", :format => "rss" }, { :title => "#{ Growstuff::Application.config.site_name } - Recently added crops" })
- = auto_discovery_link_tag(:rss, { :controller => "/plantings", :format => "rss" }, { :title => "#{ Growstuff::Application.config.site_name } - Recent plantings from all members" })
+ = auto_discovery_link_tag(:rss, { :controller => "/members", :action => 'show', :format => "rss", :id => yield(:member_rss_slug) }, { :title => "#{ ENV['GROWSTUFF_SITE_NAME'] }- #{yield(:member_rss_login_name)}'s posts" })
+ = auto_discovery_link_tag(:rss, { :controller => "/posts", :format => "rss" }, { :title => "#{ ENV['GROWSTUFF_SITE_NAME'] } - Recent posts from all members" })
+ = auto_discovery_link_tag(:rss, { :controller => "/crops", :format => "rss" }, { :title => "#{ ENV['GROWSTUFF_SITE_NAME'] } - Recently added crops" })
+ = auto_discovery_link_tag(:rss, { :controller => "/plantings", :format => "rss" }, { :title => "#{ ENV['GROWSTUFF_SITE_NAME'] } - Recent plantings from all members" })
%title
- = content_for?(:title) ? yield(:title) + " - #{ Growstuff::Application.config.site_name} " : Growstuff::Application.config.site_name
+ = content_for?(:title) ? yield(:title) + " - #{ ENV['GROWSTUFF_SITE_NAME']} " : ENV['GROWSTUFF_SITE_NAME']
= csrf_meta_tags
/ Le HTML5 shim, for IE6-8 support of HTML elements
/[if lt IE 9]
diff --git a/app/views/members/index.html.haml b/app/views/members/index.html.haml
index 34816d9d4..5bac7592b 100644
--- a/app/views/members/index.html.haml
+++ b/app/views/members/index.html.haml
@@ -1,4 +1,4 @@
-= content_for :title, "#{Growstuff::Application.config.site_name} members"
+= content_for :title, "#{ENV['GROWSTUFF_SITE_NAME']} members"
%div.pagination
= page_entries_info @members, :model => "members"
diff --git a/app/views/members/show.rss.haml b/app/views/members/show.rss.haml
index 1321ad739..96c17f984 100644
--- a/app/views/members/show.rss.haml
+++ b/app/views/members/show.rss.haml
@@ -1,7 +1,7 @@
%rss{:version => 2.0}
%channel
- %title #{Growstuff::Application.config.site_name} - #{@member.login_name}'s recent posts
+ %title #{ENV['GROWSTUFF_SITE_NAME']} - #{@member.login_name}'s recent posts
%link= member_url(@member)
- @posts.each do |post|
%item
diff --git a/app/views/notifier/notify.html.haml b/app/views/notifier/notify.html.haml
index 0597f7ac2..b6e962fb3 100644
--- a/app/views/notifier/notify.html.haml
+++ b/app/views/notifier/notify.html.haml
@@ -1,4 +1,4 @@
-- site_name = Growstuff::Application.config.site_name
+- site_name = ENV['GROWSTUFF_SITE_NAME']
%p Hello #{@notification.recipient.login_name},
%p
diff --git a/app/views/photos/index.html.haml b/app/views/photos/index.html.haml
index 4def0b037..ddf207906 100644
--- a/app/views/photos/index.html.haml
+++ b/app/views/photos/index.html.haml
@@ -1,6 +1,6 @@
- content_for :title, "Photos"
-%p Most recent photos added to #{Growstuff::Application.config.site_name}.
+%p Most recent photos added to #{ENV['GROWSTUFF_SITE_NAME']}.
%div.pagination
= page_entries_info @photos, :model => "photos"
diff --git a/app/views/places/show.html.haml b/app/views/places/show.html.haml
index cad9998a1..d93bd6026 100644
--- a/app/views/places/show.html.haml
+++ b/app/views/places/show.html.haml
@@ -8,7 +8,7 @@
%div#map{ :style => "height:300px"}
%h3
- = Growstuff::Application.config.site_name
+ = ENV['GROWSTUFF_SITE_NAME']
members near #{@place}
- if !@nearby_members.empty?
diff --git a/app/views/plantings/index.rss.haml b/app/views/plantings/index.rss.haml
index 29d73be66..04304c635 100644
--- a/app/views/plantings/index.rss.haml
+++ b/app/views/plantings/index.rss.haml
@@ -2,7 +2,7 @@
%rss{:version => 2.0}
%channel
%title
- #{Growstuff::Application.config.site_name} - Recent plantings from #{ @owner ? @owner : 'all members' }
+ #{ENV['GROWSTUFF_SITE_NAME']} - Recent plantings from #{ @owner ? @owner : 'all members' }
%link= plantings_url
- @plantings.each do |planting|
%item
diff --git a/app/views/posts/index.html.haml b/app/views/posts/index.html.haml
index 80eda2767..10bebe997 100644
--- a/app/views/posts/index.html.haml
+++ b/app/views/posts/index.html.haml
@@ -33,7 +33,7 @@
= link_to "#{@author}'s posts RSS feed", posts_path(:format => 'rss')
- else
- Subscribe to the #{Growstuff::Application.config.site_name}
+ Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']}
= link_to "posts RSS feed", posts_path(:format => 'rss')
or
= succeed "." do
diff --git a/app/views/posts/index.rss.haml b/app/views/posts/index.rss.haml
index 3358064d6..34c0d1153 100644
--- a/app/views/posts/index.rss.haml
+++ b/app/views/posts/index.rss.haml
@@ -2,7 +2,7 @@
%rss{:version => 2.0}
%channel
%title
- #{Growstuff::Application.config.site_name} - Recent posts from #{ @author ? @author : 'all members' }
+ #{ENV['GROWSTUFF_SITE_NAME']} - Recent posts from #{ @author ? @author : 'all members' }
%link= posts_url
- @posts.each do |post|
%item
diff --git a/app/views/posts/show.rss.haml b/app/views/posts/show.rss.haml
index 3dc40c509..0bc4e2348 100644
--- a/app/views/posts/show.rss.haml
+++ b/app/views/posts/show.rss.haml
@@ -1,7 +1,7 @@
%rss{:version => 2.0}
%channel
- %title #{Growstuff::Application.config.site_name} - Recent comments on #{@post.subject}
+ %title #{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on #{@post.subject}
%link= post_url(@post)
- @post.comments.each do |comment|
%item
diff --git a/app/views/seeds/_form.html.haml b/app/views/seeds/_form.html.haml
index aa60cb62d..cb4ca579e 100644
--- a/app/views/seeds/_form.html.haml
+++ b/app/views/seeds/_form.html.haml
@@ -36,7 +36,7 @@
=link_to "Change your location.", edit_member_registration_path
%span.help-block
Are you interested in trading or swapping seeds with other
- #{Growstuff::Application.config.site_name} members? If you
+ #{ENV['GROWSTUFF_SITE_NAME']} members? If you
list your seeds as available for trade, other members can
contact you to request seeds. You can list any conditions or
other information in the description, above.
diff --git a/app/views/seeds/index.html.haml b/app/views/seeds/index.html.haml
index 99effef12..cd317332a 100644
--- a/app/views/seeds/index.html.haml
+++ b/app/views/seeds/index.html.haml
@@ -1,7 +1,7 @@
- content_for :title, @owner ? "#{@owner}'s seeds" : "Everyone's seeds"
%p
- #{Growstuff::Application.config.site_name} helps you track your seed
+ #{ENV['GROWSTUFF_SITE_NAME']} helps you track your seed
stash or trade seeds with other members.
%p
diff --git a/app/views/seeds/index.rss.haml b/app/views/seeds/index.rss.haml
index b39216584..570f35f2f 100644
--- a/app/views/seeds/index.rss.haml
+++ b/app/views/seeds/index.rss.haml
@@ -2,7 +2,7 @@
%rss{:version => 2.0}
%channel
%title
- #{Growstuff::Application.config.site_name} - Recent seeds from #{ @owner ? @owner : 'all members' }
+ #{ENV['GROWSTUFF_SITE_NAME']} - Recent seeds from #{ @owner ? @owner : 'all members' }
%link= seeds_url
- @seeds.each do |seed|
%item
diff --git a/app/views/shared/_account_status.html.haml b/app/views/shared/_account_status.html.haml
index a4b3119c7..5ee44faff 100644
--- a/app/views/shared/_account_status.html.haml
+++ b/app/views/shared/_account_status.html.haml
@@ -10,4 +10,4 @@
= current_member.account.paid_until_string
- if ! current_member.is_paid?
- = link_to "Upgrade and support #{Growstuff::Application.config.site_name}", shop_path, :class => 'btn btn-primary'
+ = link_to "Upgrade and support #{ENV['GROWSTUFF_SITE_NAME']}", shop_path, :class => 'btn btn-primary'
diff --git a/config/application.yml.example b/config/application.yml.example
index 19dbcd3cb..84bd467e2 100644
--- a/config/application.yml.example
+++ b/config/application.yml.example
@@ -35,4 +35,3 @@ staging:
production:
GROWSTUFF_SITE_NAME: Growstuff
-
diff --git a/config/environments/development.rb b/config/environments/development.rb
index cbb6cde89..bf05091b9 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -52,7 +52,6 @@ Growstuff::Application.configure do
}
config.action_mailer.delivery_method = :smtp
- config.site_name = "Growstuff (dev)"
config.host = 'localhost:8080'
config.analytics_code = ''
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 348e32f43..16ece5bcf 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -79,7 +79,6 @@ Growstuff::Application.configure do
}
config.action_mailer.delivery_method = :smtp
- config.site_name = "Growstuff"
config.host = 'growstuff.org'
config.analytics_code = <<-eos
diff --git a/config/environments/staging.rb b/config/environments/staging.rb
index 614198816..cf3296e2d 100644
--- a/config/environments/staging.rb
+++ b/config/environments/staging.rb
@@ -79,7 +79,6 @@ Growstuff::Application.configure do
}
config.action_mailer.delivery_method = :smtp
- config.site_name = "Growstuff (staging)"
config.host = 'dev.growstuff.org'
config.analytics_code = ''
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 8dc7db388..939c7211e 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -42,7 +42,6 @@ Growstuff::Application.configure do
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
Growstuff::Application.configure do
- config.site_name = "Growstuff (test)"
config.host = 'test.example.com'
config.analytics_code = ''
config.currency = 'AUD'
diff --git a/spec/views/home/index_spec.rb b/spec/views/home/index_spec.rb
index f94892b9c..829c6fa36 100644
--- a/spec/views/home/index_spec.rb
+++ b/spec/views/home/index_spec.rb
@@ -38,7 +38,7 @@ describe 'home/index.html.haml', :type => "view" do
end
it 'should say welcome' do
- rendered.should contain "Welcome to #{Growstuff::Application.config.site_name}, #{@member.login_name}"
+ rendered.should contain "Welcome to #{ENV['GROWSTUFF_SITE_NAME']}, #{@member.login_name}"
end
end
diff --git a/spec/views/layouts/_header_spec.rb b/spec/views/layouts/_header_spec.rb
index bb6cea3dd..21c0678ce 100644
--- a/spec/views/layouts/_header_spec.rb
+++ b/spec/views/layouts/_header_spec.rb
@@ -8,7 +8,7 @@ describe 'layouts/_header.html.haml', :type => "view" do
end
it 'shows the title' do
- rendered.should contain Growstuff::Application.config.site_name
+ rendered.should contain ENV['GROWSTUFF_SITE_NAME']
end
it 'should have signup/signin links' do