restful_resource 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/restful_resource/base.rb +10 -0
- data/lib/restful_resource/http_client.rb +13 -0
- data/lib/restful_resource/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 518adcf1420c8305d189766883817e8c71d8cd09ffe472270e2a2cfa0e6a1103
|
4
|
+
data.tar.gz: 82fdbfd0ace4c8c2e8aca022e60b6a55cf84177add1719fb9d5e55b504aacb84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae13ab26b3ce3d49061db7ca21f4ec1d41358120f54039e0b9f8a549aaf867a2e192b132173f52f7d38fb911c978fbffd0c74e8a574d4a64688d21a48b5b3f9
|
7
|
+
data.tar.gz: b5a9fe7a39f196739016b340c933d693126fceac8f93cc707bd8d1b69e13e7caf9c6a318a8e8bf36457ec0e2269c2038bf2389baf9abb4f08b90ca9828888398
|
data/CHANGELOG.md
CHANGED
@@ -57,6 +57,16 @@ module RestfulResource
|
|
57
57
|
RestfulResource::OpenObject.new(parse_json(response.body))
|
58
58
|
end
|
59
59
|
|
60
|
+
def self.patch(id, data: {}, headers: {}, **params)
|
61
|
+
params_without_options, options = format_params(params)
|
62
|
+
options.delete(:headers)
|
63
|
+
|
64
|
+
url = member_url(id, params_without_options)
|
65
|
+
|
66
|
+
response = http.patch(url, data: data, headers: headers, **options)
|
67
|
+
new(parse_json(response.body))
|
68
|
+
end
|
69
|
+
|
60
70
|
def self.put(id, data: {}, headers: {}, **params)
|
61
71
|
params_without_options, options = format_params(params)
|
62
72
|
options.delete(:headers)
|
@@ -143,6 +143,19 @@ module RestfulResource
|
|
143
143
|
)
|
144
144
|
end
|
145
145
|
|
146
|
+
def patch(url, data: {}, headers: {}, open_timeout: nil, timeout: nil)
|
147
|
+
http_request(
|
148
|
+
Request.new(
|
149
|
+
:patch,
|
150
|
+
url,
|
151
|
+
body: data,
|
152
|
+
headers: headers,
|
153
|
+
open_timeout: open_timeout,
|
154
|
+
timeout: timeout
|
155
|
+
)
|
156
|
+
)
|
157
|
+
end
|
158
|
+
|
146
159
|
def put(url, data: {}, headers: {}, open_timeout: nil, timeout: nil)
|
147
160
|
http_request(
|
148
161
|
Request.new(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restful_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Santoro
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-11-
|
12
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|