debug_socket 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -1
- data/README.md +3 -3
- data/exe/debug-socket +8 -3
- data/lib/debug_socket/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92e2954364c7dd4e35377fcf428a18359e1f0e08155976d3991d39b9c64445ae
|
4
|
+
data.tar.gz: 5c970a58fca9e9c995b0223b988c48b2aea894906161bd336e566b4fbbdcab5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 603356c14c52452afcd8453a26dd657a0ef033b09f7b3df3ad0f50425ef9ea08d14998f430aceb1e85dc57d7819f7391acce142efc1466bbd4ede6ed758e1ac2
|
7
|
+
data.tar.gz: 11ff34cbba7b9a01f7632fa59b5893427c8eeb2782387198946eb792724791c6c0cd7f9dded065c8934e8e3dc43b601d6cef6db081d2abf3b19113630ac05a1c
|
data/CHANGES.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
### 0.1.
|
1
|
+
### 0.1.8 2022-10-10
|
2
|
+
|
3
|
+
- [#15](https://github.com/square/debug_socket/pull/15)
|
4
|
+
Remove socat dependency in debug-socket script.
|
5
|
+
|
6
|
+
### 0.1.7 2020-01-09
|
2
7
|
|
3
8
|
- [#11](https://github.com/square/debug_socket/pull/11)
|
4
9
|
Properly escape command when sent to socket.
|
data/README.md
CHANGED
@@ -63,9 +63,9 @@ spec/debug_socket_spec.rb:48:in `sleep'
|
|
63
63
|
spec/debug_socket_spec.rb:48:in `block (4 levels) in <top (required)>'
|
64
64
|
```
|
65
65
|
|
66
|
-
The gem also provides a
|
67
|
-
|
68
|
-
|
66
|
+
The gem also provides a script. The `debug-socket` script takes one argument,
|
67
|
+
the path to the unix socket, and it will run the `backtrace` command through
|
68
|
+
that socket.
|
69
69
|
|
70
70
|
```
|
71
71
|
% debug-socket ~/tmp/puma-debug-1234.sock
|
data/exe/debug-socket
CHANGED
@@ -2,16 +2,21 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require "shellwords"
|
5
|
+
require "socket"
|
5
6
|
|
6
7
|
if ARGV[0].nil? || ARGV[0].empty? || ARGV[0] == "-h" || ARGV[0] == "--help"
|
7
8
|
puts "\nUsage: debug-socket <socket-path> [<command>=backtrace]"
|
8
9
|
exit 1
|
9
10
|
end
|
10
11
|
|
11
|
-
|
12
|
+
socket_path = ARGV[0]
|
12
13
|
command = ARGV[1] || "backtrace"
|
13
14
|
|
14
|
-
warn "\nSending `#{command}` to the following socket: #{
|
15
|
+
warn "\nSending `#{command}` to the following socket: #{socket_path}"\
|
15
16
|
"----------------------------------------------------------\n\n"
|
16
17
|
|
17
|
-
|
18
|
+
UNIXSocket.open(socket_path) do |socket|
|
19
|
+
socket.write(command)
|
20
|
+
socket.close_write
|
21
|
+
puts socket.read
|
22
|
+
end
|
data/lib/debug_socket/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debug_socket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Lazarus
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description:
|
14
14
|
email:
|
15
15
|
- lazarus@squareup.com
|
16
16
|
executables:
|
@@ -36,7 +36,7 @@ files:
|
|
36
36
|
homepage: https://github.com/square/debug_socket
|
37
37
|
licenses: []
|
38
38
|
metadata: {}
|
39
|
-
post_install_message:
|
39
|
+
post_install_message:
|
40
40
|
rdoc_options: []
|
41
41
|
require_paths:
|
42
42
|
- lib
|
@@ -51,8 +51,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.
|
55
|
-
signing_key:
|
54
|
+
rubygems_version: 3.3.3
|
55
|
+
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: Debug Socket for running ruby processes
|
58
58
|
test_files: []
|