labimotion 2.1.0.rc11 → 2.1.0.rc13

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: b62609cc21d0cca64e84a149f6d81af0656cc3e95d5086e75f0f3b6baca27472
4
- data.tar.gz: be1fa743e3c305cc25130deed4fe4f5bbe567fa0b07e93a9429412c981c08c64
3
+ metadata.gz: e2d91570fdadd94114fe2f9d718500c5b63952aedc8d4b3c70284f50f0332aa7
4
+ data.tar.gz: 2aa299d45b1136966622d165fbb4f09416d9f13b9d7e11c8a857c14c6499dfe4
5
5
  SHA512:
6
- metadata.gz: b5dafb066cf6137a934e2dfb67d532c7edbf84c4dd46f076d4f9055d4d23ae61cb0568d65a99c3ee34ded0f658a4daf9ec1cffad8cffa9f25b089774f5a3c424
7
- data.tar.gz: d085a36adef5d13a3dbfa97c4979c83afea948c17bff059c9050b88043ab0b927b9c9dea693e7057185669e632baba2be392739f535b97459e8d91626d909507
6
+ metadata.gz: 52896a77e3e27514c0216b081e1899878097f313dab59051bd6a2916752f50bdf4b55d11dbf87c08484c8c4a8e298415dcffe2257b6fd8585ec09de7f064931c
7
+ data.tar.gz: 5e870746f14902a8e23dd42be15c18f0eb798cc313428f917e8dd8d06ccc0b601e04bae967ffd5a008274e2f1542f7c292e28e228846c5a1b70fed027b68a62c
@@ -21,6 +21,7 @@ module Labimotion
21
21
  expose! :type
22
22
  expose! :uuid
23
23
  expose! :user_labels
24
+ expose! :preview_attachment # align with eln change
24
25
  end
25
26
 
26
27
  with_options(anonymize_below: 10) do
@@ -37,10 +37,9 @@ module Labimotion
37
37
  end
38
38
 
39
39
  def sample_url
40
- protocol = Rails.env.production? ? 'https' : 'http'
41
- host = ENV['PUBLIC_URL'] || 'localhost:3000'
40
+ host = ENV['PUBLIC_URL'] || 'http://localhost:3000'
42
41
  api = 'mydb/collection/all/sample'
43
- "#{protocol}://#{host}/#{api}"
42
+ "#{host}/#{api}"
44
43
  end
45
44
 
46
45
  def build_layers
@@ -60,6 +60,12 @@ module Labimotion
60
60
  after_create :update_counter
61
61
  before_destroy :delete_attachment
62
62
 
63
+ # align with eln change on preview attachment
64
+ def preview_attachment
65
+ image_atts = attachments.select(&:type_image?)
66
+ image_atts[0] || attachments[0]
67
+ end
68
+
63
69
  def user_labels
64
70
  tag&.taggable_data&.fetch('user_labels', nil)
65
71
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '2.1.0.rc11'
5
+ VERSION = '2.1.0.rc13'
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.1.0.rc11
4
+ version: 2.1.0.rc13
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-11-05 00:00:00.000000000 Z
12
+ date: 2025-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: caxlsx