bivvy-cli 0.1.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.
- checksums.yaml +7 -0
- data/VERSION +1 -0
- data/exe/bivvy +7 -0
- data/ext/extconf.rb +68 -0
- metadata +50 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d19f0e7be2dba74dc2a414f6360bba702b17282564ab3d6192ad4d4f5dbf1547
|
|
4
|
+
data.tar.gz: 28304e5d637d2ceb0c1bb767812d5a267b10f6c447eecfc30dd348092e380b0d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 8b0161db59bd92a694332655b198749b5d46f3b33dafdb89e8e3a95e33697a9c7bc02bda7fe4d3271bc6bd0b6728e8f079e2827478c33751cc65bfd12c5670cf
|
|
7
|
+
data.tar.gz: 9057739f72cea5d32ff8c8a3342295d8f9859bab5ebfca7ec82959f6734b3c3e6f6c9832456f0cbdf572aae64f489e07d4bd9f0c9eaf8f58789ee78ecc36509a
|
data/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.1
|
data/exe/bivvy
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# Ruby's Kernel#exec replaces the current process with the given command.
|
|
5
|
+
# Arguments are passed as an array, avoiding shell interpretation.
|
|
6
|
+
binary_path = File.expand_path("bivvy-bin", __dir__)
|
|
7
|
+
exec(binary_path, *ARGV)
|
data/ext/extconf.rb
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Downloads the bivvy binary during gem installation
|
|
4
|
+
|
|
5
|
+
require "fileutils"
|
|
6
|
+
require "net/http"
|
|
7
|
+
require "uri"
|
|
8
|
+
require "rubygems/package"
|
|
9
|
+
require "zlib"
|
|
10
|
+
require "stringio"
|
|
11
|
+
|
|
12
|
+
VERSION = File.read(File.expand_path("../../VERSION", __dir__)).strip rescue "0.0.0"
|
|
13
|
+
GITHUB_REPO = "bivvy-dev/bivvy"
|
|
14
|
+
|
|
15
|
+
def platform
|
|
16
|
+
os = case RbConfig::CONFIG["host_os"]
|
|
17
|
+
when /darwin/i then "darwin"
|
|
18
|
+
when /linux/i then "linux"
|
|
19
|
+
when /mswin|mingw|cygwin/i then "windows"
|
|
20
|
+
else raise "Unsupported OS: #{RbConfig::CONFIG["host_os"]}"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
arch = case RbConfig::CONFIG["host_cpu"]
|
|
24
|
+
when /x86_64|amd64/i then "x64"
|
|
25
|
+
when /arm64|aarch64/i then "arm64"
|
|
26
|
+
else raise "Unsupported architecture: #{RbConfig::CONFIG["host_cpu"]}"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
"#{os}-#{arch}"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def download_binary
|
|
33
|
+
url = "https://github.com/#{GITHUB_REPO}/releases/download/v#{VERSION}/bivvy-#{platform}.tar.gz"
|
|
34
|
+
puts "Downloading bivvy from #{url}"
|
|
35
|
+
|
|
36
|
+
uri = URI(url)
|
|
37
|
+
response = Net::HTTP.get_response(uri)
|
|
38
|
+
|
|
39
|
+
# Follow redirects
|
|
40
|
+
while response.is_a?(Net::HTTPRedirection)
|
|
41
|
+
uri = URI(response["location"])
|
|
42
|
+
response = Net::HTTP.get_response(uri)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
raise "Download failed: #{response.code}" unless response.is_a?(Net::HTTPSuccess)
|
|
46
|
+
|
|
47
|
+
# Extract tar.gz
|
|
48
|
+
bin_dir = File.expand_path("../../exe", __dir__)
|
|
49
|
+
FileUtils.mkdir_p(bin_dir)
|
|
50
|
+
|
|
51
|
+
Gem::Package::TarReader.new(Zlib::GzipReader.new(StringIO.new(response.body))) do |tar|
|
|
52
|
+
tar.each do |entry|
|
|
53
|
+
if entry.file? && entry.full_name == "bivvy"
|
|
54
|
+
File.open(File.join(bin_dir, "bivvy-bin"), "wb") do |f|
|
|
55
|
+
f.write(entry.read)
|
|
56
|
+
end
|
|
57
|
+
FileUtils.chmod(0o755, File.join(bin_dir, "bivvy-bin"))
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
puts "bivvy installed successfully"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
download_binary
|
|
66
|
+
|
|
67
|
+
# Create empty Makefile (required by extconf.rb contract)
|
|
68
|
+
File.write("Makefile", "install:\n\t@echo 'Nothing to compile'\n")
|
metadata
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: bivvy-cli
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Brenna Flood
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-02-10 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Bivvy replaces ad-hoc bin/setup scripts with declarative YAML configuration.
|
|
14
|
+
email:
|
|
15
|
+
- hello@bivvy.dev
|
|
16
|
+
executables:
|
|
17
|
+
- bivvy
|
|
18
|
+
extensions:
|
|
19
|
+
- ext/extconf.rb
|
|
20
|
+
extra_rdoc_files: []
|
|
21
|
+
files:
|
|
22
|
+
- VERSION
|
|
23
|
+
- exe/bivvy
|
|
24
|
+
- ext/extconf.rb
|
|
25
|
+
homepage: https://bivvy.dev
|
|
26
|
+
licenses:
|
|
27
|
+
- FSL-1.1-Apache-2.0
|
|
28
|
+
metadata:
|
|
29
|
+
homepage_uri: https://bivvy.dev
|
|
30
|
+
source_code_uri: https://github.com/bivvy-dev/bivvy
|
|
31
|
+
post_install_message:
|
|
32
|
+
rdoc_options: []
|
|
33
|
+
require_paths:
|
|
34
|
+
- lib
|
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: 2.7.0
|
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
|
+
requirements:
|
|
42
|
+
- - ">="
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
version: '0'
|
|
45
|
+
requirements: []
|
|
46
|
+
rubygems_version: 3.4.19
|
|
47
|
+
signing_key:
|
|
48
|
+
specification_version: 4
|
|
49
|
+
summary: Cross-language development environment setup automation
|
|
50
|
+
test_files: []
|