bootic_client 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bootic_client/entity.rb +2 -1
- data/lib/bootic_client/version.rb +1 -1
- data/spec/entity_spec.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0fe4d2179d68484e7f21e30403d998eb4ae3e8d
|
4
|
+
data.tar.gz: 6fdb516289750547db392d3c7028ec28b2cf4fe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9093feed798a80679903c1c1d1a47d8b5118fd17ae1cf17f622257a91e3f462fd2087eeaae2aade8a5fa47ea664b9c311ce50b8c4d5dc69e9f80adb7f9adaf99
|
7
|
+
data.tar.gz: 1d5058a3d702c82084cf94686165156a518abb929990be3711676c2a467067f0bcf7473600ead9a05e46a945be8fe558448407f92ac3195bc0ffca5d44a90a1a
|
data/lib/bootic_client/entity.rb
CHANGED
@@ -31,7 +31,8 @@ module BooticClient
|
|
31
31
|
attr_reader :curies, :entities
|
32
32
|
|
33
33
|
def initialize(attrs, client, top = self)
|
34
|
-
@attrs
|
34
|
+
@attrs = attrs.kind_of?(Hash) ? attrs : {}
|
35
|
+
@client, @top = client, top
|
35
36
|
build!
|
36
37
|
self.extend EnumerableEntity if iterable?
|
37
38
|
end
|
data/spec/entity_spec.rb
CHANGED
@@ -225,4 +225,16 @@ describe BooticClient::Entity do
|
|
225
225
|
end
|
226
226
|
end
|
227
227
|
|
228
|
+
context 'empty response' do
|
229
|
+
it 'does not break if response is nil' do
|
230
|
+
entity = BooticClient::Entity.new(nil, client)
|
231
|
+
expect(entity.links).to eql({})
|
232
|
+
end
|
233
|
+
|
234
|
+
it 'does not break if response is empty string' do
|
235
|
+
entity = BooticClient::Entity.new('', client)
|
236
|
+
expect(entity.links).to eql({})
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
228
240
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootic_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Celis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
requirements: []
|
223
223
|
rubyforge_project:
|
224
|
-
rubygems_version: 2.
|
224
|
+
rubygems_version: 2.4.8
|
225
225
|
signing_key:
|
226
226
|
specification_version: 4
|
227
227
|
summary: Official Ruby client for the Bootic API
|