azure-armrest 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/lib/azure/armrest/armrest_service.rb +15 -15
- data/lib/azure/armrest/version.rb +1 -1
- 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: 12001d2bb2d38d314b1e9ea8833922a7dfb97882
|
4
|
+
data.tar.gz: b7a5853e8526cba1d68cf887b6d5451481e569e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6213f8ef74444dbc11624c66b2e32dfd8168ed10cc240e50ae7ff4e5119ca2898a498ce385503ba84581c88945ba056709ad3013f7911e3f65276be1bf732945
|
7
|
+
data.tar.gz: 0556e41d57f3d396621a080f9d7381267aa21ade4adaf92d1214ba4b02812350b452a9a61d37a769c52a3632776a0bd0fdf0e4fdd3f727738c6c03991f55b60e
|
data/CHANGES
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
= 0.2.5 - 11-Apr-2016
|
2
|
+
* Fixed a bug in the custom exception handler where the error code and
|
3
|
+
message were not set properly.
|
4
|
+
|
1
5
|
= 0.2.4 - 4-Apr-2016
|
2
6
|
* The ArmrestCollection#skip_token method was renamed to "continuation_token".
|
3
7
|
* Added the ArmrestService.log and ArmrestService.log= methods. These are just
|
@@ -388,27 +388,27 @@ module Azure
|
|
388
388
|
def self.raise_api_exception(e)
|
389
389
|
begin
|
390
390
|
response = JSON.parse(e.http_body)
|
391
|
-
code = response
|
392
|
-
message = response
|
391
|
+
code = response['error']['code']
|
392
|
+
message = response['error']['message']
|
393
393
|
rescue
|
394
394
|
message = e.http_body
|
395
395
|
end
|
396
396
|
message = e.http_body unless message
|
397
397
|
|
398
398
|
exception_type = case e
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
399
|
+
when RestClient::NotFound
|
400
|
+
ResourceNotFoundException
|
401
|
+
when RestClient::BadRequest
|
402
|
+
BadRequestException
|
403
|
+
when RestClient::GatewayTimeout
|
404
|
+
GatewayTimeoutException
|
405
|
+
when RestClient::BadGateway
|
406
|
+
BadGatewayException
|
407
|
+
when RestClient::Unauthorized, RestClient::Forbidden
|
408
|
+
UnauthorizedException
|
409
|
+
else
|
410
|
+
ApiException
|
411
|
+
end
|
412
412
|
|
413
413
|
raise exception_type.new(code, message, e)
|
414
414
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure-armrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-04-
|
14
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json
|