lutaml-path 0.2.1 → 0.2.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: e16e4725ac72465700cf480b32646b4bb58c61f2234c4a4e1105510495835aff
4
- data.tar.gz: fd93dfb0f02304e90c73785c024a82ea35e9fd6f5e10416783bbcd804d72abe2
3
+ metadata.gz: 8e786faa427ee58eeb9f9dcf52685d2f777ccbb74933329773256a3c37ddaa26
4
+ data.tar.gz: a72d4e6d1d6746bd40d43366b1439c51f99e25c623a5558e8de40e19cf9ec37d
5
5
  SHA512:
6
- metadata.gz: e55d87712ee60e0717248ff0be3e09256c1699499ac7dc2bfa876074aea5628b8e3bd659105793270864252ec4cdb0957d7fd19525e560d25852cd8387ad3618
7
- data.tar.gz: 9033638032b43fcf9ec1303555e919258dad9fdb305f37eaca4243704fe3dd81a2ad949006ee68183a4a2400d82cf70b998e714f6171b8438bd07583a3866eef
6
+ metadata.gz: 2b04e70ae8817a53590387a721bd0b98768b137c6e8ebcbfa5e5c00c8068f7fb73400ee0159877d6468c6ebf8fb7c727a4a210fbc935ce99cf8034dbeea9ab60
7
+ data.tar.gz: 0e2b4b3379e8cdf975698bd154b28c01dd3320e3bb2e83204d261549d212667ab519290b61587c3525de1a623725944dc74704d0d35ae6c912fe8d47de153cd7
@@ -51,12 +51,25 @@ module Lutaml
51
51
  # and a leaf cannot know whether the whole path has dot-steps or filters,
52
52
  # so the root rule -- the only place that knows -- decides the type and
53
53
  # unwraps Step -> PathSegment when it picks ElementPath.
54
+ #
55
+ # parsanol hands captured leaves back as binary-tagged strings, which
56
+ # raises ArgumentError (invalid byte sequence) at the first downstream
57
+ # regex on non-ASCII input. The boundary re-tag fixes mistagged-valid
58
+ # captures; byte loss inside a multibyte character is a parsanol defect
59
+ # (parsanol/parsanol-ruby#410) and scrubs to replacement content until
60
+ # it ships. Rule blocks run under the transform engine's self, so the
61
+ # helper is a class method.
62
+ def self.utf8(content)
63
+ content.to_s.dup.force_encoding("UTF-8").scrub
64
+ end
65
+
54
66
  rule(content: simple(:content)) do |dict|
55
- Step.new(PathSegment.new(dict[:content].to_s))
67
+ Step.new(PathSegment.new(Transformer.utf8(dict[:content])))
56
68
  end
57
69
 
58
70
  rule(content: simple(:content), condition: subtree(:cond)) do |dict|
59
- Step.new(PathSegment.new(dict[:content].to_s), condition: dict[:cond])
71
+ Step.new(PathSegment.new(Transformer.utf8(dict[:content])),
72
+ condition: dict[:cond])
60
73
  end
61
74
 
62
75
  rule(segment: subtree(:segment)) { segment }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Path
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.3"
6
6
  end
7
7
  end
data/lutaml-path.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  end
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
 
31
- spec.add_dependency "lutaml-model", "~> 0.8.114"
31
+ spec.add_dependency "lutaml-model", "~> 0.8.156"
32
32
  spec.add_dependency "parsanol", "~> 1.3"
33
33
  spec.metadata["rubygems_mfa_required"] = "true"
34
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-path
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
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-19 00:00:00.000000000 Z
11
+ date: 2026-11-02 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.8.114
19
+ version: 0.8.156
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.8.114
26
+ version: 0.8.156
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parsanol
29
29
  requirement: !ruby/object:Gem::Requirement