wires 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wires/channel.rb +20 -13
- data/lib/wires/convenience.rb +2 -2
- data/lib/wires/core_ext.rb +3 -3
- data/lib/wires/hub.rb +9 -8
- data/lib/wires/router.rb +53 -31
- data/lib/wires/time_scheduler.rb +63 -0
- data/lib/wires/{time.rb → time_scheduler_item.rb} +0 -62
- data/lib/wires/util/build_alt.rb +22 -0
- data/lib/wires/util/hooks.rb +50 -48
- data/lib/wires.rb +4 -3
- metadata +18 -17
- data/lib/wires/util/expect_type.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6396df6f8d7307b304ef8d37d8bc75b30de47dae
|
4
|
+
data.tar.gz: ae25aa3fac7ea8f28944e959ed3c4c502a6ea47d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14589e34c908c567b13163fd14f658b76b8bef1eb98ccb86fee49fed2e138d148c9f29e49c082f79311d9d1aa674a18f744a5dfacc955a0da00262160c4395c4
|
7
|
+
data.tar.gz: 0b51394fa0aa581c1b95a4a623851be8814b8337a63c7fce7c9c46c2eec7ecf7af47b0d4da24f171993c26b703d09f28f80125610bf8999bc3eff4b3bf9c33d4
|
data/lib/wires/channel.rb
CHANGED
@@ -10,7 +10,7 @@ module Wires
|
|
10
10
|
def inspect; "#{self.class}(#{name.inspect})"; end
|
11
11
|
|
12
12
|
@hub = Hub
|
13
|
-
@router = Router
|
13
|
+
@router = Router::Default
|
14
14
|
@new_lock = Mutex.new
|
15
15
|
@@aim_lock = Mutex.new
|
16
16
|
|
@@ -20,7 +20,8 @@ module Wires
|
|
20
20
|
|
21
21
|
def new(*args)
|
22
22
|
channel = @new_lock.synchronize do
|
23
|
-
router.get_channel(self, *args) { |name| super(name) }
|
23
|
+
router.get_channel(self, *args) { |name| super(name) }
|
24
|
+
end
|
24
25
|
end
|
25
26
|
alias_method :[], :new
|
26
27
|
end
|
@@ -33,8 +34,8 @@ module Wires
|
|
33
34
|
# Register a proc to be triggered by an event on this channel
|
34
35
|
# Return the proc that was passed in
|
35
36
|
def register(*events, &proc)
|
36
|
-
|
37
|
-
|
37
|
+
raise ArgumentError, "No callable given to execute on event: #{events}" \
|
38
|
+
unless proc.respond_to? :call
|
38
39
|
events = Event.new_from(*events)
|
39
40
|
|
40
41
|
@@aim_lock.synchronize do
|
@@ -60,7 +61,7 @@ module Wires
|
|
60
61
|
|
61
62
|
# Add hook methods
|
62
63
|
class << self
|
63
|
-
include Hooks
|
64
|
+
include Util::Hooks
|
64
65
|
|
65
66
|
def before_fire(*args, &proc)
|
66
67
|
add_hook(:@before_fire, *args, &proc)
|
@@ -72,10 +73,13 @@ module Wires
|
|
72
73
|
end
|
73
74
|
|
74
75
|
# Fire an event on this channel
|
75
|
-
def fire(input, blocking:false)
|
76
|
+
def fire(input, blocking:false, parallel:!blocking)
|
76
77
|
|
77
78
|
raise *@not_firable if @not_firable
|
78
79
|
|
80
|
+
return [] << Thread.new { fire(input, blocking:true, parallel:false) } \
|
81
|
+
if !blocking and !parallel
|
82
|
+
|
79
83
|
backtrace = caller
|
80
84
|
|
81
85
|
event = Event.new_from(*input)
|
@@ -105,22 +109,27 @@ module Wires
|
|
105
109
|
end
|
106
110
|
|
107
111
|
# Fire to selected targets
|
108
|
-
procs.uniq.
|
112
|
+
threads = procs.uniq.map do |pr|
|
109
113
|
self.class.hub.spawn \
|
110
114
|
event, # fired event object event
|
111
115
|
self.name, # name of channel fired from
|
112
116
|
pr, # proc to execute
|
113
117
|
blocking, # boolean from blocking kwarg
|
118
|
+
parallel, # boolean from parallel kwarg
|
114
119
|
backtrace # captured backtrace
|
115
|
-
end
|
120
|
+
end.reject &:nil?
|
121
|
+
|
122
|
+
threads.each &:join if blocking and parallel
|
116
123
|
|
117
124
|
self.class.run_hooks(:@after_fire, event, self)
|
118
125
|
|
119
|
-
|
126
|
+
threads
|
127
|
+
end
|
120
128
|
|
121
129
|
# Fire a blocking event on this channel
|
122
|
-
def
|
123
|
-
|
130
|
+
def fire!(event)
|
131
|
+
kwargs[:blocking] ||= true
|
132
|
+
fire(*args, **kwargs)
|
124
133
|
end
|
125
134
|
|
126
135
|
# Returns true if listening on 'self' would hear a firing on 'other'
|
@@ -135,8 +144,6 @@ module Wires
|
|
135
144
|
self.class.router.get_receivers self
|
136
145
|
end
|
137
146
|
|
138
|
-
router.clear_channels
|
139
|
-
|
140
147
|
end
|
141
148
|
|
142
149
|
end
|
data/lib/wires/convenience.rb
CHANGED
data/lib/wires/core_ext.rb
CHANGED
@@ -18,11 +18,11 @@ module Wires
|
|
18
18
|
# Add methods to ::Time and ::Numeric
|
19
19
|
def extend_core
|
20
20
|
# Add Time#fire for timed firing of events
|
21
|
-
::Time.class_eval
|
21
|
+
::Time.class_eval <<-CODE
|
22
22
|
def fire(event, channel='*', **kwargs)
|
23
|
-
|
23
|
+
#{TimeScheduler}.add(self, event, channel, **kwargs)
|
24
24
|
end
|
25
|
-
|
25
|
+
CODE
|
26
26
|
|
27
27
|
# Add Numeric => Numeric time-factor converters
|
28
28
|
{
|
data/lib/wires/hub.rb
CHANGED
@@ -66,22 +66,22 @@ module Wires
|
|
66
66
|
return neglect(*args) \
|
67
67
|
if @hold_lock.instance_variable_get(:@mon_mutex).locked?
|
68
68
|
|
69
|
-
event, chan, proc, blocking, fire_bt = *args
|
69
|
+
event, chan, proc, blocking, parallel, fire_bt = *args
|
70
70
|
*proc_args = event, chan
|
71
71
|
*exc_args = event, chan, fire_bt
|
72
72
|
|
73
|
-
# If
|
74
|
-
if
|
73
|
+
# If not parallel, run the proc in this thread
|
74
|
+
if !parallel
|
75
75
|
begin
|
76
76
|
proc.call(*proc_args)
|
77
77
|
rescue Exception => exc
|
78
78
|
unhandled_exception(exc, *exc_args)
|
79
79
|
end
|
80
80
|
|
81
|
-
return
|
81
|
+
return nil
|
82
82
|
end
|
83
83
|
|
84
|
-
# If not
|
84
|
+
# If not parallel, clear old threads and spawn a new thread
|
85
85
|
Thread.exclusive do
|
86
86
|
begin
|
87
87
|
# Raise ThreadError for user-set thread limit to mimic OS limit
|
@@ -94,7 +94,7 @@ module Wires
|
|
94
94
|
rescue Exception => exc
|
95
95
|
unhandled_exception(exc, *exc_args)
|
96
96
|
ensure
|
97
|
-
spawn_neglected_task_chain
|
97
|
+
spawn_neglected_task_chain unless blocking
|
98
98
|
@children.synchronize { @children.delete Thread.current }
|
99
99
|
end
|
100
100
|
end
|
@@ -112,11 +112,12 @@ module Wires
|
|
112
112
|
|
113
113
|
# Join child threads, one by one, allowing more children to appear
|
114
114
|
def join_children
|
115
|
-
a_thread =
|
116
|
-
|
115
|
+
a_thread = nil
|
116
|
+
loop do
|
117
117
|
@children.synchronize do
|
118
118
|
a_thread = @children.shift
|
119
119
|
end
|
120
|
+
break unless a_thread
|
120
121
|
a_thread.join if ((a_thread) and (a_thread!=Thread.current))
|
121
122
|
Thread.pass
|
122
123
|
end
|
data/lib/wires/router.rb
CHANGED
@@ -1,42 +1,64 @@
|
|
1
1
|
|
2
2
|
module Wires
|
3
|
-
|
4
|
-
class Router
|
3
|
+
module Router
|
5
4
|
|
6
|
-
@table = Hash.new
|
7
5
|
|
8
|
-
class
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
6
|
+
class Default
|
7
|
+
class << self
|
8
|
+
|
9
|
+
def clear_channels()
|
10
|
+
@table = {}
|
11
|
+
@fuzzy_table = {}
|
12
|
+
@star = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def get_channel(chan_cls, name)
|
16
|
+
@chan_cls ||= chan_cls
|
17
|
+
channel = @table[name] ||= (new_one=true; yield name)
|
18
|
+
|
19
|
+
if new_one and name.is_a? Regexp then
|
20
|
+
@fuzzy_table[name] = channel
|
21
|
+
channel.not_firable = [TypeError,
|
22
|
+
"Cannot fire on Regexp channel: #{name.inspect}."\
|
23
|
+
" Regexp channels can only used in event handlers."]
|
24
|
+
end
|
25
|
+
|
26
|
+
channel
|
27
|
+
end
|
28
|
+
|
29
|
+
def get_receivers(chan)
|
30
|
+
name = chan.name
|
31
|
+
return @table.values if name == '*'
|
32
|
+
|
33
|
+
@fuzzy_table.each_pair.select do |k,v|
|
34
|
+
(begin; name =~ k; rescue TypeError; end)
|
35
|
+
end.map { |k,v| v } + [chan, (@star||=@chan_cls['*'])]
|
27
36
|
end
|
28
37
|
|
29
|
-
channel
|
30
38
|
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
39
|
+
clear_channels
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
class Simple
|
44
|
+
class << self
|
45
|
+
|
46
|
+
def clear_channels()
|
47
|
+
@table = {}
|
48
|
+
end
|
49
|
+
|
50
|
+
def get_channel(chan_cls, name)
|
51
|
+
@table[name] ||= yield name
|
52
|
+
end
|
53
|
+
|
54
|
+
def get_receivers(chan)
|
55
|
+
[chan]
|
56
|
+
end
|
57
|
+
|
37
58
|
end
|
38
|
-
|
59
|
+
clear_channels
|
39
60
|
end
|
61
|
+
|
62
|
+
|
40
63
|
end
|
41
|
-
|
42
64
|
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
|
2
|
+
module Wires
|
3
|
+
|
4
|
+
# A singleton class to schedule future firing of events
|
5
|
+
class TimeScheduler
|
6
|
+
@schedule = Array.new
|
7
|
+
@thread = Thread.new {nil}
|
8
|
+
@schedule_lock = Monitor.new
|
9
|
+
@cond = @schedule_lock.new_cond
|
10
|
+
|
11
|
+
class << self
|
12
|
+
|
13
|
+
# Add an event to the schedule
|
14
|
+
def add(*args)
|
15
|
+
new_item = args.first
|
16
|
+
new_item = (TimeSchedulerItem.new *args) \
|
17
|
+
unless new_item.is_a? TimeSchedulerItem
|
18
|
+
|
19
|
+
new_item.schedulers << self
|
20
|
+
schedule_update new_item
|
21
|
+
new_item
|
22
|
+
end
|
23
|
+
|
24
|
+
# Add an event to the schedule using << operator
|
25
|
+
def <<(arg); add(*arg); end
|
26
|
+
|
27
|
+
# Get a copy of the event schedule from outside the class
|
28
|
+
def list; @schedule_lock.synchronize { @schedule.dup } end
|
29
|
+
# Clear the event schedule from outside the class
|
30
|
+
def clear; @schedule_lock.synchronize { @schedule.clear } end
|
31
|
+
# Make the scheduler wake up and re-evaluate
|
32
|
+
def refresh; schedule_update end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def schedule_update(item_to_add=nil)
|
37
|
+
@schedule_lock.synchronize do
|
38
|
+
@schedule << item_to_add if item_to_add
|
39
|
+
@schedule.select! {|x| x.active?}
|
40
|
+
@schedule.sort! {|a,b| a.time <=> b.time}
|
41
|
+
@cond.broadcast
|
42
|
+
end
|
43
|
+
nil end
|
44
|
+
|
45
|
+
def main_loop
|
46
|
+
pending = []
|
47
|
+
loop do
|
48
|
+
@schedule_lock.synchronize do
|
49
|
+
timeout = (@schedule.first.time_until unless @schedule.empty?)
|
50
|
+
@cond.wait timeout
|
51
|
+
pending = @schedule.take_while &:ready?
|
52
|
+
end
|
53
|
+
pending.each &:fire
|
54
|
+
end
|
55
|
+
nil end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
@thread = Thread.new { main_loop }
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
|
2
2
|
module Wires
|
3
3
|
|
4
|
-
class TimeSchedulerAnonEvent < Event; end
|
5
|
-
|
6
4
|
class TimeSchedulerItem
|
7
5
|
|
8
6
|
attr_reader :time, :event, :channel, :interval
|
@@ -14,7 +12,6 @@ module Wires
|
|
14
12
|
**kwargs)
|
15
13
|
|
16
14
|
time ||= Time.now
|
17
|
-
expect_type time, Time
|
18
15
|
|
19
16
|
@active = (not cancel)
|
20
17
|
tempcount = count
|
@@ -81,63 +78,4 @@ module Wires
|
|
81
78
|
:count_dec
|
82
79
|
end
|
83
80
|
|
84
|
-
# A singleton class to schedule future firing of events
|
85
|
-
class TimeScheduler
|
86
|
-
@schedule = Array.new
|
87
|
-
@thread = Thread.new {nil}
|
88
|
-
@schedule_lock = Monitor.new
|
89
|
-
@cond = @schedule_lock.new_cond
|
90
|
-
|
91
|
-
class << self
|
92
|
-
|
93
|
-
# Add an event to the schedule
|
94
|
-
def add(*args)
|
95
|
-
new_item = args.first
|
96
|
-
new_item = (TimeSchedulerItem.new *args) \
|
97
|
-
unless new_item.is_a? TimeSchedulerItem
|
98
|
-
|
99
|
-
new_item.schedulers << self
|
100
|
-
schedule_update new_item
|
101
|
-
new_item
|
102
|
-
end
|
103
|
-
|
104
|
-
# Add an event to the schedule using << operator
|
105
|
-
def <<(arg); add(*arg); end
|
106
|
-
|
107
|
-
# Get a copy of the event schedule from outside the class
|
108
|
-
def list; @schedule_lock.synchronize { @schedule.dup } end
|
109
|
-
# Clear the event schedule from outside the class
|
110
|
-
def clear; @schedule_lock.synchronize { @schedule.clear } end
|
111
|
-
# Make the scheduler wake up and re-evaluate
|
112
|
-
def refresh; schedule_update end
|
113
|
-
|
114
|
-
private
|
115
|
-
|
116
|
-
def schedule_update(item_to_add=nil)
|
117
|
-
@schedule_lock.synchronize do
|
118
|
-
@schedule << item_to_add if item_to_add
|
119
|
-
@schedule.select! {|x| x.active?}
|
120
|
-
@schedule.sort! {|a,b| a.time <=> b.time}
|
121
|
-
@cond.broadcast
|
122
|
-
end
|
123
|
-
nil end
|
124
|
-
|
125
|
-
def main_loop
|
126
|
-
pending = []
|
127
|
-
loop do
|
128
|
-
@schedule_lock.synchronize do
|
129
|
-
timeout = (@schedule.first.time_until unless @schedule.empty?)
|
130
|
-
@cond.wait timeout
|
131
|
-
pending = @schedule.take_while &:ready?
|
132
|
-
end
|
133
|
-
pending.each &:fire
|
134
|
-
end
|
135
|
-
nil end
|
136
|
-
|
137
|
-
end
|
138
|
-
|
139
|
-
@thread = Thread.new { main_loop }
|
140
|
-
|
141
|
-
end
|
142
|
-
|
143
81
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
module Wires
|
3
|
+
module Util
|
4
|
+
|
5
|
+
# Build an alternate version of the Wires module that doesn't
|
6
|
+
# know about or interfere with the original Wires module.
|
7
|
+
# Specify the module_path as a string, starting with global locator '::':
|
8
|
+
# >> module MyModule; end
|
9
|
+
# >> Wires::Util.build_alt "::MyModule::MyWires"
|
10
|
+
def self.build_alt(module_path)
|
11
|
+
main_file = File.expand_path("../../wires.rb", File.dirname(__FILE__))
|
12
|
+
|
13
|
+
File.read(main_file)
|
14
|
+
.scan(/require_relative[\s\(]+(["'])(.*)\1/)
|
15
|
+
.map(&:last)
|
16
|
+
.map { |file| File.expand_path("#{file}.rb", File.dirname(main_file)) }
|
17
|
+
.map { |file| File.read file }
|
18
|
+
.each { |code| eval code.gsub("Wires", "#{module_path}") }
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
data/lib/wires/util/hooks.rb
CHANGED
@@ -1,56 +1,58 @@
|
|
1
1
|
|
2
2
|
module Wires
|
3
|
-
module
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
hooks
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# Remove a hook by proc reference
|
17
|
-
def remove_hook(hooks_sym, &proc)
|
18
|
-
hooks = instance_variable_get(hooks_sym.to_sym)
|
19
|
-
return unless hooks
|
20
|
-
hooks.reject! {|h| h[0]==proc}
|
21
|
-
end
|
22
|
-
|
23
|
-
# Run all hooks, deleting those not marked for retention
|
24
|
-
def run_hooks(hooks_sym, *exc_args)
|
25
|
-
hooks = instance_variable_get(hooks_sym.to_sym)
|
26
|
-
return unless hooks
|
27
|
-
for hook in hooks
|
28
|
-
proc, retain = hook
|
29
|
-
proc.call(*exc_args)
|
3
|
+
module Util
|
4
|
+
module Hooks
|
5
|
+
|
6
|
+
# Register a hook - can be called multiple times if retain is true
|
7
|
+
def add_hook(hooks_sym, retain=false, &proc)
|
8
|
+
hooks = instance_variable_get(hooks_sym.to_sym)
|
9
|
+
if hooks
|
10
|
+
hooks << [proc, retain]
|
11
|
+
else
|
12
|
+
instance_variable_set(hooks_sym.to_sym, [[proc, retain]])
|
13
|
+
end
|
14
|
+
proc
|
30
15
|
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
(force ? hooks.clear : hooks.select!{|h| h[1]})
|
38
|
-
nil end
|
39
|
-
|
40
|
-
# Flush/run all hooks, keeping only those marked for retention
|
41
|
-
def flush_hooks(hooks_sym, *exc_args)
|
42
|
-
hooks = instance_variable_get(hooks_sym.to_sym)
|
43
|
-
return unless hooks
|
44
|
-
retained = Queue.new
|
45
|
-
while not hooks.empty?
|
46
|
-
proc, retain = hooks.shift
|
47
|
-
retained << [proc, retain] if retain
|
48
|
-
proc.call(*exc_args)
|
16
|
+
|
17
|
+
# Remove a hook by proc reference
|
18
|
+
def remove_hook(hooks_sym, &proc)
|
19
|
+
hooks = instance_variable_get(hooks_sym.to_sym)
|
20
|
+
return unless hooks
|
21
|
+
hooks.reject! {|h| h[0]==proc}
|
49
22
|
end
|
50
|
-
|
51
|
-
|
23
|
+
|
24
|
+
# Run all hooks, deleting those not marked for retention
|
25
|
+
def run_hooks(hooks_sym, *exc_args)
|
26
|
+
hooks = instance_variable_get(hooks_sym.to_sym)
|
27
|
+
return unless hooks
|
28
|
+
for hook in hooks
|
29
|
+
proc, retain = hook
|
30
|
+
proc.call(*exc_args)
|
31
|
+
end
|
32
|
+
nil end
|
33
|
+
|
34
|
+
# Clear hooks not marked for retention (or all hooks if force)
|
35
|
+
def clear_hooks(hooks_sym, force=false)
|
36
|
+
hooks = instance_variable_get(hooks_sym.to_sym)
|
37
|
+
return unless hooks
|
38
|
+
(force ? hooks.clear : hooks.select!{|h| h[1]})
|
39
|
+
nil end
|
40
|
+
|
41
|
+
# Flush/run all hooks, keeping only those marked for retention
|
42
|
+
def flush_hooks(hooks_sym, *exc_args)
|
43
|
+
hooks = instance_variable_get(hooks_sym.to_sym)
|
44
|
+
return unless hooks
|
45
|
+
retained = Queue.new
|
46
|
+
while not hooks.empty?
|
47
|
+
proc, retain = hooks.shift
|
48
|
+
retained << [proc, retain] if retain
|
49
|
+
proc.call(*exc_args)
|
50
|
+
end
|
51
|
+
while not retained.empty?
|
52
|
+
hooks << retained.shift
|
53
|
+
end
|
52
54
|
end
|
53
|
-
end
|
54
55
|
|
56
|
+
end
|
55
57
|
end
|
56
58
|
end
|
data/lib/wires.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
|
2
2
|
require 'thread'
|
3
|
-
require 'threadlock'
|
3
|
+
require 'threadlock'
|
4
4
|
|
5
|
-
require_relative 'wires/util/expect_type'
|
6
5
|
require_relative 'wires/util/hooks'
|
6
|
+
require_relative 'wires/util/build_alt'
|
7
7
|
|
8
8
|
require_relative 'wires/event'
|
9
9
|
require_relative 'wires/hub'
|
10
10
|
require_relative 'wires/router'
|
11
11
|
require_relative 'wires/channel'
|
12
|
-
require_relative 'wires/
|
12
|
+
require_relative 'wires/time_scheduler_item'
|
13
|
+
require_relative 'wires/time_scheduler'
|
13
14
|
require_relative 'wires/core_ext'
|
14
15
|
require_relative 'wires/convenience'
|
metadata
CHANGED
@@ -1,87 +1,88 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wires
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe McIlvain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: threadlock
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: wires-test
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: jemc-reporter
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
70
|
-
objects together with wires. Inspired by the python 'circuits' framework.
|
69
|
+
description: A lightweight, extensible asynchronous event routing framework in Ruby.
|
70
|
+
Patch your objects together with wires. Inspired by the python 'circuits' framework.
|
71
71
|
email: joe.eli.mac@gmail.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- lib/wires.rb
|
77
|
-
- lib/wires/time.rb
|
78
77
|
- lib/wires/hub.rb
|
79
78
|
- lib/wires/router.rb
|
80
79
|
- lib/wires/core_ext.rb
|
81
|
-
- lib/wires/util/
|
80
|
+
- lib/wires/util/build_alt.rb
|
82
81
|
- lib/wires/util/hooks.rb
|
83
82
|
- lib/wires/convenience.rb
|
84
83
|
- lib/wires/channel.rb
|
84
|
+
- lib/wires/time_scheduler_item.rb
|
85
|
+
- lib/wires/time_scheduler.rb
|
85
86
|
- lib/wires/event.rb
|
86
87
|
- LICENSE
|
87
88
|
- README.md
|
@@ -95,17 +96,17 @@ require_paths:
|
|
95
96
|
- lib
|
96
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
97
98
|
requirements:
|
98
|
-
- -
|
99
|
+
- - ">="
|
99
100
|
- !ruby/object:Gem::Version
|
100
101
|
version: '0'
|
101
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
103
|
requirements:
|
103
|
-
- -
|
104
|
+
- - ">="
|
104
105
|
- !ruby/object:Gem::Version
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.1.5
|
109
110
|
signing_key:
|
110
111
|
specification_version: 4
|
111
112
|
summary: wires
|