anycable-thruster 0.1.16-x86_64-darwin → 0.1.17-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3679db5371a79f966a6646b0ec492c2d2a198c6cfb90df9377757319c3d21371
4
- data.tar.gz: 918c26fe0f8cfad523c95a9d05ecb119b1be1aa68148b3ba320875e1f883aefe
3
+ metadata.gz: c6a9dfa203d90b5610bb2dfbfdfdd015c6b1417d027a9d59b5d45ac2b4876c89
4
+ data.tar.gz: 15244a43b64a0901cc64de4c73854edb350f67cb1d94f297e0d1dee3d97f1459
5
5
  SHA512:
6
- metadata.gz: 16c3afa445a82f441a937454e7452cdfa8a990f04d5cb424fd173935a7c5c46344ceaddd13767af757f2837f2ab07c35f957373fb3e5668322f72a106249981d
7
- data.tar.gz: 437e8efcbc38c52aa8b8e3ad1c77621043d47e12d489c8678a58229c4048237c19d63e1bdd4c75864627e49fca93649ab0cb4b2fa3105f3a9418f71cd275dc33
6
+ metadata.gz: 8cfa1e29a4b58f3b84f03b1675730a018a7a936aec0bcd7f9b459d9312a73422664168720333681f451123063b3e6136c2cbc78192f87d92c5cf688f73c864d4
7
+ data.tar.gz: b166411d8a3e1a16063fdf4e381decaa343cc294e364d1307e8defd646fa608ced29634d4ae8712a3be20b4287f20d89cfd3972e91ab78f5da154a4377384d7f
data/README.md CHANGED
@@ -26,6 +26,40 @@ ANYCABLE_DEBUG=true thrust bin/rails s
26
26
  ANYCABLE_OPT="-debug" thrust bin/rails s
27
27
  ```
28
28
 
29
+ ## Using a custom AnyCable binary
30
+
31
+ AnyCable Thruster can launch an external AnyCable-compatible binary (e.g., **AnyCable Pro**) instead of the one bundled with the gem.
32
+ Set `ANYCABLE_THRUSTER_BIN_PATH` to either a **full path** or a **command name** (looked up in `$PATH`).
33
+ If the variable is not set, Thruster falls back to the bundled per-platform binary.
34
+
35
+ ### Local usage
36
+
37
+ If you have `anycable-thruster` available in your `$PATH`:
38
+
39
+ ```sh
40
+ # Thruster will exec the given binary and pass through all CLI args
41
+ ANYCABLE_THRUSTER_BIN_PATH=anycable-thruster thrust bin/rails server
42
+
43
+ #You may also use an absolute path if you prefer:
44
+ ANYCABLE_THRUSTER_BIN_PATH=/usr/local/bin/anycable-thruster thrust bin/rails server
45
+ ```
46
+
47
+ ### Heroku (with the AnyCable Go buildpack)
48
+
49
+ **Configure the AnyCable Go buildpack to fetch the Thruster binary:**
50
+ - `HEROKU_ANYCABLE_GO_BINARY_NAME=anycable-thruster`
51
+
52
+ In Procfile:
53
+
54
+ ```
55
+ # resolves via PATH
56
+ web: ANYCABLE_THRUSTER_BIN_PATH=anycable-thruster thrust bin/rails server
57
+
58
+ # resolve absolute path at runtime
59
+ # web: ANYCABLE_THRUSTER_BIN_PATH=$(which anycable-thruster) thrust bin/rails server
60
+ ```
61
+
62
+ For full buildpack options see the buildpack [README](https://github.com/anycable/heroku-anycable-go).
29
63
  ----
30
64
 
31
65
  > [!NOTE]
@@ -123,6 +157,7 @@ environment variables that you can set.
123
157
  | `EAB_KID` | The EAB key identifier to use when provisioning TLS certificates, if required. | None |
124
158
  | `EAB_HMAC_KEY` | The Base64-encoded EAB HMAC key to use when provisioning TLS certificates, if required. | None |
125
159
  | `FORWARD_HEADERS` | Whether to forward X-Forwarded-* headers from the client. | Disabled when running with TLS; enabled otherwise |
160
+ | `LOG_REQUESTS` | Log all requests. Set to `0` or `false` to disable request logging | Enabled |
126
161
  | `DEBUG` | Set to `1` or `true` to enable debug logging. | Disabled |
127
162
 
128
163
  To prevent naming clashes with your application's own environment variables,
data/exe/thrust CHANGED
@@ -1,11 +1,26 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- PLATFORM = [ :cpu, :os ].map { |m| Gem::Platform.local.send(m) }.join("-")
3
+ ENV_KEY = "ANYCABLE_THRUSTER_BIN_PATH"
4
+ CUSTOM_ANYCABLE_PATH = ENV[ENV_KEY].to_s
5
+
6
+ if CUSTOM_ANYCABLE_PATH != ""
7
+ begin
8
+ exec(CUSTOM_ANYCABLE_PATH, *ARGV)
9
+ rescue Errno::ENOENT
10
+ warn("ERROR: #{ENV_KEY}=#{CUSTOM_ANYCABLE_PATH.inspect} not found in PATH or as a file.")
11
+ exit 1
12
+ rescue SystemCallError => e
13
+ warn("ERROR: #{ENV_KEY}=#{CUSTOM_ANYCABLE_PATH.inspect} failed: #{e.class}: #{e.message}")
14
+ exit 1
15
+ end
16
+ end
17
+
18
+ PLATFORM = %i[cpu os].map { |m| Gem::Platform.local.send(m) }.join("-")
4
19
  EXECUTABLE = File.expand_path(File.join(__dir__, PLATFORM, "thrust"))
5
20
 
6
21
  if File.exist?(EXECUTABLE)
7
22
  exec(EXECUTABLE, *ARGV)
8
23
  else
9
- STDERR.puts("ERROR: Unsupported platform: #{PLATFORM}")
24
+ warn("ERROR: Unsupported platform: #{PLATFORM}")
10
25
  exit 1
11
26
  end
Binary file
@@ -2,7 +2,7 @@ require_relative "../../thruster/version"
2
2
 
3
3
  module AnyCable
4
4
  module Thruster
5
- VERSION = "0.1.16"
5
+ VERSION = "0.1.17"
6
6
 
7
7
  # Very basic validation to ensure the versions are in sync
8
8
  if ::Thruster::VERSION.split(".").take(2) != VERSION.split(".").take(2)
@@ -1,3 +1,3 @@
1
1
  module Thruster
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anycable-thruster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Kevin McConnell
@@ -9,7 +9,7 @@ authors:
9
9
  - Igor Platonov
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-06-04 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A zero-config HTTP/2 proxy for lightweight production deployments with
15
15
  AnyCable real-time server included
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubygems_version: 3.6.5
49
+ rubygems_version: 3.6.9
50
50
  specification_version: 4
51
51
  summary: Zero-config HTTP/2 proxy with embedded AnyCable
52
52
  test_files: []