debug_socket 0.1.10 → 0.1.11
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 +9 -2
- data/Gemfile +2 -0
- data/lib/debug_socket/version.rb +1 -1
- data/lib/debug_socket.rb +9 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c844ddc1e0ac6b6b437a7d5092d7307421f98cb81a18fe6a0da66ee23ba2f49
|
|
4
|
+
data.tar.gz: ff08f0e2e6d88b8ed324085232e4e9a1b30ef28eaded4e68eac6e9fdbc5ac5dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9bccf812ec9b3b27435e4d44ce4bd01e754b77d0d0d79ca8c37d4984b7d0003c793f21f02b037a527d8274bd5e693f702f30968640480b8a435564c9657ab1b0
|
|
7
|
+
data.tar.gz: 9a9d99005a8e6c45da15b7dd1e3175cc91c9ca345d3fb2c1f5c7b31aac377fb9b0d1a00301828fb832582fdd01563cfb02ee24ae2806bd21fca55243c8a9d70b
|
data/CHANGES.md
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
### 0.1.11 2026-01-07
|
|
2
|
+
|
|
3
|
+
- [#19](https://github.com/square/debug_socket/pull/19)
|
|
4
|
+
`dup` the `input` before `eval`-ing it so any modifications of `input` do not impact logging.
|
|
5
|
+
(@nerdrew)
|
|
6
|
+
|
|
1
7
|
### 0.1.10 2025-09-05
|
|
2
8
|
|
|
3
|
-
- #18
|
|
4
|
-
Use log level `warn` instead of `unknown` for logging the socket path.
|
|
9
|
+
- [#18](https://github.com/square/debug_socket/pull/18)
|
|
10
|
+
Use log level `warn` instead of `unknown` for logging the socket path.
|
|
11
|
+
(@mdayaram)
|
|
5
12
|
|
|
6
13
|
### 0.1.9 2025-04-03
|
|
7
14
|
|
data/Gemfile
CHANGED
data/lib/debug_socket/version.rb
CHANGED
data/lib/debug_socket.rb
CHANGED
|
@@ -11,10 +11,6 @@ module DebugSocket
|
|
|
11
11
|
# to run.
|
|
12
12
|
def self.isolated_eval(input)
|
|
13
13
|
eval(input) # rubocop:disable Security/Eval
|
|
14
|
-
# We rescue Exception here because the input could have SyntaxErrors etc.
|
|
15
|
-
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
16
|
-
DebugSocket.logger&.error { "debug-socket-error=#{e.inspect} input=#{input.inspect} path=#{@path} backtrace=#{e.backtrace.inspect}" }
|
|
17
|
-
"#{e.class.name}: #{e.message}\n#{e.backtrace.join("\n")}"
|
|
18
14
|
end
|
|
19
15
|
|
|
20
16
|
# Print the backtrace for every Thread
|
|
@@ -63,7 +59,15 @@ module DebugSocket
|
|
|
63
59
|
logger&.warn("debug-socket-command=#{input.inspect}")
|
|
64
60
|
|
|
65
61
|
perform_audit(input, &block) if block
|
|
66
|
-
|
|
62
|
+
output =
|
|
63
|
+
begin
|
|
64
|
+
Commands.isolated_eval(input.dup)
|
|
65
|
+
# We rescue Exception here because the input could have SyntaxErrors etc.
|
|
66
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
67
|
+
logger&.error { "debug-socket-error=#{e.inspect} input=#{input.inspect} path=#{@path} backtrace=#{e.backtrace.inspect}" }
|
|
68
|
+
"#{e.class.name}: #{e.message}\n#{e.backtrace.join("\n")}"
|
|
69
|
+
end
|
|
70
|
+
socket.puts(output)
|
|
67
71
|
|
|
68
72
|
errors = 0
|
|
69
73
|
rescue StandardError => e
|