api_client 0.5.14 → 0.5.15
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 +4 -0
- data/lib/api_client/errors.rb +1 -0
- data/lib/api_client/version.rb +1 -1
- data/spec/api_client/connection/basic_spec.rb +7 -7
- 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: a6c012cef145acbd3588f48fd9c4dbd56aa0ba90
|
4
|
+
data.tar.gz: c9e0e93d078e9fac878b72f2a11220d40cb72e63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1111eab30cc3bcdc8fec74ba66a0b356f2ec6eb0460f4ee3e7991c2c5433996cd9416eaf84cbf418bc2dc790b2714e92ea5a352ffe68f77fb2abfd555c468b90
|
7
|
+
data.tar.gz: 5aa6b0e78e3912e6c68b39ee4cacccc94394737e86cb5af64a2f32e370d72d1f811d9d2a0f59b4aab2ba8b43a7c86383152cc4d21e744e6131a1befec6932aab
|
data/CHANGELOG.md
CHANGED
data/lib/api_client/errors.rb
CHANGED
data/lib/api_client/version.rb
CHANGED
@@ -96,42 +96,42 @@ describe ApiClient::Connection::Basic do
|
|
96
96
|
@response.env[:status] = 401
|
97
97
|
lambda {
|
98
98
|
@instance.send :handle_response, request, @response
|
99
|
-
}.should raise_error(ApiClient::Errors::Unauthorized, "
|
99
|
+
}.should raise_error(ApiClient::Errors::Unauthorized, "Status code: 401")
|
100
100
|
end
|
101
101
|
|
102
102
|
it "raises an ApiClient::Errors::Forbidden if status is 403" do
|
103
103
|
@response.env[:status] = 403
|
104
104
|
lambda {
|
105
105
|
@instance.send :handle_response, request, @response
|
106
|
-
}.should raise_error(ApiClient::Errors::Forbidden, "
|
106
|
+
}.should raise_error(ApiClient::Errors::Forbidden, "Status code: 403")
|
107
107
|
end
|
108
108
|
|
109
109
|
it "raises an ApiClient::Errors::NotFound if status is 404" do
|
110
110
|
@response.env[:status] = 404
|
111
111
|
lambda {
|
112
112
|
@instance.send :handle_response, request, @response
|
113
|
-
}.should raise_error(ApiClient::Errors::NotFound, "
|
113
|
+
}.should raise_error(ApiClient::Errors::NotFound, "Status code: 404")
|
114
114
|
end
|
115
115
|
|
116
116
|
it "raises an ApiClient::Errors::BadRequest if status is 400" do
|
117
117
|
@response.env[:status] = 400
|
118
118
|
lambda {
|
119
119
|
@instance.send :handle_response, request, @response
|
120
|
-
}.should raise_error(ApiClient::Errors::BadRequest, "
|
120
|
+
}.should raise_error(ApiClient::Errors::BadRequest, "Status code: 400")
|
121
121
|
end
|
122
122
|
|
123
123
|
it "raises an ApiClient::Errors::Unsupported if status is 406" do
|
124
124
|
@response.env[:status] = 406
|
125
125
|
lambda {
|
126
126
|
@instance.send :handle_response, request, @response
|
127
|
-
}.should raise_error(ApiClient::Errors::Unsupported, "
|
127
|
+
}.should raise_error(ApiClient::Errors::Unsupported, "Status code: 406")
|
128
128
|
end
|
129
129
|
|
130
130
|
it "raises an ApiClient::Errors::Conflict if status is 409" do
|
131
131
|
@response.env[:status] = 409
|
132
132
|
lambda {
|
133
133
|
@instance.send :handle_response, request, @response
|
134
|
-
}.should raise_error(ApiClient::Errors::Conflict, "
|
134
|
+
}.should raise_error(ApiClient::Errors::Conflict, "Status code: 409")
|
135
135
|
end
|
136
136
|
|
137
137
|
it "raises an ApiClient::Errors::Unsupported if status is 422" do
|
@@ -161,7 +161,7 @@ describe ApiClient::Connection::Basic do
|
|
161
161
|
@response.env[:status] = 502
|
162
162
|
lambda {
|
163
163
|
@instance.send :handle_response, request, @response
|
164
|
-
}.should raise_error(ApiClient::Errors::ServerError, "
|
164
|
+
}.should raise_error(ApiClient::Errors::ServerError, "Status code: 502")
|
165
165
|
end
|
166
166
|
|
167
167
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Bunsch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|