lhs 9.0.3 → 9.0.4

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: a94202476f1970242cdb7215def030000b3ee3b9
4
- data.tar.gz: 074bb140334dcd7e09f1fdb93896edea6935c72c
3
+ metadata.gz: eb534b7591faab4cd810b3cadc57187834180736
4
+ data.tar.gz: 10ebca98180dab9bf47532bba6b82ed9011dff59
5
5
  SHA512:
6
- metadata.gz: 3d300ee0903b0c74999cb3b8cccc46bda9efdc2005ac18e9bddb01ec64e274063f7d12782b36578fca4ef97f38cbbf06640bc46f92a95326e3c421ba553c9634
7
- data.tar.gz: 0556539c40153065c023cb49638d4f799391e814abd8d3150fdebad5a952df3a1c6ad7d1f9f174db159f489288840a07286ad86c1a815f3f2ba6a44f9e53c80b
6
+ metadata.gz: ac2ab9727befddaabc2684dd021d906e8c0c58f41dda4e9695b1847ed8716a0148604a89c4f830883bd8bc62a5958017f2a927927eca77cd81ed06299896dda1
7
+ data.tar.gz: a71dfe943c674098b6195df7e9a26addfe2cc35cc6bef4ce8093ddd284a0ea7a114f0bc27f2553a006325728c574ea2dcba2fdced82c8269ae7376c96362d697
@@ -17,7 +17,8 @@ class LHS::Collection < LHS::Proxy
17
17
  end
18
18
 
19
19
  def href
20
- _data._raw[:href]
20
+ return _data._raw[:href] if _data._raw.is_a? Hash
21
+ nil
21
22
  end
22
23
 
23
24
  def _collection
data/lib/lhs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LHS
2
- VERSION = "9.0.3"
2
+ VERSION = "9.0.4"
3
3
  end
@@ -0,0 +1,15 @@
1
+ require 'rails_helper'
2
+
3
+ describe LHS::Collection do
4
+ let(:collection) do
5
+ LHS::Collection.new(LHS::Data.new([]))
6
+ end
7
+
8
+ context 'array misses href' do
9
+ it 'works with empty array' do
10
+ expect(
11
+ collection.href
12
+ ).to eq nil
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhs
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.3
4
+ version: 9.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhs/graphs/contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-24 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lhc
@@ -238,6 +238,7 @@ files:
238
238
  - spec/collection/configurable_spec.rb
239
239
  - spec/collection/delegate_spec.rb
240
240
  - spec/collection/enumerable_spec.rb
241
+ - spec/collection/href_spec.rb
241
242
  - spec/collection/meta_data_spec.rb
242
243
  - spec/collection/respond_to_spec.rb
243
244
  - spec/collection/without_object_items_spec.rb
@@ -394,6 +395,7 @@ test_files:
394
395
  - spec/collection/configurable_spec.rb
395
396
  - spec/collection/delegate_spec.rb
396
397
  - spec/collection/enumerable_spec.rb
398
+ - spec/collection/href_spec.rb
397
399
  - spec/collection/meta_data_spec.rb
398
400
  - spec/collection/respond_to_spec.rb
399
401
  - spec/collection/without_object_items_spec.rb