labimotion 1.0.6 → 1.0.9

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: 4cb214fd84c4c884358893ea3a5c7af5504bf3c9d366747d95c4c86aa6f2c42e
4
- data.tar.gz: 5ec0a7b4e10b6174ba9802648c9f9f15e85c03b491035d375b06ee85e25ce15e
3
+ metadata.gz: b432c8afff71beea08329d10e1d97c4c786b070ade3cdf877d70575b9a95d9f6
4
+ data.tar.gz: b3724326dfd1fed70ceb38e849f1d378c8918f674018475ed582660a3958d0d6
5
5
  SHA512:
6
- metadata.gz: 6c2c0a26c8c8ce05d44f976d1146464f72c1dd173529cff04fa9918863c8f074f69299d90d2d9fefafcd5628a5dd28d29ade1b5b9029b4aac88602f05d64db90
7
- data.tar.gz: 67bfe5f4e12b5b8412a95fd4124818dfb4da775baa2558e4934c4b8b86d79c43c0c65f51070e4893ef3cf857bfae2e3efd6061bbbd1b5b5759917bfed936568d
6
+ metadata.gz: 91081e8585e5c0073018c8492bec6257cf55506d707ab0fe0c0c8758d62916d869df4e6aad7435c6a55392dd31ef97b5b8913bcd0fcaf93de1d0a55cf6e06f94
7
+ data.tar.gz: b5f6c6d6aef7850c1c0e28048bdfc4b56851b9474e228b7851082ec64738b7424ea29ffa59c90c34c1698d6685f004af1028be95ef485dd4f4d5871542f8c615
@@ -15,6 +15,7 @@ module Labimotion
15
15
  expose! :properties
16
16
  expose! :properties_release
17
17
  expose! :short_label
18
+ expose! :thumb_svg
18
19
  expose! :type
19
20
  expose! :uuid
20
21
  end
@@ -101,13 +101,20 @@ module Labimotion
101
101
  end
102
102
 
103
103
  def thumb_svg
104
- image_atts = attachments.select do |a_img|
105
- a_img&.content_type&.match(Regexp.union(%w[jpg jpeg png tiff tif]))
106
- end
104
+ if Labimotion::IS_RAILS5 == true
105
+ image_atts = attachments.select do |a_img|
106
+ a_img&.content_type&.match(Regexp.union(%w[jpg jpeg png tiff tif]))
107
+ end
107
108
 
108
- attachment = image_atts[0] || attachments[0]
109
- preview = attachment.read_thumbnail if attachment
110
- preview && Base64.encode64(preview) || 'not available'
109
+ attachment = image_atts[0] || attachments[0]
110
+ preview = attachment.read_thumbnail if attachment
111
+ preview && Base64.encode64(preview) || 'not available'
112
+ else
113
+ image_atts = attachments.select(&:type_image?)
114
+ attachment = image_atts[0] || attachments[0]
115
+ preview = attachment&.read_thumbnail
116
+ (preview && Base64.encode64(preview)) || 'not available'
117
+ end
111
118
  end
112
119
 
113
120
 
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'labimotion/models/concerns/generic_klass_revisions'
3
+ require 'labimotion/models/concerns/workflow'
3
4
 
4
5
  module Labimotion
5
6
  class SegmentKlass < ApplicationRecord
@@ -1,7 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ ## Labimotion Version
3
4
  module Labimotion
4
5
  IS_RAILS5 = false
5
- VERSION = '0.1.14' if Labimotion::IS_RAILS5 == true
6
- VERSION = '1.0.6' if Labimotion::IS_RAILS5 == false
6
+ VERSION_ELN = '1.0.9'
7
+ VERSION_REPO = '0.3.1'
8
+
9
+ VERSION = Labimotion::VERSION_REPO if Labimotion::IS_RAILS5 == true
10
+ VERSION = Labimotion::VERSION_ELN 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: 1.0.6
4
+ version: 1.0.9
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-09-10 00:00:00.000000000 Z
12
+ date: 2023-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -34,7 +34,6 @@ extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - lib/labimotion.rb
37
- - lib/labimotion/api.rb
38
37
  - lib/labimotion/apis/converter_api.rb
39
38
  - lib/labimotion/apis/generic_dataset_api.rb
40
39
  - lib/labimotion/apis/generic_element_api.rb
@@ -96,9 +95,9 @@ files:
96
95
  - lib/labimotion/utils/serializer.rb
97
96
  - lib/labimotion/utils/utils.rb
98
97
  - lib/labimotion/version.rb
99
- homepage: https://github.com/phuang26/labimotion
98
+ homepage: https://gitlab.kit.edu/kit/labimotion/labimotion
100
99
  licenses:
101
- - MIT
100
+ - GPL-3.0
102
101
  metadata: {}
103
102
  post_install_message:
104
103
  rdoc_options: []
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ## This is the first version of the dataset class
4
- module Labimotion
5
- ## This is the first version of the dataset class
6
- class Api
7
- def initialize
8
- # Initialization code
9
- end
10
-
11
- def gget_data
12
- 'Hello, worlddddddddddddddddddddd!'
13
- end
14
-
15
- def self.hello
16
- 'Hellooooooooooooooooooooo!'
17
- end
18
- end
19
- end