leptris 1.9.9-aarch64-linux → 1.9.10-aarch64-linux

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: a3e769db2680672311b6a197addbddf7aea0ebc854633d8c6e70dcc2c9b140d5
4
- data.tar.gz: 41babd5326bfb3d919da576ce62d8c66978705af5c459c4e2ffd5a37e90e7814
3
+ metadata.gz: efe9c8c8dcce3172320cb136460cbb5be0cc2ccbecdfc4fc121c0d497dbf1c3e
4
+ data.tar.gz: 76d3ddb87586fd9bbffe7b6b19d4cce8054d7573f27cec48db41f4c4e16740f5
5
5
  SHA512:
6
- metadata.gz: da87c53f676e34885526b7b8c4caae847e8743e9ea1066423f35504e68c46ee27432ff4d65da5d132190a14ff88c6c8810cbd500e418d4828fb8efc979292217
7
- data.tar.gz: c3125b29f8d0d59a665fa2905831bcd54f797b7d04ee5ea5b9874fefc9b995a79d2d763134670c19a99f9f86305f85c77db5f50951bf5bca4007c052b4ee9d11
6
+ metadata.gz: 9693e537dbb31e512481cc007cc9552ae72f0c32e5c529c8c96027fc83bbe89014c84ff60805a90203991c0dbb33e35ac214f9b4460445bb5d493d5538cd7b03
7
+ data.tar.gz: c810827e0feb0e1f0f5b85f1cf776ec208356149840a0ac7df90dce95113b67c7d7fe36948d4643117dd612c239273d64cd022dc029df727f01a37c857984145
data/CHANGELOG.md CHANGED
@@ -5,6 +5,22 @@ All notable changes to Leptris will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.10] - 2026-08-26
9
+
10
+ ### Changed
11
+
12
+ - **README: Migrating from Nokogiri, caught up to the 1.9.x
13
+ surface** — the notable-differences list now covers the lifetime
14
+ contract (UseAfterFreeError on freed-document reads/mutations),
15
+ readonly mode, recover parsing + last_error_position, searchable
16
+ fragments, receiver-relative css, and expanded-name attribute
17
+ access, each with the migrating reader's context.
18
+ - **Spec organization**: the eight-round perf_surface_spec grab-bag
19
+ splits into one file per concern (seam_and_reads,
20
+ sax_and_query_paths, lifetime_contract, fragment_and_position,
21
+ receiver_relative_css). Suite count unchanged at 274; each file
22
+ is one scannable context.
23
+
8
24
  ## [1.9.9] - 2026-08-26
9
25
 
10
26
  ### Changed
data/README.adoc CHANGED
@@ -410,7 +410,26 @@ Notable differences:
410
410
  * `Node#children` includes whitespace text nodes (same as Nokogiri); use
411
411
  `#element_children` or `#first_element_child` to skip them.
412
412
  * CSS support is intentionally minimal — for advanced selectors, drop to
413
- `xpath`.
413
+ `xpath`. `css` is receiver-relative (Nokogiri semantics): scoped to
414
+ an element or fragment, document-wide from a Document.
415
+ * `DocumentFragment` is searchable (`fragment.xpath/at_xpath/css/at_css/search`)
416
+ — Nokogiri fragment parity.
417
+ * Expanded-name attribute access: `Element#attribute_ns(uri, local)` /
418
+ `#has_attribute_ns?(uri, local)` — XML Namespaces 1.0 semantics
419
+ (cross-prefix match, nil URI matches no-namespace, xmlns invisible).
420
+ * `Leptris::XML.parse(xml, recover: true)` returns an empty document
421
+ with the failure recorded on the thread-global last error instead of
422
+ raising ParseError — libxml2 `XML_PARSE_RECOVER` semantics. The
423
+ companion `Document#last_error_position` returns `[line, column]`.
424
+ * `Leptris::XML.parse(xml, readonly: true)` (or `Document#readonly!`)
425
+ freezes the document for reading: mutations raise ReadOnlyError, read
426
+ methods memoize aggressively. Faster steady state; no Nokogiri
427
+ equivalent.
428
+ * **Lifetime contract**: a borrowed handle used after the owning
429
+ document has been freed (or GC'd) raises `Leptris::XML::UseAfterFreeError`.
430
+ Nokogiri is silent on this — migrating code that holds Node references
431
+ past Document disposal will see the error; silence-replace-UAF patterns
432
+ from Nokogiri do not apply.
414
433
  * No `Nokogiri::HTML` or `Nokogiri::CSS` parser. Leptris is XML-only.
415
434
  * No XSLT, no RelaxNG / DTD validation, no schema caching.
416
435
  * No built-in JRuby / TruffleRuby support — only CRuby via `ffi`.
data/Rakefile CHANGED
@@ -55,11 +55,25 @@ task default: :spec
55
55
  namespace :audit do
56
56
  desc "Fail when ffi.rb attachments and library exports drift"
57
57
  task :symbols do
58
- lib = Dir.glob("lib/libleptris.{dylib,so,dll}").first
59
- unless system("which nm > /dev/null 2>&1")
58
+ # nm cannot read MSVC PE export tables (every symbol reports as
59
+ # unexported -> guaranteed false drift), so Windows skips: the
60
+ # darwin/linux CI legs enforce the mirror — any one platform's
61
+ # build of the same C surface suffices.
62
+ if Gem.win_platform?
63
+ puts "audit:symbols: skipped on Windows (PE export tables); " \
64
+ "darwin/linux legs enforce the mirror"
65
+ next
66
+ end
67
+ # Probe nm without a shell: the multi-arg system() execs
68
+ # directly, so there is no which/redirect syntax to be
69
+ # platform-hostile. File::NULL is NUL where it must be; a
70
+ # missing binary is falsy either way (ENOENT rescue belts the
71
+ # older spawn behavior).
72
+ unless nm_available?
60
73
  puts "audit:symbols: skipped (nm unavailable on this platform)"
61
74
  next
62
75
  end
76
+ lib = Dir.glob("lib/libleptris.{dylib,so,dll}").first
63
77
  unless lib
64
78
  abort "audit:symbols: vendored library not found — run rake compile"
65
79
  end
@@ -86,6 +100,13 @@ namespace :audit do
86
100
  abort "audit:symbols: drift detected"
87
101
  end
88
102
  end
103
+
104
+ # @api private
105
+ def nm_available?
106
+ system("nm", "--version", out: File::NULL, err: File::NULL)
107
+ rescue Errno::ENOENT
108
+ false
109
+ end
89
110
  end
90
111
 
91
112
  require "rubygems/package_task"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.9"
4
+ VERSION = "1.9.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.9
4
+ version: 1.9.10
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.