interscript 3.2.1 → 3.3.0

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: d563d6c5e8b2552d43b377d7c0637bc178a03bfa48ab8296c13de68269264266
4
- data.tar.gz: f235d6abf2393cd6b7af75eb78960466f915f81a4d873c4db920ffe97a226bbd
3
+ metadata.gz: f7222468ba9bbd27444aea9c8fe0f7e3378b053a500d9f03c925a4c2a39cc9f1
4
+ data.tar.gz: b6c1e37c348f2bb42d4358ca83fa332f83a29b41b9ff88241a1e171b20c4225c
5
5
  SHA512:
6
- metadata.gz: 494749273ef3a9d265c0ab4d5c622024f7cac93125a0a13c3f5773b24648d1a195c550371d2379e8ec2a96dbf63d9217dad24b24497df72f1afa6dfb4467c29f
7
- data.tar.gz: 630e78cfd16a814c80b3a53441cfb48b7d82094c32be909e683727cfa4607a885455018be87bf3a8fa48c9efea7a4cd228612b8450c9f6d22bdb93e5fa9a7f8a
6
+ metadata.gz: a0cf0d2d1f75e3dd9b30b2282eae24b58572c002ae5fde9cac4b26debe7bb457f97b83193c965a8936e92f8c9e673c5fad36c051804accd3f0fd708679b60efe
7
+ data.tar.gz: bcb8654fb9af857a41e469d284c825d07ada2c62c9c21732c7d510b07a3186afcd7bdc37a631048d98bd30e967f768c359020189e8d5cb974f56fff5781e8775
@@ -25,10 +25,11 @@ module Interscript
25
25
  whitespace?
26
26
  end
27
27
 
28
- # Comments and stray identifiers are silently consumed.
28
+ # Comments are consumed; stray identifiers are a parse error
29
+ # (WO87/A4 strict-parse ruling: the corpus is 295/295 strict-clean,
30
+ # so a typo'd map can no longer silently no-op).
29
31
  rule(:comment_item) do
30
- (str("#") >> (str("\n").absent? >> any).repeat).as(:comment) |
31
- identifier.as(:noop)
32
+ (str("#") >> (str("\n").absent? >> any).repeat).as(:comment)
32
33
  end
33
34
 
34
35
  # Bare rule directly in a stage body (not wrapped in sequence/parallel).
@@ -1,3 +1,3 @@
1
1
  module Interscript
2
- VERSION = "3.2.1"
2
+ VERSION = "3.3.0"
3
3
  end
data/lib/interscript.rb CHANGED
@@ -82,8 +82,28 @@ module Interscript
82
82
  detector.call(source, destination)
83
83
  end
84
84
 
85
+ # Locate the interscript-maps registry yaml(s) across installed gems.
86
+ #
87
+ # rubygems 4 removed StubSpecification#files, which
88
+ # Gem.find_latest_files relies on, so the fast path can raise there;
89
+ # the fallback globs the interscript-maps gems directly (there are
90
+ # only ever one or two of them, so this stays cheap).
91
+ def locate_map_gems_yaml
92
+ found = begin
93
+ Gem.find_latest_files("interscript-maps.yaml")
94
+ rescue
95
+ nil
96
+ end
97
+ return found if found.is_a?(Array) && found.any?
98
+
99
+ Gem::Specification.latest_specs
100
+ .select { |spec| spec.name == "interscript-maps" }
101
+ .flat_map { |spec| Dir.glob(File.join(spec.full_gem_path, "**", "interscript-maps.yaml")) }
102
+ .uniq
103
+ end
104
+
85
105
  def map_gems
86
- @map_gems ||= Gem.find_latest_files("interscript-maps.yaml").map do |i|
106
+ @map_gems ||= locate_map_gems_yaml.map do |i|
87
107
  [i, YAML.load_file(i)]
88
108
  end.to_h
89
109
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-25 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: thor