debug_socket 0.1.6 → 0.1.8
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 +4 -4
- data/CHANGES.md +11 -0
- data/README.md +3 -3
- data/exe/debug-socket +10 -3
- data/lib/debug_socket/version.rb +1 -1
- metadata +7 -8
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,3 +1,14 @@
|
|
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
|
7
|
+
|
8
|
+
- [#11](https://github.com/square/debug_socket/pull/11)
|
9
|
+
Properly escape command when sent to socket.
|
10
|
+
([@drcapulet])
|
11
|
+
|
1
12
|
### 0.1.6 2018-09-20
|
2
13
|
- Update rubocop
|
3
14
|
- Check socket existence before closing
|
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
@@ -1,15 +1,22 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require "shellwords"
|
5
|
+
require "socket"
|
6
|
+
|
4
7
|
if ARGV[0].nil? || ARGV[0].empty? || ARGV[0] == "-h" || ARGV[0] == "--help"
|
5
8
|
puts "\nUsage: debug-socket <socket-path> [<command>=backtrace]"
|
6
9
|
exit 1
|
7
10
|
end
|
8
11
|
|
9
|
-
|
12
|
+
socket_path = ARGV[0]
|
10
13
|
command = ARGV[1] || "backtrace"
|
11
14
|
|
12
|
-
warn "\nSending `#{command}` to the following socket: #{
|
15
|
+
warn "\nSending `#{command}` to the following socket: #{socket_path}"\
|
13
16
|
"----------------------------------------------------------\n\n"
|
14
17
|
|
15
|
-
|
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,9 +51,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
|
55
|
-
|
56
|
-
signing_key:
|
54
|
+
rubygems_version: 3.3.3
|
55
|
+
signing_key:
|
57
56
|
specification_version: 4
|
58
57
|
summary: Debug Socket for running ruby processes
|
59
58
|
test_files: []
|