reactor 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +4 -0
- data/lib/reactor/version.rb +1 -1
- data/lib/reactor.rb +1 -0
- data/spec/reactor_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8241a3de8050e5f19503c616d3604571f6e67e52
|
4
|
+
data.tar.gz: 086fb218d96c3c49c96750e22cbda5ecf70a9483
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 247f4e9a9ffddcf15fa1d44b6131b1b22e597ab651ffb78ac4aba04bd1d1af3ef9949d94ed50962611f3ef90c6a2f575b6f12630cb0e8c4a48b866b34c7e02d3
|
7
|
+
data.tar.gz: 284d161eaf8aa11c1b0376449e3b3e8ff57970b614aebaf2ca4f02b41f4f5b200048f3b92b37b6e7360ac59f85f7f44812cdc66e99e587dffff4089e41416ee8
|
data/Changes.md
CHANGED
data/lib/reactor/version.rb
CHANGED
data/lib/reactor.rb
CHANGED
data/spec/reactor_spec.rb
CHANGED
@@ -34,6 +34,24 @@ describe Reactor do
|
|
34
34
|
Reactor::Event.publish :test_event
|
35
35
|
end
|
36
36
|
end
|
37
|
+
|
38
|
+
it 'disables the subscriber outside the block' do
|
39
|
+
expect(Reactor::TEST_MODE_SUBSCRIBERS).to be_empty
|
40
|
+
Reactor.with_subscriber_enabled(subscriber) do
|
41
|
+
expect(Reactor::TEST_MODE_SUBSCRIBERS).to contain_exactly(subscriber)
|
42
|
+
end
|
43
|
+
expect(Reactor::TEST_MODE_SUBSCRIBERS).to be_empty
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'correctly handles exceptions inside the block' do
|
47
|
+
expect(Reactor::TEST_MODE_SUBSCRIBERS).to be_empty
|
48
|
+
expect {
|
49
|
+
Reactor.with_subscriber_enabled(subscriber) do
|
50
|
+
raise RuntimeError
|
51
|
+
end
|
52
|
+
}.to raise_error(RuntimeError)
|
53
|
+
expect(Reactor::TEST_MODE_SUBSCRIBERS).to be_empty
|
54
|
+
end
|
37
55
|
end
|
38
56
|
end
|
39
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winfred
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sidekiq
|