Skip to content
Browse files

Reduce direct dependency on environment variables

This way I can run tests that run this method directly and without setting the
environment variable (it is set in Rakefile).
  • Loading branch information...
1 parent 221ed85 commit b7b47668f023e65f3fda1dabd595ff6507bbf9d3 @jamiecobbett jamiecobbett committed Feb 25, 2013
Showing with 4 additions and 5 deletions.
  1. +1 −1 Gemfile
  2. +2 −3 Gemfile.lock
  3. +1 −1 app/helpers/artefacts_helper.rb
View
2 Gemfile
@@ -3,7 +3,7 @@ source 'https://BnrJb6FZyzspBboNJzYZ@gem.fury.io/govuk/'
gem 'gds-warmup-controller', '0.1.0'
-gem 'plek', '1.1.0'
+gem 'plek', '1.3.1'
gem 'formtastic', git: 'https://github.com/justinfrench/formtastic.git', branch: '2.1-stable'
gem 'formtastic-bootstrap', git: 'https://github.com/cgunther/formtastic-bootstrap.git', branch: 'bootstrap-2'
gem 'ansi'
View
5 Gemfile.lock
@@ -214,8 +214,7 @@ GEM
omniauth-oauth2 (1.1.1)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
- plek (1.1.0)
- builder
+ plek (1.3.1)
polyglot (0.3.3)
rack (1.4.3)
rack-accept (0.4.5)
@@ -341,7 +340,7 @@ DEPENDENCIES
mongoid_rails_migrations (= 1.0.0)
nokogiri
null_logger
- plek (= 1.1.0)
+ plek (= 1.3.1)
rails (= 3.2.11)
router-client (= 3.1.0)
rummageable (~> 0.3.0)
View
2 app/helpers/artefacts_helper.rb
@@ -4,7 +4,7 @@ def need_url(artefact)
end
def published_url(artefact)
- ENV['GOVUK_WEBSITE_ROOT'] + "/#{artefact.slug}"
+ Plek.current.website_root + "/#{artefact.slug}"
end
def human_timestamp(timestamp)

0 comments on commit b7b4766

Please sign in to comment.
Something went wrong with that request. Please try again.