gruf-relay 0.1.0.pre.dev-x86_64-darwin

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: 6cfee91be13c4019fe883984581a4c092bd9746184134f0112e165643480fe97
4
+ data.tar.gz: 9575c14815efbdf8683e6402d39c619f7a56e986b18b0203ce815a8b0ca6321a
5
+ SHA512:
6
+ metadata.gz: 6994c13e6c15547bb46a25e8c56c3c925c7f00d226d0e6cdc968f3ab47cbf79470bc542ba62fb6a741eeb919f01a07086cd10ad1684a57a8ac6b41f0f06c5dbe
7
+ data.tar.gz: 62378f614eb7cdcb590b073bba34a6a6d134553fc0cdaf3568649d1931e5d0fcf7490f6deeb564e444ba4e674d34edb02b5357364466f69ed9201c7140d2c107
data/bin/gruf-relay ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "rbconfig" # Needed for platform detection
5
+ require "gruf_relay"
6
+
7
+ # Pass all arguments to the binary
8
+ exec GrufRelay.binary_path, *ARGV
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrufRelay
4
+ VERSION = ENV.fetch("GEM_VERSION", "0.1.0")
5
+ end
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.pre.dev
5
+ platform: x86_64-darwin
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-darwin-amd64
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: []