flor 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/CHANGELOG.md +7 -0
  2. data/Makefile +3 -0
  3. data/lib/flor.rb +1 -1
  4. data/lib/flor/colours.rb +7 -3
  5. data/lib/flor/conf.rb +21 -15
  6. data/lib/flor/core/executor.rb +71 -77
  7. data/lib/flor/core/node.rb +6 -1
  8. data/lib/flor/core/procedure.rb +112 -58
  9. data/lib/flor/core/texecutor.rb +6 -5
  10. data/lib/flor/log.rb +9 -7
  11. data/lib/flor/migrations/0003_timer_onid_bnid.rb +35 -0
  12. data/lib/flor/migrations/0004_trap_bnid.rb +16 -0
  13. data/lib/flor/pcore/_arr.rb +2 -2
  14. data/lib/flor/pcore/_atom.rb +1 -1
  15. data/lib/flor/pcore/_att.rb +59 -13
  16. data/lib/flor/pcore/_happly.rb +3 -3
  17. data/lib/flor/pcore/_obj.rb +22 -2
  18. data/lib/flor/pcore/_skip.rb +2 -2
  19. data/lib/flor/pcore/apply.rb +1 -1
  20. data/lib/flor/pcore/arith.rb +1 -1
  21. data/lib/flor/pcore/break.rb +2 -2
  22. data/lib/flor/pcore/case.rb +1 -1
  23. data/lib/flor/pcore/cmp.rb +1 -1
  24. data/lib/flor/pcore/cond.rb +1 -1
  25. data/lib/flor/pcore/cursor.rb +2 -2
  26. data/lib/flor/pcore/define.rb +1 -1
  27. data/lib/flor/pcore/fail.rb +1 -6
  28. data/lib/flor/pcore/if.rb +2 -2
  29. data/lib/flor/pcore/map.rb +1 -1
  30. data/lib/flor/pcore/matchr.rb +92 -0
  31. data/lib/flor/pcore/move.rb +2 -3
  32. data/lib/flor/pcore/noeval.rb +1 -1
  33. data/lib/flor/pcore/noret.rb +1 -1
  34. data/lib/flor/pcore/push.rb +1 -1
  35. data/lib/flor/pcore/rand.rb +1 -1
  36. data/lib/flor/pcore/set.rb +1 -1
  37. data/lib/flor/pcore/twig.rb +2 -2
  38. data/lib/flor/pcore/until.rb +4 -1
  39. data/lib/flor/pcore/val.rb +1 -1
  40. data/lib/flor/punit/cancel.rb +2 -3
  41. data/lib/flor/punit/cmap.rb +5 -6
  42. data/lib/flor/punit/concurrence.rb +3 -5
  43. data/lib/flor/punit/schedule.rb +20 -5
  44. data/lib/flor/punit/signal.rb +1 -1
  45. data/lib/flor/punit/sleep.rb +2 -2
  46. data/lib/flor/punit/task.rb +3 -3
  47. data/lib/flor/punit/trace.rb +1 -1
  48. data/lib/flor/punit/trap.rb +22 -6
  49. data/lib/flor/to_string.rb +2 -1
  50. data/lib/flor/unit/executor.rb +3 -5
  51. data/lib/flor/unit/hooker.rb +2 -3
  52. data/lib/flor/unit/models/timer.rb +9 -3
  53. data/lib/flor/unit/models/trap.rb +1 -0
  54. data/lib/flor/unit/scheduler.rb +40 -35
  55. data/lib/flor/unit/storage.rb +70 -59
  56. data/lib/flor/unit/waiter.rb +2 -3
  57. data/t.txt +4 -0
  58. metadata +6 -4
  59. data/fail.txt +0 -3
  60. data/lib/flor/pcore/match.rb +0 -46
@@ -62,9 +62,8 @@ module Flor
62
62
  fail(RuntimeError, "timeout for #{self.to_s}") if @queue.empty?
63
63
  end
64
64
 
65
- executor, message = @queue.shift
66
-
67
- message
65
+ #executor, message = @queue.shift
66
+ @queue.shift[1]
68
67
  end
69
68
  end
70
69
 
data/t.txt ADDED
@@ -0,0 +1,4 @@
1
+
2
+ lib/flor/core/node.rb:77: def cnodes_any?; cnodes && cnodes.any?; end
3
+
4
+
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.11.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-03-17 00:00:00.000000000 Z
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/match.rb
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
@@ -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
-