bookingsync-api 0.0.21 → 0.0.22
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/bookingsync/api/client.rb +1 -0
- data/lib/bookingsync/api/error.rb +1 -0
- data/lib/bookingsync/api/version.rb +1 -1
- data/spec/bookingsync/api/client_spec.rb +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d266f143b5485fb802a2ca679b463bfe5114c6d2
|
4
|
+
data.tar.gz: ef12933a93a4f3cda873b11003f59a53f629052d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc4c02905c35cc51762cec8d5a11960bda57729211b126b14584b80d8d4630c5177e6b1a6ca48dc2d880d65e7d2c02f70d4f035c85ad77e5e15c8d8ecf93fa10
|
7
|
+
data.tar.gz: ef0b52ef4c204465124b13533ba29c2737773d8dd4b1bb253c5362703c1978096e280696b82646c9f233694b4b39c9065614d4ef9e1acbbd18f9dc4fd86cc3a9
|
data/CHANGELOG.md
ADDED
@@ -291,6 +291,7 @@ module BookingSync::API
|
|
291
291
|
when 204; nil # destroy/cancel
|
292
292
|
when 200..299; response
|
293
293
|
when 401; raise Unauthorized.new(response)
|
294
|
+
when 403; raise Forbidden.new(response)
|
294
295
|
when 404; raise NotFound.new(response)
|
295
296
|
when 422; raise UnprocessableEntity.new(response)
|
296
297
|
else raise UnsupportedResponse.new(response)
|
@@ -133,6 +133,15 @@ describe BookingSync::API::Client do
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
+
context "API returns 403" do
|
137
|
+
it "raises Unauthorized exception" do
|
138
|
+
stub_get("resource", status: 403)
|
139
|
+
expect {
|
140
|
+
client.get("resource")
|
141
|
+
}.to raise_error(BookingSync::API::Forbidden)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
136
145
|
context "API returns 404" do
|
137
146
|
it "raises NotFound exception" do
|
138
147
|
stub_get("resource", status: 404)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookingsync-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sébastien Grosjean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
92
|
- ".travis.yml"
|
93
|
+
- CHANGELOG.md
|
93
94
|
- Gemfile
|
94
95
|
- Guardfile
|
95
96
|
- LICENSE.txt
|