terminalwire 0.3.0.alpha1 → 0.3.0.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +70 -0
- data/exe/terminalwire-exec +2 -0
- metadata +6 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c6a0576496fe4e19d2d6f19edd711e1e65b4610049697aea78a027c44dddc3d
|
4
|
+
data.tar.gz: 2637f65a0b40f314d2851f15ab1c851b1e1989c15aa120f0e29d0646d4e4b63b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 756b9561b5d5773dd10be19f1297efc67ed7784a97786d54555a5ce8c105a023f24d006dc8da79039310ad064dba9f49fad41ab9fbe39dde1ba0cd935ea7bb32
|
7
|
+
data.tar.gz: b9f225099cab372e0d283f30290f84b1a79d460a3ac49f4f7a4f1360fce84516a80d42aef04dc428c773cc588cd9cdfdbb92cb36f559fef775eaabc708d3ff7f
|
data/Rakefile
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
task :default do
|
4
|
+
ruby_version = "3.3.6"
|
5
|
+
os = "osx"
|
6
|
+
platform = "arm64"
|
7
|
+
url = "https://github.com/YOU54F/traveling-ruby/releases/download/rel-20241122/traveling-ruby-20241122-#{ruby_version}-#{os}-#{platform}-full.tar.gz"
|
8
|
+
path = Pathname.new("package/#{os}-#{platform}")
|
9
|
+
gem = Gem::Specification.load("terminalwire.gemspec")
|
10
|
+
|
11
|
+
sh "mkdir -p #{path}"
|
12
|
+
|
13
|
+
# Don't bother downloading if we already have the file
|
14
|
+
unless File.exist? path.join("lib/ruby/info/RUBY_COMPAT_VERSION")
|
15
|
+
sh "mkdir -p #{path.join("lib/ruby")}"
|
16
|
+
sh "curl -L #{url} | tar -xzf - -C #{path.join("lib/ruby")}"
|
17
|
+
end
|
18
|
+
|
19
|
+
# Install the base gem and all of its dependencies in the vendor directory.
|
20
|
+
sh "gem install #{gem.name} --version '#{gem.version}' --install-dir #{path.join("lib/vendor")} --no-document --verbose"
|
21
|
+
|
22
|
+
# Remove caches to make package smaller
|
23
|
+
sh "rm -rf #{path.join("lib/vendor/cache")}"
|
24
|
+
sh "rm -rf #{path.join("lib/vendor/bin")}"
|
25
|
+
sh "rm -rf #{path.join("lib/vendor/doc")}"
|
26
|
+
sh "rm -rf #{path.join("lib/vendor/plugins")}"
|
27
|
+
|
28
|
+
File.write path.join("lib/boot.rb"), <<~RUBY
|
29
|
+
# Resolve the base directory
|
30
|
+
base_dir = File.expand_path("../..", __FILE__)
|
31
|
+
|
32
|
+
# Add all gem paths under lib/vendor to the load path
|
33
|
+
Dir.glob(File.join(base_dir, "lib/vendor/gems/*/lib")).each do |gem_path|
|
34
|
+
$LOAD_PATH.unshift gem_path
|
35
|
+
end
|
36
|
+
RUBY
|
37
|
+
|
38
|
+
gems = path.glob("lib/vendor/specifications/*.gemspec").each_with_object({}) do |spec_path, hash|
|
39
|
+
spec = Gem::Specification.load(spec_path.to_s)
|
40
|
+
hash[spec.name] = spec
|
41
|
+
end
|
42
|
+
|
43
|
+
terminalwire_gem = gems.fetch("terminalwire")
|
44
|
+
|
45
|
+
gem_path = Pathname.new(terminalwire_gem.full_gem_path).relative_path_from path.expand_path
|
46
|
+
exe_path = gem_path.join(terminalwire_gem.bindir, "terminalwire-exec")
|
47
|
+
|
48
|
+
# Let's write the executable path into the thing...'
|
49
|
+
File.write path.join("terminalwire-exec"), <<~RUBY
|
50
|
+
#!/bin/bash
|
51
|
+
# Resolve the directory of the current script
|
52
|
+
SELFDIR="$(cd "$(dirname "$0")" && pwd)"
|
53
|
+
|
54
|
+
# Path to the embedded Ruby executable
|
55
|
+
RUBY_EXEC="$SELFDIR/lib/ruby/bin/ruby"
|
56
|
+
BOOT_SCRIPT="$SELFDIR/lib/boot.rb"
|
57
|
+
PROGRAM="$SELFDIR/#{exe_path}"
|
58
|
+
|
59
|
+
# Pass the boot script and the main Ruby script to Ruby
|
60
|
+
exec "$RUBY_EXEC" -r"$BOOT_SCRIPT" "$PROGRAM" "$@"
|
61
|
+
RUBY
|
62
|
+
|
63
|
+
File.chmod 0755, path.join("terminalwire-exec")
|
64
|
+
|
65
|
+
# TODO: download and install each gem extension for its platform.
|
66
|
+
native_gems = gems.values.select{ _1.extensions.any? }
|
67
|
+
native_gems.each do |native_gem|
|
68
|
+
p native_gem
|
69
|
+
end
|
70
|
+
end
|
data/exe/terminalwire-exec
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminalwire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: terminalwire-client
|
@@ -16,14 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - '='
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.0.
|
18
|
+
version: 0.3.0.alpha3
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - '='
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.0.
|
25
|
+
version: 0.3.0.alpha3
|
27
26
|
description: Stream command-line apps from your server without a web API
|
28
27
|
email:
|
29
28
|
- brad@terminalwire.com
|
@@ -33,6 +32,7 @@ executables:
|
|
33
32
|
extensions: []
|
34
33
|
extra_rdoc_files: []
|
35
34
|
files:
|
35
|
+
- Rakefile
|
36
36
|
- exe/terminalwire
|
37
37
|
- exe/terminalwire-exec
|
38
38
|
homepage: https://terminalwire.com/ruby
|
@@ -44,7 +44,6 @@ metadata:
|
|
44
44
|
source_code_uri: https://github.com/terminalwire/ruby/tree/main/terminalwire
|
45
45
|
changelog_uri: https://github.com/terminalwire/ruby/tags
|
46
46
|
funding_uri: https://terminalwire.com/funding
|
47
|
-
post_install_message:
|
48
47
|
rdoc_options: []
|
49
48
|
require_paths:
|
50
49
|
- lib
|
@@ -59,8 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
58
|
- !ruby/object:Gem::Version
|
60
59
|
version: '0'
|
61
60
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
63
|
-
signing_key:
|
61
|
+
rubygems_version: 3.6.2
|
64
62
|
specification_version: 4
|
65
63
|
summary: Ship a CLI for your web app. No API required.
|
66
64
|
test_files: []
|