rally-wsapi 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/wsapi/session.rb +2 -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: 3df68a100086937f398ec7af562adef04e842f57
|
4
|
+
data.tar.gz: 5d60da654dbc81820b7753cd8f3e6658512ab5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05cc5a253e6be6365d38e9ff5ab0719c10e2b0227ecb6043512226704a8cb1a9938ba8797c4bf452d157f076a98401375e859fe6277d752f47a3b4569d65cec5
|
7
|
+
data.tar.gz: 3a0ae7c065e07da22f22a3772ef140a5b4672f34dcdda02badd9cb4851bf6a6801f059d2dd46847cc45d6a84d0155188a09584ce8229c87c0482fb3a81f751da
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/lib/wsapi/session.rb
CHANGED
@@ -12,6 +12,7 @@ module Wsapi
|
|
12
12
|
super(msg)
|
13
13
|
end
|
14
14
|
end
|
15
|
+
class BadRequestError < StandardErrorWithResponse; end
|
15
16
|
class AuthorizationError < StandardErrorWithResponse; end
|
16
17
|
class ApiError < StandardErrorWithResponse; end
|
17
18
|
class ObjectNotFoundError < StandardErrorWithResponse; end
|
@@ -197,6 +198,7 @@ module Wsapi
|
|
197
198
|
end
|
198
199
|
|
199
200
|
def check_response_for_errors!(response)
|
201
|
+
raise BadRequestError.new("Bad request", response) if response.status == 400
|
200
202
|
raise AuthorizationError.new("Unauthorized", response) if response.status == 401 || response.status == 403
|
201
203
|
raise ApiError.new("Internal server error", response) if response.status == 500
|
202
204
|
raise ApiError.new("Service unavailable", response) if response.status == 503
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rally-wsapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antti Pitkänen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|