hyperresource 0.9.3 → 0.9.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: 4229e58b266ed68da1b4ddef72db0573010e3745
4
- data.tar.gz: a00f3bd10be628ef41c1aa7353eeb5992299c9b1
3
+ metadata.gz: 91706bba854fe1bb041e6ab5a481d47229483934
4
+ data.tar.gz: c7056b3be33ec4d7f6ec10af270f1654a41d28b8
5
5
  SHA512:
6
- metadata.gz: 37ae186431974a6c78a492add4312c2237aef357be8bb10c7c389a9fc4e6ad9f9fa0ff9394859c03aa66fc3acbfd14cd6d1ea28eb3ecedc7323fd0a0f2353dec
7
- data.tar.gz: d46f1f92cb8730399cbb50278b3ea3c5c97a7ec0b42a35a78e00f01b14f9e8c3f001c2da3254f055e4da843ba8e01c29be42fe089b2e18711845c083b2eca044
6
+ metadata.gz: 6bc8fc0a0e6db1cecd7c759db9f632fbca3edb2df70ba918d5e35c633131e8ee1eced14cdc63dba9eec7bb30aafc3cd4dbde9d28de8516ad4da463963751a2d0
7
+ data.tar.gz: 55546d6d747b3dad3039e4c5c13bf04909e3f13b1dce1efddd84df204b997b04b99bc0d562064d2635d7a4a7e9bd53f5df5620723dedc5bb491002039c664f6c
@@ -196,7 +196,7 @@ public
196
196
  ## Otherwise, try to match against attributes, then objects, then links.
197
197
  method = method.to_s
198
198
  if method[-1,1] == '='
199
- return attributes[method[0..-2]] = args.first if attributes[method[0..-2]]
199
+ return attributes[method[0..-2]] = args.first if attributes && attributes.has_key?(method[0..-2])
200
200
  else
201
201
  return attributes[method] if attributes && attributes.has_key?(method.to_s)
202
202
  return objects[method] if objects && objects[method]
@@ -31,7 +31,8 @@ class HyperResource
31
31
  apply_links(response, resource)
32
32
  apply_attributes(response, resource)
33
33
  resource.loaded = true
34
- resource.href = response['_links']['self']['href'] rescue nil
34
+ new_href = response['_links']['self']['href'] rescue nil
35
+ resource.href = new_href unless new_href.nil? && resource.href
35
36
  resource
36
37
  end
37
38
 
@@ -1,5 +1,5 @@
1
1
  class HyperResource
2
- VERSION = '0.9.3'
3
- VERSION_DATE = '2015-11-02'
2
+ VERSION = '0.9.4'
3
+ VERSION_DATE = '2015-11-18'
4
4
  end
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperresource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Gamache
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-02 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uri_template
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.4.5.1
171
+ rubygems_version: 2.4.6
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Extensible hypermedia client for Ruby