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.
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.15.3
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -16,33 +16,34 @@ bindir: bin
16
16
  cert_chain:
17
17
  - |
18
18
  -----BEGIN CERTIFICATE-----
19
- MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
20
- ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
21
- MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
22
- aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
23
- AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
24
- xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
25
- eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
26
- L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
27
- 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
28
- E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
29
- rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
30
- w+XmCywiTQrFzMMAvcA7rP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6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
38
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
39
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
40
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
41
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
42
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
43
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
44
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
44
45
  -----END CERTIFICATE-----
45
- date: 2022-05-12 00:00:00.000000000 Z
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: bundler
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: covered
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: rake
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: '10.0'
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: '10.0'
145
+ version: 0.18.1
117
146
  - !ruby/object:Gem::Dependency
118
- name: rspec
147
+ name: sus
119
148
  requirement: !ruby/object:Gem::Requirement
120
149
  requirements:
121
150
  - - "~>"
122
151
  - !ruby/object:Gem::Version
123
- version: '3.0'
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: '3.0'
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: '2.5'
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.3.7
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
@@ -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
@@ -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