parliament-utils 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13af7ea61b278dc7f963e0acc545f11cfadf149d
4
- data.tar.gz: 6a8b53ac4c37387e7879bf6828918aba2a661eb9
3
+ metadata.gz: 3c3ae1db8a0d05619846c4a71d64ee723ee2909d
4
+ data.tar.gz: 3f67e12e92a0e3c31ded1e34da2db98c84bd692f
5
5
  SHA512:
6
- metadata.gz: a8dd45c517231ba88c6bb61c3a417913b364b7ade41c99a6d9bca5dc0b79c42a018e7b407653f02a3236cba42ea1c370a916824572dec57103f326b81887eea5
7
- data.tar.gz: 4bd7f725c08c626a998bd1135e588bf22e444e979e00f110b2643f8d8acd04f38805387ac487b80fe923cd8c612f675e940c2a7838bf10eaac661757bfbf512e
6
+ metadata.gz: 6657efa44b48f7a294c54d57d7850f0883f6205f440066c7fdcd23487e7a5b69a094b247d32f40be245087fb95f68f5bd5476b65f091f9e97703a12d81ac302c
7
+ data.tar.gz: 6ab02040b386cda1d90eab7b6ea9c8107872d5d931174bfecaaece04c62c280270360a9f0e7f9c96939ee7dc8122fe68cbbd269c1068fc9d5126a80a78e86e29
@@ -80,10 +80,9 @@ en:
80
80
  default: '%-d %b %Y'
81
81
  # global error message translations
82
82
  error:
83
- no_constituency: "we couldn't find the postcode you entered."
84
- lookup_unavailable: 'postcode check is currently unavailable.'
85
- postcode_invalid: "we couldn't find the postcode you entered."
86
- no_mp: "We couldn't find an MP for that postcode. Your constituency is"
83
+ lookup_unavailable: 'Postcode check is not available. Please try again later.'
84
+ postcode_invalid_html: 'We could not find your postcode. If you have any questions, <a href="https://www.parliament.uk/mps-lords-and-offices/offices/commons/hcio/contact-us">contact the House of Commons Enquiry Service</a>.'
85
+ no_mp: 'We could not find an MP for your postcode. Your constituency is'
87
86
  # people translations
88
87
  people:
89
88
  index:
@@ -19,9 +19,9 @@ module Parliament
19
19
  begin
20
20
  Parliament::Utils::Helpers::ParliamentHelper.parliament_request.constituency_lookup_by_postcode.get(params: { postcode: postcode })
21
21
  rescue Parliament::ClientError
22
- raise(PostcodeError, I18n.t('error.no_constituency').capitalize)
22
+ raise(PostcodeError, I18n.t('error.postcode_invalid_html'))
23
23
  rescue Parliament::ServerError
24
- raise(PostcodeError, I18n.t('error.lookup_unavailable').capitalize)
24
+ raise(PostcodeError, I18n.t('error.lookup_unavailable'))
25
25
  end
26
26
  end
27
27
 
@@ -57,7 +57,7 @@ module Parliament
57
57
  def self.clean_input(raw_input)
58
58
  postcode = raw_input.gsub(/\s+/, '').upcase
59
59
 
60
- postcode.match(/[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/).nil? ? raise(PostcodeError, I18n.t('error.postcode_invalid').capitalize) : postcode
60
+ postcode.match(/[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/).nil? ? raise(PostcodeError, I18n.t('error.postcode_invalid_html')) : postcode
61
61
  end
62
62
 
63
63
  class PostcodeError < StandardError
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Utils
3
- VERSION = '0.11.1'.freeze
3
+ VERSION = '0.11.2'.freeze
4
4
  end
5
5
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_dependency 'parliament-ruby'
25
- spec.add_dependency 'parliament-grom-decorators'
25
+ spec.add_dependency 'parliament-grom-decorators', '0.31'
26
26
  spec.add_dependency 'parliament-ntriple'
27
27
  spec.add_dependency 'i18n'
28
28
  spec.add_dependency 'vcard'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2018-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parliament-ruby
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: parliament-grom-decorators
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.31'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.31'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: parliament-ntriple
43
43
  requirement: !ruby/object:Gem::Requirement