pluggaloid 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pluggaloid/event.rb +1 -1
- data/lib/pluggaloid/version.rb +1 -1
- data/test/plugin_test.rb +7 -2
- 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: 7358343d060d4f87c19baa5b60711f46054a7628
|
4
|
+
data.tar.gz: 06430001dbaef9ff4a35b36bef2097b08db3dd68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 887c77c768a9fa525c39a91d08d8c67894c0a32f5217a44e6600382c6f04757841e56d752b816857ddfab5ba68ae6430c1b12b2fd52b5bc21e143f96880e2859
|
7
|
+
data.tar.gz: 30c03917dcb49ec48f0787570f697ea321f0f82179e8dfbc1677222263c02405f0b04559a3099c6565948c232e0f4dcac6964007a410ce2f9c27342600ffbc39
|
data/lib/pluggaloid/event.rb
CHANGED
data/lib/pluggaloid/version.rb
CHANGED
data/test/plugin_test.rb
CHANGED
@@ -31,11 +31,14 @@ describe(Pluggaloid::Plugin) do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it "filter in another thread" do
|
34
|
-
filter_thread = nil
|
34
|
+
success = filter_thread = nil
|
35
35
|
Pluggaloid::Plugin.create(:event) do
|
36
36
|
on_thread do
|
37
37
|
end
|
38
38
|
|
39
|
+
on_unhandled do
|
40
|
+
success = true end
|
41
|
+
|
39
42
|
filter_thread do
|
40
43
|
filter_thread = Thread.current
|
41
44
|
[] end end
|
@@ -47,8 +50,10 @@ describe(Pluggaloid::Plugin) do
|
|
47
50
|
Pluggaloid::Event.filter_another_thread = true
|
48
51
|
filter_thread = nil
|
49
52
|
eval_all_events do
|
50
|
-
Pluggaloid::Event[:thread].call
|
53
|
+
Pluggaloid::Event[:thread].call
|
54
|
+
Pluggaloid::Event[:unhandled].call end
|
51
55
|
assert filter_thread, "The filter doesn't run."
|
56
|
+
assert success, "Event :unhandled doesn't run."
|
52
57
|
refute_equal Thread.current, filter_thread, 'The filter should execute in not a main thread'
|
53
58
|
end
|
54
59
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluggaloid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshiaki Asai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: delayer
|