omf_oml 1.1.8 → 1.1.9

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.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  .project
2
2
  pkg
3
3
  lib/omf_oml/BACKUP
4
+ .idea
@@ -234,10 +234,13 @@ module OMF::OML
234
234
  #
235
235
  def to_table(aspect, table_opts = {})
236
236
  aspect = aspect.to_sym
237
+ table_opts[:supress_index] = true
237
238
  case aspect
238
239
  when :nodes
240
+ #puts "TABLE SCHEME 1 >>>> #{@node_schema}"
239
241
  table = OmlTable.create @name + '/nodes', @node_schema, table_opts
240
- #puts "TABLE SCHEME >>>> #{table.schema}"
242
+ #puts "TABLE SCHEME 2 >>>> #{@node_schema} - #{table.schema}"
243
+ #table.add_rows(@nodes)
241
244
  table.add_rows(@nodes.map do |id, n|
242
245
  @node_schema.hash_to_row(n.attributes)
243
246
  end)
@@ -250,17 +253,8 @@ module OMF::OML
250
253
 
251
254
  when :links
252
255
  table = OmlTable.create @name + '/links', @link_schema, table_opts
253
- # @links.each do |id, l|
254
- # table.add_row @link_schema.hash_to_row(l.attributes)
255
- # end
256
256
  table.add_rows(@links.map do |id, n|
257
- # puts @link_schema.hash_to_row(n.attributes).inspect
258
- # puts table.schema
259
- # table.add_row @link_schema.hash_to_row(n.attributes)
260
- # puts table.rows.inspect
261
- # exit
262
-
263
- @link_schema.hash_to_row(n.attributes)
257
+ @link_schema.hash_to_row(n.attributes)
264
258
  end)
265
259
  #puts table.rows.inspect
266
260
  on_update "__to_tables_links_#{table.object_id}" do |a|
@@ -59,7 +59,7 @@ module OMF::OML
59
59
 
60
60
  def self.create(schema_description)
61
61
  if schema_description.kind_of? self
62
- return schema_description
62
+ return schema_description.clone
63
63
  end
64
64
  return self.new(schema_description)
65
65
  end
data/lib/omf_oml/table.rb CHANGED
@@ -44,7 +44,7 @@ module OMF::OML
44
44
  # option 'supress_index' is set.
45
45
  # opts -
46
46
  # :max_size - keep table to that size by dropping older rows
47
- # :supress_index - don't add index, even if schema doesn't start with '__id__'
47
+ # :supress_index - don't pex, even if schema doesn't start with '__id__'
48
48
  #
49
49
  def initialize(tname, schema, opts = {}, &on_before_row_added)
50
50
  super tname
@@ -6,6 +6,6 @@
6
6
  #-------------------------------------------------------------------------------
7
7
  module OMF
8
8
  module OML
9
- VERSION = '1.1.8'
9
+ VERSION = '1.1.9'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omf_oml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
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: 2014-07-27 00:00:00.000000000 Z
12
+ date: 2015-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omf_base