exceptional_synchrony 1.4.5 → 1.4.6
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/.github/workflows/pipeline.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +32 -103
- data/catalog-info.yaml +35 -0
- data/exceptional_synchrony.gemspec +1 -1
- data/lib/exceptional_synchrony/callback_exceptions.rb +1 -1
- data/lib/exceptional_synchrony/version.rb +1 -1
- data/test/unit/event_machine_proxy_test.rb +5 -25
- metadata +3 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b71be2de82429b47ed818b7917462ca97ce84536ed1ad21ac9d6783fe5c64468
|
|
4
|
+
data.tar.gz: '08885035983ed422cf14209229905892fb26fc1a760107e55f6baea1ccff7c59'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82fafb9ad1d90c3bacb2d4f73e2c9282240678ae1931c1acc1131f5fd6297a062cc977a83348d05b692c65d15b081198b91b50f6af8cbe7b9ba32a833df379cc
|
|
7
|
+
data.tar.gz: cbfbbe45d7e759bac61530d0a94c82c55d6986289177145709024f57217b9b0c759d63f4560359c7e52db958fff5c0c2d84ce947632519ff2da226b18cf1da86
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.1.6
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ Note: This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0
|
|
|
6
6
|
|
|
7
7
|
All notable changes to this project will be documented in this file.
|
|
8
8
|
|
|
9
|
+
## [1.4.6] - Unreleased
|
|
10
|
+
### Changed
|
|
11
|
+
- Loosed dependency on `exception_handling` to remove upper bound.
|
|
12
|
+
|
|
9
13
|
## [1.4.5] - 2024-02-29
|
|
10
14
|
### Changed
|
|
11
15
|
- Updated dependency on `exception_handling` to allow for the latest version.
|
data/Gemfile.lock
CHANGED
|
@@ -1,46 +1,17 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
exceptional_synchrony (1.4.
|
|
4
|
+
exceptional_synchrony (1.4.6)
|
|
5
5
|
em-http-request
|
|
6
6
|
em-synchrony
|
|
7
7
|
eventmachine
|
|
8
|
-
exception_handling (>= 2.10
|
|
8
|
+
exception_handling (>= 2.10)
|
|
9
9
|
invoca-utils (~> 0.3)
|
|
10
10
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
|
|
15
|
-
actionpack (= 7.1.3.2)
|
|
16
|
-
actionview (= 7.1.3.2)
|
|
17
|
-
activejob (= 7.1.3.2)
|
|
18
|
-
activesupport (= 7.1.3.2)
|
|
19
|
-
mail (~> 2.5, >= 2.5.4)
|
|
20
|
-
net-imap
|
|
21
|
-
net-pop
|
|
22
|
-
net-smtp
|
|
23
|
-
rails-dom-testing (~> 2.2)
|
|
24
|
-
actionpack (7.1.3.2)
|
|
25
|
-
actionview (= 7.1.3.2)
|
|
26
|
-
activesupport (= 7.1.3.2)
|
|
27
|
-
nokogiri (>= 1.8.5)
|
|
28
|
-
racc
|
|
29
|
-
rack (>= 2.2.4)
|
|
30
|
-
rack-session (>= 1.0.1)
|
|
31
|
-
rack-test (>= 0.6.3)
|
|
32
|
-
rails-dom-testing (~> 2.2)
|
|
33
|
-
rails-html-sanitizer (~> 1.6)
|
|
34
|
-
actionview (7.1.3.2)
|
|
35
|
-
activesupport (= 7.1.3.2)
|
|
36
|
-
builder (~> 3.1)
|
|
37
|
-
erubi (~> 1.11)
|
|
38
|
-
rails-dom-testing (~> 2.2)
|
|
39
|
-
rails-html-sanitizer (~> 1.6)
|
|
40
|
-
activejob (7.1.3.2)
|
|
41
|
-
activesupport (= 7.1.3.2)
|
|
42
|
-
globalid (>= 0.3.6)
|
|
43
|
-
activesupport (7.1.3.2)
|
|
14
|
+
activesupport (7.1.3.4)
|
|
44
15
|
base64
|
|
45
16
|
bigdecimal
|
|
46
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
@@ -50,25 +21,23 @@ GEM
|
|
|
50
21
|
minitest (>= 5.1)
|
|
51
22
|
mutex_m
|
|
52
23
|
tzinfo (~> 2.0)
|
|
53
|
-
addressable (2.8.
|
|
54
|
-
public_suffix (>= 2.0.2, <
|
|
24
|
+
addressable (2.8.7)
|
|
25
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
55
26
|
ansi (1.5.0)
|
|
56
27
|
base64 (0.2.0)
|
|
57
|
-
bigdecimal (3.1.
|
|
58
|
-
builder (3.
|
|
28
|
+
bigdecimal (3.1.8)
|
|
29
|
+
builder (3.3.0)
|
|
59
30
|
coderay (1.1.3)
|
|
60
|
-
concurrent-ruby (1.
|
|
31
|
+
concurrent-ruby (1.3.3)
|
|
61
32
|
connection_pool (2.4.1)
|
|
62
|
-
contextual_logger (1.
|
|
63
|
-
activesupport
|
|
33
|
+
contextual_logger (1.4.0)
|
|
34
|
+
activesupport (>= 6.0)
|
|
64
35
|
json
|
|
65
36
|
cookiejar (0.3.4)
|
|
66
|
-
crack (0.
|
|
37
|
+
crack (1.0.0)
|
|
38
|
+
bigdecimal
|
|
67
39
|
rexml
|
|
68
|
-
|
|
69
|
-
date (3.3.4)
|
|
70
|
-
drb (2.2.0)
|
|
71
|
-
ruby2_keywords
|
|
40
|
+
drb (2.2.1)
|
|
72
41
|
em-http-request (1.1.7)
|
|
73
42
|
addressable (>= 2.3.4)
|
|
74
43
|
cookiejar (!= 0.3.1)
|
|
@@ -79,83 +48,43 @@ GEM
|
|
|
79
48
|
eventmachine (>= 1.0.0.beta.4)
|
|
80
49
|
em-synchrony (1.0.6)
|
|
81
50
|
eventmachine (>= 1.0.0.beta.1)
|
|
82
|
-
erubi (1.12.0)
|
|
83
51
|
escalate (0.3.0)
|
|
84
52
|
eventmachine (1.2.7)
|
|
85
|
-
exception_handling (
|
|
86
|
-
actionmailer (>= 5.2)
|
|
87
|
-
actionpack (>= 5.2)
|
|
53
|
+
exception_handling (3.1.2)
|
|
88
54
|
activesupport (>= 5.2)
|
|
89
55
|
contextual_logger (~> 1.0)
|
|
90
56
|
escalate (~> 0.3)
|
|
91
|
-
eventmachine (~> 1.0)
|
|
92
57
|
invoca-utils (~> 0.3)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
globalid (1.2.1)
|
|
96
|
-
activesupport (>= 6.1)
|
|
97
|
-
hashdiff (1.0.1)
|
|
58
|
+
psych (>= 3.2)
|
|
59
|
+
hashdiff (1.1.0)
|
|
98
60
|
http_parser.rb (0.8.0)
|
|
99
|
-
i18n (1.14.
|
|
61
|
+
i18n (1.14.5)
|
|
100
62
|
concurrent-ruby (~> 1.0)
|
|
101
|
-
invoca-utils (0.
|
|
102
|
-
activesupport (>=
|
|
103
|
-
json (2.7.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
mail (2.8.1)
|
|
108
|
-
mini_mime (>= 0.1.1)
|
|
109
|
-
net-imap
|
|
110
|
-
net-pop
|
|
111
|
-
net-smtp
|
|
112
|
-
method_source (1.0.0)
|
|
113
|
-
mini_mime (1.1.5)
|
|
114
|
-
mini_portile2 (2.8.5)
|
|
115
|
-
minitest (5.18.0)
|
|
116
|
-
minitest-reporters (1.6.0)
|
|
63
|
+
invoca-utils (0.6.0)
|
|
64
|
+
activesupport (>= 6.0)
|
|
65
|
+
json (2.7.2)
|
|
66
|
+
method_source (1.1.0)
|
|
67
|
+
minitest (5.24.1)
|
|
68
|
+
minitest-reporters (1.7.1)
|
|
117
69
|
ansi
|
|
118
70
|
builder
|
|
119
71
|
minitest (>= 5.0)
|
|
120
72
|
ruby-progressbar
|
|
121
73
|
mutex_m (0.2.0)
|
|
122
|
-
net-imap (0.4.10)
|
|
123
|
-
date
|
|
124
|
-
net-protocol
|
|
125
|
-
net-pop (0.1.2)
|
|
126
|
-
net-protocol
|
|
127
|
-
net-protocol (0.2.2)
|
|
128
|
-
timeout
|
|
129
|
-
net-smtp (0.4.0.1)
|
|
130
|
-
net-protocol
|
|
131
|
-
nokogiri (1.15.5)
|
|
132
|
-
mini_portile2 (~> 2.8.2)
|
|
133
|
-
racc (~> 1.4)
|
|
134
74
|
pry (0.14.2)
|
|
135
75
|
coderay (~> 1.1)
|
|
136
76
|
method_source (~> 1.0)
|
|
137
|
-
psych (
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
rack-test (2.1.0)
|
|
144
|
-
rack (>= 1.3)
|
|
145
|
-
rails-dom-testing (2.2.0)
|
|
146
|
-
activesupport (>= 5.0.0)
|
|
147
|
-
minitest
|
|
148
|
-
nokogiri (>= 1.6)
|
|
149
|
-
rails-html-sanitizer (1.6.0)
|
|
150
|
-
loofah (~> 2.21)
|
|
151
|
-
nokogiri (~> 1.14)
|
|
152
|
-
rake (13.0.6)
|
|
153
|
-
rexml (3.2.5)
|
|
77
|
+
psych (5.1.2)
|
|
78
|
+
stringio
|
|
79
|
+
public_suffix (6.0.0)
|
|
80
|
+
rake (13.2.1)
|
|
81
|
+
rexml (3.3.1)
|
|
82
|
+
strscan
|
|
154
83
|
rr (1.2.1)
|
|
155
84
|
ruby-progressbar (1.13.0)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
85
|
+
stringio (3.1.1)
|
|
86
|
+
strscan (3.1.0)
|
|
87
|
+
thor (1.3.1)
|
|
159
88
|
tzinfo (2.0.6)
|
|
160
89
|
concurrent-ruby (~> 1.0)
|
|
161
90
|
webmock (1.24.6)
|
data/catalog-info.yaml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This file is partially auto-generated by the invoca-backstage-tools gem
|
|
2
|
+
# The following fields should not be edited manually as they are auto-generated
|
|
3
|
+
# based on the contents of the repo:
|
|
4
|
+
# - metadata.name
|
|
5
|
+
# - metadata.title
|
|
6
|
+
# - metadata.description
|
|
7
|
+
# - annotations.github.com/project-slug
|
|
8
|
+
# - invoca.com/version-repository-location
|
|
9
|
+
# - invoca.com/version-repository-name
|
|
10
|
+
# - spec.type
|
|
11
|
+
# - spec.owner
|
|
12
|
+
---
|
|
13
|
+
apiVersion: backstage.io/v1alpha1
|
|
14
|
+
kind: Component
|
|
15
|
+
metadata:
|
|
16
|
+
name: exceptional_synchrony-gem
|
|
17
|
+
title: ExceptionalSynchrony
|
|
18
|
+
annotations:
|
|
19
|
+
buildkite.com/project-slug: Invoca/exceptional_synchrony
|
|
20
|
+
github.com/project-slug: Invoca/exceptional_synchrony
|
|
21
|
+
invoca.com/version-repository-location: rubygems
|
|
22
|
+
invoca.com/version-repository-name: exceptional_synchrony
|
|
23
|
+
endoflife.date/products: ruby@3.3
|
|
24
|
+
tags:
|
|
25
|
+
- ruby
|
|
26
|
+
- open-source
|
|
27
|
+
- gem
|
|
28
|
+
description: ''
|
|
29
|
+
spec:
|
|
30
|
+
type: library
|
|
31
|
+
lifecycle: production
|
|
32
|
+
owner: octothorpe
|
|
33
|
+
dependsOn:
|
|
34
|
+
- component:exception_handling-gem
|
|
35
|
+
- component:invoca-utils-gem
|
|
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.add_dependency 'em-synchrony'
|
|
20
20
|
spec.add_dependency 'em-http-request'
|
|
21
21
|
spec.add_dependency 'eventmachine'
|
|
22
|
-
spec.add_dependency 'exception_handling', '>= 2.10'
|
|
22
|
+
spec.add_dependency 'exception_handling', '>= 2.10'
|
|
23
23
|
spec.add_dependency 'invoca-utils', '~> 0.3'
|
|
24
24
|
end
|
|
@@ -120,11 +120,7 @@ describe ExceptionalSynchrony::EventMachineProxy do
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
it "should handle exceptions when not waiting for its block to run" do
|
|
123
|
-
|
|
124
|
-
mock(ExceptionHandling).log_error(is_a(RuntimeError), "defer", {})
|
|
125
|
-
else
|
|
126
|
-
mock(ExceptionHandling).log_error(is_a(RuntimeError), "defer")
|
|
127
|
-
end
|
|
123
|
+
mock(ExceptionHandling).log_error(is_a(RuntimeError), "defer")
|
|
128
124
|
|
|
129
125
|
@em.run do
|
|
130
126
|
assert_nil @em.defer(wait_for_result: false) { raise RuntimeError, "error in defer" }
|
|
@@ -152,31 +148,19 @@ describe ExceptionalSynchrony::EventMachineProxy do
|
|
|
152
148
|
end
|
|
153
149
|
|
|
154
150
|
it "add_timer" do
|
|
155
|
-
|
|
156
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "add_timer", {})
|
|
157
|
-
else
|
|
158
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "add_timer")
|
|
159
|
-
end
|
|
151
|
+
mock(ExceptionHandling).log_error(EXCEPTION, "add_timer")
|
|
160
152
|
mock(EventMachine::Synchrony).add_timer(10) { |duration, *args| args.first.call }
|
|
161
153
|
@em.add_timer(10) { raise EXCEPTION }
|
|
162
154
|
end
|
|
163
155
|
|
|
164
156
|
it "add_periodic_timer" do
|
|
165
|
-
|
|
166
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "add_periodic_timer", {})
|
|
167
|
-
else
|
|
168
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "add_periodic_timer")
|
|
169
|
-
end
|
|
157
|
+
mock(ExceptionHandling).log_error(EXCEPTION, "add_periodic_timer")
|
|
170
158
|
mock(EventMachine::Synchrony).add_periodic_timer(10) { |duration, *args| args.first.call }
|
|
171
159
|
@em.add_periodic_timer(10) { raise EXCEPTION }
|
|
172
160
|
end
|
|
173
161
|
|
|
174
162
|
it "next_tick" do
|
|
175
|
-
|
|
176
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "next_tick", {})
|
|
177
|
-
else
|
|
178
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "next_tick")
|
|
179
|
-
end
|
|
163
|
+
mock(ExceptionHandling).log_error(EXCEPTION, "next_tick")
|
|
180
164
|
mock(EventMachine::Synchrony).next_tick { |*args| args.first.call }
|
|
181
165
|
@em.next_tick { raise EXCEPTION }
|
|
182
166
|
end
|
|
@@ -226,11 +210,7 @@ describe ExceptionalSynchrony::EventMachineProxy do
|
|
|
226
210
|
|
|
227
211
|
describe "when using #{method} and on_error = :log" do
|
|
228
212
|
it "should rescue any exceptions and log them" do
|
|
229
|
-
|
|
230
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "run_with_error_logging", {})
|
|
231
|
-
else
|
|
232
|
-
mock(ExceptionHandling).log_error(EXCEPTION, "run_with_error_logging")
|
|
233
|
-
end
|
|
213
|
+
mock(ExceptionHandling).log_error(EXCEPTION, "run_with_error_logging")
|
|
234
214
|
|
|
235
215
|
@proxy.run(on_error: :log) { raise EXCEPTION }
|
|
236
216
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: exceptional_synchrony
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Invoca
|
|
@@ -59,9 +59,6 @@ dependencies:
|
|
|
59
59
|
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '2.10'
|
|
62
|
-
- - "<"
|
|
63
|
-
- !ruby/object:Gem::Version
|
|
64
|
-
version: '4.0'
|
|
65
62
|
type: :runtime
|
|
66
63
|
prerelease: false
|
|
67
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -69,9 +66,6 @@ dependencies:
|
|
|
69
66
|
- - ">="
|
|
70
67
|
- !ruby/object:Gem::Version
|
|
71
68
|
version: '2.10'
|
|
72
|
-
- - "<"
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '4.0'
|
|
75
69
|
- !ruby/object:Gem::Dependency
|
|
76
70
|
name: invoca-utils
|
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -103,6 +97,7 @@ files:
|
|
|
103
97
|
- Gemfile.lock
|
|
104
98
|
- README.md
|
|
105
99
|
- Rakefile
|
|
100
|
+
- catalog-info.yaml
|
|
106
101
|
- exceptional_synchrony.gemspec
|
|
107
102
|
- lib/exceptional_synchrony.rb
|
|
108
103
|
- lib/exceptional_synchrony/callback_exceptions.rb
|
|
@@ -137,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
132
|
- !ruby/object:Gem::Version
|
|
138
133
|
version: '0'
|
|
139
134
|
requirements: []
|
|
140
|
-
rubygems_version: 3.
|
|
135
|
+
rubygems_version: 3.3.27
|
|
141
136
|
signing_key:
|
|
142
137
|
specification_version: 4
|
|
143
138
|
summary: Extensions to EventMachine/Synchrony to work well with exceptions
|