confium 0.4.0 → 0.4.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: 322f29b8f4f4e0ad02bec82cbb5a99ea45852fc618f09344c35fb1d42319afbb
4
- data.tar.gz: e1050278065503030b8f82dd10047eda3363ac3b875456cfe7b2c2ce17573975
3
+ metadata.gz: a46dd7e9a6967adabafbf136b1d8397b30dd6b62cf391bc65a3cbfbdb40aa974
4
+ data.tar.gz: 4644e733341fedcdb25860ba0a11f158307f379067e1455415c6ca2f7fbb9cb5
5
5
  SHA512:
6
- metadata.gz: 7cdc24b0b728d4f8afc59d6f5e63e9f4a4c328aab34dca675b51391f340699b33b9d216baf2c433bac7fe6ee29f24aca134323b8cda0c5904b498621debd82ed
7
- data.tar.gz: 71a1d6c636f88a80f31bcd7682cfc6762d99882a3eeed12ba5315ce81225068e280069a3ab2a3b2378d30abc928842c9561cf451ddfeda2038dda94768525ab7
6
+ metadata.gz: a11f941a43c841a1af5e64cd0529faf177fdcb30908843b5458ac75fa92ea9c48ab2ecf351f674d90e809f1b21af2c8c039a4c6263b6a916ad166dd7b28be7ce
7
+ data.tar.gz: 2b6ef5346cf0edd3c956b99908f4d581589da7a4c0aad6dafbaf019482df392294acd7ae58ab54781dda6824b2f77858b93c7333f9a31432226c1725dd2fa4eb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.1] — 2026-08-24
4
+
5
+ ### Fixed
6
+
7
+ - **Windows platform gems load on every supported Ruby.** A PE
8
+ import names the version-specific ruby DLL
9
+ (`x64-ucrt-ruby330.dll`), so the shared 3.3 window could not load
10
+ under 3.4 (Windows error 126). Windows gems now carry an exact
11
+ window per Ruby (3.1-3.4); the loader prefers the exact minor and
12
+ falls back to the shared 3.3 window on other platforms. The
13
+ mingw runtime is embedded (`-static-libgcc`).
14
+ - 0.4.0 shipped as a source gem only — its platform publish was
15
+ correctly blocked by the failing Windows install-check; the
16
+ platform gems first appear here.
17
+
3
18
  ## [0.4.0] — 2026-08-23
4
19
 
5
20
  ### Changed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Confium
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
data/lib/confium.rb CHANGED
@@ -18,18 +18,27 @@ begin
18
18
  # 3.1 and 3.2 get exact-minor builds while 3.3 covers 3.3+).
19
19
  # Source builds install the extension flat, without a version
20
20
  # directory.
21
- window = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3') ? '3.3' : RUBY_VERSION[/\A\d+\.\d+/]
22
- begin
23
- require_relative "confium_native/#{window}/confium_native"
24
- rescue LoadError
25
- # Fall back to the flat source-build path only when the windowed
26
- # binary is absent; a present-but-unloadable binary must raise its
27
- # real dlopen error instead of masquerading as "not built".
28
- dlext = RbConfig::CONFIG['DLEXT'] || 'so'
29
- windowed = File.expand_path("confium_native/#{window}/confium_native.#{dlext}", __dir__ || '.')
30
- raise if File.exist?(windowed)
31
-
21
+ minor = RUBY_VERSION[/\A\d+\.\d+/]
22
+ dlext = RbConfig::CONFIG['DLEXT'] || 'so'
23
+ candidates = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3') ? [minor, '3.3'].uniq : [minor]
24
+ # Windows gems carry an exact-minor window per Ruby (a PE import
25
+ # names the version-specific ruby DLL); other platforms share the
26
+ # 3.3 window for 3.3+. Prefer the exact minor when present.
27
+ windowed = candidates.filter_map do |w|
28
+ path = File.expand_path("confium_native/#{w}/confium_native.#{dlext}", __dir__ || '.')
29
+ w if File.exist?(path)
30
+ end
31
+ if windowed.empty?
32
32
  require_relative 'confium_native/confium_native'
33
+ else
34
+ windowed.each do |w|
35
+ require_relative "confium_native/#{w}/confium_native"
36
+ break
37
+ rescue LoadError => e
38
+ # A present-but-unloadable binary raises its real dlopen
39
+ # error once every window has been tried.
40
+ raise e if w == windowed.last
41
+ end
33
42
  end
34
43
  rescue LoadError => e
35
44
  warn 'confium: native extension not built — run `bundle exec rake compile`'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Open