ratomic 0.3.3-x86_64-linux → 0.3.5-x86_64-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: d565658052227045bc772eee539aad34c1780094042c1a992afd906a57ef9af0
4
- data.tar.gz: 13340d50845c8cd53695988d72d2be7fb6be2cd88ac5367a6e9ea1a526414b5e
3
+ metadata.gz: 00f479fa31d796a3a19c130c381196024f18ed955335146f0d11de4d9037e015
4
+ data.tar.gz: e7d02c99cdb9893526f7d4efd7c95bf98129ad6964fd8ac4c06568b0fb58c51f
5
5
  SHA512:
6
- metadata.gz: 1bf03f72929cac20d41c3709ef5998ce248b01a6225efbda9d0e255ff49c85909a9cf7ed949de858ce0fef86a5583cba816b76706e0a1de7a205e2dece5c7fd6
7
- data.tar.gz: 2405fc90bdbdce2eae60739ab64c8bcdea37029b91b95ff629c7a4839771481d79e8dd700460ec079227dad8271589da3ace2e3615a0c43020aa99e7087142c7
6
+ metadata.gz: 18bdfa1dcc5459679c669d9b3de701ad87d435a76fc29318d0d029b549208e82c105089eb3c8ab9e0ebe6123568a3f9f9ebb1aa081382b7f1a270612974f4db1
7
+ data.tar.gz: f109864e8bbe604de9e723504c877bba3d1cf7734e04d5365263cdb6fbadbd32812c517b35ea89f38de627a9a912d455601b4ed0c973728297fedd324e62192f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.5] - 2026-06-06
4
+
5
+ - Fix the native loader so development loads the compiled extension from the
6
+ workspace layout while installed gems still resolve the versioned packaged
7
+ native path.
8
+ - Add loader coverage for the native-enabled path and keep the release smoke
9
+ test validating the packaged native gem shape before publish.
10
+
11
+ ## [0.3.4] - 2026-06-06
12
+
13
+ - Move the compiled native extension into the versioned `lib/ratomic/4.0/`
14
+ layout used by the installed gem.
15
+ - Load the versioned native artifact explicitly and mark native support as
16
+ unavailable when the extension is missing.
17
+ - Add loader coverage for both the versioned native path and the native-disabled
18
+ branch.
19
+
3
20
  ## [0.3.3] - 2026-06-06
4
21
 
5
22
  - Fix `require "ratomic"` for installed gems by resolving the packaged native
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Ratomic
4
4
  # Current gem version string.
5
- VERSION = "0.3.3"
5
+ VERSION = "0.3.5"
6
6
  end
data/lib/ratomic.rb CHANGED
@@ -12,13 +12,34 @@ module Ratomic
12
12
  # Base error class for Ratomic-specific failures.
13
13
  class Error < StandardError; end
14
14
 
15
- def self.load_native_extension
16
- packaged_native = Dir[File.join(__dir__, "ratomic", "*", "ratomic.{so,bundle}")].min
15
+ class << self
16
+ def native_extension_path
17
+ ruby_api_ver = RbConfig::CONFIG.fetch("ruby_version").split(".", 3)[0, 2].join(".")
18
+ "ratomic/#{ruby_api_ver}/ratomic"
19
+ end
20
+ private :native_extension_path
21
+
22
+ def development_native_extension_path
23
+ "ratomic/ratomic"
24
+ end
25
+ private :development_native_extension_path
26
+
27
+ def load_native_extension_path(path)
28
+ require_relative path
29
+ true
30
+ rescue LoadError
31
+ false
32
+ end
33
+ private :load_native_extension_path
34
+
35
+ def load_native_extension
36
+ @native_enabled =
37
+ load_native_extension_path(native_extension_path) ||
38
+ load_native_extension_path(development_native_extension_path)
39
+ end
17
40
 
18
- if packaged_native
19
- require packaged_native.sub(/\.(so|bundle)\z/, "")
20
- else
21
- require "ratomic/ratomic"
41
+ def native_enabled?
42
+ @native_enabled == true
22
43
  end
23
44
  end
24
45
  private_class_method :load_native_extension
data/ratomic.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  "backed by native Rust concurrency primitives."
15
15
  spec.homepage = "https://mperham.github.io/ratomic"
16
16
  spec.license = "MIT"
17
- spec.required_ruby_version = [">= 4.0", "< 4.1.dev"]
17
+ spec.required_ruby_version = ">= 4.0"
18
18
 
19
19
  spec.metadata["homepage_uri"] = spec.homepage
20
20
  spec.metadata["source_code_uri"] = "https://github.com/mperham/ratomic"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratomic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Mike Perham
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-06-05 00:00:00.000000000 Z
12
+ date: 2026-06-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Ractor-safe counters, maps, queues, and ownership-transfer pools backed
15
15
  by native Rust concurrency primitives.