rbbt-rest 1.8.40 → 1.8.41

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/rest/common/table.rb +21 -23
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6e39414dfa8743ef0a2ab20880ed774c4913b24
4
- data.tar.gz: c74e24621e889e206d34c8a5b7cebd8524f7d9e7
3
+ metadata.gz: c5950461e9ab9838266729bf8e17a8491d82f5d9
4
+ data.tar.gz: 030f028cb7a66dae4ddbc17b1b31ca7ba72ae789
5
5
  SHA512:
6
- metadata.gz: 1d76af4b2ea1abf905fe9c70ac0f2af3d501dca8f76a870be9804129714755805209d035ec3d3ed65b935e2785e6b264928e7c930258077be9a2204ec0714e37
7
- data.tar.gz: e1945fdeaeacad36b42380f66236d1000aa225980a305b8f556358c75e78847f12fb9ac7fdd8b630e19558226d046ef0091ec31cd0e69d656ce8f06cbae6aacc
6
+ metadata.gz: 43d79e0c6db923b969b6c5b6165a246d0d978647f3385a22b51c2f2e4ab70e1ae7cac9680004a6727d4f202189301fa001908f1c3be9507498a70f38eb3cd34e
7
+ data.tar.gz: 691fbd2e676dcf6d301dd15facadec190bb84d92de4e76431c1b9135357d45c3f7bd5c47c28dcd36a7046e445f3439b418bf82323e0b7f2760cbba8a33c9a148
@@ -323,29 +323,27 @@ module RbbtRESTHelpers
323
323
  @table_filters[field] = type
324
324
  end
325
325
 
326
- #def self.save_tsv(tsv, path)
327
- # iii :SAVE
328
- # Open.write(path, tsv.to_s)
329
- # table_options = {:tsv_entity_options => tsv.entity_options, :tsv_entity_templates => tsv.entity_templates}
330
- # iii table_options
331
- # if tsv.entity_templates and tsv.entity_templates.any?
332
- # table_options[:headers] ||= {}
333
- # tsv.entity_templates.each do |field,template|
334
- # next if template.nil?
335
- # next if table_options[:headers].include? field
336
- # info = template.info
337
- # info.delete :format
338
- # info.delete :annotation_types
339
- # info.delete :annotated_array
340
- # table_options[:headers][field] = [template.annotation_types.last.to_s, info]
341
- # end
342
- # end
343
- # Open.write(path + '.table_options', table_options.to_yaml )
344
- #end
345
- #
346
- #def save_tsv(file)
347
- # RbbtRESTHelpers.save_tsv(file)
348
- #end
326
+ def self.save_tsv(tsv, path)
327
+ Open.write(path, tsv.to_s)
328
+ table_options = {:tsv_entity_options => tsv.entity_options, :tsv_entity_templates => tsv.entity_templates}
329
+ if tsv.entity_templates and tsv.entity_templates.any?
330
+ table_options[:headers] ||= {}
331
+ tsv.entity_templates.each do |field,template|
332
+ next if template.nil?
333
+ next if table_options[:headers].include? field
334
+ info = template.info
335
+ info.delete :format
336
+ info.delete :annotation_types
337
+ info.delete :annotated_array
338
+ table_options[:headers][field] = [template.annotation_types.last.to_s, info]
339
+ end
340
+ end
341
+ Open.write(path + '.table_options', table_options.to_yaml )
342
+ end
343
+
344
+ def save_tsv(file)
345
+ RbbtRESTHelpers.save_tsv(file)
346
+ end
349
347
 
350
348
 
351
349
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.40
4
+ version: 1.8.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-06 00:00:00.000000000 Z
11
+ date: 2016-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake