slimmer 9.3.0 → 9.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc69f7b1010508a72c3f0e0bd19fda25a3a333c5
4
- data.tar.gz: e268546eeebe6bbf28a1abe6cca04a8b862db7f0
3
+ metadata.gz: b6039bc564c32247a980528bfd6ed8117fdf350a
4
+ data.tar.gz: 8521f622319f6f03d771460a10679c4dbd8d2c01
5
5
  SHA512:
6
- metadata.gz: c272c313b75a6fa1fccb00635156b7f5e9b5bd215d83b3643a49b04d9e9379280b20ef339aa499e9817742e7ecab7f4dbd82ce3054b664f22f1cc6d6a1944914
7
- data.tar.gz: 26eaf8081af22c84a6f57f685c508ec59029ce172b9668476ba2d8b8ab6a94c1840db8f4a76b5684929a618d60c1497bc15945d067396eb7cd73b0977f41537d
6
+ metadata.gz: c05b8d066db7a939c44bf946b9b10c66790e199331ee7aa01645e1cb46cc6f44976c4ba8e80bc0dbd0c90b420ed4a588cd78d625bf88fe6cc123ed955874638a
7
+ data.tar.gz: d08a0d9843664cff85ea436a12a080b863c93f3bac71f65700f0333c235c77d128831cafd1143f1e5c1a1325657027e044ada04d55d9df4517fed5eb4e918140
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # 9.3.1
2
+
3
+ * Allows frontend apps to stub component locales for example
4
+
5
+ ```ruby
6
+ class ActiveSupport::TestCase
7
+ include Slimmer::TestHelpers::SharedTemplates
8
+
9
+ def setup
10
+ stub_shared_component_locales
11
+ end
12
+ end
13
+ ```
14
+
15
+ (PR #155 https://github.com/alphagov/slimmer/pull/155)
16
+
1
17
  # 9.3.0
2
18
 
3
19
  * Integrates translations from GOVUK Components to be used in applications
@@ -1,6 +1,15 @@
1
1
  module Slimmer
2
2
  module TestHelpers
3
3
  module SharedTemplates
4
+ def stub_shared_component_locales
5
+ stub_request(:get, /https:\/\/\S+.gov.uk\/templates\/locales\/.+/).
6
+ with(headers: { 'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', 'User-Agent' => 'Ruby' }).
7
+ to_return(status: 400, headers: {})
8
+ stub_request(:get, /https:\/\/\S+.gov.uk\/templates\/locales\/en/).
9
+ with(headers: { 'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => ' gzip, deflate', 'User-Agent' => 'Ruby' }).
10
+ to_return(status: 200, body: '{}', headers: {})
11
+ end
12
+
4
13
  def shared_component_selector(name)
5
14
  "#{Slimmer::ComponentResolver::TEST_TAG_NAME}[data-template='govuk_component-#{name}']"
6
15
  end
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = '9.3.0'
2
+ VERSION = '9.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.3.0
4
+ version: 9.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Griffiths
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-27 00:00:00.000000000 Z
12
+ date: 2016-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -318,7 +318,8 @@ files:
318
318
  - test/test_template_dependency_on_static_test.rb
319
319
  - test/typical_usage_test.rb
320
320
  homepage: http://github.com/alphagov/slimmer
321
- licenses: []
321
+ licenses:
322
+ - MIT
322
323
  metadata: {}
323
324
  post_install_message:
324
325
  rdoc_options: []