console 1.23.1 → 1.23.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/console/format/safe.rb +33 -13
- data/lib/console/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9984686df55cf08a23326ad2399c96583b822bf45762224a30e071a8d9b20a1
|
4
|
+
data.tar.gz: 6febeee8181c2d113705133e364853adec8a7c2c2ee5499e98dc7662fc66d2ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a31fc4b37d62d7456b80091c74735c5fab350baf3a2fc280c351a52d5219b0cfbe6871bf835ed636df15d5da68def019980f351327d5ab547971fd896f62253
|
7
|
+
data.tar.gz: d9a1dc792ba4e6d97f7a6d2998a2795668ec26aaa05b27b65e89f706f0b98c80e904b0d9f916b83982bbb015a0e6e59845a23289377dc38194f156ecec28bf48
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/console/format/safe.rb
CHANGED
@@ -24,22 +24,38 @@ module Console
|
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
|
-
def default_objects
|
28
|
-
Hash.new.compare_by_identity
|
29
|
-
end
|
30
|
-
|
31
|
-
# The first N frames, noting that the last frame is a placeholder for all the skipped frames:
|
32
|
-
FIRST_N_FRAMES = 10 + 1
|
33
|
-
LAST_N_FRAMES = 20
|
34
|
-
MAXIMUM_FRAMES = FIRST_N_FRAMES + LAST_N_FRAMES
|
35
|
-
|
36
27
|
def filter_backtrace(error)
|
37
28
|
frames = error.backtrace
|
29
|
+
filtered = {}
|
30
|
+
filtered_count = nil
|
31
|
+
skipped = nil
|
32
|
+
|
33
|
+
frames = frames.filter_map do |frame|
|
34
|
+
if filtered[frame]
|
35
|
+
if filtered_count == nil
|
36
|
+
filtered_count = 1
|
37
|
+
skipped = frame.dup
|
38
|
+
else
|
39
|
+
filtered_count += 1
|
40
|
+
nil
|
41
|
+
end
|
42
|
+
else
|
43
|
+
if skipped
|
44
|
+
if filtered_count > 1
|
45
|
+
skipped.replace("[... #{filtered_count} frames skipped ...]")
|
46
|
+
end
|
47
|
+
|
48
|
+
filtered_count = nil
|
49
|
+
skipped = nil
|
50
|
+
end
|
51
|
+
|
52
|
+
filtered[frame] = true
|
53
|
+
frame
|
54
|
+
end
|
55
|
+
end
|
38
56
|
|
39
|
-
|
40
|
-
|
41
|
-
frames[FIRST_N_FRAMES-1] = "[... #{frames.size - (MAXIMUM_FRAMES-1)} frames ...]"
|
42
|
-
frames.slice!(FIRST_N_FRAMES...-LAST_N_FRAMES)
|
57
|
+
if skipped && filtered_count > 1
|
58
|
+
skipped.replace("[... #{filtered_count} frames skipped ...]")
|
43
59
|
end
|
44
60
|
|
45
61
|
return frames
|
@@ -69,6 +85,10 @@ module Console
|
|
69
85
|
end
|
70
86
|
end
|
71
87
|
|
88
|
+
def default_objects
|
89
|
+
Hash.new.compare_by_identity
|
90
|
+
end
|
91
|
+
|
72
92
|
# This will recursively generate a safe version of the object.
|
73
93
|
# Nested hashes and arrays will be transformed recursively.
|
74
94
|
# Strings will be encoded with the given encoding.
|
data/lib/console/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.23.
|
4
|
+
version: 1.23.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -46,7 +46,7 @@ cert_chain:
|
|
46
46
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
47
47
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
48
48
|
-----END CERTIFICATE-----
|
49
|
-
date: 2023-08-
|
49
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
50
50
|
dependencies:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: fiber-annotation
|
metadata.gz.sig
CHANGED
Binary file
|