labimotion 1.4.0.rc2 → 1.4.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/labimotion/entities/element_revision_entity.rb +2 -2
- data/lib/labimotion/entities/eln_element_entity.rb +2 -2
- data/lib/labimotion/entities/properties_entity.rb +2 -2
- data/lib/labimotion/entities/segment_revision_entity.rb +2 -2
- data/lib/labimotion/utils/import_utils.rb +1 -1
- data/lib/labimotion/utils/serializer.rb +2 -2
- data/lib/labimotion/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0e43bc1bdccd36b76e3c357c88b148f6af58a422ac15967b51018ad68cc570c
|
4
|
+
data.tar.gz: bf7e9b0ea4e21736bd9a71cca94b32f02c3d2eed96a1188c07a97be3e11a25f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b64d866c7f796c327b3a3f37b7ac5883a1e4ce8e604b0280dc3f47ea300ebbfb82251ea2e42ac2315377d24453f4323de13d10a6a6a85bd6fdf1f57671431d24
|
7
|
+
data.tar.gz: 90d185c4806b9e9f10ace66612bad2eb1e31d268a517890c01dd1304fcb53c1b42ef2433a2960d0da53e5c910c7fd8b526c6d4057845f394f663fd148d9e0e2b
|
@@ -23,7 +23,7 @@ module Labimotion
|
|
23
23
|
|
24
24
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_label'] = el.short_label if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
|
25
25
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_tip'] = el.short_label if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
|
26
|
-
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el
|
26
|
+
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el&.molecule_svg_file || 'nosvg')
|
27
27
|
end
|
28
28
|
|
29
29
|
field_tables = object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS].select { |ss| ss['type'] == Labimotion::FieldType::TABLE }
|
@@ -41,7 +41,7 @@ module Labimotion
|
|
41
41
|
find_mol = Molecule.find_by(id: sub_value[col_id]['value']['el_id'])
|
42
42
|
next unless find_mol.present?
|
43
43
|
|
44
|
-
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_mol.molecule_svg_file)
|
44
|
+
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_mol.molecule_svg_file) if find_mol&.molecule_svg_file&.present?
|
45
45
|
sub_value[col_id]['value']['el_inchikey'] = find_mol.inchikey
|
46
46
|
sub_value[col_id]['value']['el_smiles'] = find_mol.cano_smiles
|
47
47
|
sub_value[col_id]['value']['el_iupac'] = find_mol.iupac_name
|
@@ -47,7 +47,7 @@ module Labimotion
|
|
47
47
|
el.short_label
|
48
48
|
end
|
49
49
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] =
|
50
|
-
field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el
|
50
|
+
field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el&.molecule_svg_file || 'nosvg')
|
51
51
|
end
|
52
52
|
|
53
53
|
field_tables = object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS].select { |ss| ss['type'] == Labimotion::FieldType::TABLE }
|
@@ -88,7 +88,7 @@ module Labimotion
|
|
88
88
|
|
89
89
|
case obj
|
90
90
|
when Labimotion::Prop::MOLECULE
|
91
|
-
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_obj.molecule_svg_file)
|
91
|
+
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_obj.molecule_svg_file) if find_obj&.molecule_svg_file&.present?
|
92
92
|
sub_value[col_id]['value']['el_inchikey'] = find_obj.inchikey
|
93
93
|
sub_value[col_id]['value']['el_smiles'] = find_obj.cano_smiles
|
94
94
|
sub_value[col_id]['value']['el_iupac'] = find_obj.iupac_name
|
@@ -20,7 +20,7 @@ module Labimotion
|
|
20
20
|
|
21
21
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_label'] = el.short_label if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
|
22
22
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_tip'] = el.short_label if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
|
23
|
-
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el
|
23
|
+
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el&.molecule_svg_file || 'nosvg')
|
24
24
|
end
|
25
25
|
|
26
26
|
field_sys_reactions = object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS].select { |ss| ss['type'] == Labimotion::FieldType::SYS_REACTION }
|
@@ -69,7 +69,7 @@ module Labimotion
|
|
69
69
|
|
70
70
|
case obj
|
71
71
|
when Labimotion::Prop::MOLECULE
|
72
|
-
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_obj.molecule_svg_file)
|
72
|
+
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_obj.molecule_svg_file) if find_obj&.molecule_svg_file&.present?
|
73
73
|
sub_value[col_id]['value']['el_inchikey'] = find_obj.inchikey
|
74
74
|
sub_value[col_id]['value']['el_smiles'] = find_obj.cano_smiles
|
75
75
|
sub_value[col_id]['value']['el_iupac'] = find_obj.iupac_name
|
@@ -22,7 +22,7 @@ module Labimotion
|
|
22
22
|
|
23
23
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_label'] = el.short_label if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
|
24
24
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_tip'] = el.short_label if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
|
25
|
-
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el
|
25
|
+
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el&.molecule_svg_file || 'nosvg')
|
26
26
|
end
|
27
27
|
|
28
28
|
field_tables = object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS].select { |ss| ss['type'] == Labimotion::FieldType::TABLE }
|
@@ -40,7 +40,7 @@ module Labimotion
|
|
40
40
|
find_mol = Molecule.find_by(id: sub_value[col_id]['value']['el_id'])
|
41
41
|
next unless find_mol.present?
|
42
42
|
|
43
|
-
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_mol.molecule_svg_file)
|
43
|
+
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_mol.molecule_svg_file) if find_mol&.molecule_svg_file&.present?
|
44
44
|
sub_value[col_id]['value']['el_inchikey'] = find_mol.inchikey
|
45
45
|
sub_value[col_id]['value']['el_smiles'] = find_mol.cano_smiles
|
46
46
|
sub_value[col_id]['value']['el_iupac'] = find_mol.iupac_name
|
@@ -24,7 +24,7 @@ module Labimotion
|
|
24
24
|
value['el_id'] = molecule.id
|
25
25
|
value['el_tip'] = "#{molecule.inchikey}@@#{molecule.cano_smiles}"
|
26
26
|
value['el_label'] = molecule.iupac_name
|
27
|
-
value['el_svg'] = File.join('/images', 'molecules', molecule
|
27
|
+
value['el_svg'] = File.join('/images', 'molecules', molecule&.molecule_svg_file) if molecule&.molecule_svg_file.present?
|
28
28
|
value['el_inchikey'] = molecule.inchikey
|
29
29
|
value['el_smiles'] = molecule.cano_smiles
|
30
30
|
value['el_type'] = 'molecule' if value['el_type'].nil?
|
@@ -13,7 +13,7 @@ module Labimotion
|
|
13
13
|
|
14
14
|
case obj
|
15
15
|
when Labimotion::Prop::MOLECULE
|
16
|
-
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_obj.molecule_svg_file)
|
16
|
+
sub_value[col_id]['value']['el_svg'] = File.join('/images', 'molecules', find_obj.molecule_svg_file) if find_obj&.molecule_svg_file&.present?
|
17
17
|
sub_value[col_id]['value']['el_inchikey'] = find_obj.inchikey
|
18
18
|
sub_value[col_id]['value']['el_smiles'] = find_obj.cano_smiles
|
19
19
|
sub_value[col_id]['value']['el_iupac'] = find_obj.iupac_name
|
@@ -56,7 +56,7 @@ module Labimotion
|
|
56
56
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_tip'] = el.short_label if %w[drag_sample].include?(field['type'])
|
57
57
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_tip'] = "#{el.element_klass&.label}@@#{el.name}" if %w[drag_element].include?(field['type'])
|
58
58
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['icon_name'] = el.element_klass&.icon_name || '' if %w[drag_element].include?(field['type'])
|
59
|
-
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el
|
59
|
+
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_svg'] = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el.get_svg_path : File.join('/images', 'molecules', el&.molecule_svg_file || 'nosvg') if Labimotion::FieldType::DRAG_MS.include?(field['type'])
|
60
60
|
object.properties[Labimotion::Prop::LAYERS][key][Labimotion::Prop::FIELDS][idx]['value']['el_decoupled'] = el.decoupled if %w[drag_sample].include?(field['type'])
|
61
61
|
end
|
62
62
|
|
data/lib/labimotion/version.rb
CHANGED
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: 1.4.0.
|
4
|
+
version: 1.4.0.rc3
|
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: 2024-
|
12
|
+
date: 2024-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|