gruf-relay 0.1.0-arm64-linux
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/bin/gruf-relay +8 -0
- data/exe/gruf-relay-linux-arm64 +0 -0
- data/lib/gruf_relay/version.rb +5 -0
- data/lib/gruf_relay.rb +55 -0
- metadata +51 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 26fafc9015deefe5f4476ce16c527bfe8f563728b9692bb0d492b94b502992b0
|
4
|
+
data.tar.gz: d6a775b272e4771b7069a30635a1f2fa05e4bd70da5c96dedd061ed17772dbbf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: da6d78e219958b7d6d339877f924b0f98409998f83ab15fd686966eb042aa462c8a260ca4aa4a93124c15d32f6e27e85f50ec20cc0b13943e28c5a7f591fe05b
|
7
|
+
data.tar.gz: 87a03a859c1c4be1cf4b312078b300e4555754a433ddfa29a73e50b928d35950c0a87e8fbb8741e165a41d34f38a24da135ff55028ec0d0bb6ac3c94330f0358
|
data/bin/gruf-relay
ADDED
Binary file
|
data/lib/gruf_relay.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gruf_relay/version"
|
4
|
+
|
5
|
+
module GrufRelay
|
6
|
+
class Error < StandardError; end
|
7
|
+
class UnsupportedPlatformError < Error; end
|
8
|
+
|
9
|
+
# Path to the binary for the current platform
|
10
|
+
def self.binary_path
|
11
|
+
@@binary_path ||= begin
|
12
|
+
os = RbConfig::CONFIG["host_os"].downcase
|
13
|
+
cpu = RbConfig::CONFIG["host_cpu"].downcase
|
14
|
+
|
15
|
+
# Normalize OS
|
16
|
+
os = case os
|
17
|
+
when /linux/
|
18
|
+
"linux"
|
19
|
+
when /darwin|mac os/
|
20
|
+
"darwin"
|
21
|
+
else
|
22
|
+
raise UnsupportedPlatformError, "Unsupported OS: #{os}"
|
23
|
+
end
|
24
|
+
|
25
|
+
# Normalize CPU architecture
|
26
|
+
arch = case cpu
|
27
|
+
when /x86_64|x64|amd64/
|
28
|
+
"amd64"
|
29
|
+
when /arm64|aarch64/
|
30
|
+
"arm64"
|
31
|
+
else
|
32
|
+
raise UnsupportedPlatformError, "Unsupported architecture: #{cpu}"
|
33
|
+
end
|
34
|
+
|
35
|
+
binary_name = "gruf-relay-#{os}-#{arch}"
|
36
|
+
|
37
|
+
# Path to the binary for this platform
|
38
|
+
binary_path = File.expand_path("../exe/#{binary_name}", __dir__)
|
39
|
+
|
40
|
+
unless File.exist?(binary_path)
|
41
|
+
raise Error, "Missing binary for #{os}/#{arch}. Expected at #{binary_path}"
|
42
|
+
end
|
43
|
+
|
44
|
+
# Make sure the binary is executable
|
45
|
+
File.chmod(0755, binary_path) unless File.executable?(binary_path)
|
46
|
+
|
47
|
+
binary_path
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Execute the gruf-relay binary with the given arguments
|
52
|
+
def self.execute(*args)
|
53
|
+
system(binary_path, *args)
|
54
|
+
end
|
55
|
+
end
|
metadata
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gruf-relay
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: arm64-linux
|
6
|
+
authors:
|
7
|
+
- Misha Merkushin aka bibendi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-04-30 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A Go-based gRPC Gruf Relay service wrapped in a Ruby gem
|
14
|
+
email:
|
15
|
+
- merkushin.m.s@gmail.com
|
16
|
+
executables:
|
17
|
+
- gruf-relay
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- bin/gruf-relay
|
22
|
+
- exe/gruf-relay-linux-arm64
|
23
|
+
- lib/gruf_relay.rb
|
24
|
+
- lib/gruf_relay/version.rb
|
25
|
+
homepage: https://github.com/bibendi/gruf-relay
|
26
|
+
licenses:
|
27
|
+
- MIT
|
28
|
+
metadata:
|
29
|
+
homepage_uri: https://github.com/bibendi/gruf-relay
|
30
|
+
source_code_uri: https://github.com/bibendi/gruf-relay/tree/master
|
31
|
+
changelog_uri: https://github.com/bibendi/gruf-relay/blob/master/CHANGELOG.md
|
32
|
+
post_install_message:
|
33
|
+
rdoc_options: []
|
34
|
+
require_paths:
|
35
|
+
- lib
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.7.0
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
requirements: []
|
47
|
+
rubygems_version: 3.5.21
|
48
|
+
signing_key:
|
49
|
+
specification_version: 4
|
50
|
+
summary: gRPC Gruf Relay service
|
51
|
+
test_files: []
|