parliament-grom-decorators 0.4.0 → 0.6.0

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: e649faeeb48c56cf61abf0e55bb06388b8a9b5cc
4
- data.tar.gz: 7242fcbffaeec3b80d423611aca29b6e6067d6f4
3
+ metadata.gz: 59b3a83b821bad071cce710d20079ac25d6b08b2
4
+ data.tar.gz: 7416a8d6af10cb52dea4f79f1ab3fb9a2e6bd498
5
5
  SHA512:
6
- metadata.gz: dbcd078abc3abf833e794fd5f4fc873c46461405201d4b06bec1f63f7bd23ae70f936fce6513101f3dab04509024cad10dcb2f21e09226e631d7013658d90699
7
- data.tar.gz: f956fa3a5576996215614f0b0358bb17b61834bcf7c9cf1f8126c63a5127359f84f4735ea9d007e28fb2eb58bd65721b9979177166732ab16fd09fd0a6711744
6
+ metadata.gz: e606e60b1618be3a0bf00af8aaa46fc7504f944b900690e9a78080f6f290e7614328e9662fa2f554aad9768c3c37ee58d36cdfe672258fa64d568f638e511c60
7
+ data.tar.gz: 328a8c47da1350044c56f5c5102d07316bd65c0802f25b77bc0137b3da99c5691f013955dcaa7d16eccb929c7d21e1fc50c702198979d7e03d7d75f47dc50b1b
@@ -0,0 +1,30 @@
1
+ pipelines:
2
+ GEM-grom-decorators:
3
+ group: Dependencies
4
+ label_template: "${COUNT}"
5
+ materials:
6
+ GEM-grom-decorators-git:
7
+ git: https://github.com/ukparliament/parliament-grom-decorators.git
8
+ branch: master
9
+ auto_update: true
10
+ stages:
11
+ - deploy:
12
+ approval: manual
13
+ jobs:
14
+ deploy:
15
+ tasks:
16
+ - exec:
17
+ run_if: passed
18
+ command: make
19
+ arguments:
20
+ - checkout_to_release
21
+ - exec:
22
+ run_if: passed
23
+ command: make
24
+ arguments:
25
+ - deploy_to_release
26
+
27
+ environments:
28
+ Web.LIVE:
29
+ pipelines:
30
+ - GEM-grom-decorators
@@ -128,6 +128,11 @@ module Parliament
128
128
 
129
129
  @party_name
130
130
  end
131
+
132
+ # @return [Array, Array] the regions of the Grom::Node or an empty array.
133
+ def region
134
+ respond_to?(:inEuropeanRegion) ? inEuropeanRegion : []
135
+ end
131
136
  end
132
137
  end
133
138
  end
@@ -10,6 +10,27 @@ module Parliament
10
10
  def name
11
11
  @name ||= respond_to?(:formalBodyName) ? formalBodyName : ''
12
12
  end
13
+
14
+ # Alias formalBodyStartDate with fallback.
15
+ #
16
+ # @return [DateTime, nil] the start date of the Grom::Node or nil.
17
+ def start_date
18
+ @start_date ||= respond_to?(:formalBodyStartDate) ? DateTime.parse(formalBodyStartDate) : nil
19
+ end
20
+
21
+ # Alias formalBodyEndDate with fallback.
22
+ #
23
+ # @return [DateTime, nil] the end date of the Grom::Node or nil.
24
+ def end_date
25
+ @end_date ||= respond_to?(:formalBodyEndDate) ? DateTime.parse(formalBodyEndDate) : nil
26
+ end
27
+
28
+ # Checks if Grom::Node has an end date.
29
+ #
30
+ # @return [Boolean] a boolean depending on whether or not the Grom::Node has an end date.
31
+ def current?
32
+ end_date.nil?
33
+ end
13
34
  end
14
35
  end
15
36
  end
@@ -1,7 +1,7 @@
1
1
  module Parliament
2
2
  module Grom
3
3
  module Decorator
4
- VERSION = '0.4.0'.freeze
4
+ VERSION = '0.6.0'.freeze
5
5
  end
6
6
  end
7
7
  end
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.0
4
+ version: 0.6.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-08-24 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -170,6 +170,7 @@ files:
170
170
  - bin/console
171
171
  - bin/setup
172
172
  - config/locales/en.yml
173
+ - gocd/web1live.yaml
173
174
  - lib/parliament/grom/decorator.rb
174
175
  - lib/parliament/grom/decorator/constituency_area.rb
175
176
  - lib/parliament/grom/decorator/constituency_group.rb
@@ -214,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
215
  version: '0'
215
216
  requirements: []
216
217
  rubyforge_project:
217
- rubygems_version: 2.6.8
218
+ rubygems_version: 2.6.11
218
219
  signing_key:
219
220
  specification_version: 4
220
221
  summary: Parliamentary Grom decorator