leptris 1.9.163.3 → 1.9.163.4
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/Rakefile +45 -7
- data/ext/leptris/native/native.c +10 -0
- data/lib/leptris/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 563c1898720e4a4830a4dd15aa33372ea54f9fe36f3f61f78f53783b29bda28d
|
|
4
|
+
data.tar.gz: fa70c8307df2f4ae2cc7db47206ce19088d59c41b4ca8372d3572b6778bc30e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2022e7e5b8490faa476bd04319351c90252507e910994d677bca98f51eb78c6346f56febcf248abb9dbcfaed54a4ec58b654ff40b674ea67d5b9283459fd910a
|
|
7
|
+
data.tar.gz: 3119ce57e8a1ce038c5aad76d72d5ce92cfb3a06a7416f2677fafb824233da229198b51a64b454da73e7d5d1aaa95aa6344755bf0069ae1cf518e6b65e021725
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ 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.163.4] - 2026-09-15
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`NativeNode#document`** (moxml #213): the TypedData struct
|
|
13
|
+
always held the owning Document but never exposed it — adapters
|
|
14
|
+
routing `native.document` (the Node#document contract) hit
|
|
15
|
+
NoMethodError. Returns the binding Document for the node and
|
|
16
|
+
every descendant.
|
|
17
|
+
|
|
8
18
|
## [1.9.163.3] - 2026-09-15
|
|
9
19
|
|
|
10
20
|
### Fixed
|
data/Rakefile
CHANGED
|
@@ -28,25 +28,63 @@ CMAKE_FLAGS = %w[
|
|
|
28
28
|
-DLEPTRIS_ENABLE_ICONV=OFF
|
|
29
29
|
].freeze
|
|
30
30
|
|
|
31
|
+
require "tmpdir"
|
|
32
|
+
|
|
31
33
|
desc "Build libleptris #{LIBLEPTRIS_VERSION} (+ utf8proc) from release tarballs into lib/"
|
|
32
34
|
task :compile do
|
|
35
|
+
# GitHub tarball downloads intermittently return a non-gzip body
|
|
36
|
+
# (rate-limit/redirect HTML) — the piped curl|tar form then fails
|
|
37
|
+
# with "not in gzip format" and takes the leg down. Download to a
|
|
38
|
+
# file with retries, validate the gzip magic, extract from the
|
|
39
|
+
# file.
|
|
40
|
+
# Whole-cycle retry: a truncated body can still start with the
|
|
41
|
+
# gzip magic (Windows runners) and only fail at tar EOF — refetch
|
|
42
|
+
# on any failure in the chain rather than trusting curl's exit
|
|
43
|
+
# code alone.
|
|
44
|
+
fetch_tarball = lambda do |url, dest_dir|
|
|
45
|
+
attempts = 0
|
|
46
|
+
begin
|
|
47
|
+
attempts += 1
|
|
48
|
+
tgz = File.join(Dir.tmpdir, "leptris-#{Time.now.to_i}-#{rand(1e9)}.tgz")
|
|
49
|
+
begin
|
|
50
|
+
sh "curl -sfL --retry 4 --retry-delay 2 --retry-all-errors -o #{tgz} #{url}"
|
|
51
|
+
magic = File.binread(tgz, 2)
|
|
52
|
+
unless magic.bytes == [0x1f, 0x8b]
|
|
53
|
+
raise "downloaded #{url} is not gzip (got #{magic.bytes.inspect})"
|
|
54
|
+
end
|
|
55
|
+
# GNU tar (Git-bundled, Windows) parses D:/... as a
|
|
56
|
+
# REMOTE host spec ("Cannot connect to D:") — the piped
|
|
57
|
+
# form never had a file argument, so this only surfaces
|
|
58
|
+
# with -o. --force-local is GNU tar; bsdtar (macOS) and
|
|
59
|
+
# plain GNU tar (linux) don't need it but tolerate being
|
|
60
|
+
# skipped.
|
|
61
|
+
local_flag = Gem.win_platform? ? " --force-local" : ""
|
|
62
|
+
sh "tar#{local_flag} -xzf #{tgz} -C #{dest_dir} --strip-components=1"
|
|
63
|
+
ensure
|
|
64
|
+
File.delete(tgz) if File.exist?(tgz)
|
|
65
|
+
end
|
|
66
|
+
rescue StandardError => e
|
|
67
|
+
raise if attempts >= 3
|
|
68
|
+
warn "tarball fetch attempt #{attempts} failed (#{e.message}); retrying"
|
|
69
|
+
retry
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
33
73
|
version = ENV.fetch("LIBLEPTRIS_VERSION", LIBLEPTRIS_VERSION)
|
|
34
74
|
build = File.expand_path("tmp/libleptris-#{version}", __dir__)
|
|
35
75
|
rm_rf(build)
|
|
36
76
|
mkdir_p(build)
|
|
37
|
-
|
|
38
|
-
|
|
77
|
+
fetch_tarball.call(
|
|
78
|
+
"https://api.github.com/repos/leptris/leptris/tarball/v#{version}", build)
|
|
39
79
|
|
|
40
80
|
# utf8proc: shared build only, @rpath install name, local prefix.
|
|
41
81
|
u8_dir = File.expand_path("tmp/utf8proc-#{UTF8PROC_VERSION}", __dir__)
|
|
42
82
|
u8_prefix = File.join(u8_dir, "prefix")
|
|
43
83
|
rm_rf(u8_dir)
|
|
44
84
|
mkdir_p(u8_dir)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
# runners (tar child status 128).
|
|
49
|
-
sh "curl -sL #{u8_url} | tar xz -C #{u8_dir} --strip-components=1"
|
|
85
|
+
fetch_tarball.call(
|
|
86
|
+
"https://github.com/JuliaStrings/utf8proc/releases/download/v#{UTF8PROC_VERSION}/utf8proc-#{UTF8PROC_VERSION}.tar.gz",
|
|
87
|
+
u8_dir)
|
|
50
88
|
sh "cmake -B #{u8_dir}/build -S #{u8_dir} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DUTF8PROC_ENABLE_TESTING=OFF"
|
|
51
89
|
sh "cmake --build #{u8_dir}/build --config Release -j 4"
|
|
52
90
|
sh "cmake --install #{u8_dir}/build --prefix #{u8_prefix}"
|
data/ext/leptris/native/native.c
CHANGED
|
@@ -467,6 +467,15 @@ static VALUE nn_byte_offset(VALUE self)
|
|
|
467
467
|
return ULL2NUM((uint64_t)f_node_offset(n->ptr));
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
+
/* The owning binding Document (moxml #213: adapters route
|
|
471
|
+
* native.document exactly like Node#document). */
|
|
472
|
+
static VALUE nn_document(VALUE self)
|
|
473
|
+
{
|
|
474
|
+
struct native_node *n;
|
|
475
|
+
TypedData_Get_Struct(self, struct native_node, &nn_type, n);
|
|
476
|
+
return n->document;
|
|
477
|
+
}
|
|
478
|
+
|
|
470
479
|
static VALUE nn_address(VALUE self)
|
|
471
480
|
{
|
|
472
481
|
struct native_node *n;
|
|
@@ -840,6 +849,7 @@ void Init_native(void)
|
|
|
840
849
|
rb_define_method(c_native_node, "append_child", nn_append_child, 1);
|
|
841
850
|
rb_define_method(c_native_node, "add_child", nn_append_child, 1);
|
|
842
851
|
rb_define_method(c_native_node, "address", nn_address, 0);
|
|
852
|
+
rb_define_method(c_native_node, "document", nn_document, 0);
|
|
843
853
|
rb_define_method(c_native_node, "attributes", nn_attributes, 0);
|
|
844
854
|
rb_define_method(c_native_node, "line", nn_line, 0);
|
|
845
855
|
rb_define_method(c_native_node, "byte_offset", nn_byte_offset, 0);
|
data/lib/leptris/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.163.
|
|
4
|
+
version: 1.9.163.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|