labimotion 1.5.0.rc1 → 1.5.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/labimotion/apis/vocabulary_api.rb +9 -8
- data/lib/labimotion/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c27e1abca5ba7bf25eb28196a873d27529c9f15a642c68359f548ab8908eb53
|
4
|
+
data.tar.gz: 2aec966843e9e8e1665afd6e6c874965bb7790d7a919802bb942c06548ce602a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e7c44330b99cb08d05a3f2402566bd6cde2e384d917e9a9ebd19963f5261ea8e08422d932b11d551b81e23b9c202896ab169091fd680eb962b1d6deb4f9a902
|
7
|
+
data.tar.gz: c7fb2ab0e3eead1f32601ad3b4b952ad9d45e56540f9add8e7520eb6790bc464a6778d515e002d6050dfd5f7b0b85fdac7a22bf6a06b5c3c7111d9a64cc6e9be
|
@@ -48,15 +48,16 @@ module Labimotion
|
|
48
48
|
get do
|
49
49
|
# merged_data = []
|
50
50
|
# Dir.glob(Rails.public_path.join('generic', 'vocabularies', '*.json')).each do |file_path|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
merged_data = []
|
52
|
+
Dir.glob(Rails.public_path.join('generic', 'vocabularies', '*.json')).each do |file_path|
|
53
|
+
file_content = File.read(file_path)
|
54
|
+
json_data = JSON.parse(file_content)
|
55
|
+
merged_data.concat(json_data)
|
56
|
+
end
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
combined_data = Labimotion::VocabularyEntity.represent(vocabularies, serializable: true)
|
58
|
+
list = Labimotion::Vocabulary.all.sort_by { |e| e.name }
|
59
|
+
data = Labimotion::VocabularyEntity.represent(list, serializable: true)
|
60
|
+
combined_data = merged_data + data
|
60
61
|
return { mc: 'ss00', data: combined_data }
|
61
62
|
rescue StandardError => e
|
62
63
|
Labimotion.log_exception(e, current_user)
|
data/lib/labimotion/version.rb
CHANGED
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.5.0.
|
4
|
+
version: 1.5.0.rc2
|
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-
|
12
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|