restify 1.11.0 → 1.12.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/CHANGELOG.md +14 -1
- data/lib/restify/error.rb +4 -1
- data/lib/restify/version.rb +1 -1
- data/spec/restify/error_spec.rb +5 -0
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19ee2486506eef195ed64b0a37ff921b97fefa46356e69d2fc3b28ca404ebf98
|
4
|
+
data.tar.gz: 3b81f57ac5b84452dc9e9b6e1bb39705b601138ee5e5f9e2d1bb33d1107e286f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2e87e8c7e31b32d7da5f70321887a7ca28831a78e088fe3c934a08dc94481413d4a24c64eb8f765d60c7195a2d9830a11d11df6fa7c9c96ee5033ae26659f80
|
7
|
+
data.tar.gz: 58697191071fa894417566779fcca6f74bb817ae6173bf9d7752b91af0b252d5ae4911fd29507b04fe6adf327e8b73cbf5109509fd9771078936259cb1911e46
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
7
|
|
8
|
+
|
8
9
|
## Unreleased
|
9
10
|
---
|
10
11
|
|
@@ -17,8 +18,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
17
18
|
### Breaks
|
18
19
|
|
19
20
|
|
21
|
+
## 1.12.0 - (2020-04-01)
|
22
|
+
---
|
23
|
+
|
24
|
+
### Added
|
25
|
+
* Explicit exception class for HTTP status code 410 (Gone)
|
26
|
+
|
27
|
+
### Changed
|
28
|
+
|
29
|
+
### Fixed
|
30
|
+
* `GatewayError` exception classes introduced in v1.11.0 now properly inherit from `ServerError` (#30)
|
31
|
+
|
32
|
+
|
20
33
|
## 1.11.0 - (2019-07-11)
|
21
|
-
###
|
34
|
+
### Added
|
22
35
|
* Explicit exception classes for HTTP status codes 500, 502, 503, 504
|
23
36
|
|
24
37
|
## 1.10.0 - 2018-12-11
|
data/lib/restify/error.rb
CHANGED
@@ -30,6 +30,8 @@ module Restify
|
|
30
30
|
NotFound.new(response)
|
31
31
|
when 406
|
32
32
|
NotAcceptable.new(response)
|
33
|
+
when 410
|
34
|
+
Gone.new(response)
|
33
35
|
when 422
|
34
36
|
UnprocessableEntity.new(response)
|
35
37
|
when 400...500
|
@@ -100,7 +102,7 @@ module Restify
|
|
100
102
|
# failing or not available.
|
101
103
|
#
|
102
104
|
# This can be used to catch "common" gateway responses.
|
103
|
-
class GatewayError <
|
105
|
+
class GatewayError < ServerError; end
|
104
106
|
|
105
107
|
###
|
106
108
|
# CONCRETE SUBCLASSES FOR TYPICAL STATUS CODES
|
@@ -111,6 +113,7 @@ module Restify
|
|
111
113
|
class Unauthorized < ClientError; end
|
112
114
|
class NotFound < ClientError; end
|
113
115
|
class NotAcceptable < ClientError; end
|
116
|
+
class Gone < ClientError; end
|
114
117
|
class UnprocessableEntity < ClientError; end
|
115
118
|
|
116
119
|
class InternalServerError < ServerError; end
|
data/lib/restify/version.rb
CHANGED
data/spec/restify/error_spec.rb
CHANGED
@@ -38,6 +38,11 @@ describe Restify::ResponseError do
|
|
38
38
|
it { is_expected.to be_a ::Restify::NotAcceptable }
|
39
39
|
end
|
40
40
|
|
41
|
+
context 'with 410 Gone' do
|
42
|
+
let(:code) { 410 }
|
43
|
+
it { is_expected.to be_a ::Restify::Gone }
|
44
|
+
end
|
45
|
+
|
41
46
|
context 'with 422 Unprocessable Entity' do
|
42
47
|
let(:code) { 422 }
|
43
48
|
it { is_expected.to be_a ::Restify::UnprocessableEntity }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -56,16 +56,22 @@ dependencies:
|
|
56
56
|
name: hashie
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.3'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '5.0'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '3.3'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '5.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rack
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,8 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
227
|
- !ruby/object:Gem::Version
|
222
228
|
version: '0'
|
223
229
|
requirements: []
|
224
|
-
|
225
|
-
rubygems_version: 2.7.7
|
230
|
+
rubygems_version: 3.1.2
|
226
231
|
signing_key:
|
227
232
|
specification_version: 4
|
228
233
|
summary: An experimental hypermedia REST client.
|