flor 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b28e7de7c950544c32279d8a63917911ae9d12be4154a1bcc0539c8ae343b6d6
4
- data.tar.gz: 1838e6d66710983c5adce4dc19b799bed0a34bf5427ee8156c516749d740e703
3
+ metadata.gz: 3016e8a2b0cf63ad1ccb0aa5a057bee3c4c99b6fd8889e5f4d5c9b8d84319295
4
+ data.tar.gz: 9bf212da214adefa0f413277d74f13cfc8b8c3585962378d4279f45324cff2d7
5
5
  SHA512:
6
- metadata.gz: f75fd74bd118784e7cf3285bff5f55d4e97c67f4666332712dc9b878c267690247468372ec3970d6cff570f90f235b31ae182279aec87f77d442d7cfa1c6536a
7
- data.tar.gz: 8c4b251c6bd1cc514580aae6430dcc70489ca046940e8a9e23104260f48be0a5049ac70310bcecfa3fdb62d00a8e603c644e177ab1db080e38bea04c1c538fa7
6
+ metadata.gz: f17775b3282df1f8dfe02660422c14fad2c30815d80a1d242010d44715fad171543bd239371c43a3dcbdb2f9781eba2f3853a3dab0aa441e7cb0422cbdf1f06a
7
+ data.tar.gz: 74d3fec7573d8a1c7b80a5cd5c100516a71b2903f51635d7b22a4b644e3865528eea7e38a1c75d0ec4df1e45b88e8b404edae47f54c3697c886e06d502ae388f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## flor 1.6.2 released 2012-12-03
6
+
7
+ * Prevent djan failing on negative indent for hash keys
8
+
9
+
10
+ ## flor 1.6.1 released 2023-10-20
11
+
12
+ * Use djan in Flor.msg_to_detail_s(executor, message)
13
+ * Accept --djan to flotojson.rb
14
+
15
+
5
16
  ## flor 1.6.0 released 2023-01-13
6
17
 
7
18
  * Add #fei to Message, Pointer, Timer, Trace and Trap models
data/README.md CHANGED
@@ -6,7 +6,6 @@
6
6
 
7
7
  Flor is a "Ruby workflow engine", if that makes any sense.
8
8
 
9
- * [![Join the chat at https://gitter.im/floraison/flor](https://badges.gitter.im/floraison/flor.svg)](https://gitter.im/floraison/flor?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
10
9
  * [floraison mailing list](https://groups.google.com/forum/#!forum/floraison)
11
10
  * [twitter.com/@flor_workflow](https://twitter.com/flor_workflow)
12
11
 
data/lib/flor/djan.rb CHANGED
@@ -140,7 +140,7 @@ module Flor
140
140
  #
141
141
  kml, vml =
142
142
  x.inject([ 0, 0 ]) { |(kl, vl), (k, v)|
143
- [ [ kl, len(k, opts) ].max, [ vl, len(v, opts) ].max ] }
143
+ [ [ kl, len(k.to_s, opts) ].max, [ vl, len(v, opts) ].max ] }
144
144
  kml += 1
145
145
  #
146
146
  if i && w && i + kml + 1 + vml < w
data/lib/flor/log.rb CHANGED
@@ -337,13 +337,18 @@ module Flor
337
337
  o.puts "#{_c.rs}#{_c.dg}<Flor.msg_to_detail_s>"
338
338
 
339
339
  o.puts "#{_c.dg}message:#{_c.yl}"
340
- o.puts YAML.dump(m)
340
+ #o.puts YAML.dump(m)
341
+ o.puts(Flor.to_djan(m, indent: 2, width: true))
341
342
 
342
343
  o.puts "#{_c.dg}tree:#{_c.yl}"
343
344
  o.puts(tree_to_s(node.lookup_tree(nid), nid, out: o)) if node
344
345
 
345
346
  o.puts "#{_c.dg}node:#{_c.yl}"
346
- o.puts n ? YAML.dump(n.merge('tree' => '(above)')) : 'nil'
347
+ #o.puts n ? YAML.dump(n.merge('tree' => '(above)')) : 'nil'
348
+ o.puts(
349
+ n ?
350
+ Flor.to_djan(n.merge('tree' => '(above)'), indent: 2, width: true) :
351
+ 'nil')
347
352
 
348
353
  o.puts "#{_c.dg}nodes:#{_c.yl}"
349
354
  o.puts nods_to_s(executor, m, opts)
@@ -62,6 +62,10 @@ class Flor::Pro::Cursor < Flor::Procedure
62
62
  #
63
63
  # ## cursor and start: / initial: attribute
64
64
  #
65
+ # Sometimes, it is necessary to enter a cursor not at its first child, but
66
+ # its second or third. Once such a cursor is entered and a `continue` is
67
+ # met it will "rewind" to the first child (not the "start" child).
68
+ #
65
69
  # ```
66
70
  # task 'create mandate'
67
71
  # cursor start: 'approve mandate'
@@ -71,6 +75,15 @@ class Flor::Pro::Cursor < Flor::Procedure
71
75
  # task 'activate mandate'
72
76
  # ```
73
77
  #
78
+ # The string passed to start:/initial: is looked up (down) in the cursor
79
+ # in the order: (example `cursor start: 'bravo'`)
80
+ #
81
+ # * tag (for example `push l 'b' tag: 'bravo'`)
82
+ # * string argument (for example `task 'toto' context: 'bravo'`)
83
+ # * string target (for example `task 'bravo'`)
84
+ # * name target (for example `bravo _`)
85
+ # * att target (for example `task 'toto' bravo: 'ok'`)
86
+ #
74
87
  # ## see also
75
88
  #
76
89
  # Break, continue, loop.
@@ -22,7 +22,12 @@ if (ARGV & [ '-h', '--help']).any?
22
22
  puts " --jp pretty prints the JSON output"
23
23
  puts
24
24
  puts " -y"
25
- puts " -yaml dumps as YAML"
25
+ puts " --yaml dumps as YAML"
26
+ puts
27
+ puts " -d"
28
+ puts " --djan dumps as djan"
29
+ puts
30
+ puts " --json dumps as JSON (it's the default)"
26
31
  puts
27
32
  puts " -h"
28
33
  puts " --help prints this help message"
@@ -84,6 +89,10 @@ elsif flags['--jp'] || flags['--pj']
84
89
  )
85
90
  elsif flags['-y'] || flags['--yaml']
86
91
  puts YAML.dump(tree)
92
+ elsif flags['-d'] || flags['--djan']
93
+ puts(Flor.to_djan(tree, indent: 2, width: true))
94
+ elsif flags['--json']
95
+ puts JSON.dump(tree)
87
96
  else
88
97
  puts JSON.dump(tree)
89
98
  end
data/lib/flor.rb CHANGED
@@ -16,7 +16,7 @@ require 'dense'
16
16
 
17
17
  module Flor
18
18
 
19
- VERSION = '1.6.0'
19
+ VERSION = '1.6.2'
20
20
  end
21
21
 
22
22
  require 'flor/colours'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-13 00:00:00.000000000 Z
11
+ date: 2023-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: munemo
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
305
  - !ruby/object:Gem::Version
306
306
  version: '0'
307
307
  requirements: []
308
- rubygems_version: 3.1.6
308
+ rubygems_version: 3.2.33
309
309
  signing_key:
310
310
  specification_version: 4
311
311
  summary: A Ruby workflow engine