garage_client 2.3.0 → 2.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2fe048281c50ac7a86c5c7e797767aad598ba7d
4
- data.tar.gz: 79145a3ccd636a550ff080cfbf645c4b84d039ab
3
+ metadata.gz: 59a22afce362de90c9f060761a53b4606bf76b15
4
+ data.tar.gz: 1a6688baf001b1d7b056f97c9bd6b6af10556e2b
5
5
  SHA512:
6
- metadata.gz: b0b85356fbc7483e712608039c4fcd3281d624c497e4b5f1af6bb04345733d78b56316d7266d5570f0c70c80ec72f725993477f3f805a739ca77596e115c8f47
7
- data.tar.gz: 8f7f45c81e14b3894010566be0af202b28f5dab33dddf7a987069a83ad712dc89fd323606ade7f9e27909f38de250769d7ce231c4f9763a24f6371f65f845e37
6
+ metadata.gz: fbfb76de3ee53fcf0bfa6a0a25e860ce4ab747b52bb265d4dba09edfa8df53ed3e75f6a9a491907b5225dd5165beb5e13394644111400cb87157199608297307
7
+ data.tar.gz: 9fc1fac781f43df08346dd422db81fad9768ad29227f14fbc434ebf3dcc53eb25a33e82d97f06344cb36c6abac03e81fc23f06c6405a24b07b94069d2dd6769b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
+ ## 2.3.1
2
+ - Raise `GarageClient::GatewayTimeout` for 504 error
3
+
1
4
  ## 2.3.0
2
- - Add new configuration parameter `name`, which is embedded in User-Agent by default
5
+ - Add `name` configuration to set application name to User-Agent
3
6
 
4
7
  ## 2.2.0
5
8
  - Change all 4xx exceptions to be `GarageClient::ClientError`
data/README.md CHANGED
@@ -136,6 +136,7 @@ GarageClient::UnsupportedMediaType
136
136
  GarageClient::UnprocessableEntity
137
137
  GarageClient::InternalServerError
138
138
  GarageClient::ServiceUnavailable
139
+ GarageClient::GatewayTimeout
139
140
  ```
140
141
 
141
142
  ## Utility
@@ -33,6 +33,7 @@ module GarageClient
33
33
  class ServerError < Error; end
34
34
  class InternalServerError < ServerError; end
35
35
  class ServiceUnavailable < ServerError; end
36
+ class GatewayTimeout < ServerError; end
36
37
 
37
38
  # GarageClient Client
38
39
  class UnsupportedResource < Error; end
@@ -31,6 +31,8 @@ module GarageClient
31
31
  raise GarageClient::InternalServerError.new(resp)
32
32
  when 503
33
33
  raise GarageClient::ServiceUnavailable.new(resp)
34
+ when 504
35
+ raise GarageClient::GatewayTimeout.new(resp)
34
36
  when ClientErrorStatuses
35
37
  raise GarageClient::ClientError.new(resp)
36
38
  when ServerErrorStatuses
@@ -1,3 +1,3 @@
1
1
  module GarageClient
2
- VERSION = '2.3.0'
2
+ VERSION = '2.3.1'
3
3
  end
@@ -437,13 +437,13 @@ describe Faraday::Response do
437
437
  422 => GarageClient::UnprocessableEntity,
438
438
  500 => GarageClient::InternalServerError,
439
439
  503 => GarageClient::ServiceUnavailable,
440
+ 504 => GarageClient::GatewayTimeout,
440
441
 
441
442
  402 => GarageClient::ClientError,
442
443
  405 => GarageClient::ClientError,
443
444
  407 => GarageClient::ClientError,
444
445
  408 => GarageClient::ClientError,
445
446
  502 => GarageClient::ServerError,
446
- 504 => GarageClient::ServerError,
447
447
  }.each do |status, exception|
448
448
  context "when HTTP status is #{status}" do
449
449
  before do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garage_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cookpad Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  requirements: []
232
232
  rubyforge_project:
233
- rubygems_version: 2.5.1
233
+ rubygems_version: 2.2.5
234
234
  signing_key:
235
235
  specification_version: 4
236
236
  summary: Ruby client library for the Garage API