labimotion 0.1.16 → 0.1.18

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: 95752e2c3001d5de57f899a05dc5e348611cd3408a7fe1a1448ee426edf56437
4
- data.tar.gz: b8715b44806c7586c71c05534e83147ec33a0648f771bd3867b0212440cdaa69
3
+ metadata.gz: d1656db6477e67ec4c028d478acd989e0f8616c765d5455a098d8119bf41d9d3
4
+ data.tar.gz: 4eec2bdfee9ed0c15ab7b804d076c0c7c4011df853b98f1b864a3f43e0f63ec5
5
5
  SHA512:
6
- metadata.gz: 45faeec9d12b78dec9838b47ac863f4492ae1808f84e4777f38d9a3137e60b74c238827ceff45639a003535906e6ec9a339d669cbc935eba62bbcb0e1157533f
7
- data.tar.gz: a19c0cd0422952d57e1151ffe87ddc032e1e18f2029ab860284a094f6ad5d645665771f7705dd7a39bfd139d524ab67a0635c936f1a46f981f55ef16b7188ed1
6
+ metadata.gz: 6c1f49548317152dd92f69360440d454c29686a508136e1e905723cf3763590e156848e1c035a48ea3160e540e152ab8add68f1fb2bed37d236a467775d11d56
7
+ data.tar.gz: 734ef5c969db235796e4b777101664930027e58b1fa0df718ab1901fcef9dc8501e44e07ce18cab519b81062206fe51d12101687741b61026127d6bfbbaf0c10
@@ -23,7 +23,7 @@ module Labimotion
23
23
  uuid = SecureRandom.uuid
24
24
  props = args[:properties]
25
25
  props['pkg'] = Labimotion::Utils.pkg(props['pkg'])
26
- props['identifier'] = klass.identifier
26
+ props['identifier'] = klass.identifier if klass.identifier.present?
27
27
  props['uuid'] = uuid
28
28
  props['klass'] = 'Dataset'
29
29
 
@@ -41,14 +41,13 @@ module Labimotion
41
41
 
42
42
  def save_segments(**args) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
43
43
  return if args[:segments].nil?
44
-
45
44
  segments = []
46
- args[:segments].each do |seg|
45
+ args[:segments]&.each do |seg|
47
46
  klass = Labimotion::SegmentKlass.find_by(id: seg['segment_klass_id'])
48
47
  uuid = SecureRandom.uuid
49
48
  props = seg['properties']
50
49
  props['pkg'] = Labimotion::Utils.pkg(props['pkg'])
51
- props['identifier'] = identifier
50
+ props['identifier'] = klass.identifier if klass.identifier.present?
52
51
  props['uuid'] = uuid
53
52
  props['klass'] = 'Segment'
54
53
  segment = Labimotion::Segment.find_by(element_type: Labimotion::Utils.element_name(self.class.name), element_id: self.id, segment_klass_id: seg['segment_klass_id'])
@@ -59,7 +58,7 @@ module Labimotion
59
58
  next if segment.present?
60
59
 
61
60
  props['klass_uuid'] = klass.uuid
62
- segment = Labimotion::Segment.create!(properties_release: klass.properties_release, segment_klass_id: seg['segment_klass_id'], element_type: Labimotion::Utils.element_name(self.class.name), element_id: self.id, properties: props, created_by: args[:current_user_id], uuid: uuid, klass_uuid: klass.uuid)
61
+ segment = Labimotion::Segment.create!(properties_release: klass.properties_release, segment_klass_id: seg['segment_klass_id'], element_type: self.class.name, element_id: self.id, properties: props, created_by: args[:current_user_id], uuid: uuid, klass_uuid: klass.uuid)
63
62
  segments.push(segment)
64
63
  end
65
64
  segments
@@ -2,6 +2,10 @@
2
2
 
3
3
  module Labimotion
4
4
  IS_RAILS5 = true
5
- VERSION = '0.1.16' if Labimotion::IS_RAILS5 == true
6
- VERSION = '1.0.1' if Labimotion::IS_RAILS5 == false
5
+
6
+ ## for Chemotion Repository
7
+ VERSION = '0.1.18' if Labimotion::IS_RAILS5 == true
8
+
9
+ ## for Chemotion ELN
10
+ VERSION = '1.0.5' if Labimotion::IS_RAILS5 == false
7
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labimotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chia-Lin Lin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-08-29 00:00:00.000000000 Z
12
+ date: 2023-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails