shadow_cabinet 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c44deaa7aadd38cd40b6a6befdc6a52935196129
|
|
4
|
+
data.tar.gz: d31e296b01b54f233ce316c896dc2dd111d808c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18ecfa417d78f384d8b8df4af4c57e59d4159df981aadc11985575ad7ef79597d327493a369648fe7f35888fcbd5f4da0a9e04ba0ed5e1d55c335636be5382b8
|
|
7
|
+
data.tar.gz: bc032e5b03497928b02bd8c51d197fc47639c89505ee4b4c04a7bedcac789b42a0b92f5d47e047c205207fc5722405ee403aa6a1379b3ff500bcb457308653bc
|
|
@@ -47,6 +47,18 @@ module ShadowCabinet
|
|
|
47
47
|
result.body
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
def patch(path:, params: {}, data: nil)
|
|
51
|
+
result = make_request(
|
|
52
|
+
verb: :patch,
|
|
53
|
+
request_url: construct_url(path: path, params: params),
|
|
54
|
+
data: data
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
raise result.error if result.error_present?
|
|
58
|
+
|
|
59
|
+
result.body
|
|
60
|
+
end
|
|
61
|
+
|
|
50
62
|
def delete(path:, params: {})
|
|
51
63
|
result = make_request(
|
|
52
64
|
verb: :delete,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require 'shadow_cabinet/client/base'
|
|
2
|
+
require 'shadow_cabinet/client/real/request/base'
|
|
3
|
+
|
|
4
|
+
module ShadowCabinet
|
|
5
|
+
module Client
|
|
6
|
+
class Real < Base
|
|
7
|
+
module Request
|
|
8
|
+
# Implementation for the HTTP PUT verb
|
|
9
|
+
class Patch < Base
|
|
10
|
+
|
|
11
|
+
def perform
|
|
12
|
+
response = connector.patch(path, data) do |req|
|
|
13
|
+
params.keys.each do |key|
|
|
14
|
+
req.params[key] = params[key]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
process_response(response)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'shadow_cabinet/client/base'
|
|
2
|
+
require 'shadow_cabinet/client/real/request/patch'
|
|
2
3
|
require 'shadow_cabinet/client/real/request/put'
|
|
3
4
|
|
|
4
5
|
module ShadowCabinet
|
|
@@ -6,6 +7,7 @@ module ShadowCabinet
|
|
|
6
7
|
class Real < Base
|
|
7
8
|
module Request
|
|
8
9
|
KNOWN = {
|
|
10
|
+
patch: Patch,
|
|
9
11
|
put: Put,
|
|
10
12
|
}
|
|
11
13
|
|
data/lib/shadow_cabinet.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shadow_cabinet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dennis Walters
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -104,6 +104,7 @@ files:
|
|
|
104
104
|
- lib/shadow_cabinet/client/real.rb
|
|
105
105
|
- lib/shadow_cabinet/client/real/request.rb
|
|
106
106
|
- lib/shadow_cabinet/client/real/request/base.rb
|
|
107
|
+
- lib/shadow_cabinet/client/real/request/patch.rb
|
|
107
108
|
- lib/shadow_cabinet/client/real/request/put.rb
|
|
108
109
|
- lib/shadow_cabinet/client/result.rb
|
|
109
110
|
- lib/shadow_cabinet/version.rb
|