glossarist 2.0.4 → 2.0.5

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: 93a350e5e964f972f6b37865cf7cb7d452b0e8281429718b7f8121feceaccd2d
4
- data.tar.gz: a474d840ee6d35ee6781f252f678b45fc05835b9915588b151715fe8ef8d5874
3
+ metadata.gz: 32dd0617dca310b2979fc5d2afb81888c7ec39c09da98c2a5d0a34da56d170b3
4
+ data.tar.gz: 86be4aa4175439dd7cd85d63673a3db85813fde697733913f819eaa395ad66d5
5
5
  SHA512:
6
- metadata.gz: 75e5f037aa510ad73388b255039c6256d38a057387eb9584f2d3412635f9701719ac8fb1a91be476a8091543cd2366598e4831a84ee066e85fa24173e361117a
7
- data.tar.gz: 073b9bd4562d657d7ccfe8adde06de7727e5bd14c51e8cbcbdeef7924619dcee2b23f51538e67e6a859e00f4b15933b631c2d315abaad4e8a20d5fb200842efb
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 = ManagedConcept.new(concept_hash)
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)
@@ -8,6 +8,7 @@ module Glossarist
8
8
 
9
9
  DEFAULT_CLASSES = {
10
10
  localized_concept: Glossarist::LocalizedConcept,
11
+ managed_concept: Glossarist::ManagedConcept,
11
12
  }.freeze
12
13
 
13
14
  attr_reader :registered_classes
@@ -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(ManagedConcept.new(managed_concept))
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(ManagedConcept.new(data: { id: id }))
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
@@ -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
- ManagedConcept.new(generate_v2_concept_hash(concept_hash))
13
+ Config.class_for(:managed_concept).new(generate_v2_concept_hash(concept_hash))
14
14
  end
15
15
 
16
16
  private
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.0.4"
7
+ VERSION = "2.0.5"
8
8
  end
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
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-26 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: relaton