flor 0.9.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/CHANGELOG.md +10 -0
  2. data/Makefile +13 -5
  3. data/README.md +0 -35
  4. data/flor.gemspec +1 -0
  5. data/lib/flor.rb +6 -24
  6. data/lib/flor/changes.rb +26 -0
  7. data/lib/flor/colours.rb +65 -31
  8. data/lib/flor/conf.rb +84 -54
  9. data/lib/flor/core.rb +0 -23
  10. data/lib/flor/core/executor.rb +12 -42
  11. data/lib/flor/core/node.rb +19 -24
  12. data/lib/flor/core/procedure.rb +13 -24
  13. data/lib/flor/core/texecutor.rb +10 -28
  14. data/lib/flor/deep.rb +152 -0
  15. data/lib/flor/djan.rb +200 -0
  16. data/lib/flor/dollar.rb +0 -24
  17. data/lib/flor/errors.rb +0 -24
  18. data/lib/flor/flor.rb +43 -296
  19. data/lib/flor/id.rb +90 -0
  20. data/lib/flor/log.rb +12 -35
  21. data/lib/flor/migrations/0002_cunit_and_munit.rb +86 -0
  22. data/lib/flor/parser.rb +40 -46
  23. data/lib/flor/pcore/_arr.rb +0 -24
  24. data/lib/flor/pcore/_atom.rb +0 -24
  25. data/lib/flor/pcore/_att.rb +3 -25
  26. data/lib/flor/pcore/_dump.rb +0 -24
  27. data/lib/flor/pcore/_err.rb +0 -24
  28. data/lib/flor/pcore/_happly.rb +0 -24
  29. data/lib/flor/pcore/_obj.rb +0 -24
  30. data/lib/flor/pcore/_skip.rb +0 -24
  31. data/lib/flor/pcore/arith.rb +0 -24
  32. data/lib/flor/pcore/break.rb +0 -24
  33. data/lib/flor/pcore/case.rb +127 -0
  34. data/lib/flor/pcore/cmp.rb +0 -24
  35. data/lib/flor/pcore/cond.rb +24 -24
  36. data/lib/flor/pcore/cursor.rb +0 -24
  37. data/lib/flor/pcore/define.rb +0 -24
  38. data/lib/flor/pcore/fail.rb +0 -24
  39. data/lib/flor/pcore/if.rb +39 -0
  40. data/lib/flor/pcore/loop.rb +0 -24
  41. data/lib/flor/pcore/map.rb +0 -24
  42. data/lib/flor/pcore/match.rb +0 -24
  43. data/lib/flor/pcore/move.rb +0 -24
  44. data/lib/flor/pcore/noeval.rb +0 -24
  45. data/lib/flor/pcore/noret.rb +0 -24
  46. data/lib/flor/pcore/push.rb +1 -25
  47. data/lib/flor/pcore/rand.rb +59 -0
  48. data/lib/flor/pcore/sequence.rb +0 -24
  49. data/lib/flor/pcore/set.rb +0 -24
  50. data/lib/flor/pcore/stall.rb +0 -24
  51. data/lib/flor/pcore/until.rb +0 -24
  52. data/lib/flor/pcore/val.rb +0 -24
  53. data/lib/flor/punit/cancel.rb +0 -24
  54. data/lib/flor/punit/cmap.rb +0 -24
  55. data/lib/flor/punit/concurrence.rb +54 -24
  56. data/lib/flor/punit/every.rb +0 -24
  57. data/lib/flor/punit/graft.rb +41 -0
  58. data/lib/flor/punit/on.rb +0 -24
  59. data/lib/flor/punit/schedule.rb +0 -24
  60. data/lib/flor/punit/signal.rb +0 -24
  61. data/lib/flor/punit/sleep.rb +0 -24
  62. data/lib/flor/punit/task.rb +0 -26
  63. data/lib/flor/punit/trace.rb +0 -24
  64. data/lib/flor/punit/trap.rb +0 -24
  65. data/lib/flor/to_string.rb +4 -25
  66. data/lib/flor/tools/env.rb +0 -23
  67. data/lib/flor/tools/shell.rb +810 -0
  68. data/lib/flor/unit.rb +0 -23
  69. data/lib/flor/unit/executor.rb +35 -31
  70. data/lib/flor/unit/ganger.rb +9 -34
  71. data/lib/flor/unit/hooker.rb +5 -25
  72. data/lib/flor/unit/journal.rb +0 -23
  73. data/lib/flor/unit/loader.rb +63 -94
  74. data/lib/flor/unit/logger.rb +8 -27
  75. data/lib/flor/unit/models.rb +0 -24
  76. data/lib/flor/unit/models/execution.rb +13 -24
  77. data/lib/flor/unit/models/pointer.rb +0 -24
  78. data/lib/flor/unit/models/timer.rb +0 -24
  79. data/lib/flor/unit/models/trace.rb +0 -24
  80. data/lib/flor/unit/models/trap.rb +0 -24
  81. data/lib/flor/unit/scheduler.rb +157 -128
  82. data/lib/flor/unit/storage.rb +224 -167
  83. data/lib/flor/unit/taskers.rb +38 -25
  84. data/lib/flor/unit/waiter.rb +7 -26
  85. data/lib/flor/unit/wlist.rb +8 -24
  86. metadata +28 -7
  87. data/fail.txt +0 -16
  88. data/intercepted.txt +0 -123
  89. data/lib/flor/pcore/ife.rb +0 -56
  90. data/lib/flor/tools/repl.rb +0 -231
  91. data/out.txt +0 -206
@@ -1,26 +1,3 @@
1
- #--
2
- # Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Made in Japan.
23
- #++
24
1
 
25
2
  module Flor
26
3
 
@@ -37,18 +14,54 @@ module Flor
37
14
 
38
15
  protected
39
16
 
40
- def reply(force=false)
17
+ def return(force=false)
41
18
 
42
- @ganger.reply(@message) if force || @ganger
19
+ @ganger.return(@message) if force || @ganger
43
20
  end
21
+ alias reply return
44
22
 
45
23
  def exid; @message['exid']; end
46
24
  def nid; @message['nid']; end
47
25
 
26
+ def payload; @message['payload']; end
27
+ alias fields payload
28
+
29
+ def attd; @message['attd']; end
30
+ def attl; @message['attl']; end
31
+
32
+ def tasker; @message['tasker']; end
33
+ def taskname; @message['taskname']; end
34
+ alias task_name taskname
35
+
36
+ def vars; @message['vars']; end
37
+
48
38
  def execution
49
39
 
50
40
  @ganger.unit.execution(exid)
51
41
  end
42
+
43
+ # For domain taskers
44
+ #
45
+ def route(name)
46
+
47
+ if name.is_a?(String)
48
+
49
+ [
50
+ Flor.dup_and_merge(
51
+ @message,
52
+ 'tasker' => name, 'original_tasker' => @message['tasker'],
53
+ 'routed' => true)
54
+ ]
55
+
56
+ else
57
+
58
+ [
59
+ Flor.dup_and_merge(
60
+ @message,
61
+ 'routed' => !! name)
62
+ ]
63
+ end
64
+ end
52
65
  end
53
66
  end
54
67
 
@@ -1,26 +1,3 @@
1
- #--
2
- # Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Made in Japan.
23
- #++
24
1
 
25
2
  module Flor
26
3
 
@@ -97,11 +74,15 @@ module Flor
97
74
 
98
75
  def match?(message)
99
76
 
100
- return false if @exid && @exid != message['exid']
77
+ mpoint = message['point']
78
+
79
+ return false if @exid && @exid != message['exid'] && mpoint != 'idle'
101
80
 
102
81
  nid, points = @serie.first
103
- return false if nid && message['nid'] && nid != message['nid']
104
- return false if ! points.include?(message['point'])
82
+ mnid = message['nid']
83
+
84
+ return false if nid && mnid && nid != mnid
85
+ return false if ! points.include?(mpoint)
105
86
 
106
87
  true
107
88
  end
@@ -1,26 +1,3 @@
1
- #--
2
- # Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Made in Japan.
23
- #++
24
1
 
25
2
  module Flor
26
3
 
@@ -63,7 +40,14 @@ module Flor
63
40
 
64
41
  def wait(exid, opts)
65
42
 
66
- opts = { wait: opts } if opts.is_a?(String) || opts == true
43
+ exid, opts =
44
+ if opts == true && exid == 'idle'
45
+ [ nil, { wait: exid } ]
46
+ elsif opts == true || opts.is_a?(String)
47
+ [ exid, { wait: opts } ]
48
+ else
49
+ [ exid, opts ]
50
+ end
67
51
 
68
52
  @mutex.synchronize do
69
53
 
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.9.5
4
+ version: 0.10.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-02-10 00:00:00.000000000 Z
12
+ date: 2017-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: munemo
@@ -91,6 +91,22 @@ dependencies:
91
91
  - - '='
92
92
  - !ruby/object:Gem::Version
93
93
  version: 3.4.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: terminal-table
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
94
110
  description: A Ruby workflow engine (ruote next generation)
95
111
  email:
96
112
  - jmettraux+flor@gmail.com
@@ -99,6 +115,7 @@ extensions: []
99
115
  extra_rdoc_files: []
100
116
  files:
101
117
  - Makefile
118
+ - lib/flor/changes.rb
102
119
  - lib/flor/colours.rb
103
120
  - lib/flor/conf.rb
104
121
  - lib/flor/core/executor.rb
@@ -106,11 +123,15 @@ files:
106
123
  - lib/flor/core/procedure.rb
107
124
  - lib/flor/core/texecutor.rb
108
125
  - lib/flor/core.rb
126
+ - lib/flor/deep.rb
127
+ - lib/flor/djan.rb
109
128
  - lib/flor/dollar.rb
110
129
  - lib/flor/errors.rb
111
130
  - lib/flor/flor.rb
131
+ - lib/flor/id.rb
112
132
  - lib/flor/log.rb
113
133
  - lib/flor/migrations/0001_tables.rb
134
+ - lib/flor/migrations/0002_cunit_and_munit.rb
114
135
  - lib/flor/parser.rb
115
136
  - lib/flor/pcore/_arr.rb
116
137
  - lib/flor/pcore/_atom.rb
@@ -123,12 +144,13 @@ files:
123
144
  - lib/flor/pcore/apply.rb
124
145
  - lib/flor/pcore/arith.rb
125
146
  - lib/flor/pcore/break.rb
147
+ - lib/flor/pcore/case.rb
126
148
  - lib/flor/pcore/cmp.rb
127
149
  - lib/flor/pcore/cond.rb
128
150
  - lib/flor/pcore/cursor.rb
129
151
  - lib/flor/pcore/define.rb
130
152
  - lib/flor/pcore/fail.rb
131
- - lib/flor/pcore/ife.rb
153
+ - lib/flor/pcore/if.rb
132
154
  - lib/flor/pcore/loop.rb
133
155
  - lib/flor/pcore/map.rb
134
156
  - lib/flor/pcore/match.rb
@@ -136,6 +158,7 @@ files:
136
158
  - lib/flor/pcore/noeval.rb
137
159
  - lib/flor/pcore/noret.rb
138
160
  - lib/flor/pcore/push.rb
161
+ - lib/flor/pcore/rand.rb
139
162
  - lib/flor/pcore/sequence.rb
140
163
  - lib/flor/pcore/set.rb
141
164
  - lib/flor/pcore/stall.rb
@@ -145,6 +168,7 @@ files:
145
168
  - lib/flor/punit/cmap.rb
146
169
  - lib/flor/punit/concurrence.rb
147
170
  - lib/flor/punit/every.rb
171
+ - lib/flor/punit/graft.rb
148
172
  - lib/flor/punit/on.rb
149
173
  - lib/flor/punit/schedule.rb
150
174
  - lib/flor/punit/signal.rb
@@ -154,7 +178,7 @@ files:
154
178
  - lib/flor/punit/trap.rb
155
179
  - lib/flor/to_string.rb
156
180
  - lib/flor/tools/env.rb
157
- - lib/flor/tools/repl.rb
181
+ - lib/flor/tools/shell.rb
158
182
  - lib/flor/unit/executor.rb
159
183
  - lib/flor/unit/ganger.rb
160
184
  - lib/flor/unit/hooker.rb
@@ -175,10 +199,7 @@ files:
175
199
  - lib/flor/unit.rb
176
200
  - lib/flor.rb
177
201
  - flor.gemspec
178
- - fail.txt
179
- - intercepted.txt
180
202
  - LICENSE.txt
181
- - out.txt
182
203
  - CHANGELOG.md
183
204
  - README.md
184
205
  homepage: http://github.com/floraison
data/fail.txt DELETED
@@ -1,16 +0,0 @@
1
- rspec ./spec/conf_spec.rb:35 # Flor::Conf.read fails when it cannot parse
2
- rspec ./spec/core/on_error_spec.rb:33 # Flor core the on_error: attribute fails if the handler does not exist
3
- rspec ./spec/core/on_error_spec.rb:46 # Flor core the on_error: attribute triggers when a child has an error
4
- rspec ./spec/core/on_error_spec.rb:61 # Flor core the on_error: attribute accepts the name of a function
5
- rspec ./spec/core/tags_spec.rb:116 # Flor core the tags attribute fails on non-string attributes
6
- rspec ./spec/pcore/cmp_spec.rb:230 # Flor procedures < fails when arguments are not comparable
7
- rspec ./spec/pcore/fail_spec.rb:20 # Flor procedures fail raises an error
8
- rspec ./spec/pcore/fail_spec.rb:36 # Flor procedures fail raises an error when empty too
9
- rspec ./spec/pcore/fail_spec.rb:55 # Flor procedures error is an alias to "fail"
10
- rspec ./spec/pcore/move_spec.rb:22 # Flor pcore move fails if the target cannot be found
11
- rspec ./spec/pcore/procedure_spec.rb:271 # Flor::Procedure status "closed" on-error #receive does not open the node
12
- rspec ./spec/pcore/push_spec.rb:34 # Flor procedures push fails if it cannot push to the first child
13
- rspec ./spec/pcore/set_spec.rb:79 # Flor procedures set fails when it cannot set a deep field
14
- rspec ./spec/pcore/set_spec.rb:124 # Flor procedures set fails when it cannot set a deep variable
15
- rspec ./spec/pcore/set_spec.rb:169 # Flor procedures set a sets locally if there is no a in the lookup chain
16
- rspec ./spec/pcore/set_spec.rb:225 # Flor procedures set v.a sets locally if there is no a in the lookup chain
@@ -1,123 +0,0 @@
1
- ================================================================================
2
- "java.lang.ArrayIndexOutOfBoundsException: 7"
3
- org.jruby.RubyArray.collect(RubyArray.java:2399)
4
- org.jruby.RubyArray.collect19(RubyArray.java:2407)
5
- org.jruby.RubyArray$INVOKER$i$0$0$collect19.call(RubyArray$INVOKER$i$0$0$collect19.gen)
6
-
7
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.chained_4_rescue_2$RUBY$SYNTHETIC__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:236)
8
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.chained_3_ensure_3$RUBY$__ensure__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
9
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.block_0$RUBY$__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:234)
10
- rubyjit$RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399$block_0$RUBY$__file__.call(rubyjit$RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399$block_0$RUBY$__file__)
11
- org.jruby.runtime.CompiledBlock19.yieldSpecificInternal(CompiledBlock19.java:117)
12
-
13
-
14
- rubyjit.RSpec::Core::Example$$with_around_and_singleton_context_hooks_3b50427a6d5505735484cd86431f6a767c1d18f4548153399.block_0$RUBY$__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:478)
15
- rubyjit$RSpec::Core::Example$$with_around_and_singleton_context_hooks_3b50427a6d5505735484cd86431f6a767c1d18f4548153399$block_0$RUBY$__file__.call(rubyjit$RSpec::Core::Example$$with_around_and_singleton_context_hooks_3b50427a6d5505735484cd86431f6a767c1d18f4548153399$block_0$RUBY$__file__)
16
-
17
-
18
-
19
- rubyjit.RSpec::Core::Example$$with_around_example_hooks_f42ef83f37556525813c37189c97bfafa418095d548153399.block_0$RUBY$__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:435)
20
- rubyjit$RSpec::Core::Example$$with_around_example_hooks_f42ef83f37556525813c37189c97bfafa418095d548153399$block_0$RUBY$__file__.call(rubyjit$RSpec::Core::Example$$with_around_example_hooks_f42ef83f37556525813c37189c97bfafa418095d548153399$block_0$RUBY$__file__)
21
-
22
-
23
-
24
- rubyjit.RSpec::Core::Hooks::HookCollections$$run_5d8d48da1a9e19fa57aca42145bb7983771aa82e548153399.block_0$RUBY$__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/hooks.rb:478)
25
- rubyjit$RSpec::Core::Hooks::HookCollections$$run_5d8d48da1a9e19fa57aca42145bb7983771aa82e548153399$block_0$RUBY$__file__.call(rubyjit$RSpec::Core::Hooks::HookCollections$$run_5d8d48da1a9e19fa57aca42145bb7983771aa82e548153399$block_0$RUBY$__file__)
26
-
27
-
28
-
29
- rubyjit.RSpec::Core::Hooks::HookCollections$$run_around_example_hooks_for_46882d65b8cfc96e5a66894bebd6d613fe20048a548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/hooks.rb:616)
30
- rubyjit.RSpec::Core::Hooks::HookCollections$$run_around_example_hooks_for_46882d65b8cfc96e5a66894bebd6d613fe20048a548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/hooks.rb)
31
-
32
-
33
-
34
- rubyjit.RSpec::Core::Hooks::HookCollections$$run_5d8d48da1a9e19fa57aca42145bb7983771aa82e548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/hooks.rb:478)
35
- rubyjit.RSpec::Core::Hooks::HookCollections$$run_5d8d48da1a9e19fa57aca42145bb7983771aa82e548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/hooks.rb)
36
-
37
-
38
-
39
- rubyjit.RSpec::Core::Example$$with_around_example_hooks_f42ef83f37556525813c37189c97bfafa418095d548153399.chained_0_rescue_1$RUBY$SYNTHETIC__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:435)
40
- rubyjit.RSpec::Core::Example$$with_around_example_hooks_f42ef83f37556525813c37189c97bfafa418095d548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
41
- rubyjit.RSpec::Core::Example$$with_around_example_hooks_f42ef83f37556525813c37189c97bfafa418095d548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
42
-
43
-
44
-
45
- rubyjit.RSpec::Core::Example$$with_around_and_singleton_context_hooks_3b50427a6d5505735484cd86431f6a767c1d18f4548153399.chained_0_ensure_1$RUBY$__ensure__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:478)
46
- rubyjit.RSpec::Core::Example$$with_around_and_singleton_context_hooks_3b50427a6d5505735484cd86431f6a767c1d18f4548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
47
- rubyjit.RSpec::Core::Example$$with_around_and_singleton_context_hooks_3b50427a6d5505735484cd86431f6a767c1d18f4548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
48
-
49
-
50
-
51
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.chained_2_rescue_1$RUBY$SYNTHETIC__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:233)
52
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.chained_1_ensure_2$RUBY$__ensure__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
53
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.chained_0_ensure_1$RUBY$__ensure__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb:229)
54
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
55
- rubyjit.RSpec::Core::Example$$run_e23a0386b8914aee0fb2ff25382f02e76d718a30548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example.rb)
56
-
57
-
58
- rubyjit.RSpec::Core::ExampleGroup$$run_examples_d1ecff0be8f52462c9431f9e5a26b42be542fee3548153399.block_0$RUBY$__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:581)
59
- rubyjit$RSpec::Core::ExampleGroup$$run_examples_d1ecff0be8f52462c9431f9e5a26b42be542fee3548153399$block_0$RUBY$__file__.call(rubyjit$RSpec::Core::ExampleGroup$$run_examples_d1ecff0be8f52462c9431f9e5a26b42be542fee3548153399$block_0$RUBY$__file__)
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
- rubyjit.RSpec::Core::ExampleGroup$$run_examples_d1ecff0be8f52462c9431f9e5a26b42be542fee3548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:577)
68
- rubyjit.RSpec::Core::ExampleGroup$$run_examples_d1ecff0be8f52462c9431f9e5a26b42be542fee3548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb)
69
-
70
-
71
-
72
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.chained_1_rescue_1$RUBY$SYNTHETIC__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:543)
73
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.chained_0_ensure_1$RUBY$__ensure__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb)
74
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:541)
75
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb)
76
-
77
-
78
-
79
-
80
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.block_0$RUBY$__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:544)
81
- rubyjit$RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399$block_0$RUBY$__file__.call(rubyjit$RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399$block_0$RUBY$__file__)
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.chained_1_rescue_1$RUBY$SYNTHETIC__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:544)
90
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.chained_0_ensure_1$RUBY$__ensure__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb)
91
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb:541)
92
- rubyjit.RSpec::Core::ExampleGroup$$run_a3bf101cd7bf6e139f3a52a1db889d129cb68613548153399.__file__(/home/travis/build/floraison/flor/vendor/bundle/jruby/1.9/gems/rspec-core-3.4.2/lib/rspec/core/example_group.rb)
93
-
94
- --------------------------------------------------------------------------------
95
- Failures:
96
-
97
- 2) Flor unit Flor::Scheduler#hook may filter on point:/p:
98
- Failure/Error: fail "**INTERCEPTED**"
99
-
100
- RuntimeError:
101
- **INTERCEPTED**
102
- # ./spec/unit/hooks_spec.rb:117:in `(root)'
103
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:1:in `(root)'
104
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'
105
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'
106
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'
107
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
108
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
109
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
110
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
111
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
112
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
113
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/exe/bundle:34:in `(root)'
114
- # /home/travis/.rvm/gems/jruby-d20@global/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
115
-
116
- Finished in 1 minute 49.84 seconds (files took 1.05 seconds to load)
117
- 460 examples, 2 failures, 2 pending
118
-
119
- Failed examples:
120
-
121
- rspec ./spec/punit/schedule_spec.rb:64 # Flor punit schedule cron triggers repeatedly
122
- rspec ./spec/unit/hooks_spec.rb:95 # Flor unit Flor::Scheduler#hook may filter on point:/p:
123
-
@@ -1,56 +0,0 @@
1
- #--
2
- # Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Made in Japan.
23
- #++
24
-
25
-
26
- class Flor::Pro::Ife < Flor::Procedure
27
-
28
- names 'ife', 'unlesse'
29
-
30
- def pre_execute
31
-
32
- unatt_unkeyed_children
33
- end
34
-
35
- def receive_non_att
36
-
37
- return reply if @fcid > first_unkeyed_child_id
38
- # "else" or "then" answered, replying to parent...
39
-
40
- off =
41
- if tree[0] == 'unlesse'
42
- Flor.false?(payload['ret']) ? 1 : 2
43
- else # 'ife'
44
- Flor.true?(payload['ret']) ? 1 : 2
45
- end
46
-
47
- nxt = @fcid + off
48
-
49
- if nxt >= children.size
50
- reply('ret' => node_payload_ret)
51
- else
52
- execute_child(nxt)
53
- end
54
- end
55
- end
56
-