ratomic 0.3.3-arm64-darwin → 0.3.4-arm64-darwin

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: 790b4edcd1c39fea5642b510a9b8e644f5e3f2efb73630aaf303136119cfeaac
4
- data.tar.gz: cbbc2391164272004319246749829826831ad6f00dfd2565468603a82bd5456a
3
+ metadata.gz: 47155190009fcef332534f2f98c584a8248947751d70016182db634db442fe0b
4
+ data.tar.gz: e9328a6abbbc662bd06a552d82726a3519220293f72aea8c795190b59abaad0c
5
5
  SHA512:
6
- metadata.gz: f3100114171d46ee64e968e6129e1f1cf2e96748196eaedfe6faa7ac71d340a988815352d3ffaa9368acffe5377e5d3713494a8d52bbcdcaaa21cb80bb651b4b
7
- data.tar.gz: ad214aec44653181d81b3bf2c4df4e4849653800ae984bff0efb73c09bdec86bee6d14a37682bfefb42e6302395169e5be6829a941e27536fff1c50b38ce1af3
6
+ metadata.gz: 23e3adab9478b07bf546f46a8ef08d548f7c948ea01b126c6a7fb0e78e23f99e63613ca1f1e1c859391b79b552f17eff41f8f54b4c55c59d207ac609d0b1826d
7
+ data.tar.gz: de892a72b09170726be4d3ccf710edaa565c2549e33c5dbe7d1d926f22b7a52efda80a0b9b03ae26633b2f79823c9e768b079e75b63ad8f3ba917bacb1e7c4bc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.4] - 2026-06-06
4
+
5
+ - Move the compiled native extension into the versioned `lib/ratomic/4.0/`
6
+ layout used by the installed gem.
7
+ - Load the versioned native artifact explicitly and mark native support as
8
+ unavailable when the extension is missing.
9
+ - Add loader coverage for both the versioned native path and the native-disabled
10
+ branch.
11
+
3
12
  ## [0.3.3] - 2026-06-06
4
13
 
5
14
  - 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.4"
6
6
  end
data/lib/ratomic.rb CHANGED
@@ -9,26 +9,27 @@ require "rbconfig"
9
9
  #
10
10
  # The public API currently includes {Counter}, {Map}, {Queue}, and {Pool}.
11
11
  module Ratomic
12
- # Base error class for Ratomic-specific failures.
13
- class Error < StandardError; end
14
-
15
12
  def self.load_native_extension
16
- packaged_native = Dir[File.join(__dir__, "ratomic", "*", "ratomic.{so,bundle}")].min
13
+ ruby_api_ver = RbConfig::CONFIG.fetch("ruby_version").split(".", 3)[0, 2].join(".")
14
+ require_relative "ratomic/#{ruby_api_ver}/ratomic"
15
+ @native_enabled = true
16
+ rescue LoadError
17
+ @native_enabled = false
18
+ end
17
19
 
18
- if packaged_native
19
- require packaged_native.sub(/\.(so|bundle)\z/, "")
20
- else
21
- require "ratomic/ratomic"
22
- end
20
+ def self.native_enabled?
21
+ @native_enabled == true
23
22
  end
24
23
  private_class_method :load_native_extension
24
+
25
+ # Base error class for Ratomic-specific failures.
26
+ class Error < StandardError; end
25
27
  end
26
28
 
27
29
  Ratomic.send(:load_native_extension)
28
- require "ratomic/version"
29
-
30
- require "ratomic/undefined"
31
- require "ratomic/counter"
32
- require "ratomic/map"
33
- require "ratomic/queue"
34
- require "ratomic/pool"
30
+ require_relative "ratomic/version"
31
+ require_relative "ratomic/undefined"
32
+ require_relative "ratomic/counter"
33
+ require_relative "ratomic/map"
34
+ require_relative "ratomic/queue"
35
+ require_relative "ratomic/pool"
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.4
5
5
  platform: arm64-darwin
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.
@@ -23,12 +23,12 @@ files:
23
23
  - LICENSE.txt
24
24
  - README.md
25
25
  - lib/ratomic.rb
26
- - lib/ratomic/3.0/ratomic.bundle
27
- - lib/ratomic/3.1/ratomic.bundle
28
- - lib/ratomic/3.2/ratomic.bundle
29
- - lib/ratomic/3.3/ratomic.bundle
30
- - lib/ratomic/3.4/ratomic.bundle
31
- - lib/ratomic/4.0/ratomic.bundle
26
+ - lib/ratomic/4.0/3.0/ratomic.bundle
27
+ - lib/ratomic/4.0/3.1/ratomic.bundle
28
+ - lib/ratomic/4.0/3.2/ratomic.bundle
29
+ - lib/ratomic/4.0/3.3/ratomic.bundle
30
+ - lib/ratomic/4.0/3.4/ratomic.bundle
31
+ - lib/ratomic/4.0/4.0/ratomic.bundle
32
32
  - lib/ratomic/counter.rb
33
33
  - lib/ratomic/map.rb
34
34
  - lib/ratomic/pool.rb
File without changes
File without changes
File without changes
File without changes
File without changes