glossarist 2.3.1 → 2.3.3

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: 04b9e5d5f00de57e8d2c9aff73d25697758be004f33c5d02c0fdbf6254c69521
4
- data.tar.gz: bca6a55ce2c23c374ab5d0e8745803f5ea77af3535ab94835726eeb06f331600
3
+ metadata.gz: a75cc5452007137935ee367597782e90653e258410395ec0999759c476b17951
4
+ data.tar.gz: 288b8e2296bc38eec16a23d98cde09c8d8bfb3b80c9faa6ae9d8e93b74f9e602
5
5
  SHA512:
6
- metadata.gz: 1fa6e324a0f5a72a682a30492fa440731570da4f1b976b293318bd331b888743702e8241b9135a8a4aacc56cbdf266ca1319de9519fa8c0c09f56d9e9fa0e308
7
- data.tar.gz: '09cc267101990c505ffeb3798887fc79d42b8c0aef6aa25424971095d5c745fa1a9bd9142f99adf7c012c7dce0d670e07ddfb932d85ca65603d6c5c9b9cbbd0f'
6
+ metadata.gz: d96f49186c0afc7908fc13300fba02376e50a9a216efa49e3e196a7bbd3aa469507469c86d98fecdd63a8ee4c37bbf8fd9f8ac8ca912f1bb80008b4cefd41342
7
+ data.tar.gz: ece9076469e7989b2733016466622cd7371b633fb6f26880c0d184716bd8a7040a78378d1629a3de65084ce34b07ab4656424cb79f951c08aab97294a512b2de
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/exe/glossarist CHANGED
@@ -21,12 +21,14 @@ class GlossaristCommand < Thor
21
21
 
22
22
  concept_set = Glossarist::ConceptSet.new(options[:concepts_path], assets)
23
23
  latex_str = concept_set.to_latex(latex_concepts_file)
24
+ output_latex(latex_str)
25
+ end
24
26
 
27
+ def output_latex(latex_str)
25
28
  output_file_path = options[:output_file]
29
+
26
30
  if output_file_path
27
- File.open(output_file_path, "w") do |file|
28
- file.puts latex_str
29
- end
31
+ File.open(output_file_path, "w") { |file| file.puts latex_str }
30
32
  else
31
33
  puts latex_str
32
34
  end
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.5.0"
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
@@ -15,14 +15,13 @@ module Glossarist
15
15
  map :data, to: :data
16
16
  map :termid, to: :termid
17
17
  map :subject, to: :subject
18
- map :non_verb_rep, to: :non_verb_rep
19
- map :extension_attributes, to: :extension_attributes
20
- map :lineage_source, to: :lineage_source
18
+ map %i[non_verb_rep nonVerbRep], to: :non_verb_rep
19
+ map %i[extension_attributes extensionAttributes], to: :extension_attributes
20
+ map %i[lineage_source lineageSource], to: :lineage_source
21
21
  map :localizations, to: :localizations
22
- map :extension_attributes, to: :extension_attributes
22
+ map %i[extension_attributes extensionAttributes], to: :extension_attributes
23
23
 
24
- map :date_accepted,
25
- with: { from: :date_accepted_from_yaml, to: :date_accepted_to_yaml }
24
+ map %i[date_accepted dateAccepted], with: { from: :date_accepted_from_yaml, to: :date_accepted_to_yaml }
26
25
  map :uuid, to: :uuid, with: { to: :uuid_to_yaml, from: :uuid_from_yaml }
27
26
  map :id, to: :id, with: { to: :id_to_yaml, from: :id_from_yaml }
28
27
  map :identifier, to: :id, with: { to: :id_to_yaml, from: :id_from_yaml }
@@ -28,7 +28,7 @@ module Glossarist
28
28
  map :definition, to: :definition, render_nil: true
29
29
  map :examples, to: :examples, render_nil: true
30
30
  map :id, to: :id
31
- map :lineage_source_similarity, to: :lineage_source_similarity
31
+ map %i[lineage_source_similarity lineageSourceSimilarity], to: :lineage_source_similarity
32
32
  map :notes, to: :notes, render_nil: true
33
33
  map :release, to: :release
34
34
  map :sources, to: :sources
@@ -36,11 +36,11 @@ module Glossarist
36
36
  with: { from: :terms_from_yaml, to: :terms_to_yaml }
37
37
  map :related, to: :related
38
38
  map :domain, to: :domain
39
- map :language_code, to: :language_code
40
- map :entry_status, to: :entry_status
41
- map :review_date, to: :review_date
42
- map :review_decision_date, to: :review_decision_date
43
- map :review_decision_event, to: :review_decision_event
39
+ map %i[language_code languageCode], to: :language_code
40
+ map %i[entry_status entryStatus], to: :entry_status
41
+ map %i[review_date reviewDate], to: :review_date
42
+ map %i[review_decision_date reviewDecisionDate], to: :review_decision_date
43
+ map %i[review_decision_event reviewDecisionEvent], to: :review_decision_event
44
44
  end
45
45
 
46
46
  def terms_from_yaml(model, value)
@@ -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
@@ -5,7 +5,7 @@ module Glossarist
5
5
 
6
6
  yaml do
7
7
  map :path, to: :path
8
- map :localized_concepts_path, to: :localized_concepts_path
8
+ map %i[localized_concepts_path localizedConceptsPath], to: :localized_concepts_path
9
9
  end
10
10
 
11
11
  def load_from_files(collection: nil)
@@ -9,8 +9,8 @@ module Glossarist
9
9
 
10
10
  yaml do
11
11
  map :type, to: :type
12
- map :normative_status, to: :normative_status
13
- map :geographical_area, to: :geographical_area
12
+ map %i[normative_status normativeStatus], to: :normative_status
13
+ map %i[geographical_area geographicalArea], to: :geographical_area
14
14
  map :designation, to: :designation
15
15
  end
16
16
 
@@ -16,8 +16,8 @@ module Glossarist
16
16
  yaml do
17
17
  map :type, to: :type, render_default: true
18
18
  map :prefix, to: :prefix
19
- map :usage_info, to: :usage_info
20
- map :grammar_info, to: :grammar_info
19
+ map %i[usage_info usageInfo], to: :usage_info
20
+ map %i[grammar_info grammarInfo], to: :grammar_info
21
21
  end
22
22
 
23
23
  def self.of_yaml(hash, options = {})
@@ -12,9 +12,7 @@ module Glossarist
12
12
  map :gender, to: :gender
13
13
  map :number, to: :number
14
14
 
15
- map :part_of_speech,
16
- with: { to: :part_of_speech_to_yaml,
17
- from: :part_of_speech_from_yaml }
15
+ map %i[part_of_speech partOfSpeech], with: { to: :part_of_speech_to_yaml, from: :part_of_speech_from_yaml }
18
16
  Glossarist::GlossaryDefinition::GRAMMAR_INFO_BOOLEAN_ATTRIBUTES.each do |bool_attr|
19
17
  map bool_attr,
20
18
  with: { to: :"part_of_speech_#{bool_attr}_to_yaml",
@@ -6,7 +6,7 @@ module Glossarist
6
6
 
7
7
  yaml do
8
8
  map :classification, to: :classification
9
- map :review_type, to: :review_type
9
+ map %i[review_type reviewType], to: :review_type
10
10
  end
11
11
 
12
12
  alias_method :status=, :entry_status=
@@ -28,8 +28,7 @@ module Glossarist
28
28
  with: { to: :identifier_to_yaml, from: :identifier_from_yaml }
29
29
  map :related, to: :related
30
30
  map :dates, to: :dates
31
- map :date_accepted,
32
- with: { from: :date_accepted_from_yaml, to: :date_accepted_to_yaml }
31
+ map %i[date_accepted dateAccepted], with: { from: :date_accepted_from_yaml, to: :date_accepted_to_yaml }
33
32
  map :status, to: :status
34
33
 
35
34
  map :uuid, to: :uuid, with: { from: :uuid_from_yaml, to: :uuid_to_yaml }
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.3.1"
7
+ VERSION = "2.3.3"
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.1
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-27 00:00:00.000000000 Z
11
+ date: 2025-03-07 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.5.0
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.5.0
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.