hotcell-client 1.0.0 → 1.1.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/lib/hot_cell/client/version.rb +1 -1
- data/lib/hot_cell/client.rb +1 -1
- data/lib/hot_cell/failures.rb +13 -0
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ba1bb0047670fef637ea304c58ca6589c68c68491b84df357745f4c35dba740
|
|
4
|
+
data.tar.gz: ec3e1cac68b95f6af2c00982538ce95a19a1257014c1c8bec53a49a860e68f83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26eaf78d5f835becb66508a423f91f73223e843d531e6d44723c5d635f9cab1b16f7560f58fc322ab25b50c6503d6d6227d88665a0ca2f81533de19e16f3b84d
|
|
7
|
+
data.tar.gz: e12b678e13d8327c502ae440e923970dd7bcd32b1e828ba9d1ffedabbf724e678c6d36a63bf412d50b289be46c513698f62af187d4a35a6ee13a8d573bfe16a5
|
data/lib/hot_cell/client.rb
CHANGED
|
@@ -200,7 +200,7 @@ module HotCell
|
|
|
200
200
|
return if response.ok?
|
|
201
201
|
|
|
202
202
|
failure = response.failure
|
|
203
|
-
error = cell.exception_for(failure).new(failure.to_s)
|
|
203
|
+
error = Verdict.wrap(cell.exception_for(failure).new(failure.to_s), failure)
|
|
204
204
|
cell.report_contract_skew error if failure.code == "protocol"
|
|
205
205
|
|
|
206
206
|
raise error
|
data/lib/hot_cell/failures.rb
CHANGED
|
@@ -21,4 +21,17 @@ module HotCell
|
|
|
21
21
|
# classification, so a later tidying pass that gives both a common ancestor silently turns every retryable
|
|
22
22
|
# failure into a permanent one.
|
|
23
23
|
class TransientFailure < StandardError; end
|
|
24
|
+
|
|
25
|
+
# Extended onto every exception the client raises, so an application can read the failure's code,
|
|
26
|
+
# cause and permanence without parsing the message — and rescue HotCell::Verdict itself, whatever
|
|
27
|
+
# classes the registration injected.
|
|
28
|
+
module Verdict
|
|
29
|
+
attr_reader :hot_cell_failure
|
|
30
|
+
|
|
31
|
+
def self.wrap(error, failure)
|
|
32
|
+
error.extend(self)
|
|
33
|
+
error.instance_variable_set(:@hot_cell_failure, failure)
|
|
34
|
+
error
|
|
35
|
+
end
|
|
36
|
+
end
|
|
24
37
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hotcell-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Dalessio
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 1.
|
|
18
|
+
version: 1.1.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 1.
|
|
25
|
+
version: 1.1.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: activesupport
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -71,8 +71,8 @@ licenses:
|
|
|
71
71
|
- MIT
|
|
72
72
|
metadata:
|
|
73
73
|
homepage_uri: https://github.com/basecamp/hotcell
|
|
74
|
-
source_code_uri: https://github.com/basecamp/hotcell/tree/v1.
|
|
75
|
-
changelog_uri: https://github.com/basecamp/hotcell/blob/v1.
|
|
74
|
+
source_code_uri: https://github.com/basecamp/hotcell/tree/v1.1.0/hotcell-client
|
|
75
|
+
changelog_uri: https://github.com/basecamp/hotcell/blob/v1.1.0/CHANGELOG.md
|
|
76
76
|
documentation_uri: https://basecamp.github.io/hotcell/
|
|
77
77
|
bug_tracker_uri: https://github.com/basecamp/hotcell/issues
|
|
78
78
|
rubygems_mfa_required: 'true'
|
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
91
|
version: '0'
|
|
92
92
|
requirements: []
|
|
93
|
-
rubygems_version: 4.0.
|
|
93
|
+
rubygems_version: 4.0.16
|
|
94
94
|
specification_version: 4
|
|
95
95
|
summary: Call a HotCell from an application.
|
|
96
96
|
test_files: []
|