jsonism 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -2
- data/lib/jsonism/link.rb +4 -4
- data/lib/jsonism/request.rb +1 -1
- data/lib/jsonism/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bbba8bdfabd9277674c1e59b3fbc747861b72f3
|
4
|
+
data.tar.gz: a1b287259dbdd6ba9eba0a4a7aa549f3569fe18b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c265e77c7e61a4c8efbe8833526e29a52bc258ed55866cf580e0bb054c4b9aa8a3f9c1fc720dcbbdfccda568371095cbae82c5e2f2378796aa0335a464d3ecc1
|
7
|
+
data.tar.gz: 562607918e137311bfd7c69171e59f2b771b0e0205444e141d5bbccdfedb52d432051047eabb8105bd11ad76910543a619c2b56da337eb0906d7df043a72a442
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -50,11 +50,11 @@ client.list_app.body[0].to_hash #=> {"id"=>"01234567-89ab-cdef-0123-456789abcdef
|
|
50
50
|
|
51
51
|
# Resource can respond to .delete method if a link with rel=delete is defined in schema
|
52
52
|
# DELETE /apps/1
|
53
|
-
client.
|
53
|
+
client.list_app.body[0].body.delete
|
54
54
|
|
55
55
|
# Resource can also respond to .update method in the same rule
|
56
56
|
# PATCH /apps/1
|
57
|
-
resource = client.
|
57
|
+
resource = client.list_app.body[0]
|
58
58
|
resource.name = "charlie"
|
59
59
|
resource.update
|
60
60
|
```
|
data/lib/jsonism/link.rb
CHANGED
@@ -30,14 +30,14 @@ module Jsonism
|
|
30
30
|
schema.title
|
31
31
|
end
|
32
32
|
|
33
|
+
def schema
|
34
|
+
@link.target_schema || @link.parent
|
35
|
+
end
|
36
|
+
|
33
37
|
private
|
34
38
|
|
35
39
|
def link_title
|
36
40
|
@link.title
|
37
41
|
end
|
38
|
-
|
39
|
-
def schema
|
40
|
-
@link.target_schema || @link.parent
|
41
|
-
end
|
42
42
|
end
|
43
43
|
end
|
data/lib/jsonism/request.rb
CHANGED
@@ -24,7 +24,7 @@ module Jsonism
|
|
24
24
|
Response.new(
|
25
25
|
client: @client,
|
26
26
|
resource_class: resource_class,
|
27
|
-
response: @client.connection.send(method, path),
|
27
|
+
response: @client.connection.send(method, path, request_params, @headers),
|
28
28
|
)
|
29
29
|
else
|
30
30
|
raise MissingParams, missing_params
|
data/lib/jsonism/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonism
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|