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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8323690e6c42f0a6ce2ed910bf933d6f8eb6bc9a
4
- data.tar.gz: e8603030d496cb30d6e99e813c4cd32d05e118e6
3
+ metadata.gz: 12001d2bb2d38d314b1e9ea8833922a7dfb97882
4
+ data.tar.gz: b7a5853e8526cba1d68cf887b6d5451481e569e3
5
5
  SHA512:
6
- metadata.gz: 90aee7872a99f54b922e8252517e603208f5df62b53c0707687872df69beda6f01867b5ff8d06ad80285ed14eaebb75a3b6ffbe9f1fc2ef6da27565a00e6a35a
7
- data.tar.gz: 7c280d3c7c302b21ebf4a2975aa613ce0e65b4c7d2417cad77f04e01283e8badc89dbab5649322aa6b8b59dfefff0c6baf97a45e8400158601d41895589059ff
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.fetch_path('error', 'code')
392
- message = response.fetch_path('error', 'message')
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
- 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
408
- UnauthorizedException
409
- else
410
- ApiException
411
- end
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
@@ -1,5 +1,5 @@
1
1
  module Azure
2
2
  module Armrest
3
- VERSION = '0.2.4'
3
+ VERSION = '0.2.5'
4
4
  end
5
5
  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
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-04 00:00:00.000000000 Z
14
+ date: 2016-04-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json