glossarist 2.3.2 → 2.3.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: 0667bd53eab8d4a86ef3376ddb095b7dafe5ce903b5df39683f279ef51c01a7e
4
- data.tar.gz: 66a281d1f6132de430a6c24706eeb564c98c10f97cfac4751811c33dae2fdcc6
3
+ metadata.gz: e49a6e0ff48ff126c32d77d0d455e5c26e9182416c55d258ab4a115282f32476
4
+ data.tar.gz: 3642c9cdd60fb8ed81575a92b3622c711cac6382c0f6f4b0b5b9a2f063f243da
5
5
  SHA512:
6
- metadata.gz: 2eb5758d7c7528f8cf8759924e9b2e6e5872ea58ef4c63b86365265f884f99ac4899caf62003bd01b2cb9ff8f32d914775df95820f21907c8f5cb80c306009a4
7
- data.tar.gz: 43b9635c121ca5e910611a46109a3353c2290ef8e901bec2b1a55e37e03d707e28cfb927ed6a20c9e6e85df9bc708801552bab821d20f63dff71bce832055e14
6
+ metadata.gz: 449d9b34b2d01404f4e47716e803e6cd3195a70ac4be9aee20e00a2c776ffebc9c37e3170477898107b01401e3aec17f20e9af3f057d749a95a53c106299c935
7
+ data.tar.gz: 5f01ab6a96f4d1e7805ece97c00d4b179b6ab01a9b2636d76d707842d68d15d3d2c576cab81fe71f0d4119e399f72890d104424c98e50b2189a477e157bc84f0
data/Gemfile CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "pry", "~> 0.14.0"
6
- gem "rake", "~> 13.0"
7
- gem "rspec", "~> 3.10"
5
+ gem "pry"
6
+ gem "rake"
7
+ gem "rspec"
8
+ gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
8
9
 
9
10
  gemspec
data/glossarist.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency "lutaml-model", "~> 0.6"
33
+ spec.add_dependency "lutaml-model", "~> 0.7"
34
34
  spec.add_dependency "relaton", "~> 1.19"
35
35
  spec.add_dependency "thor"
36
36
  end
@@ -44,6 +44,10 @@ module Glossarist
44
44
  data.sources
45
45
  end
46
46
 
47
+ def sources=(value)
48
+ data.sources = value
49
+ end
50
+
47
51
  def examples
48
52
  data.examples
49
53
  end
@@ -3,11 +3,11 @@ module Glossarist
3
3
  include Glossarist::Utilities::CommonFunctions
4
4
 
5
5
  attribute :dates, ConceptDate, collection: true
6
- attribute :definition, DetailedDefinition, collection: true
7
- attribute :examples, DetailedDefinition, collection: true
6
+ attribute :definition, DetailedDefinition, collection: true, initialize_empty: true
7
+ attribute :examples, DetailedDefinition, collection: true, initialize_empty: true
8
8
  attribute :id, :string
9
9
  attribute :lineage_source_similarity, :integer
10
- attribute :notes, DetailedDefinition, collection: true
10
+ attribute :notes, DetailedDefinition, collection: true, initialize_empty: true
11
11
  attribute :release, :string
12
12
  attribute :sources, ConceptSource, collection: true
13
13
  attribute :terms, Designation::Base, collection: true
@@ -25,11 +25,11 @@ module Glossarist
25
25
 
26
26
  yaml do
27
27
  map :dates, to: :dates
28
- map :definition, to: :definition, render_nil: true
29
- map :examples, to: :examples, render_nil: true
28
+ map :definition, to: :definition, value_map: { to: { empty: :empty } }
29
+ map :examples, to: :examples, value_map: { to: { empty: :empty } }
30
30
  map :id, to: :id
31
31
  map %i[lineage_source_similarity lineageSourceSimilarity], to: :lineage_source_similarity
32
- map :notes, to: :notes, render_nil: true
32
+ map :notes, to: :notes, value_map: { to: { empty: :empty } }
33
33
  map :release, to: :release
34
34
  map :sources, to: :sources
35
35
  map :terms, to: :terms,
@@ -48,7 +48,7 @@ module Glossarist
48
48
  end
49
49
 
50
50
  def terms_to_yaml(model, doc)
51
- doc["terms"] = model.terms.map(&:to_yaml_hash)
51
+ doc["terms"] = model.terms&.map(&:to_yaml_hash)
52
52
  end
53
53
 
54
54
  def date_accepted
@@ -4,7 +4,7 @@ module Glossarist
4
4
  class ManagedConcept < Lutaml::Model::Serializable
5
5
  include Glossarist::Utilities::CommonFunctions
6
6
 
7
- attribute :data, ManagedConceptData
7
+ attribute :data, ManagedConceptData, default: -> { ManagedConceptData.new }
8
8
 
9
9
  attribute :related, RelatedConcept, collection: true
10
10
  attribute :dates, ConceptDate, collection: true
@@ -19,7 +19,7 @@ module Glossarist
19
19
  end
20
20
 
21
21
  def id_to_yaml(model, doc)
22
- value = model.id || model.identifier
22
+ value = model.id
23
23
  doc["identifier"] = value if value && !doc["identifier"]
24
24
  end
25
25
 
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.3.2"
7
+ VERSION = "2.3.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.3.2
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-13 00:00:00.000000000 Z
11
+ date: 2025-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.6'
19
+ version: '0.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.6'
26
+ version: '0.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: relaton
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.3.27
140
+ rubygems_version: 3.5.22
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Concept models for terminology glossaries conforming ISO 10241-1.