b4n1-secrets 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fb58f3050b5d46fadb25c400957df9d4f968d709ebe1b65d56dfbb35b327cad7
4
+ data.tar.gz: 89838d01f695b8da1f74758d4a41d8f9b62c15b2a9ee064d08417516a6b18975
5
+ SHA512:
6
+ metadata.gz: 593e68f4a4ab7fef65aed7025d7eab573159bfa049e7d3ef240cc5dfa4b0365f4750ece3ad75826e034ae237d6c175c3940e2ac82ce05bb275eb38f7d81e339f
7
+ data.tar.gz: cab8b72892a117c6073010d223344fa8f59c229f01697620b36adeb08505ad1d32fa9600f98d84c627385aa5afc3ccfd6c2e339aec8ba4a433f4122aa972fcf2
Binary file
@@ -0,0 +1,38 @@
1
+ require "open3"
2
+
3
+ module B4n1Secrets
4
+ PLATFORMS = {
5
+ "x86_64-linux" => "b4n1secrets-linux-amd64",
6
+ "aarch64-linux" => "b4n1secrets-linux-arm64",
7
+ "x86_64-darwin" => "b4n1secrets-macos-x64",
8
+ "arm64-darwin" => "b4n1secrets-macos-arm64",
9
+ "x64-mingw32" => "b4n1secrets-windows-amd64.exe",
10
+ }
11
+
12
+ def self.binary_path
13
+ return ENV["B4N1SECRETS_BIN_PATH"] if ENV["B4N1SECRETS_BIN_PATH"]
14
+ require "rbconfig"
15
+ key = "#{RbConfig::CONFIG['host_cpu']}-#{RbConfig::CONFIG['host_os']}"
16
+ name = PLATFORMS[key]
17
+ return name ? File.join(__dir__, "..", "bin", name) : "b4n1secrets"
18
+ end
19
+
20
+ def self.run(*args)
21
+ stdout, stderr, status = Open3.capture3(binary_path, *args)
22
+ stdout
23
+ end
24
+
25
+ class Client
26
+ def initialize(binary_path = nil)
27
+ @binary = binary_path || B4n1Secrets.binary_path
28
+ end
29
+ def version; B4n1Secrets.run("--version").strip; end
30
+ def list(dir, meta = false)
31
+ args = ["list", dir]
32
+ args << "--meta" if meta
33
+ B4n1Secrets.run(*args).strip
34
+ end
35
+ def get(dir, key); B4n1Secrets.run("get", dir, key).strip; end
36
+ def close(dir); B4n1Secrets.run("close", dir).strip; end
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: b4n1-secrets
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Bani Montoya
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-11-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Thin Ruby wrapper around the b4n1-secrets binary.
14
+ email: banimontoya@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - bin/b4n1secrets-linux-amd64
20
+ - lib/b4n1secrets.rb
21
+ homepage: https://github.com/B4N1-com/b4n1-secrets
22
+ licenses:
23
+ - BUSL-1.1
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.4.20
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Sovereign offline vault — committable encrypted secrets
44
+ test_files: []