Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Pull in updated version of plek
Browse files Browse the repository at this point in the history
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
alext committed Aug 2, 2012
1 parent d59942c commit fc5bf0c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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']
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
11 changes: 10 additions & 1 deletion test/unit/routable_artefact_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test_helper'
require_relative '../test_helper'

class RoutableArtefactTest < ActiveSupport::TestCase
setup do
Expand Down Expand Up @@ -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.