parliament-utils 0.11.0 → 0.11.1

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: c9fb446f1675166df467e0f7a24e77cafeb77c2a
4
- data.tar.gz: 189933e48ae3177c3f70b30220cdb5e44f9f7185
3
+ metadata.gz: 13af7ea61b278dc7f963e0acc545f11cfadf149d
4
+ data.tar.gz: 6a8b53ac4c37387e7879bf6828918aba2a661eb9
5
5
  SHA512:
6
- metadata.gz: c71f22e145584e6bce932ffd7594dbab4f6bf06c2335ab12b7edf51a9dfa4bf5cf5a6bc757e7f35ebd9fc07fb91f9a31c417dd769adc4f672fcbc2546fa899cf
7
- data.tar.gz: 17a178523e7f3d199596d0cd9dcf22cc8dce22611c091e7374f7449e28804dfcf6294dbf05fbad22424a58267be1f30edcb656be3d98940c0e1cf0045ccbf5fb
6
+ metadata.gz: a8dd45c517231ba88c6bb61c3a417913b364b7ade41c99a6d9bca5dc0b79c42a018e7b407653f02a3236cba42ea1c370a916824572dec57103f326b81887eea5
7
+ data.tar.gz: 4bd7f725c08c626a998bd1135e588bf22e444e979e00f110b2643f8d8acd04f38805387ac487b80fe923cd8c612f675e940c2a7838bf10eaac661757bfbf512e
@@ -10,7 +10,7 @@ module Parliament
10
10
  def commons?(house)
11
11
  set_ids
12
12
 
13
- house.graph_id == @commons_id
13
+ house&.graph_id == @commons_id
14
14
  end
15
15
 
16
16
  # Checks if house is the House of Lords and sets @commons_id and @lords_id if not already set.
@@ -18,6 +18,8 @@ module Parliament
18
18
  # @param [Grom::Node] house a Grom::Node with type https://id.parliament.uk/schema/House.
19
19
  # @return [Boolean] boolean depending on whether the house has the same id as the House of Lords.
20
20
  def lords?(house)
21
+ return false if house.nil?
22
+
21
23
  !commons?(house)
22
24
  end
23
25
 
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Utils
3
- VERSION = '0.11.0'.freeze
3
+ VERSION = '0.11.1'.freeze
4
4
  end
5
5
  end
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.0
4
+ version: 0.11.1
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-21 00:00:00.000000000 Z
11
+ date: 2018-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parliament-ruby