flor 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e89a3c4accc6ee1eca033031352f4c6d20c9b42ffbcb44aebe3cca04b59bc128
4
- data.tar.gz: 30914f85dfb1f76de1877cdb60e977eff73cb1ee31d9dfa7b893160799b4c162
3
+ metadata.gz: f1dae0857de545986e18ad31a41f37a6ead6687b34d3c06de22aafa606369283
4
+ data.tar.gz: 9843d0124a2c3948ffc6846e7854854f5eda37d95bd02bfc02cecfefab0e5ea1
5
5
  SHA512:
6
- metadata.gz: 91cbcbbebccc7209554f49645a43876bf7f2743a77eac4a64ab3daf7f5fbfb8f2e7d566f6ffc03c932222aa2daf82e5674fd52a653bddd8b390b27cbb4714e1c
7
- data.tar.gz: 174730b60ab5366c9cae335644ace73722ff52dc34477754020817c630dfabe1f6710846e437bbb936cb76fb4922f04d1dc2ffd2fde64f4c80924bd3dd7a629f
6
+ metadata.gz: 185490e0054ffdfe7c078b71955834679a398266e613be5d8bb6b63bc626bf4727bd4fd45249e7dea14cdd91a85c5ad92a1f6b3b120117c7c274b41d5478ba31
7
+ data.tar.gz: e6dde7ae40f3ef6d2c7a620d6a07840c6591b745798962d039ac39fa426e4bcef51f3c67e97d9a367bb981918ec5fe98934393eec2cd7e87046b8d491b9a6511
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## flor 1.2.2 released 2021-03-29
6
+
7
+ * Include data in flor_pointers
8
+ * Ensure flor_pointers name is a string
9
+
10
+
5
11
  ## flor 1.2.1 released 2021-03-22
6
12
 
7
13
  * If conf sto_db_logger is false, do not attach a logger to the db connection
data/lib/flor.rb CHANGED
@@ -16,7 +16,7 @@ require 'dense'
16
16
 
17
17
  module Flor
18
18
 
19
- VERSION = '1.2.1'
19
+ VERSION = '1.2.2'
20
20
  end
21
21
 
22
22
  require 'flor/colours'
@@ -12,8 +12,9 @@ module Flor
12
12
  :status, :ctime, :mtime, :cunit, :munit
13
13
  ].freeze
14
14
  POINTER_COLUMNS = [
15
- :domain, :exid, :nid, :type, :name, :value, :ctime, :cunit
16
- ].freeze
15
+ :domain, :exid, :nid, :type, :name, :value, :ctime, :cunit,
16
+ :content
17
+ ].freeze
17
18
 
18
19
  attr_reader :unit, :db, :models
19
20
 
@@ -720,17 +721,17 @@ module Flor
720
721
  vs = nid == '0' ? node['vars'] : nil
721
722
  vs.each { |k, v|
722
723
  case v; when Numeric, String, TrueClass, FalseClass, NilClass
723
- a << [ dom, exid, '0', 'var', k, v.to_s, now, u, nil ]
724
+ a << [ dom, exid, '0', 'var', k, v.to_s, now, u, v ]
724
725
  when Array, Hash
725
726
  s = '(array)'; s = '(object)' if v.is_a?(Hash)
726
- a << [ dom, exid, '0', 'var', k, s, now, u, nil ]
727
+ a << [ dom, exid, '0', 'var', k, s, now, u, v ]
727
728
  else
728
- a << [ dom, exid, '0', 'var', k, nil, now, u, nil ]
729
+ a << [ dom, exid, '0', 'var', k, nil, now, u, v ]
729
730
  end } if vs
730
731
 
731
732
  if ta = node['task']
732
733
  tasker = ta['tasker']
733
- name = ta['name']
734
+ n = ta['name']; name = n.is_a?(String) ? n : JSON.dump(n)
734
735
  content = { message: node['message'], atts: node['atts'] }
735
736
  a << [ dom, exid, nid, 'tasker', tasker, name, now, u, content ]
736
737
  end
@@ -746,29 +747,30 @@ module Flor
746
747
  #
747
748
  # don't insert when already inserted
748
749
 
749
- if pointer_columns.include?(:content)
750
- pointers.each { |ptr|
751
- c = ptr[8]; ptr[8] = to_blob(c) if c }
752
- else
753
- pointers.each { |ptr|
754
- ptr.pop }
755
- end
750
+ #if pointer_columns.include?(:content)
751
+ pointers.each { |ptr| c = ptr[8]; ptr[8] = to_blob(c) if c }
752
+ #else
753
+ # pointers.each { |ptr| ptr.pop }
754
+ #end
756
755
 
756
+ #@db[:flor_pointers]
757
+ # .import(
758
+ # pointer_columns,
759
+ # pointers)
757
760
  @db[:flor_pointers]
758
761
  .import(
759
- pointer_columns,
762
+ POINTER_COLUMNS,
760
763
  pointers)
761
764
  end
762
765
 
763
- def pointer_columns
764
-
765
- @pointer_columns ||=
766
- if @db[:flor_pointers].columns.include?(:content)
767
- POINTER_COLUMNS + [ :content ]
768
- else
769
- POINTER_COLUMNS
770
- end
771
- end
766
+ #def pointer_columns
767
+ # @pointer_columns ||=
768
+ # if @db[:flor_pointers].columns.include?(:content)
769
+ # POINTER_COLUMNS + [ :content ]
770
+ # else
771
+ # POINTER_COLUMNS
772
+ # end
773
+ #end
772
774
 
773
775
  def determine_type_and_schedule(message)
774
776
 
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.2.1
4
+ version: 1.2.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: 2021-03-22 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: munemo