libv8-node 24.12.0.0-x86_64-linux-musl → 24.12.0.1-x86_64-linux-musl

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: 449eef79fdd6aa7ead071b5df1217c4f39dd4e12099ac3fcb7e06b4c26d547c6
4
- data.tar.gz: c357648865e7b89b0afce30a9b196c80524cb198e82c6b1859f794a3f9a3bfe2
3
+ metadata.gz: d3d984dcc8c574d0ea0464e9283da4008e37556140d34278162616960accb6f6
4
+ data.tar.gz: 9de195dac87796e6ff1162e3e990f783b682954295345d614cb9dadc0e411cdd
5
5
  SHA512:
6
- metadata.gz: 29d9a02835643c46e255f4e2ac101c5bde1772c71cd9ed4b8ea105b5514c563d1dbcc1bc0eead7c83d94c4041422614669f1b23d1e52a11d4f8b5274a50a4560
7
- data.tar.gz: b9278e4906542df3ce622f9d67665f6a46722ac51bef2b4fb45a7550f4c62928155c88bdb790ef2c6baba7d7d0c1da71d5bb8618f2ff89d7bbccab2760858282
6
+ metadata.gz: e89cf4b0b1d0a4e5c642aaa797024826b118c08d3bb836341c6c2b29fab82ab40dec3e1582648c343433eb86b64db3c7728e69ec9ef956000e0789d9af95cd49
7
+ data.tar.gz: 82462dce42be0bcbdda53b572fcdd194ed4d4eac32ef48e5d13e0b4003cc0f45c91b8d257e30f84c7ca003e33179ab40ab17518e577dcb589c555e49796df0e2
@@ -22,7 +22,38 @@ module Libv8::Node
22
22
  end
23
23
 
24
24
  def platform
25
- Gem::Platform.local.tap { |p| RUBY_PLATFORM =~ /musl/ && p.version.nil? && p.instance_eval { @version = 'musl' } }.to_s.gsub(/-darwin-?\d+/, '-darwin')
25
+ @platform ||= determine_platform
26
+ end
27
+
28
+ def determine_platform
29
+ ideal = construct_ideal_platform_name
30
+ return ideal if platform_directory_exists?(ideal)
31
+
32
+ fallback_platform
33
+ end
34
+
35
+ def construct_ideal_platform_name
36
+ local = Gem::Platform.local
37
+ parts = [local.cpu, local.os, local.version]
38
+ parts[2] = 'musl' if musl_platform?
39
+ parts.compact.reject(&:empty?).join('-').gsub(/-darwin-?\d+/, '-darwin')
40
+ end
41
+
42
+ def musl_platform?
43
+ RUBY_PLATFORM =~ /musl/
44
+ end
45
+
46
+ def platform_directory_exists?(name)
47
+ File.directory?(File.join(vendored_source_path, name))
48
+ end
49
+
50
+ def fallback_platform
51
+ available = available_platform_directories
52
+ available.size == 1 ? available.first : construct_ideal_platform_name
53
+ end
54
+
55
+ def available_platform_directories
56
+ Dir.glob(File.join(vendored_source_path, '*')).select { |d| File.directory?(d) }.map { |d| File.basename(d) } - ['include']
26
57
  end
27
58
 
28
59
  def config
@@ -4,7 +4,7 @@ module Libv8
4
4
  end
5
5
 
6
6
  module Libv8::Node
7
- VERSION = '24.12.0.0'
7
+ VERSION = '24.12.0.1'
8
8
  NODE_VERSION = '24.12.0'
9
9
  LIBV8_VERSION = '13.6.233.17' # from src/node-.../deps/v8/include/v8-version.h
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libv8-node
3
3
  version: !ruby/object:Gem::Version
4
- version: 24.12.0.0
4
+ version: 24.12.0.1
5
5
  platform: x86_64-linux-musl
6
6
  authors:
7
7
  - ''