shb 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shb/abstract_client.rb +4 -0
- data/lib/shb/version.rb +1 -1
- data/spec/shb_spec.rb +3 -0
- 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: fe5d68a724fdf9d7ad6c080a8d511b93908ed8ec
|
4
|
+
data.tar.gz: 76667bc452f6bbe1ed085c422bbbf5b63ff11b07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c1214aa053aa6e7b42ea127387c81fcb9535101384471527755ac10eb09c0d540b43be5576f6bc0b82fd9e81dabb54760fef8587810a0e2c76da262aea1557e
|
7
|
+
data.tar.gz: 6717cec4603b01082ef0b165b7da38cea239f845a90e6e3652f225e52678e57cba528631314949d406a3d5f489aa8b47cd25de6fc34e849a9477cdc24b61b462
|
data/lib/shb/abstract_client.rb
CHANGED
@@ -44,6 +44,10 @@ module Shb
|
|
44
44
|
make_request!(:put, path, options, &block)
|
45
45
|
end
|
46
46
|
|
47
|
+
def delete(path, options = {}, &block)
|
48
|
+
make_request!(:delete, path, options, &block)
|
49
|
+
end
|
50
|
+
|
47
51
|
################################################################################
|
48
52
|
private
|
49
53
|
|
data/lib/shb/version.rb
CHANGED
data/spec/shb_spec.rb
CHANGED
@@ -28,6 +28,8 @@ describe Shb::Client do
|
|
28
28
|
specify { expect(shb.post('/').body).to eq "post" }
|
29
29
|
specify { expect(shb.put('/').code).to eq 200 }
|
30
30
|
specify { expect(shb.put('/').body).to eq "put" }
|
31
|
+
specify { expect(shb.delete('/').code).to eq 200 }
|
32
|
+
specify { expect(shb.delete('/').body).to eq "delete" }
|
31
33
|
end
|
32
34
|
|
33
35
|
context "requests with data" do
|
@@ -41,6 +43,7 @@ describe Shb::Client do
|
|
41
43
|
specify { expect(shb.get('/', query: {q: 1}).body).to eq "q=1&" }
|
42
44
|
specify { expect(shb.post('/', query: {q: 1}, body: {body: 1}).body).to eq "q=1&body=1" }
|
43
45
|
specify { expect(shb.put('/', query: {q: 1}, body: {body: 1}).body).to eq "q=1&body=1" }
|
46
|
+
specify { expect(shb.delete('/', query: {q: 1}, body: {body: 1}).body).to eq "q=1&body=1" }
|
44
47
|
end
|
45
48
|
|
46
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Hallstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|