parliament-grom-decorators 0.27.6 → 0.27.7

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
- SHA1:
3
- metadata.gz: c00e897763f3cce97ef6d88b2180cc712650d845
4
- data.tar.gz: b0ab1f9a9eab0dfea9c9aa2744a2577c4c0c093f
2
+ SHA256:
3
+ metadata.gz: 47db897947e04f3f2e7481252d8bcc8a55947503d7b9214f3200068f03bdde84
4
+ data.tar.gz: e52b868d8a46f7aa84aec9c20001261e6e77b7a0ddbd326837050837043fb0c0
5
5
  SHA512:
6
- metadata.gz: d04614e8d27c48ed7e1fb3148a59dc2b4d03eb21f410d8d6fb47610e42cb1834693e38d9292de254711b21d9b95a055620c1d9f62164312192d393e6130b6bf7
7
- data.tar.gz: bac7db42a799ae20f00ffa9fe0ba3b98d21c9350582a17a95d5cf4ce53713ecd2abc24e309ba763fbcfcdf548cc1b26d330bde11e2fe78a4552fd3d58b966250
6
+ metadata.gz: d8685431d8bbbe013636adfacdd2113c02c9461def37aae4e21db5c6e7750d110c91edc04cb4feefb36c21c5b1827f0eaee2331d9282eba05844c12037939499
7
+ data.tar.gz: 027ee5f5fa6b2f2deefac2f5b30933a499f5c34187e15635cc8ad445c2af04f69b811a1c37c658eecff015c64bee873c318724857de9030d2cf279f70c356b74
@@ -5,7 +5,7 @@ module Parliament
5
5
  module AnsweringBody
6
6
  # Alias groupName with fallback.
7
7
  #
8
- # @return [String, STring] the name of the Grom::Node or an empty string.
8
+ # @return [String, String] the name of the Grom::Node or an empty string.
9
9
  def name
10
10
  respond_to?(:groupName) ? groupName : ''
11
11
  end
@@ -0,0 +1,15 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/LaidThing
5
+ module LaidThing
6
+ # Alias laidThingHasLaying with fallback.
7
+ #
8
+ # @return [Grom::Node, nil] a laying Grom::Node or nil.
9
+ def laying
10
+ respond_to?(:laidThingHasLaying) ? laidThingHasLaying.first : nil
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -13,9 +13,16 @@ module Parliament
13
13
  # Alias layingHasLayingBody with fallback.
14
14
  #
15
15
  # @return [Grom::Node, nil] the LayingBody of the Grom::Node or nil.
16
- def laying_body
16
+ def body
17
17
  respond_to?(:layingHasLayingBody) ? layingHasLayingBody.first : nil
18
18
  end
19
+
20
+ # Alias layingHasLayingPerson with fallback.
21
+ #
22
+ # @return [Grom::Node, nil] the LayingPerson of the Grom::Node or nil.
23
+ def person
24
+ respond_to?(:layingHasLayingPerson) ? layingHasLayingPerson.first : nil
25
+ end
19
26
  end
20
27
  end
21
28
  end
@@ -0,0 +1,22 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/ProposedNegativeStatutoryInstrumentPaper
5
+ module ProposedNegativeStatutoryInstrumentPaper
6
+ # Alias proposedNegativeStatutoryInstrumentPaperName with fallback.
7
+ #
8
+ # @return [String, String] the name of the Grom::Node or an empty string.
9
+ def name
10
+ respond_to?(:proposedNegativeStatutoryInstrumentPaperName) ? proposedNegativeStatutoryInstrumentPaperName : ''
11
+ end
12
+
13
+ # Alias proposedNegativeStatutoryInstrumentPaperPrecedesStatutoryInstrumentPaper with fallback.
14
+ #
15
+ # @return [Array, Array] an array of StatutoryInstrumentPaper Grom::Nodes or an empty array.
16
+ def statutory_instrument_papers
17
+ respond_to?(:proposedNegativeStatutoryInstrumentPaperPrecedesStatutoryInstrumentPaper) ? proposedNegativeStatutoryInstrumentPaperPrecedesStatutoryInstrumentPaper : []
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,7 +1,7 @@
1
1
  module Parliament
2
2
  module Grom
3
3
  module Decorator
4
- # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/StatutoryInstrumentPage
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/StatutoryInstrumentPaper
5
5
  module StatutoryInstrumentPaper
6
6
  # Alias statutoryInstrumentPaperName with fallback.
7
7
  #
@@ -31,11 +31,11 @@ module Parliament
31
31
  respond_to?(:statutoryInstrumentPaperNumber) ? statutoryInstrumentPaperNumber : ''
32
32
  end
33
33
 
34
- # Alias statutoryInstrumentPaperComingIntoForceDate with fallback.
34
+ # Alias statutoryInstrumentPaperMadeDate with fallback.
35
35
  #
36
- # @return [Date, nil] the coming into force date of the Grom::Node or an empty string.
37
- def coming_into_force_date
38
- respond_to?(:statutoryInstrumentPaperComingIntoForceDate) ? DateTime.parse(statutoryInstrumentPaperComingIntoForceDate) : nil
36
+ # @return [Date, nil] the coming into force date of the Grom::Node or nil.
37
+ def made_date
38
+ respond_to?(:statutoryInstrumentPaperMadeDate) ? DateTime.parse(statutoryInstrumentPaperMadeDate) : nil
39
39
  end
40
40
 
41
41
  # Alias statutoryInstrumentPaperComingIntoForceNote with fallback.
@@ -45,18 +45,18 @@ module Parliament
45
45
  respond_to?(:statutoryInstrumentPaperComingIntoForceNote) ? statutoryInstrumentPaperComingIntoForceNote : ''
46
46
  end
47
47
 
48
- # Alias workPackagedThingHasWorkPackagedThingWebLink with fallback.
48
+ # Alias Date with fallback.
49
49
  #
50
- # @return [String, String] a web link to view the statutory instrument Grom::Node or an empty string.
51
- def weblink
52
- respond_to?(:workPackagedThingHasWorkPackagedThingWebLink) ? workPackagedThingHasWorkPackagedThingWebLink : ''
50
+ # @return [Date, nil] the coming into force date of the Grom::Node or nil.
51
+ def coming_into_force_date
52
+ respond_to?(:statutoryInstrumentPaperComingIntoForceDate) ? DateTime.parse(statutoryInstrumentPaperComingIntoForceDate) : nil
53
53
  end
54
54
 
55
- # Alias workPackagedThingHasWorkPackage with fallback.
55
+ # Alias statutoryInstrumentPaperFollowsProposedNegativeStatutoryInstrumentPaper with fallback.
56
56
  #
57
- # @return [Grom::Node, nil] a work package Grom::Node or an empty string.
58
- def work_package
59
- respond_to?(:workPackagedThingHasWorkPackage) ? workPackagedThingHasWorkPackage.first : nil
57
+ # @return [Array, Array] an array of ProposedNegativeStatutoryInstrumentPaper Grom::Nodes or an empty array.
58
+ def proposed_negative_statutory_instrument_papers
59
+ respond_to?(:statutoryInstrumentPaperFollowsProposedNegativeStatutoryInstrumentPaper) ? statutoryInstrumentPaperFollowsProposedNegativeStatutoryInstrumentPaper : []
60
60
  end
61
61
  end
62
62
  end
@@ -1,7 +1,7 @@
1
1
  module Parliament
2
2
  module Grom
3
3
  module Decorator
4
- VERSION = '0.27.6'.freeze
4
+ VERSION = '0.27.7'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -7,7 +7,7 @@ module Parliament
7
7
  # Alias workPackageHasProcedure with fallback.
8
8
  # NB: Currently, work packages only have one procedure
9
9
  #
10
- # @return [Grom::Node, nil] a Procedure Grom::Node of the Grom::Node or nil.
10
+ # @return [Grom::Node, nil] a Procedure Grom::Node or nil.
11
11
  def procedure
12
12
  respond_to?(:workPackageHasProcedure) ? workPackageHasProcedure.first : nil
13
13
  end
@@ -15,7 +15,7 @@ module Parliament
15
15
  # Alias workPackageHasWorkPackageableThing with fallback.
16
16
  # NB: Currently, work packages only have one work packageable thing
17
17
  #
18
- # @return [Grom::Node, nil] a Procedure Grom::Node of the Grom::Node or nil.
18
+ # @return [Grom::Node, nil] a Procedure Grom::Node or nil.
19
19
  def work_packageable_thing
20
20
  respond_to?(:workPackageHasWorkPackageableThing) ? workPackageHasWorkPackageableThing.first : nil
21
21
  end
@@ -32,6 +32,11 @@ module Parliament
32
32
  respond_to?(:workPackageHasBusinessItem) ? workPackageHasBusinessItem : []
33
33
  end
34
34
 
35
+ # @return [Grom::Node, nil] a Laying Grom::Node or nil.
36
+ def laying
37
+ respond_to?(:workPackageHasProcedure) ? workPackageHasProcedure.first : nil
38
+ end
39
+
35
40
  # Alias oldestBusinessItemDate with fallback.
36
41
  #
37
42
  # @return [Date, nil] a date or nil.
@@ -0,0 +1,22 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/WorkdPackagedThing
5
+ module WorkPackagedThing
6
+ # Alias workPackagedThingHasWorkPackagedThingWebLink with fallback.
7
+ #
8
+ # @return [String, String] a web link to view the statutory instrument Grom::Node or an empty string.
9
+ def web_link
10
+ respond_to?(:workPackagedThingHasWorkPackagedThingWebLink) ? workPackagedThingHasWorkPackagedThingWebLink : ''
11
+ end
12
+
13
+ # Alias workPackagedThingHasWorkPackage with fallback.
14
+ #
15
+ # @return [Grom::Node, nil] a work package Grom::Node or nil.
16
+ def work_package
17
+ respond_to?(:workPackagedThingHasWorkPackage) ? workPackagedThingHasWorkPackage.first : nil
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -25,6 +25,7 @@ require 'parliament/grom/decorator/group'
25
25
  require 'parliament/grom/decorator/house'
26
26
  require 'parliament/grom/decorator/house_seat'
27
27
  require 'parliament/grom/decorator/incumbency'
28
+ require 'parliament/grom/decorator/laid_thing'
28
29
  require 'parliament/grom/decorator/laying'
29
30
  require 'parliament/grom/decorator/laying_body'
30
31
  require 'parliament/grom/decorator/member_image'
@@ -38,6 +39,7 @@ require 'parliament/grom/decorator/postal_address'
38
39
  require 'parliament/grom/decorator/procedure_route'
39
40
  require 'parliament/grom/decorator/procedure_step'
40
41
  require 'parliament/grom/decorator/procedure'
42
+ require 'parliament/grom/decorator/proposed_negative_statutory_instrument_paper'
41
43
  require 'parliament/grom/decorator/question'
42
44
  require 'parliament/grom/decorator/seat_incumbency'
43
45
  require 'parliament/grom/decorator/statutory_instrument_paper'
@@ -46,6 +48,7 @@ require 'parliament/grom/decorator/opposition_position'
46
48
  require 'parliament/grom/decorator/web_article'
47
49
  require 'parliament/grom/decorator/work_package'
48
50
  require 'parliament/grom/decorator/work_packageable_thing'
51
+ require 'parliament/grom/decorator/work_packaged_thing'
49
52
 
50
53
  # Namespace for classes and modules that handle connections to, and processing of data from the parliamentary API.
51
54
  # @since 0.1.0
@@ -56,52 +59,55 @@ module Parliament
56
59
  # @since 0.1.0
57
60
  module Decorator
58
61
  MAPPING = {
59
- 'Answer' => Answer,
60
- 'AnsweringBody' => AnsweringBody,
61
- 'AnsweringBodyAllocation' => AnsweringBodyAllocation,
62
- 'ArticleType' => ArticleType,
63
- 'Audience' => Audience,
64
- 'BusinessItem' => BusinessItem,
65
- 'Collection' => Collection,
66
- 'Concept' => Concept,
67
- 'ConstituencyArea' => ConstituencyArea,
68
- 'ConstituencyGroup' => ConstituencyGroup,
69
- 'ContactPoint' => ContactPoint,
70
- 'EuropeanRegion' => EuropeanRegion,
71
- 'FormalBodyChair' => FormalBodyChair,
72
- 'FormalBodyMembership' => FormalBodyMembership,
73
- 'FormalBodyType' => FormalBodyType,
74
- 'FormalBody' => FormalBody,
75
- 'Gender' => Gender,
76
- 'GenderIdentity' => GenderIdentity,
77
- 'GovernmentIncumbency' => GovernmentIncumbency,
78
- 'GovernmentPosition' => GovernmentPosition,
79
- 'GovRegisterGovernmentOrganisation' => GovRegisterGovernmentOrganisation,
80
- 'Group' => Group,
81
- 'House' => House,
82
- 'HouseSeat' => HouseSeat,
83
- 'Incumbency' => Incumbency,
84
- 'Laying' => Laying,
85
- 'LayingBody' => LayingBody,
86
- 'MemberImage' => MemberImage,
87
- 'OppositionIncumbency' => OppositionIncumbency,
88
- 'OppositionPosition' => OppositionPosition,
89
- 'ParliamentPeriod' => ParliamentPeriod,
90
- 'ParliamentaryIncumbency' => ParliamentaryIncumbency,
91
- 'Party' => Party,
92
- 'PartyMembership' => PartyMembership,
93
- 'Person' => Person,
94
- 'Position' => Position,
95
- 'Procedure' => Procedure,
96
- 'ProcedureRoute' => ProcedureRoute,
97
- 'ProcedureStep' => ProcedureStep,
98
- 'PostalAddress' => PostalAddress,
99
- 'Question' => Question,
100
- 'SeatIncumbency' => SeatIncumbency,
101
- 'StatutoryInstrumentPaper' => StatutoryInstrumentPaper,
102
- 'WebArticle' => WebArticle,
103
- 'WorkPackage' => WorkPackage,
104
- 'WorkPackageableThing' => WorkPackageableThing
62
+ 'Answer' => Answer,
63
+ 'AnsweringBody' => AnsweringBody,
64
+ 'AnsweringBodyAllocation' => AnsweringBodyAllocation,
65
+ 'ArticleType' => ArticleType,
66
+ 'Audience' => Audience,
67
+ 'BusinessItem' => BusinessItem,
68
+ 'Collection' => Collection,
69
+ 'Concept' => Concept,
70
+ 'ConstituencyArea' => ConstituencyArea,
71
+ 'ConstituencyGroup' => ConstituencyGroup,
72
+ 'ContactPoint' => ContactPoint,
73
+ 'EuropeanRegion' => EuropeanRegion,
74
+ 'FormalBodyChair' => FormalBodyChair,
75
+ 'FormalBodyMembership' => FormalBodyMembership,
76
+ 'FormalBodyType' => FormalBodyType,
77
+ 'FormalBody' => FormalBody,
78
+ 'Gender' => Gender,
79
+ 'GenderIdentity' => GenderIdentity,
80
+ 'GovernmentIncumbency' => GovernmentIncumbency,
81
+ 'GovernmentPosition' => GovernmentPosition,
82
+ 'GovRegisterGovernmentOrganisation' => GovRegisterGovernmentOrganisation,
83
+ 'Group' => Group,
84
+ 'House' => House,
85
+ 'HouseSeat' => HouseSeat,
86
+ 'Incumbency' => Incumbency,
87
+ 'LaidThing' => LaidThing,
88
+ 'Laying' => Laying,
89
+ 'LayingBody' => LayingBody,
90
+ 'MemberImage' => MemberImage,
91
+ 'OppositionIncumbency' => OppositionIncumbency,
92
+ 'OppositionPosition' => OppositionPosition,
93
+ 'ParliamentPeriod' => ParliamentPeriod,
94
+ 'ParliamentaryIncumbency' => ParliamentaryIncumbency,
95
+ 'Party' => Party,
96
+ 'PartyMembership' => PartyMembership,
97
+ 'Person' => Person,
98
+ 'Position' => Position,
99
+ 'Procedure' => Procedure,
100
+ 'ProcedureRoute' => ProcedureRoute,
101
+ 'ProcedureStep' => ProcedureStep,
102
+ 'ProposedNegativeStatutoryInstrumentPaper' => ProposedNegativeStatutoryInstrumentPaper,
103
+ 'PostalAddress' => PostalAddress,
104
+ 'Question' => Question,
105
+ 'SeatIncumbency' => SeatIncumbency,
106
+ 'StatutoryInstrumentPaper' => StatutoryInstrumentPaper,
107
+ 'WebArticle' => WebArticle,
108
+ 'WorkPackage' => WorkPackage,
109
+ 'WorkPackageableThing' => WorkPackageableThing,
110
+ 'WorkPackagedThing' => WorkPackagedThing
105
111
  }.freeze
106
112
 
107
113
  class << self
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.27.6
4
+ version: 0.27.7
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-08-23 00:00:00.000000000 Z
11
+ date: 2018-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -200,6 +200,7 @@ files:
200
200
  - lib/parliament/grom/decorator/house.rb
201
201
  - lib/parliament/grom/decorator/house_seat.rb
202
202
  - lib/parliament/grom/decorator/incumbency.rb
203
+ - lib/parliament/grom/decorator/laid_thing.rb
203
204
  - lib/parliament/grom/decorator/laying.rb
204
205
  - lib/parliament/grom/decorator/laying_body.rb
205
206
  - lib/parliament/grom/decorator/member_image.rb
@@ -215,6 +216,7 @@ files:
215
216
  - lib/parliament/grom/decorator/procedure.rb
216
217
  - lib/parliament/grom/decorator/procedure_route.rb
217
218
  - lib/parliament/grom/decorator/procedure_step.rb
219
+ - lib/parliament/grom/decorator/proposed_negative_statutory_instrument_paper.rb
218
220
  - lib/parliament/grom/decorator/question.rb
219
221
  - lib/parliament/grom/decorator/seat_incumbency.rb
220
222
  - lib/parliament/grom/decorator/statutory_instrument_paper.rb
@@ -222,6 +224,7 @@ files:
222
224
  - lib/parliament/grom/decorator/web_article.rb
223
225
  - lib/parliament/grom/decorator/work_package.rb
224
226
  - lib/parliament/grom/decorator/work_packageable_thing.rb
227
+ - lib/parliament/grom/decorator/work_packaged_thing.rb
225
228
  - makefile
226
229
  - parliament-grom-decorators.gemspec
227
230
  homepage: http://github.com/ukparliament/parliament-grom-decorators
@@ -243,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
246
  version: '0'
244
247
  requirements: []
245
248
  rubyforge_project:
246
- rubygems_version: 2.6.8
249
+ rubygems_version: 2.7.6
247
250
  signing_key:
248
251
  specification_version: 4
249
252
  summary: Parliamentary Grom decorator