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 +4 -4
- data/lib/hyper_resource.rb +1 -1
- data/lib/hyper_resource/adapter/hal_json.rb +2 -1
- data/lib/hyper_resource/version.rb +2 -2
- 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: 91706bba854fe1bb041e6ab5a481d47229483934
|
4
|
+
data.tar.gz: c7056b3be33ec4d7f6ec10af270f1654a41d28b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bc8fc0a0e6db1cecd7c759db9f632fbca3edb2df70ba918d5e35c633131e8ee1eced14cdc63dba9eec7bb30aafc3cd4dbde9d28de8516ad4da463963751a2d0
|
7
|
+
data.tar.gz: 55546d6d747b3dad3039e4c5c13bf04909e3f13b1dce1efddd84df204b997b04b99bc0d562064d2635d7a4a7e9bd53f5df5620723dedc5bb491002039c664f6c
|
data/lib/hyper_resource.rb
CHANGED
@@ -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
|
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
|
-
|
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
|
|
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.
|
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-
|
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.
|
171
|
+
rubygems_version: 2.4.6
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Extensible hypermedia client for Ruby
|