labimotion 2.0.0.rc6 → 2.0.0.rc7

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: b55a7bdf8c25fd127bd7a7bab35676d74e3f3523cb55e03516cc28d3e2df738c
4
- data.tar.gz: a28bad0092a10adc3befb26c3803d5f969d40bf9e387a7015890c2f81cd3089e
3
+ metadata.gz: 4939f188635fe8994339ee41af70efde1ff991c04fdcf3e5b7655502679db2d6
4
+ data.tar.gz: de30c9da40f6f8baf061212ae8b13cd8c21bacf4d353a04b27668854b02f464a
5
5
  SHA512:
6
- metadata.gz: 94b3f84c3b2588b08f19c66bafdd17fb9eef3674040bd3dc0683132a4b5709c11f643e81afda2109741da24e4a38c6b407c4eff279c00c9292ef0942611c4ec8
7
- data.tar.gz: 19082b803643920e698b9f14c1ce89b68aac5121a5adeab473d86c16c7129ba1d9e024e1bcec83b7c802ed79409183e1129967881295b66c363912652d563191
6
+ metadata.gz: 2985f972026f5ab556ab37fd8dd9226b0728369d8cdc0f8fa5efbb4b35b2cf48e2961e114ef0793fc7c12e1d7cad46b5025ec9f8128ac8e839c7c9e291f1aff8
7
+ data.tar.gz: d1f5d637746cca7208a50c4a928e512026abc55fd8242252ac87d4e43b6dc72654bc82e5698ecc9f529317f0b3c049a2a5a07f781237e7da0bbebc6374a88cd9
@@ -31,7 +31,7 @@ module Labimotion
31
31
  source_id: params[:source_id],
32
32
  layer_id: params[:layer_id],
33
33
  field_id: params[:name],
34
- identifier: params[:source_id],
34
+ identifier: SecureRandom.uuid,
35
35
  created_by: current_user.id,
36
36
  properties: declared(params, include_missing: false),
37
37
  }
@@ -11,9 +11,10 @@ module Labimotion
11
11
 
12
12
  case voc['source']
13
13
  when Labimotion::Prop::ELEMENT
14
- if voc['identifier'] == 'element.name'
14
+ voc['source_name'] = ElementKlass.find_by(identifier: voc['source_id'])&.label
15
+ # if voc['identifier'] == 'element.name'
15
16
  # voc['source_name'] = ElementKlass.find_by(identifier: voc['source_id'])&.name
16
- end
17
+ # end
17
18
  when Labimotion::Prop::SEGMENT
18
19
  voc['source_name'] = SegmentKlass.find_by(identifier: voc['source_id'])&.label
19
20
  when Labimotion::Prop::DATASET
@@ -127,11 +127,12 @@ module Labimotion
127
127
  attributes['properties']['uuid'] = uuid
128
128
  attributes['uuid'] = uuid
129
129
  attributes['klass_uuid'] = properties['klass_uuid']
130
- element.update(attributes)
130
+ element.update_columns(attributes)
131
131
  end
132
132
  element.save_segments(segments: params[:segments], current_user_id: current_user.id)
133
133
  element.reload
134
134
  element.properties = update_vocabularies(element.properties, current_user, element)
135
+ ## element.user_for_revision = current_user
135
136
  element.save!
136
137
  element
137
138
  rescue StandardError => e
@@ -55,7 +55,7 @@
55
55
  "id": 4,
56
56
  "identifier": "user-name",
57
57
  "name": "creator",
58
- "label": "creator",
58
+ "label": "Creator",
59
59
  "field_type": "text",
60
60
  "opid": 9,
61
61
  "term_id": "NCIT_C42628",
@@ -43,6 +43,7 @@ module Labimotion
43
43
  released_by: released_by,
44
44
  uuid: uuid,
45
45
  version: version,
46
+ created_by: updated_by,
46
47
  properties_release: properties_release,
47
48
  released_at: released_at
48
49
  }
@@ -8,6 +8,8 @@ module Labimotion
8
8
  after_create :create_vault
9
9
  after_update :save_to_vault
10
10
  before_destroy :delete_attachments
11
+
12
+ ## attr_accessor :user_for_revision
11
13
  end
12
14
 
13
15
  def create_vault
@@ -19,6 +21,7 @@ module Labimotion
19
21
  uuid: uuid,
20
22
  klass_uuid: klass_uuid,
21
23
  properties: properties,
24
+ ## created_by: user_for_revision&.id,
22
25
  properties_release: properties_release
23
26
  }
24
27
  attributes["#{Labimotion::Utils.element_name_dc(self.class.name)}_id"] = id
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '2.0.0.rc6'
5
+ VERSION = '2.0.0.rc7'
6
6
  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: 2.0.0.rc6
4
+ version: 2.0.0.rc7
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: 2025-02-21 00:00:00.000000000 Z
12
+ date: 2025-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails