console 1.15.3 → 1.17.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 +0 -0
- data/bake/console.rb +3 -0
- data/lib/console/buffer.rb +2 -19
- data/lib/console/capture.rb +13 -19
- data/lib/console/clock.rb +6 -23
- data/lib/console/compatible/logger.rb +2 -19
- data/lib/console/event/failure.rb +3 -20
- data/lib/console/event/generic.rb +2 -19
- data/lib/console/event/progress.rb +2 -19
- data/lib/console/event/spawn.rb +2 -19
- data/lib/console/event.rb +2 -20
- data/lib/console/filter.rb +11 -25
- data/lib/console/logger.rb +6 -31
- data/lib/console/output/default.rb +2 -19
- data/lib/console/output/json.rb +2 -19
- data/lib/console/output/sensitive.rb +2 -19
- data/lib/console/output/split.rb +28 -0
- data/lib/console/output/text.rb +2 -19
- data/lib/console/output/xterm.rb +2 -19
- data/lib/console/output.rb +2 -19
- data/lib/console/progress.rb +8 -25
- data/lib/console/resolver.rb +3 -19
- data/lib/console/serialized/logger.rb +8 -19
- data/lib/console/split.rb +5 -38
- data/lib/console/terminal/logger.rb +27 -28
- data/lib/console/terminal/text.rb +2 -19
- data/lib/console/terminal/xterm.rb +4 -21
- data/lib/console/terminal.rb +2 -19
- data/lib/console/version.rb +3 -20
- data/lib/console.rb +5 -20
- data/license.md +27 -0
- data/readme.md +31 -0
- data.tar.gz.sig +0 -0
- metadata +69 -40
- metadata.gz.sig +0 -0
- data/lib/console/event/measure.rb +0 -44
- data/lib/console/event/metric.rb +0 -60
- data/lib/console/measure.rb +0 -51
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.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -16,33 +16,34 @@ bindir: bin
|
|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VM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
44
45
|
-----END CERTIFICATE-----
|
45
|
-
date:
|
46
|
+
date: 2023-06-05 00:00:00.000000000 Z
|
46
47
|
dependencies:
|
47
48
|
- !ruby/object:Gem::Dependency
|
48
49
|
name: fiber-local
|
@@ -58,6 +59,20 @@ dependencies:
|
|
58
59
|
- - ">="
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: fiber-annotation
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
61
76
|
- !ruby/object:Gem::Dependency
|
62
77
|
name: bake
|
63
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +88,7 @@ dependencies:
|
|
73
88
|
- !ruby/object:Gem::Version
|
74
89
|
version: '0'
|
75
90
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
91
|
+
name: bake-test
|
77
92
|
requirement: !ruby/object:Gem::Requirement
|
78
93
|
requirements:
|
79
94
|
- - ">="
|
@@ -87,7 +102,7 @@ dependencies:
|
|
87
102
|
- !ruby/object:Gem::Version
|
88
103
|
version: '0'
|
89
104
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
105
|
+
name: bake-test-external
|
91
106
|
requirement: !ruby/object:Gem::Requirement
|
92
107
|
requirements:
|
93
108
|
- - ">="
|
@@ -101,33 +116,47 @@ dependencies:
|
|
101
116
|
- !ruby/object:Gem::Version
|
102
117
|
version: '0'
|
103
118
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
119
|
+
name: bundler
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
type: :development
|
126
|
+
prerelease: false
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: covered
|
105
134
|
requirement: !ruby/object:Gem::Requirement
|
106
135
|
requirements:
|
107
136
|
- - "~>"
|
108
137
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
138
|
+
version: 0.18.1
|
110
139
|
type: :development
|
111
140
|
prerelease: false
|
112
141
|
version_requirements: !ruby/object:Gem::Requirement
|
113
142
|
requirements:
|
114
143
|
- - "~>"
|
115
144
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
145
|
+
version: 0.18.1
|
117
146
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
147
|
+
name: sus
|
119
148
|
requirement: !ruby/object:Gem::Requirement
|
120
149
|
requirements:
|
121
150
|
- - "~>"
|
122
151
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
152
|
+
version: '0.14'
|
124
153
|
type: :development
|
125
154
|
prerelease: false
|
126
155
|
version_requirements: !ruby/object:Gem::Requirement
|
127
156
|
requirements:
|
128
157
|
- - "~>"
|
129
158
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
159
|
+
version: '0.14'
|
131
160
|
description:
|
132
161
|
email:
|
133
162
|
executables: []
|
@@ -143,17 +172,15 @@ files:
|
|
143
172
|
- lib/console/event.rb
|
144
173
|
- lib/console/event/failure.rb
|
145
174
|
- lib/console/event/generic.rb
|
146
|
-
- lib/console/event/measure.rb
|
147
|
-
- lib/console/event/metric.rb
|
148
175
|
- lib/console/event/progress.rb
|
149
176
|
- lib/console/event/spawn.rb
|
150
177
|
- lib/console/filter.rb
|
151
178
|
- lib/console/logger.rb
|
152
|
-
- lib/console/measure.rb
|
153
179
|
- lib/console/output.rb
|
154
180
|
- lib/console/output/default.rb
|
155
181
|
- lib/console/output/json.rb
|
156
182
|
- lib/console/output/sensitive.rb
|
183
|
+
- lib/console/output/split.rb
|
157
184
|
- lib/console/output/text.rb
|
158
185
|
- lib/console/output/xterm.rb
|
159
186
|
- lib/console/progress.rb
|
@@ -165,6 +192,8 @@ files:
|
|
165
192
|
- lib/console/terminal/text.rb
|
166
193
|
- lib/console/terminal/xterm.rb
|
167
194
|
- lib/console/version.rb
|
195
|
+
- license.md
|
196
|
+
- readme.md
|
168
197
|
homepage: https://github.com/socketry/console
|
169
198
|
licenses:
|
170
199
|
- MIT
|
@@ -177,14 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
206
|
requirements:
|
178
207
|
- - ">="
|
179
208
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
209
|
+
version: 2.7.3
|
181
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
211
|
requirements:
|
183
212
|
- - ">="
|
184
213
|
- !ruby/object:Gem::Version
|
185
214
|
version: '0'
|
186
215
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
216
|
+
rubygems_version: 3.4.7
|
188
217
|
signing_key:
|
189
218
|
specification_version: 4
|
190
219
|
summary: Beautiful logging for Ruby.
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require_relative 'metric'
|
24
|
-
require_relative '../clock'
|
25
|
-
|
26
|
-
module Console
|
27
|
-
module Event
|
28
|
-
class Enter < Generic
|
29
|
-
def initialize(name)
|
30
|
-
@name = name
|
31
|
-
end
|
32
|
-
|
33
|
-
def format(output, terminal, verbose)
|
34
|
-
output.puts "→ #{@name}"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
class Exit < Metric
|
39
|
-
def value_string
|
40
|
-
"← #{@name} took #{Clock.formatted_duration(@value)}"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
data/lib/console/event/metric.rb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require_relative 'generic'
|
24
|
-
require_relative '../clock'
|
25
|
-
|
26
|
-
module Console
|
27
|
-
module Event
|
28
|
-
class Metric < Generic
|
29
|
-
def self.[](**parameters)
|
30
|
-
parameters.map(&self.method(:new))
|
31
|
-
end
|
32
|
-
|
33
|
-
def initialize(name, value, **tags)
|
34
|
-
@name = name
|
35
|
-
@value = value
|
36
|
-
@tags = tags
|
37
|
-
end
|
38
|
-
|
39
|
-
attr :name
|
40
|
-
attr :value
|
41
|
-
attr :tags
|
42
|
-
|
43
|
-
def to_h
|
44
|
-
{name: @name, value: @value, tags: @tags}
|
45
|
-
end
|
46
|
-
|
47
|
-
def value_string
|
48
|
-
"#{@name}: #{@value}"
|
49
|
-
end
|
50
|
-
|
51
|
-
def format(output, terminal, verbose)
|
52
|
-
if @tags&.any?
|
53
|
-
output.puts "#{value_string} #{@tags.inspect}"
|
54
|
-
else
|
55
|
-
output.puts value_string
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
data/lib/console/measure.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require_relative 'event/measure'
|
24
|
-
require_relative 'clock'
|
25
|
-
|
26
|
-
module Console
|
27
|
-
class Measure
|
28
|
-
def initialize(output, subject, **tags)
|
29
|
-
@output = output
|
30
|
-
@subject = subject
|
31
|
-
@tags = tags
|
32
|
-
end
|
33
|
-
|
34
|
-
attr :tags
|
35
|
-
|
36
|
-
# Measure the execution of a block of code.
|
37
|
-
def duration(name, &block)
|
38
|
-
@output.info(@subject) {Event::Enter.new(name)}
|
39
|
-
|
40
|
-
start_time = Clock.now
|
41
|
-
|
42
|
-
result = yield(self)
|
43
|
-
|
44
|
-
duration = Clock.now - start_time
|
45
|
-
|
46
|
-
@output.info(@subject) {Event::Exit.new(name, duration, **@tags)}
|
47
|
-
|
48
|
-
return result
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|