leptris 1.9.0 → 1.9.1
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 +17 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris.rb +26 -7
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed2f1d5755923f389734df36cc9c40c513535e58e7abe5a40aa87dd93f858788
|
|
4
|
+
data.tar.gz: eb4e9c9c3b12a7584572746053c9aaf318ee5481fa002909d8502d5565bcf543
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35a1a34584014746679c39098f60c6009871007e3e5016562b669437e6f00d84412c7a26f286034f628421f72846c810b1b3568faacbbae86fa3e6c47b6db20f
|
|
7
|
+
data.tar.gz: 5e4785ee975db46c2f7798a4effd7c3d2be729e94ded98db78e3cdd830891b0704170e104d9b2287ff1e4e8a98833917a70a7ec4d5591615931020cf67f18e54
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ 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.1] - 2026-08-24
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Autoload manifest restored after `require "leptris"`** (issue
|
|
13
|
+
#53): 1.9.0's eager FFI require ran inside `module Leptris`
|
|
14
|
+
before `autoload :XML` was registered, so ffi.rb's module opening
|
|
15
|
+
created `Leptris::XML` first — the autoload registration was
|
|
16
|
+
shadowed, xml.rb never loaded, and the entire API was unreachable
|
|
17
|
+
(`Leptris::XML.constants == [:FFI]`, no `Leptris::XML.parse`).
|
|
18
|
+
The eager require now runs after the registration: ffi.rb's
|
|
19
|
+
module opening triggers the autoload, FFI lands inside the real
|
|
20
|
+
manifest module, and a downstream `require "leptris/xml"` is a
|
|
21
|
+
no-op (the moxml workaround becomes unnecessary). Eager library
|
|
22
|
+
resolution at require time (#49) is unchanged. Regression spec
|
|
23
|
+
runs the cold `require "leptris"` path in a subprocess.
|
|
24
|
+
|
|
8
25
|
## [1.9.0] - 2026-08-24
|
|
9
26
|
|
|
10
27
|
Lockstep with libleptris 1.9.0 (covers the 1.8.0 and 1.9.0 engine
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris.rb
CHANGED
|
@@ -3,12 +3,31 @@
|
|
|
3
3
|
require "leptris/version"
|
|
4
4
|
|
|
5
5
|
module Leptris
|
|
6
|
-
# Eager library resolution (issue leptris-ruby#49): autoload made
|
|
7
|
-
# ffi_lib lazy, so a ruby-platform gem (no vendored libleptris)
|
|
8
|
-
# failed deep inside Document.parse instead of at require time.
|
|
9
|
-
# Loading the FFI module NOW turns that into an immediate,
|
|
10
|
-
# actionable LoadError.
|
|
11
|
-
require "leptris/xml/ffi"
|
|
12
|
-
|
|
13
6
|
autoload :XML, "leptris/xml"
|
|
14
7
|
end
|
|
8
|
+
|
|
9
|
+
# Eager library resolution (issue leptris-ruby#49): resolve the
|
|
10
|
+
# native library at require time instead of lazily inside
|
|
11
|
+
# Document.parse, so a missing library fails immediately.
|
|
12
|
+
#
|
|
13
|
+
# The require MUST come after the autoload registration above.
|
|
14
|
+
# ffi.rb opens `module Leptris; module XML`, and when that runs
|
|
15
|
+
# before `autoload :XML` exists it creates the constant first — the
|
|
16
|
+
# later autoload registration is then shadowed, xml.rb never loads,
|
|
17
|
+
# and the entire API is unreachable (Leptris::XML.constants ==
|
|
18
|
+
# [:FFI]; issue leptris-ruby#53). Requiring from here after the
|
|
19
|
+
# registration makes ffi.rb's module opening trigger the autoload,
|
|
20
|
+
# landing FFI inside the real manifest module; a downstream
|
|
21
|
+
# `require "leptris/xml"` is then a no-op.
|
|
22
|
+
begin
|
|
23
|
+
require "leptris/xml/ffi"
|
|
24
|
+
rescue LoadError => e
|
|
25
|
+
raise LoadError, <<~MSG
|
|
26
|
+
Leptris could not load the native libleptris library.
|
|
27
|
+
The ruby-platform gem is a fallback variant and ships no
|
|
28
|
+
binary; install the platform-specific variant for your system
|
|
29
|
+
(e.g. `gem install leptris --platform=arm64-darwin`), or set
|
|
30
|
+
LEPTRIS_LIB_PATH to a libleptris.{so,dylib,dll} file.
|
|
31
|
+
(Underlying error: #{e.message})
|
|
32
|
+
MSG
|
|
33
|
+
end
|