labimotion 1.4.0.2 → 1.4.1

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: 5564b71b1b531e05ab523719dbd1a052c19828c86921f17381ca545554f2c514
4
- data.tar.gz: ee3b1e84d1aff2619a9ab65901c0f6c20af7288b3b6ef6f7ec49843dd78a543e
3
+ metadata.gz: a1c30f358902beeb863766ddb2ee02b980b3cca7055f45babe20fb4211277772
4
+ data.tar.gz: 86e1e46884b26fbfff1a91618698ab29072940109f9bc7c3d114b48a9b93ee86
5
5
  SHA512:
6
- metadata.gz: a8cfa29e6fbc0ed90c8bec7e581286f2921c461c0ba8fd9b957d98cd88287630f46fe86ab7f86404afd4379623e66296e23e858746b050b66ad76f3290799792
7
- data.tar.gz: af817bdab6d263afbb26b9efb7313ab505d3b56727e97b7c31149f139bfe6c45b26650ebcabc4614a4e367ff10f6719ffbedb6b9c5acae580c301a50c5379f15
6
+ metadata.gz: 41655a864b15b848116b370964ae6a05c707512d6ba80987cdec1f392d3fb647476fcf119612f116a2923c4992e32b00127371ac8a77d6e7de6cf1dc94773dbd
7
+ data.tar.gz: 8308707ad72ac2ebd38c725bc1336151712b5900fa4f35429674ee54f26cbe6fcc7ed43ef71777b6dd069701411540c776a7f183b183d147c1a3658a124e12a7
@@ -125,7 +125,7 @@ module Labimotion
125
125
 
126
126
  name = response&.headers && response&.headers['content-disposition']&.split('=')&.last
127
127
  filename = oat.filename
128
- name = "#{File.basename(filename, '.*')}.zip" if name.nil?
128
+ name = "#{File.basename(filename, '.*')}.zip"
129
129
 
130
130
  att = Attachment.new(
131
131
  filename: name,
@@ -172,7 +172,7 @@ module Labimotion
172
172
  Labimotion::ConState::ERROR
173
173
  end
174
174
  rescue StandardError => e
175
- Labimotion::Converter.logger.error ["process fail: #{id}", e.message, *e.backtrace].join($INPUT_RECORD_SEPARATOR)
175
+ Labimotion::Converter.logger.error ["process fail: [#{data[:a]&.id}]", e.message, *e.backtrace].join($INPUT_RECORD_SEPARATOR)
176
176
  Labimotion::ConState::ERROR
177
177
  ensure
178
178
  FileUtils.rm_f(ofile)
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '1.4.0.2'
5
+ VERSION = '1.4.1'
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: 1.4.0.2
4
+ version: 1.4.1
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-09-06 00:00:00.000000000 Z
12
+ date: 2024-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -38,10 +38,8 @@ files:
38
38
  - lib/labimotion/apis/generic_dataset_api.rb
39
39
  - lib/labimotion/apis/generic_element_api.rb
40
40
  - lib/labimotion/apis/generic_klass_api.rb
41
- - lib/labimotion/apis/labimotion_api.rb
42
41
  - lib/labimotion/apis/labimotion_hub_api.rb
43
42
  - lib/labimotion/apis/segment_api.rb
44
- - lib/labimotion/apis/vocabulary_api.rb
45
43
  - lib/labimotion/collection/export.rb
46
44
  - lib/labimotion/collection/import.rb
47
45
  - lib/labimotion/conf.rb
@@ -1,13 +0,0 @@
1
- # app/api/labimotion/central_api.rb
2
- module Labimotion
3
- class LabimotionAPI < Grape::API
4
- mount Labimotion::ConverterAPI
5
- mount Labimotion::GenericKlassAPI
6
- mount Labimotion::GenericElementAPI
7
- mount Labimotion::GenericDatasetAPI
8
- mount Labimotion::SegmentAPI
9
- mount Labimotion::LabimotionHubAPI
10
- mount Labimotion::StandardLayerAPI
11
- mount Labimotion::VocabularyAPI
12
- end
13
- end
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'labimotion/version'
4
-
5
- module Labimotion
6
- # Generic Element API
7
- class VocabularyAPI < Grape::API
8
- include Grape::Kaminari
9
- helpers Labimotion::ParamHelpers
10
-
11
- resource :vocab do
12
- namespace :save do
13
- desc 'Save vocabularies'
14
- params do
15
- use :std_layer_save
16
- end
17
- before do
18
- rescue ActiveRecord::RecordNotFound
19
- error!('404 Not Found', 404)
20
- end
21
- post do
22
- rescue ActiveRecord::RecordInvalid => e
23
- { error: e.message }
24
- end
25
- end
26
-
27
- namespace :field_klasses do
28
- desc 'get all field klasses for admin function'
29
- get do
30
- list = Labimotion::Vocabulary.all.sort_by { |e| e.name }
31
- present list, with: Labimotion::VocabularyEntity, root: 'klass'
32
- rescue StandardError => e
33
- Labimotion.log_exception(e, current_user)
34
- []
35
- end
36
- end
37
-
38
- end
39
- end
40
- end