zoid 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/lib/zoid/agent.rb +36 -0
- data/lib/zoid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0682a01a12a7c9dca0a8f8c28eb6f5139e72da3c
|
4
|
+
data.tar.gz: 48046edb6e2a79acb8830b20c643295a8bffbd81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d038eb2d844e8cac63c14b7a5af0732f786dba59da4b8290edceeb8c41a466dc01c39d8d421fb59c69014377d1a66ecda84b86e1a291d7afce34018b00194ad5
|
7
|
+
data.tar.gz: a37e0774394b1f3d55d1b16e3d8ef90eede70a368ed1b51584551b229b9c91bfaf77cff9bf271e7726266d321d5c38f618d55e1a20c6d4cb9706df14122a06ea
|
data/README.md
CHANGED
data/lib/zoid/agent.rb
CHANGED
@@ -35,6 +35,42 @@ module Zoid
|
|
35
35
|
Zoid::Response.new(response.status, response.body)
|
36
36
|
end
|
37
37
|
|
38
|
+
def put(path, params = {})
|
39
|
+
response = connection.put do |request|
|
40
|
+
request.path = path
|
41
|
+
request.headers['Content-Type'] = "application/json"
|
42
|
+
request.body = params
|
43
|
+
|
44
|
+
yield if block_given?
|
45
|
+
end
|
46
|
+
|
47
|
+
Zoid::Response.new(response.status, response.body)
|
48
|
+
end
|
49
|
+
|
50
|
+
def patch(path, params = {})
|
51
|
+
response = connection.patch do |request|
|
52
|
+
request.path = path
|
53
|
+
request.headers['Content-Type'] = "application/json"
|
54
|
+
request.body = params
|
55
|
+
|
56
|
+
yield if block_given?
|
57
|
+
end
|
58
|
+
|
59
|
+
Zoid::Response.new(response.status, response.body)
|
60
|
+
end
|
61
|
+
|
62
|
+
def delete(path, params = {})
|
63
|
+
response = connection.delete do |request|
|
64
|
+
request.path = path
|
65
|
+
request.headers['Content-Type'] = "application/json"
|
66
|
+
request.body = params
|
67
|
+
|
68
|
+
yield if block_given?
|
69
|
+
end
|
70
|
+
|
71
|
+
Zoid::Response.new(response.status, response.body)
|
72
|
+
end
|
73
|
+
|
38
74
|
private
|
39
75
|
|
40
76
|
def connection(&block)
|
data/lib/zoid/version.rb
CHANGED