Permalink
Browse files

Pull in updated version of plek

This changes the lookup for 'frontend' to return the internal hostname
(i.e. frontend.production.alphagov.co.uk). previously this was returning
www.production....  This was causing havok when registering with the
router.
  • Loading branch information...
1 parent d59942c commit fc5bf0c0db4c1934e458f148554e015fa37329cf @alext alext committed Aug 2, 2012
Showing with 17 additions and 8 deletions.
  1. +2 −2 Gemfile
  2. +5 −5 Gemfile.lock
  3. +10 −1 test/unit/routable_artefact_test.rb
View
@@ -8,7 +8,7 @@ end
gem 'gds-warmup-controller', '0.1.0'
-gem 'plek', '~> 0'
+gem 'plek', '~> 0.3.0'
gem 'formtastic', git: 'git://github.com/justinfrench/formtastic.git', branch: '2.1-stable'
gem 'formtastic-bootstrap', git: 'git://github.com/cgunther/formtastic-bootstrap.git', branch: 'bootstrap-2'
gem 'stomp'
@@ -38,7 +38,7 @@ gem 'lograge'
if ENV['CONTENT_MODELS_DEV']
gem "govuk_content_models", path: '../govuk_content_models'
else
- gem "govuk_content_models", "0.2.4"
+ gem "govuk_content_models", "~> 0.2.4"
end
if ENV['BUNDLE_DEV']
View
@@ -118,14 +118,14 @@ GEM
json
gherkin (2.7.3)
json (>= 1.4.6)
- govuk_content_models (0.2.4)
+ govuk_content_models (0.2.5)
bson_ext
differ
gds-api-adapters
gds-sso (>= 0.7, < 2.0)
mongoid (~> 2.4.10)
omniauth-oauth2 (~> 1.0)
- plek (~> 0.1.22)
+ plek (>= 0.1.22, < 0.4)
state_machine
hashie (1.2.0)
hike (1.2.1)
@@ -182,7 +182,7 @@ GEM
omniauth-oauth2 (1.1.0)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
- plek (0.1.24)
+ plek (0.3.0)
builder
polyglot (0.3.3)
rack (1.3.5)
@@ -297,7 +297,7 @@ DEPENDENCIES
gds-sso (~> 1.2.0)
gds-warmup-controller (= 0.1.0)
gelf
- govuk_content_models (= 0.2.4)
+ govuk_content_models (~> 0.2.4)
launchy
lograge
minitest
@@ -306,7 +306,7 @@ DEPENDENCIES
mongoid (~> 2.4.2)
nokogiri
null_logger
- plek (~> 0)
+ plek (~> 0.3.0)
rack (= 1.3.5)
rails (~> 3.1.1)
rake (= 0.9.2)
@@ -1,4 +1,4 @@
-require 'test_helper'
+require_relative '../test_helper'
class RoutableArtefactTest < ActiveSupport::TestCase
setup do
@@ -59,4 +59,13 @@ class RoutableArtefactTest < ActiveSupport::TestCase
@routable.submit
end
end
+
+ should "use the internal hostname for frontend" do
+ # Was previously using the publically visible hostname (www...) which was breaking things.
+ Plek.stubs(:current_env).returns('production')
+ @artefact.update_attributes!(:owning_app => 'frontend')
+ Router.any_instance.expects(:update_application).with("frontend", "https://frontend.production.alphagov.co.uk")
+ Router.any_instance.stubs(:create_route)
+ @routable.submit
+ end
end

0 comments on commit fc5bf0c

Please sign in to comment.