garage_client 2.1.7 → 2.2.0
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 +4 -4
- data/.travis.yml +3 -3
- data/CHANGELOG.md +7 -0
- data/garage_client.gemspec +0 -1
- data/lib/garage_client/error.rb +11 -11
- data/lib/garage_client/version.rb +1 -1
- data/spec/garage_client/request/json_encoded_spec.rb +3 -0
- metadata +3 -19
- data/Guardfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0ae5b3ae6c5a36e39aea7fbb4c508248329ceb0
|
4
|
+
data.tar.gz: 951d87cff4b2fa051f523879810c3231b6e95f12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35480761fae84cd1ae4df093eb7ca58ff12a0b3942cf62220a28f6dc992297ad38dc070a627726516f701576628c47b9761fe0f36d950bb7139b5116f1a50fac
|
7
|
+
data.tar.gz: dc3709d896cb7c5f4f25d71a286adfe5c2e1ed699aa3ccd773f5205054c3d4a59493f1dab127b22c96e04ad351aa04740a9007dac3bfb65bdd64b30b01e239fb
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 2.2.0
|
2
|
+
- Change all 4xx exceptions to be `GarageClient::ClientError`
|
3
|
+
- Change all 5xx exceptions to be `GarageClient::ServerError`
|
4
|
+
|
5
|
+
## 2.1.7
|
6
|
+
- Append `HTTP_X_REQUEST_ID` header by `Thread.current[:request_id]`
|
7
|
+
|
1
8
|
## 2.1.6
|
2
9
|
- Raise error on 4xx client errors or 5xx server errors.
|
3
10
|
|
data/garage_client.gemspec
CHANGED
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_development_dependency "rake", ">= 0.9.2"
|
28
28
|
s.add_development_dependency "rspec"
|
29
29
|
s.add_development_dependency "json"
|
30
|
-
s.add_development_dependency "guard-rspec"
|
31
30
|
s.add_development_dependency "webmock"
|
32
31
|
s.add_development_dependency "pry"
|
33
32
|
# Until bug fixed: https://github.com/colszowka/simplecov/issues/281
|
data/lib/garage_client/error.rb
CHANGED
@@ -19,20 +19,20 @@ module GarageClient
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# HTTP level
|
22
|
-
class BadRequest < Error; end
|
23
|
-
class Unauthorized < Error; end
|
24
|
-
class Forbidden < Error; end
|
25
|
-
class NotFound < Error; end
|
26
|
-
class NotAcceptable < Error; end
|
27
|
-
class Conflict < Error; end
|
28
|
-
class UnsupportedMediaType < Error; end
|
29
|
-
class UnprocessableEntity < Error; end
|
30
22
|
class ClientError < Error; end
|
31
|
-
class
|
23
|
+
class BadRequest < ClientError; end
|
24
|
+
class Unauthorized < ClientError; end
|
25
|
+
class Forbidden < ClientError; end
|
26
|
+
class NotFound < ClientError; end
|
27
|
+
class NotAcceptable < ClientError; end
|
28
|
+
class Conflict < ClientError; end
|
29
|
+
class UnsupportedMediaType < ClientError; end
|
30
|
+
class UnprocessableEntity < ClientError; end
|
32
31
|
|
33
32
|
# Remote Server
|
34
|
-
class
|
35
|
-
class
|
33
|
+
class ServerError < Error; end
|
34
|
+
class InternalServerError < ServerError; end
|
35
|
+
class ServiceUnavailable < ServerError; end
|
36
36
|
|
37
37
|
# GarageClient Client
|
38
38
|
class UnsupportedResource < Error; end
|
@@ -49,6 +49,9 @@ describe GarageClient::Request::JsonEncoded do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
it "does nothing" do
|
52
|
+
# https://github.com/bblimke/webmock/commit/93ef063a043a222774fd339b3a56a428feab813f
|
53
|
+
pending 'webmock does not support matching body for multipart/form-data'
|
54
|
+
|
52
55
|
stub_post("/examples").with(
|
53
56
|
body: [
|
54
57
|
"-------------RubyMultipartPost",
|
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.
|
4
|
+
version: 2.2.0
|
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-
|
11
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: guard-rspec
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: webmock
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,7 +176,6 @@ files:
|
|
190
176
|
- ".travis.yml"
|
191
177
|
- CHANGELOG.md
|
192
178
|
- Gemfile
|
193
|
-
- Guardfile
|
194
179
|
- LICENSE.txt
|
195
180
|
- README.md
|
196
181
|
- Rakefile
|
@@ -245,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
230
|
version: '0'
|
246
231
|
requirements: []
|
247
232
|
rubyforge_project:
|
248
|
-
rubygems_version: 2.
|
233
|
+
rubygems_version: 2.2.5
|
249
234
|
signing_key:
|
250
235
|
specification_version: 4
|
251
236
|
summary: Ruby client library for the Garage API
|
@@ -267,4 +252,3 @@ test_files:
|
|
267
252
|
- spec/garage_client/response_spec.rb
|
268
253
|
- spec/garage_client_spec.rb
|
269
254
|
- spec/spec_helper.rb
|
270
|
-
has_rdoc:
|