glossarist 2.0.4 → 2.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32dd0617dca310b2979fc5d2afb81888c7ec39c09da98c2a5d0a34da56d170b3
|
4
|
+
data.tar.gz: 86be4aa4175439dd7cd85d63673a3db85813fde697733913f819eaa395ad66d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a1a28e3ce040c3b2b2b31ee8f61fe831f5bdacc9c1105c42bde7efe7404238e018509e3805a50a31df34f36d8dd7e73c3d15c7921bd0d65d2fc9463d86cc14a
|
7
|
+
data.tar.gz: 1dfffaf4e40421827785ec0f6eb288cc1733a7661cf5a9352000eafa127d4fd6427a6033c37b87d8115414ebc0433091c0c94fedd9c867369d87d2893d2f69ed
|
@@ -36,7 +36,7 @@ module Glossarist
|
|
36
36
|
concept_hash = Psych.safe_load(File.read(filename), permitted_classes: [Date, Time])
|
37
37
|
concept_hash["uuid"] = concept_hash["id"] || File.basename(filename, ".*")
|
38
38
|
|
39
|
-
concept =
|
39
|
+
concept = Config.class_for(:managed_concept).new(concept_hash)
|
40
40
|
concept.localized_concepts.each do |_lang, id|
|
41
41
|
localized_concept = load_localized_concept(id)
|
42
42
|
concept.add_l10n(localized_concept)
|
data/lib/glossarist/config.rb
CHANGED
@@ -17,7 +17,7 @@ module Glossarist
|
|
17
17
|
|
18
18
|
def managed_concepts=(managed_concepts = [])
|
19
19
|
managed_concepts.each do |managed_concept|
|
20
|
-
store(
|
20
|
+
store(Config.class_for(:managed_concept).new(managed_concept))
|
21
21
|
end
|
22
22
|
|
23
23
|
@managed_concepts.values
|
@@ -53,7 +53,7 @@ module Glossarist
|
|
53
53
|
# ManagedConcept ID
|
54
54
|
# @return [ManagedConcept]
|
55
55
|
def fetch_or_initialize(id)
|
56
|
-
fetch(id) or store(
|
56
|
+
fetch(id) or store(Config.class_for(:managed_concept).new(data: { id: id }))
|
57
57
|
end
|
58
58
|
|
59
59
|
# Adds concept to the collection. If collection contains a concept with
|
data/lib/glossarist/v1_reader.rb
CHANGED
@@ -10,7 +10,7 @@ module Glossarist
|
|
10
10
|
|
11
11
|
def load_concept_from_file(filename)
|
12
12
|
concept_hash = Psych.safe_load(File.read(filename), permitted_classes: [Date])
|
13
|
-
|
13
|
+
Config.class_for(:managed_concept).new(generate_v2_concept_hash(concept_hash))
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
data/lib/glossarist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glossarist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton
|