labimotion 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 905de9f283f00c1f3e7976bd55c0888a826d70ab81dfd3e194479e78e5f94844
4
- data.tar.gz: b513e705204af46949c78b2510ade676319c6bc71fc315474e28440381d7d629
3
+ metadata.gz: b432c8afff71beea08329d10e1d97c4c786b070ade3cdf877d70575b9a95d9f6
4
+ data.tar.gz: b3724326dfd1fed70ceb38e849f1d378c8918f674018475ed582660a3958d0d6
5
5
  SHA512:
6
- metadata.gz: 56d99bf9f393d27a60ee1c6513f71df26822b3514daa9d7cc27a5b2a507227f26b06b5eb38f4d7531f35e453d153bf3527d60a60b8485357df6565a0149c000d
7
- data.tar.gz: dd132a8553f99e35f72bdcc37fcdba945858ec4ebd6f4c167906b8909135f6750ba0e49d83fd7af7419e7afb4f0d5421ae59d154db231e8b425e77a1c9f0d1eb
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,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.7' 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.7
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