flor 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/Makefile +3 -0
- data/lib/flor.rb +1 -1
- data/lib/flor/colours.rb +7 -3
- data/lib/flor/conf.rb +21 -15
- data/lib/flor/core/executor.rb +71 -77
- data/lib/flor/core/node.rb +6 -1
- data/lib/flor/core/procedure.rb +112 -58
- data/lib/flor/core/texecutor.rb +6 -5
- data/lib/flor/log.rb +9 -7
- data/lib/flor/migrations/0003_timer_onid_bnid.rb +35 -0
- data/lib/flor/migrations/0004_trap_bnid.rb +16 -0
- data/lib/flor/pcore/_arr.rb +2 -2
- data/lib/flor/pcore/_atom.rb +1 -1
- data/lib/flor/pcore/_att.rb +59 -13
- data/lib/flor/pcore/_happly.rb +3 -3
- data/lib/flor/pcore/_obj.rb +22 -2
- data/lib/flor/pcore/_skip.rb +2 -2
- data/lib/flor/pcore/apply.rb +1 -1
- data/lib/flor/pcore/arith.rb +1 -1
- data/lib/flor/pcore/break.rb +2 -2
- data/lib/flor/pcore/case.rb +1 -1
- data/lib/flor/pcore/cmp.rb +1 -1
- data/lib/flor/pcore/cond.rb +1 -1
- data/lib/flor/pcore/cursor.rb +2 -2
- data/lib/flor/pcore/define.rb +1 -1
- data/lib/flor/pcore/fail.rb +1 -6
- data/lib/flor/pcore/if.rb +2 -2
- data/lib/flor/pcore/map.rb +1 -1
- data/lib/flor/pcore/matchr.rb +92 -0
- data/lib/flor/pcore/move.rb +2 -3
- data/lib/flor/pcore/noeval.rb +1 -1
- data/lib/flor/pcore/noret.rb +1 -1
- data/lib/flor/pcore/push.rb +1 -1
- data/lib/flor/pcore/rand.rb +1 -1
- data/lib/flor/pcore/set.rb +1 -1
- data/lib/flor/pcore/twig.rb +2 -2
- data/lib/flor/pcore/until.rb +4 -1
- data/lib/flor/pcore/val.rb +1 -1
- data/lib/flor/punit/cancel.rb +2 -3
- data/lib/flor/punit/cmap.rb +5 -6
- data/lib/flor/punit/concurrence.rb +3 -5
- data/lib/flor/punit/schedule.rb +20 -5
- data/lib/flor/punit/signal.rb +1 -1
- data/lib/flor/punit/sleep.rb +2 -2
- data/lib/flor/punit/task.rb +3 -3
- data/lib/flor/punit/trace.rb +1 -1
- data/lib/flor/punit/trap.rb +22 -6
- data/lib/flor/to_string.rb +2 -1
- data/lib/flor/unit/executor.rb +3 -5
- data/lib/flor/unit/hooker.rb +2 -3
- data/lib/flor/unit/models/timer.rb +9 -3
- data/lib/flor/unit/models/trap.rb +1 -0
- data/lib/flor/unit/scheduler.rb +40 -35
- data/lib/flor/unit/storage.rb +70 -59
- data/lib/flor/unit/waiter.rb +2 -3
- data/t.txt +4 -0
- metadata +6 -4
- data/fail.txt +0 -3
- data/lib/flor/pcore/match.rb +0 -46
data/lib/flor/unit/waiter.rb
CHANGED
data/t.txt
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: munemo
|
@@ -132,6 +132,8 @@ files:
|
|
132
132
|
- lib/flor/log.rb
|
133
133
|
- lib/flor/migrations/0001_tables.rb
|
134
134
|
- lib/flor/migrations/0002_cunit_and_munit.rb
|
135
|
+
- lib/flor/migrations/0003_timer_onid_bnid.rb
|
136
|
+
- lib/flor/migrations/0004_trap_bnid.rb
|
135
137
|
- lib/flor/parser.rb
|
136
138
|
- lib/flor/pcore/_arr.rb
|
137
139
|
- lib/flor/pcore/_atom.rb
|
@@ -153,7 +155,7 @@ files:
|
|
153
155
|
- lib/flor/pcore/if.rb
|
154
156
|
- lib/flor/pcore/loop.rb
|
155
157
|
- lib/flor/pcore/map.rb
|
156
|
-
- lib/flor/pcore/
|
158
|
+
- lib/flor/pcore/matchr.rb
|
157
159
|
- lib/flor/pcore/move.rb
|
158
160
|
- lib/flor/pcore/noeval.rb
|
159
161
|
- lib/flor/pcore/noret.rb
|
@@ -204,8 +206,8 @@ files:
|
|
204
206
|
- lib/flor/unit.rb
|
205
207
|
- lib/flor.rb
|
206
208
|
- flor.gemspec
|
207
|
-
- fail.txt
|
208
209
|
- LICENSE.txt
|
210
|
+
- t.txt
|
209
211
|
- CHANGELOG.md
|
210
212
|
- README.md
|
211
213
|
homepage: http://github.com/floraison
|
data/fail.txt
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
rspec ./spec/unit/push_and_runs_spec.rb:30 # Flor unit push (run spanning) works
|
2
|
-
rspec ./spec/unit/scheduler_spec.rb:371 # Flor unit Flor::Scheduler sch_msg_max_res_time flags as "active" messages that have been reserved for too long
|
3
|
-
rspec ./spec/unit/waiter_spec.rb:127 # Flor::Waiter as a launch option lets wait until the scheduler gets idle
|
data/lib/flor/pcore/match.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
|
2
|
-
class Flor::Pro::Match < Flor::Procedure
|
3
|
-
|
4
|
-
names %w[ match match? ]
|
5
|
-
|
6
|
-
def pre_execute
|
7
|
-
|
8
|
-
@node['rets'] = []
|
9
|
-
end
|
10
|
-
|
11
|
-
def receive_last
|
12
|
-
|
13
|
-
rex, str = arguments
|
14
|
-
|
15
|
-
m = rex.match(str)
|
16
|
-
|
17
|
-
payload['ret'] =
|
18
|
-
if @node['heap'] == 'match?'
|
19
|
-
!! m
|
20
|
-
else
|
21
|
-
m ? m.to_a : []
|
22
|
-
end
|
23
|
-
|
24
|
-
reply
|
25
|
-
end
|
26
|
-
|
27
|
-
protected
|
28
|
-
|
29
|
-
def arguments
|
30
|
-
|
31
|
-
fail ArgumentError.new(
|
32
|
-
"'match' needs at least 2 arguments"
|
33
|
-
) if @node['rets'].size < 2
|
34
|
-
|
35
|
-
rex = @node['rets']
|
36
|
-
.find { |r| r.is_a?(Array) && r[0] == '_rxs' } || @node['rets'].last
|
37
|
-
|
38
|
-
str = (@node['rets'] - [ rex ]).first
|
39
|
-
|
40
|
-
rex = rex.is_a?(String) ? rex : rex[1].to_s
|
41
|
-
rex = rex.match(/\A\/[^\/]*\/[a-z]*\z/) ? Kernel.eval(rex) : Regexp.new(rex)
|
42
|
-
|
43
|
-
[ rex, str ]
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|