parliament-grom-decorators 0.1.8 → 0.2.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: caf5b54f7284c776dedf0e150c6e61b828538a4b
|
|
4
|
+
data.tar.gz: 569dd6c2278a0661d7a71da4c5ea4c25d33d741f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5049ec5b9a1677f722e29c17cedf619aa326854e539dac2ffee6c618fd1abaa13369da730c9b636b96fa9c51e0962a8c3a37b155f3e0d54dc39689360b8ad275
|
|
7
|
+
data.tar.gz: d6ae208e8efcb123e59ded44b6df5535f5213ccaa06ea3811d5505ae2c2db5a377101afccc1fc5b553a06de98a048a9eaa43a2428d2e8036e4bfe2b9b8f8f584
|
|
@@ -169,7 +169,6 @@ module Parliament
|
|
|
169
169
|
build_house_membership_status(no_current_seat_incumbency, no_current_house_incumbency, former_lord, former_mp)
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
# TODO: Convert hard-coded strings to language file values
|
|
173
172
|
def build_house_membership_status(no_current_seat_incumbency, no_current_house_incumbency, former_lord, former_mp)
|
|
174
173
|
statuses = []
|
|
175
174
|
statuses << I18n.t('person.current.mp') unless no_current_seat_incumbency
|
|
@@ -177,7 +176,7 @@ module Parliament
|
|
|
177
176
|
statuses << I18n.t('person.former.member_of_the_house_of_lords') if former_lord
|
|
178
177
|
statuses << I18n.t('person.former.mp') if former_mp
|
|
179
178
|
|
|
180
|
-
statuses
|
|
179
|
+
convert_house_membership_status(statuses)
|
|
181
180
|
end
|
|
182
181
|
|
|
183
182
|
def general_membership_status
|
|
@@ -186,6 +185,12 @@ module Parliament
|
|
|
186
185
|
statuses << I18n.t('person.former.member') if !incumbencies.empty? && incumbencies.select(&:current?).empty?
|
|
187
186
|
statuses
|
|
188
187
|
end
|
|
188
|
+
|
|
189
|
+
def convert_house_membership_status(statuses)
|
|
190
|
+
statuses.each_with_index do |status, index|
|
|
191
|
+
status[0] = status[0].downcase if index != 0
|
|
192
|
+
end
|
|
193
|
+
end
|
|
189
194
|
end
|
|
190
195
|
end
|
|
191
196
|
end
|
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
|
|
12
12
|
spec.summary = %q{Parliamentary Grom decorator}
|
|
13
13
|
spec.description = %q{Parliamentary Grom decorator}
|
|
14
|
-
spec.homepage = 'http://github.com/ukparliament/
|
|
14
|
+
spec.homepage = 'http://github.com/ukparliament/parliament-grom-decorators'
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
17
17
|
f.match(%r{^(test|spec|features)/})
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parliament-grom-decorators
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rebecca Appleyard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-06-
|
|
11
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -190,7 +190,7 @@ files:
|
|
|
190
190
|
- lib/parliament/grom/decorator/seat_incumbency.rb
|
|
191
191
|
- lib/parliament/grom/decorator/version.rb
|
|
192
192
|
- parliament-grom-decorators.gemspec
|
|
193
|
-
homepage: http://github.com/ukparliament/
|
|
193
|
+
homepage: http://github.com/ukparliament/parliament-grom-decorators
|
|
194
194
|
licenses: []
|
|
195
195
|
metadata: {}
|
|
196
196
|
post_install_message:
|