yake 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yake/errors.rb +50 -2
- data/lib/yake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e96eec76402a33ac4b0b57846ebfb90fcf22dd0adf3416cbd5acdf4b065f4675
|
4
|
+
data.tar.gz: 057c08011065fd17236d85d5327be67204af2c17e94c5c4af65de4fd4ed61941
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41435fce4006498e59c12939eb0b02a4b2c43ac2de2c892930ab38b0b5736c83a96922b28fb04b1a14530ed8deb35b849cfcb46ea38a90de71eb555e848897d7
|
7
|
+
data.tar.gz: 8ff001c1440a29f90440e120187c2df33f0f9fd72c693587b07654a6543a1d1bef585e0b03483100df5002b302d7bcf03874ce16a0380bd85b00e397d5992e18
|
data/lib/yake/errors.rb
CHANGED
@@ -29,7 +29,7 @@ module Yake
|
|
29
29
|
class RequestTimeout < Error; end # HTTP 408
|
30
30
|
class Conflict < Error; end # HTTP 409
|
31
31
|
class Gone < Error; end # HTTP 410
|
32
|
-
class LengthRequired < Error; end # HTTP
|
32
|
+
class LengthRequired < Error; end # HTTP 411
|
33
33
|
class PreconditionFailed < Error; end # HTTP 412
|
34
34
|
class PayloadTooLarge < Error; end # HTTP 413
|
35
35
|
class UriTooLong < Error; end # HTTP 414
|
@@ -58,6 +58,54 @@ module Yake
|
|
58
58
|
class InsufficientStorage < Error; end # HTTP 507
|
59
59
|
class LoopDetected < Error; end # HTTP 508
|
60
60
|
class NotExtended < Error; end # HTTP 510
|
61
|
-
class NetworkAuthenticationRequired < Error; end # HTTP
|
61
|
+
class NetworkAuthenticationRequired < Error; end # HTTP 511
|
62
|
+
|
63
|
+
ERRORS = {
|
64
|
+
'400' => BadRequest,
|
65
|
+
'401' => Unauthorized,
|
66
|
+
'402' => PaymentRequired,
|
67
|
+
'403' => Forbidden,
|
68
|
+
'404' => NotFound,
|
69
|
+
'405' => MethodNotAllowed,
|
70
|
+
'406' => NotAcceptable,
|
71
|
+
'407' => ProxyAuthenticationRequired,
|
72
|
+
'408' => RequestTimeout,
|
73
|
+
'409' => Conflict,
|
74
|
+
'410' => Gone,
|
75
|
+
'411' => LengthRequired,
|
76
|
+
'412' => PreconditionFailed,
|
77
|
+
'413' => PayloadTooLarge,
|
78
|
+
'414' => UriTooLong,
|
79
|
+
'415' => UnsupportedMediaType,
|
80
|
+
'416' => RangeNotSatisfiable,
|
81
|
+
'417' => ExpectationFailed,
|
82
|
+
'418' => ImATeapot,
|
83
|
+
'420' => EnhanceYourCalm,
|
84
|
+
'421' => MisdirectedRequest,
|
85
|
+
'422' => UnprocessableEntity,
|
86
|
+
'423' => Locked,
|
87
|
+
'424' => FailedDependency,
|
88
|
+
'425' => TooEarly,
|
89
|
+
'426' => UpgradeRequired,
|
90
|
+
'428' => PreconditionRequired,
|
91
|
+
'429' => TooManyRequests,
|
92
|
+
'431' => RequestHeaderFieldsTooLarge,
|
93
|
+
'451' => UnavailableForLegalReasons,
|
94
|
+
'500' => InternalServerError,
|
95
|
+
'501' => NotImplemented,
|
96
|
+
'502' => BadGateway,
|
97
|
+
'503' => ServiceUnavailable,
|
98
|
+
'504' => GatewayTimeout,
|
99
|
+
'505' => HttpVersionNotSupported,
|
100
|
+
'506' => VariantAlsoNegotiates,
|
101
|
+
'507' => InsufficientStorage,
|
102
|
+
'508' => LoopDetected,
|
103
|
+
'510' => NotExtended,
|
104
|
+
'511' => NetworkAuthenticationRequired,
|
105
|
+
}
|
106
|
+
|
107
|
+
def self.[](code)
|
108
|
+
ERRORS.fetch(code.to_s)
|
109
|
+
end
|
62
110
|
end
|
63
111
|
end
|
data/lib/yake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Mancevice
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|