glossarist 2.10.1 → 2.10.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: 444891250f970481ea0b53319bd26988f47374eecbbbf73a4e7e1ab3af0f8cf6
4
- data.tar.gz: '074328e959207512be6b9c8fc175c3c343a72242e75ca1ed6d75a1c6792846d8'
3
+ metadata.gz: fb1aa6f911f51d2a58777a0b48615d94bdf84f46cf434f7850ffbd022b8ad0ff
4
+ data.tar.gz: 9129cf0ef1e397c530795c33d702de64836f6728aa3825e5e255e3c64fb6dfa0
5
5
  SHA512:
6
- metadata.gz: 79aedba5703e0e807f48304caeb17a1e8d95e716aa7e344260417c1f344f2607ee2c416c6b16c397b1c828e0f57a2250cd76a32bccb5172e781ca7c45df754e1
7
- data.tar.gz: 7b080759a869d7018c1f2019f972cc3b1d374a5fa278aa97cb1db0bb938c0116ebd0a72f121b58cb9f9c6f785d3d68efd6225bb6e67c2d1013a95b65c598b1e6
6
+ metadata.gz: c9c6fccba7097d7572c7715f499e8be577557fd936fd3f7bc6573427a1e498eb859533a1506a3c19e28196d3ba85381509fde73d9d0fb67a9d89f65bd24acb6e
7
+ data.tar.gz: 7f42bfe0f602950647f08521a2e084480497d57e0d94e9b62cbfb07bd65a4fc7e9eda51a4f0640b5d37360d6f71db0d360160a0558cf3bf469092aceed4e1689
@@ -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.1"
7
+ VERSION = "2.10.3"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glossarist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.1
4
+ version: 2.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose