parliament-grom-decorators 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parliament/grom/decorator/person.rb +11 -0
- data/lib/parliament/grom/decorator/version.rb +1 -1
- data/makefile +17 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c7669b25b9c131cb1f2dcb752dc40fdaeaf6b2e
|
4
|
+
data.tar.gz: 89d568adfac9c3bb9eb9b73375c0b4ab355da468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 872f3afed18df88e0e01686272368ddbed3fc502eb80e7ca200903a7c4c3fdce5e460523ff2f30855e0247e82c73ad713272b5c159a425d915974177f4616e9b
|
7
|
+
data.tar.gz: 231a485498856776a7110073c0b959faaaba28a2b389b4a0ff4fbb03fd02e8208f4078a836c6f09b2e978b36c77ee899c5760803f434be8b0ac225e53fd62829
|
@@ -47,6 +47,17 @@ module Parliament
|
|
47
47
|
@full_name = full_name.join(' ')
|
48
48
|
end
|
49
49
|
|
50
|
+
# Alias personHasImage with fallback.
|
51
|
+
#
|
52
|
+
# @return [String, String] the image location of the Grom::Node or a placeholder string.
|
53
|
+
def image_id(show_placeholder:true)
|
54
|
+
if respond_to?(:personHasImage)
|
55
|
+
personHasImage
|
56
|
+
else
|
57
|
+
show_placeholder ? 'placeholder' : nil
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
50
61
|
# Alias memberHasIncumbency with fallback.
|
51
62
|
#
|
52
63
|
# @return [Array, Array] all the incumbencies of the Grom::Node or an empty array.
|
data/makefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
.PHONY: checkout_to_release deploy_to_release
|
2
|
+
|
3
|
+
# Github variables
|
4
|
+
GITHUB_API=https://api.github.com
|
5
|
+
ORG=ukparliament
|
6
|
+
REPO=parliament-grom-decorators
|
7
|
+
LATEST_REL=$(GITHUB_API)/repos/$(ORG)/$(REPO)/releases
|
8
|
+
REL_TAG=$(shell curl -s $(LATEST_REL) | jq -r '.[0].tag_name')
|
9
|
+
|
10
|
+
checkout_to_release:
|
11
|
+
git checkout -b release $(REL_TAG)
|
12
|
+
|
13
|
+
deploy_to_release:
|
14
|
+
rm *.gem
|
15
|
+
gem build *.gemspec
|
16
|
+
gem push *.gem
|
17
|
+
rm *.gem
|
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.2.
|
4
|
+
version: 0.2.3
|
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-
|
11
|
+
date: 2017-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/parliament/grom/decorator/postal_address.rb
|
190
190
|
- lib/parliament/grom/decorator/seat_incumbency.rb
|
191
191
|
- lib/parliament/grom/decorator/version.rb
|
192
|
+
- makefile
|
192
193
|
- parliament-grom-decorators.gemspec
|
193
194
|
homepage: http://github.com/ukparliament/parliament-grom-decorators
|
194
195
|
licenses: []
|
@@ -209,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
210
|
version: '0'
|
210
211
|
requirements: []
|
211
212
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.6.
|
213
|
+
rubygems_version: 2.6.12
|
213
214
|
signing_key:
|
214
215
|
specification_version: 4
|
215
216
|
summary: Parliamentary Grom decorator
|