glossarist 2.14.11 → 2.14.12

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: a5d6954a79534063c54006d7d1037dcee6c9dd6ee0f12c1158501f80edee7cd7
4
- data.tar.gz: 2b61ce856d91dca595a119e474c050345c3f99e47841d3d470da78ea4c5124fb
3
+ metadata.gz: a263d4f4ee789ba4a6b81d2ffe7bb2d7d381e30d0d4e851ef2cbd67501f1b25d
4
+ data.tar.gz: b28c1c1fadec0430ace72a417e7e66c0483c9a6a44e1f73fb7943cf54de12eda
5
5
  SHA512:
6
- metadata.gz: 4c4e3dd3d497a4be0de1a8dc8674d7bea41cca68a12ef512b08c606a16233b2d194eb748e7cc3a00832d7f914f219768c23b9e606f431a651394c285e0d30951
7
- data.tar.gz: cc0a8af8513ceaff32ef4bc110fe70e329571718210b05921930c93cc61735fba09315c182aaae353aafe2e019cced5c9e9964c357796c175fedd498c4b3b670
6
+ metadata.gz: d4480bd3116e28f3a919d46f5ef104d8d99f98325f62cb3c4d0a3b6172fe1e82229e4762014e5d06e8b7e550b15883e52675a7a18eda70b3af39519afed05d88
7
+ data.tar.gz: 01d698f94df0c7d8e47cc9af6c7ff50a6e2936b55eea5490df454fffde0adf1779c94a0196855b22a0c4fffca1726574b1fcf889d7bf91a423145480d69a8b8b
@@ -113,8 +113,8 @@ module Glossarist
113
113
  # Remove a hyperedge. Caller-supplied predicate selects which to
114
114
  # remove. The per-file storage is NOT modified by this method —
115
115
  # use #delete_relation_file to remove a single file.
116
- def remove_relations_if(&predicate)
117
- @relations&.reject!(&predicate)
116
+ def remove_relations_if(&)
117
+ @relations&.reject!(&)
118
118
  end
119
119
 
120
120
  # ── Concepts ──
@@ -388,7 +388,11 @@ module Glossarist
388
388
  rescue Psych::SyntaxError => e
389
389
  raise Errors::ParseError.new(filename: f, line: e.line)
390
390
  rescue Lutaml::Model::InvalidFormatError => e
391
- raise Errors::ParseError.new(filename: f, message: e.message)
391
+ # A file whose stream parses to nothing is skipped, not fatal:
392
+ # lutaml-model raises for fully-invalid streams so the collection
393
+ # can keep loading the rest of the dataset.
394
+ warn "Skipping unparseable concept file #{f}: #{e.message[0, 80]}"
395
+ next
392
396
  rescue Encoding::InvalidByteSequenceError => e
393
397
  raise Errors::LoadError.new(path: f, reason: e.message)
394
398
  end
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.14.11"
7
+ VERSION = "2.14.12"
8
8
  end
data/lib/glossarist.rb CHANGED
@@ -9,22 +9,17 @@ require "lutaml/model"
9
9
  require "lutaml/store"
10
10
 
11
11
  # glossarist datasets on disk are written in yeptris dump form (long plain
12
- # scalars unwrapped), so a silent fallback to Psych would reformat every
13
- # stored concept on the next save. Keep the native lane; hosts opt out via
14
- # LUTAML_YAML (the consumer-neutral switch, lutaml-model#1115) or its
15
- # legacy FONTIST_YAML spelling.
16
- native_lane = %w[LUTAML_YAML FONTIST_YAML].none? { |k| ENV.key?(k) } ||
17
- %w[LUTAML_YAML FONTIST_YAML].any? { |k| ENV[k] == "yeptris" }
18
- if native_lane
19
- Lutaml::Model::Config.instance.set_adapter(:yaml, :yeptris)
20
- # The yamls (multi-document stream) lane ships in lutaml-model 0.8.163+;
21
- # older releases validate!-reject the adapter type with ArgumentError —
22
- # stay on the default stream adapter there.
23
- begin
24
- Lutaml::Model::Config.instance.set_adapter(:yamls, :yeptris)
25
- rescue ArgumentError
26
- nil
27
- end
12
+ # scalars unwrapped), so a Psych fallback would reformat every stored
13
+ # concept on the next save. glossarist always rides the native lane —
14
+ # neither LUTAML_YAML nor FONTIST_YAML can flip it.
15
+ Lutaml::Model::Config.instance.set_adapter(:yaml, :yeptris)
16
+ # The yamls (multi-document stream) lane ships in lutaml-model 0.8.163+;
17
+ # older releases validate!-reject the adapter type with ArgumentError —
18
+ # stay on the default stream adapter there.
19
+ begin
20
+ Lutaml::Model::Config.instance.set_adapter(:yamls, :yeptris)
21
+ rescue ArgumentError
22
+ nil
28
23
  end
29
24
 
30
25
  module Glossarist
@@ -84,7 +79,7 @@ module Glossarist
84
79
  autoload :ManagedConcept, "glossarist/managed_concept"
85
80
  autoload :ManagedConceptCollection, "glossarist/managed_concept_collection"
86
81
  autoload :ManagedConceptData, "glossarist/managed_concept_data"
87
- autoload :Mentions, "glossarist/mentions"
82
+ autoload :Mentions, "glossarist/mentions"
88
83
  autoload :NonVerbRep, "glossarist/non_verb_rep"
89
84
  autoload :Pronunciation, "glossarist/pronunciation"
90
85
  autoload :RelatedConcept, "glossarist/related_concept"
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.14.11
4
+ version: 2.14.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-04 00:00:00.000000000 Z
11
+ date: 2026-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model