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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/wsapi/session.rb +2 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a273989e21a486fff6edbc02b95331380ca7246
4
- data.tar.gz: d1293eb20e41a39ce327081ef8d532dd72d3934b
3
+ metadata.gz: 3df68a100086937f398ec7af562adef04e842f57
4
+ data.tar.gz: 5d60da654dbc81820b7753cd8f3e6658512ab5c1
5
5
  SHA512:
6
- metadata.gz: 9fe7cf15bf3a74f4bf7f56219853ddc737b8790c53566062d21342a7769446d4027c0dc72692c1c41036e449e66092353ad44881a353bcd049732c3e664f2a9f
7
- data.tar.gz: b6d00147c3f1e4f77f5c11afe845ca667597da0f428c3197341c9264d71eb459145b54a499818e029aa6eb1dfcb75b93cc916d3751211aa8caa91e345dda1992
6
+ metadata.gz: 05cc5a253e6be6365d38e9ff5ab0719c10e2b0227ecb6043512226704a8cb1a9938ba8797c4bf452d157f076a98401375e859fe6277d752f47a3b4569d65cec5
7
+ data.tar.gz: 3a0ae7c065e07da22f22a3772ef140a5b4672f34dcdda02badd9cb4851bf6a6801f059d2dd46847cc45d6a84d0155188a09584ce8229c87c0482fb3a81f751da
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -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.3.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-02-12 00:00:00.000000000 Z
12
+ date: 2015-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake