glossarist 2.10.0 → 2.10.2

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: 483020f943aae466ffd07054d852c766673b71ca17c4289d59be667c2bd7fb4f
4
- data.tar.gz: 876d6fdcdf3c087a4c6487a48e81592a14317bde57047fb7087104b2093d4e4f
3
+ metadata.gz: ca7052a9422ffb06503b2e168e8b6bac1c1ed2fb814c82317d923acbdfa77e7e
4
+ data.tar.gz: 87e4729f1b8263e032c4e18bfd663ef3e0af53a14473e2499d1b6828e0b7d61c
5
5
  SHA512:
6
- metadata.gz: 3f7bca485b83de6c31bcf896f95d27007794e97eb54f1fc7136e7fa590b237d4a53735f9a136e624447bb886d6d5ff52b43a3adadbd3611dde296a06f2b214f7
7
- data.tar.gz: b7a489b23c7d504340cf7ae0c7bad68755d20cae57cacf8a6b340e2dde75a35fd64cce798157e9f0d4b0fc09a83d4f4fc94f7a58654d5cfda0c9aca835f77285
6
+ metadata.gz: 85077694000c2d75d7cd7ce1880b920f76f7fcbe9f4d7676e30a2dcb486f553d1d6ddf5cc21fba54b4fef02307dc906866062c080807df6e81c069269b833c30
7
+ data.tar.gz: 7cd8fd6e74a4006b6f66c22d98f067e21d58d65f74b1c5cc49307656537e4d3a4ff438a819e537a1d795f6fdefff5affe3255dacc9a5b7cc76dc9207d43f940b
@@ -269,7 +269,11 @@ module Glossarist
269
269
  end
270
270
 
271
271
  def load_legacy_localizations(managed_concept, lc_index, version = "3")
272
- l10n_class = version.to_s == "2" ? V2::LocalizedConcept : LocalizedConcept
272
+ l10n_class = case version.to_s
273
+ when "2" then V2::LocalizedConcept
274
+ when "3" then V3::LocalizedConcept
275
+ else LocalizedConcept
276
+ end
273
277
  lc_map = managed_concept.data.localized_concepts || {}
274
278
  lc_map.each_value do |uuid|
275
279
  lc_file = lc_index[uuid]
@@ -344,7 +348,7 @@ module Glossarist
344
348
  end
345
349
 
346
350
  def detect_version(raw)
347
- if (m = raw.match(/^schema_version:\s*v?(\d)/))
351
+ if (m = raw.match(/^schema_version:\s*['"]?v?(\d)/))
348
352
  m[1]
349
353
  else
350
354
  "2"
@@ -15,7 +15,7 @@ module Glossarist
15
15
 
16
16
  def check(context)
17
17
  extractor = ReferenceExtractor.new
18
- referenced_paths = Set.new
18
+ referenced_basenames = Set.new
19
19
 
20
20
  context.concepts.each do |concept|
21
21
  concept.localizations.each do |l10n|
@@ -23,19 +23,21 @@ module Glossarist
23
23
  next unless text
24
24
 
25
25
  extractor.extract_from_text(text).each do |ref|
26
- referenced_paths.add(ref.path) if ref.is_a?(AssetReference)
26
+ if ref.is_a?(AssetReference)
27
+ referenced_basenames.add(File.basename(ref.path))
28
+ end
27
29
  end
28
30
  end
29
31
  end
30
32
 
31
33
  extractor.extract_asset_refs_from_concept(concept).each do |ref|
32
- referenced_paths.add(ref.path)
34
+ referenced_basenames.add(File.basename(ref.path))
33
35
  end
34
36
  end
35
37
 
36
38
  issues = []
37
39
  context.asset_index.each_path do |path|
38
- next if referenced_paths.include?(path)
40
+ next if referenced_basenames.include?(File.basename(path))
39
41
 
40
42
  issues << issue(
41
43
  "Orphaned image: #{path} (not referenced by any concept)",
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.10.0"
7
+ VERSION = "2.10.2"
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.10.0
4
+ version: 2.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-05 00:00:00.000000000 Z
11
+ date: 2026-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model