console 1.36.0 → 1.37.0
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
- checksums.yaml.gz.sig +4 -3
- data/lib/console/clock.rb +15 -8
- data/lib/console/event/spawn.rb +7 -1
- data/lib/console/resolver.rb +7 -2
- data/lib/console/version.rb +1 -1
- data/readme.md +4 -4
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 885a16aa891f4867dc3ef9811178e121750a5f8395e88beb9f9a96b02d009ba9
|
|
4
|
+
data.tar.gz: 919cce15d67d7922a444f4d764864de5d1d4bb1ef04b59e723062040cbb7f5d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 922158e79dccdfa2db29f3dd46d1763542449a6ec8c96cfde6b28459e6b6f17e380108e3260b7ff74142eca57158e4191321ebe569a267010629ba408606a78e
|
|
7
|
+
data.tar.gz: 82feebd861439923efa6fd4b772a0767f83cd150925f876a620ac745a3e1da45ade27dd850f40751c3118abbffd6102f04dfccfe76418e7b194a36204da5df80
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
�
|
|
3
|
-
��v[Z���
|
|
1
|
+
G9�]c�id H�=%��N^)�1(Rn}�5�> \��ܦߝ
|
|
2
|
+
�_�VD;���F������eM/�������_=�7o�+p��gǏ]�=�B���
|
|
4
3
|
{
|
|
4
|
+
����5�K���Lq�2�qn�4�H�ݛbƒ.����m"<���}M#�<3Y? �6��f�͠S����IΗ
|
|
5
|
+
���h����_д����rwJ��pplι�~�7g@bF,���儀�PK��B_��=:Y�Y��ާd�]�"\�7�u�j���U�~6q�/���Y)*T��źF�����7374�,��zLથ�F�Uw�?h�
|
data/lib/console/clock.rb
CHANGED
|
@@ -16,21 +16,28 @@ module Console
|
|
|
16
16
|
return format("%.2fs", duration)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
duration
|
|
19
|
+
minutes = duration / 60.0
|
|
20
20
|
|
|
21
|
-
if
|
|
22
|
-
|
|
21
|
+
if minutes < 60.0
|
|
22
|
+
seconds = duration % 60
|
|
23
|
+
return format("%dm%02ds", minutes, seconds)
|
|
23
24
|
end
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
hours = minutes / 60.0
|
|
26
27
|
|
|
27
|
-
if
|
|
28
|
-
|
|
28
|
+
if hours < 24.0
|
|
29
|
+
minutes = minutes % 60
|
|
30
|
+
return format("%dh%02dm", hours, minutes)
|
|
29
31
|
end
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
days = hours / 24.0
|
|
34
|
+
|
|
35
|
+
if days < 100.0
|
|
36
|
+
hours = hours % 24
|
|
37
|
+
return format("%dd%02dh", days, hours)
|
|
38
|
+
end
|
|
32
39
|
|
|
33
|
-
return "
|
|
40
|
+
return format("%dd", days)
|
|
34
41
|
end
|
|
35
42
|
|
|
36
43
|
# @returns [Time] The current monotonic time.
|
data/lib/console/event/spawn.rb
CHANGED
|
@@ -61,7 +61,7 @@ module Console
|
|
|
61
61
|
#
|
|
62
62
|
# @parameter status [Process::Status] The status of the command.
|
|
63
63
|
def status=(status)
|
|
64
|
-
@end_time =
|
|
64
|
+
@end_time = self.now
|
|
65
65
|
@status = status
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -100,6 +100,12 @@ module Console
|
|
|
100
100
|
options[:severity] ||= :info
|
|
101
101
|
super
|
|
102
102
|
end
|
|
103
|
+
|
|
104
|
+
private
|
|
105
|
+
|
|
106
|
+
def now
|
|
107
|
+
Clock.now
|
|
108
|
+
end
|
|
103
109
|
end
|
|
104
110
|
end
|
|
105
111
|
end
|
data/lib/console/resolver.rb
CHANGED
|
@@ -103,8 +103,13 @@ module Console
|
|
|
103
103
|
#
|
|
104
104
|
# @parameter trace_point [TracePoint] The trace point that triggered the event.
|
|
105
105
|
def resolve(trace_point)
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
resolve_class(trace_point.self)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# @parameter klass [Class] The class that was resolved.
|
|
110
|
+
def resolve_class(klass)
|
|
111
|
+
if block = @names.delete(klass.to_s)
|
|
112
|
+
block.call(klass)
|
|
108
113
|
end
|
|
109
114
|
|
|
110
115
|
if @names.empty?
|
data/lib/console/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -34,6 +34,10 @@ Please see the [project documentation](https://socketry.github.io/console/) for
|
|
|
34
34
|
|
|
35
35
|
Please see the [project releases](https://socketry.github.io/console/releases/index) for all releases.
|
|
36
36
|
|
|
37
|
+
### v1.37.0
|
|
38
|
+
|
|
39
|
+
- Show compound units in elapsed time display.
|
|
40
|
+
|
|
37
41
|
### v1.36.0
|
|
38
42
|
|
|
39
43
|
- Add a `size_limit` to `Console::Format::Safe` (default 16KiB) which rebuilds oversized records field-by-field, keeping as many top-level fields as fit within the limit.
|
|
@@ -76,10 +80,6 @@ Please see the [project releases](https://socketry.github.io/console/releases/in
|
|
|
76
80
|
|
|
77
81
|
- Always return `nil` from `Console::Filter` logging methods.
|
|
78
82
|
|
|
79
|
-
### v1.29.1
|
|
80
|
-
|
|
81
|
-
- Fix logging `exception:` keyword argument when the value was not an exception.
|
|
82
|
-
|
|
83
83
|
## Contributing
|
|
84
84
|
|
|
85
85
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v1.37.0
|
|
4
|
+
|
|
5
|
+
- Show compound units in elapsed time display.
|
|
6
|
+
|
|
3
7
|
## v1.36.0
|
|
4
8
|
|
|
5
9
|
- Add a `size_limit` to `Console::Format::Safe` (default 16KiB) which rebuilds oversized records field-by-field, keeping as many top-level fields as fit within the limit.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
�
|
|
2
|
-
|
|
1
|
+
�&{�2��i�"�wj�"��
|
|
2
|
+
�������\��J�dl�ލ-4�kظwλ
|