sushi_fabric 0.7.0 → 0.7.1

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
  SHA1:
3
- metadata.gz: 913e2ea9c25f4966ef47d55ab6ca86e02093afe0
4
- data.tar.gz: cb1ddafc870251068b9666135e4c63f6a5bb768a
3
+ metadata.gz: b11d6ceb9a934fd85a9f5b306eed14641208480f
4
+ data.tar.gz: 5356f95d5e80384882e30f434ca9e81cb7af0078
5
5
  SHA512:
6
- metadata.gz: bd6477e704f689213e520b8d53ab48a779b11f37aabfb1157f6ba835ec1c3c3d0bcafc4109acc16706fb743151ca400d2fa0aca0d10f5f4919dc1fc79adb10e8
7
- data.tar.gz: 09282ce5875251c126c2f5573f80c0abe35ff4dc2917acfebbde1841e62b1cc96d534c224e27b647dc057264bce2d0001cbeab30d2eb874b96cb7288febad716
6
+ metadata.gz: 7ca8bef0afb9dcd1f8cf81907f3faedd5811f2f3a17c17a9ba1b564ca71acc1e8bc189ff0aed05776060d52f06a39687aeb07955ac3bacb30553ac79710a53bf
7
+ data.tar.gz: ff56156580510aa28eb5d3a2d432ac29883e62feea2ab3ff818cd2f9fe203c3e328a7723639b17e8931785a514cf7124602058f1aeb1e558d244013d5b22f1d1
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # Version = '20170303-140449'
3
+ # Version = '20170303-160743'
4
4
 
5
5
  require 'csv'
6
6
  require 'fileutils'
@@ -174,6 +174,8 @@ def save_data_set(data_set_arr, headers, rows, user=nil)
174
174
  user.data_sets << data_set
175
175
  user.save
176
176
  end
177
+ else
178
+ headers[0] = DataSet.find_by_md5(data_set.md5)
177
179
  end
178
180
  data_set.id
179
181
  end
@@ -247,11 +249,14 @@ class SushiApp
247
249
  end
248
250
  unless NO_ROR
249
251
  @current_user ||= nil
250
- @dataset_sushi_id = save_data_set(data_set_arr.to_a.flatten, headers, rows, @current_user)
251
- unless @off_bfabric_registration
252
- if dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
253
- dataset.register_bfabric
252
+ if @dataset_sushi_id = save_data_set(data_set_arr.to_a.flatten, headers, rows, @current_user)
253
+ unless @off_bfabric_registration
254
+ if dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
255
+ dataset.register_bfabric
256
+ end
254
257
  end
258
+ elsif data_set = headers[0] and data_set.instance_of?(DataSet)
259
+ @dataset_sushi_id = data_set.id
255
260
  end
256
261
  end
257
262
  elsif @dataset_sushi_id
@@ -647,6 +652,8 @@ rm -rf #{@scratch_dir} || exit 1
647
652
  user.data_sets << data_set
648
653
  user.save
649
654
  end
655
+ else
656
+ headers[0] = DataSet.find_by_md5(data_set.md5)
650
657
  end
651
658
  data_set.id
652
659
  end
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sushi_fabric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Functional Genomics Center Zurich