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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 899c376385f93633ec89fc5ecf3f6425a443d7093cb143d254d951e830546fa0
4
- data.tar.gz: 8b3754c9c75104813795af56d3fe0c34788419442c13011df23debc1bc36ceef
3
+ metadata.gz: ed2f1d5755923f389734df36cc9c40c513535e58e7abe5a40aa87dd93f858788
4
+ data.tar.gz: eb4e9c9c3b12a7584572746053c9aaf318ee5481fa002909d8502d5565bcf543
5
5
  SHA512:
6
- metadata.gz: 076ec92edb03051dcaf5b89b1104d1f39f9ca787fd4d7f3f72ff21a3fa9eecfc44fca6057c574996abeca94df51218bb8c1823e72ff8a924b3129ed14a88831a
7
- data.tar.gz: 98db2fedbf8df3a09b6d44ff23f3661e37f069ba84bce091605adb394449ec48c8030e045203c8eb45980850442eb23e265e7e0b704b809ea30a75df3a5ce86d
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.0"
4
+ VERSION = "1.9.1"
5
5
  end
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
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.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.