console 1.15.3 → 1.16.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/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 +10 -24
- 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 +2 -19
- data/lib/console/split.rb +5 -38
- data/lib/console/terminal/logger.rb +3 -19
- data/lib/console/terminal/text.rb +2 -19
- data/lib/console/terminal/xterm.rb +2 -19
- 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 +54 -39
- 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
data/lib/console/progress.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2020-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative 'event/progress'
|
24
7
|
require_relative 'clock'
|
@@ -29,14 +12,14 @@ module Console
|
|
29
12
|
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
30
13
|
end
|
31
14
|
|
32
|
-
def initialize(output, subject, total = 0, minimum_output_duration: 1
|
15
|
+
def initialize(output, subject, total = 0, minimum_output_duration: 0.1)
|
33
16
|
@output = output
|
34
17
|
@subject = subject
|
35
18
|
|
36
19
|
@start_time = Progress.now
|
37
20
|
|
38
21
|
@last_output_time = nil
|
39
|
-
@minimum_output_duration =
|
22
|
+
@minimum_output_duration = minimum_output_duration
|
40
23
|
|
41
24
|
@current = 0
|
42
25
|
@total = total
|
@@ -50,8 +33,8 @@ module Console
|
|
50
33
|
Progress.now - @start_time
|
51
34
|
end
|
52
35
|
|
53
|
-
def
|
54
|
-
@current.to_f
|
36
|
+
def ratio
|
37
|
+
Rational(@current.to_f, @total.to_f)
|
55
38
|
end
|
56
39
|
|
57
40
|
def remaining
|
@@ -90,8 +73,8 @@ module Console
|
|
90
73
|
return self
|
91
74
|
end
|
92
75
|
|
93
|
-
def mark(
|
94
|
-
@output.info(@subject,
|
76
|
+
def mark(...)
|
77
|
+
@output.info(@subject, ...)
|
95
78
|
end
|
96
79
|
|
97
80
|
def to_s
|
data/lib/console/resolver.rb
CHANGED
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2021, by Robert Schulze.
|
22
6
|
|
23
7
|
require_relative 'filter'
|
24
8
|
|
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative '../buffer'
|
24
7
|
require_relative '../filter'
|
data/lib/console/split.rb
CHANGED
@@ -1,43 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
|
6
|
-
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
5
|
+
|
6
|
+
require_relative 'output/split'
|
22
7
|
|
23
8
|
module Console
|
24
|
-
|
25
|
-
def self.[] *outputs
|
26
|
-
self.new(outputs)
|
27
|
-
end
|
28
|
-
|
29
|
-
def initialize(outputs)
|
30
|
-
@outputs = outputs
|
31
|
-
end
|
32
|
-
|
33
|
-
def verbose!(value = true)
|
34
|
-
@outputs.each{|output| output.verbose!(value)}
|
35
|
-
end
|
36
|
-
|
37
|
-
def call(level, subject = nil, *arguments, **options, &block)
|
38
|
-
@outputs.each do |output|
|
39
|
-
output.call(level, subject, *arguments, **options, &block)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
9
|
+
Split = Output::Split
|
43
10
|
end
|
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2021, by Robert Schulze.
|
22
6
|
|
23
7
|
require_relative '../buffer'
|
24
8
|
require_relative '../event'
|
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require 'io/console'
|
24
7
|
|
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require 'io/console'
|
24
7
|
|
data/lib/console/terminal.rb
CHANGED
@@ -1,23 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative 'terminal/logger'
|
data/lib/console/version.rb
CHANGED
@@ -1,25 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
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.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
22
5
|
|
23
6
|
module Console
|
24
|
-
VERSION = "1.
|
7
|
+
VERSION = "1.16.2"
|
25
8
|
end
|
data/lib/console.rb
CHANGED
@@ -1,25 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
# Copyright, 2019, by Samuel
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2019, by Bryan Powell.
|
6
|
+
# Copyright, 2020, by Michael Adams.
|
7
|
+
# Copyright, 2021, by Cédric Boutillier.
|
23
8
|
|
24
9
|
require_relative 'console/version'
|
25
10
|
require_relative 'console/logger'
|
data/license.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2019-2022, by Samuel Williams.
|
4
|
+
Copyright, 2019-2021, by Bryan Powell.
|
5
|
+
Copyright, 2019, by Cyril Roelandt.
|
6
|
+
Copyright, 2020, by Olle Jonsson.
|
7
|
+
Copyright, 2020, by Michael Adams.
|
8
|
+
Copyright, 2021, by Cédric Boutillier.
|
9
|
+
Copyright, 2021, by Robert Schulze.
|
10
|
+
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
13
|
+
in the Software without restriction, including without limitation the rights
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
16
|
+
furnished to do so, subject to the following conditions:
|
17
|
+
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
19
|
+
copies or substantial portions of the Software.
|
20
|
+
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
+
SOFTWARE.
|
data/readme.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Console
|
2
|
+
|
3
|
+
Provides beautiful console logging for Ruby applications. Implements fast, buffered log output.
|
4
|
+
|
5
|
+
[![Development Status](https://github.com/socketry/console/workflows/Test/badge.svg)](https://github.com/socketry/console/actions?workflow=Test)
|
6
|
+
|
7
|
+
## Motivation
|
8
|
+
|
9
|
+
When Ruby decided to reverse the order of exception backtraces, I finally gave up using the built in logging and decided restore sanity to the output of my programs once and for all!
|
10
|
+
|
11
|
+
## Features
|
12
|
+
|
13
|
+
- Thread safe global logger with per-fiber context.
|
14
|
+
- Carry along context with nested loggers.
|
15
|
+
- Enable/disable log levels per-class.
|
16
|
+
- Detailed logging of exceptions.
|
17
|
+
- Beautiful logging to the terminal or structured logging using JSON.
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Please see the [project documentation](https://socketry.github.io/console).
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
We welcome contributions to this project.
|
26
|
+
|
27
|
+
1. Fork it.
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
31
|
+
5. Create new Pull Request.
|
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.
|
4
|
+
version: 1.16.2
|
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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
19
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
20
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
21
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
22
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
23
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
24
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
25
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
26
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
27
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
28
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
29
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
30
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
31
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
32
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
33
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
34
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
35
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
36
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
37
|
+
cBsSYwK6fYpM+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-
|
46
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
46
47
|
dependencies:
|
47
48
|
- !ruby/object:Gem::Dependency
|
48
49
|
name: fiber-local
|
@@ -73,7 +74,7 @@ dependencies:
|
|
73
74
|
- !ruby/object:Gem::Version
|
74
75
|
version: '0'
|
75
76
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
77
|
+
name: bake-test
|
77
78
|
requirement: !ruby/object:Gem::Requirement
|
78
79
|
requirements:
|
79
80
|
- - ">="
|
@@ -87,7 +88,7 @@ dependencies:
|
|
87
88
|
- !ruby/object:Gem::Version
|
88
89
|
version: '0'
|
89
90
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
91
|
+
name: bake-test-external
|
91
92
|
requirement: !ruby/object:Gem::Requirement
|
92
93
|
requirements:
|
93
94
|
- - ">="
|
@@ -101,33 +102,47 @@ dependencies:
|
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
104
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
105
|
+
name: bundler
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: covered
|
105
120
|
requirement: !ruby/object:Gem::Requirement
|
106
121
|
requirements:
|
107
122
|
- - "~>"
|
108
123
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
124
|
+
version: 0.18.1
|
110
125
|
type: :development
|
111
126
|
prerelease: false
|
112
127
|
version_requirements: !ruby/object:Gem::Requirement
|
113
128
|
requirements:
|
114
129
|
- - "~>"
|
115
130
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
131
|
+
version: 0.18.1
|
117
132
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
133
|
+
name: sus
|
119
134
|
requirement: !ruby/object:Gem::Requirement
|
120
135
|
requirements:
|
121
136
|
- - "~>"
|
122
137
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
138
|
+
version: '0.14'
|
124
139
|
type: :development
|
125
140
|
prerelease: false
|
126
141
|
version_requirements: !ruby/object:Gem::Requirement
|
127
142
|
requirements:
|
128
143
|
- - "~>"
|
129
144
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
145
|
+
version: '0.14'
|
131
146
|
description:
|
132
147
|
email:
|
133
148
|
executables: []
|
@@ -143,17 +158,15 @@ files:
|
|
143
158
|
- lib/console/event.rb
|
144
159
|
- lib/console/event/failure.rb
|
145
160
|
- lib/console/event/generic.rb
|
146
|
-
- lib/console/event/measure.rb
|
147
|
-
- lib/console/event/metric.rb
|
148
161
|
- lib/console/event/progress.rb
|
149
162
|
- lib/console/event/spawn.rb
|
150
163
|
- lib/console/filter.rb
|
151
164
|
- lib/console/logger.rb
|
152
|
-
- lib/console/measure.rb
|
153
165
|
- lib/console/output.rb
|
154
166
|
- lib/console/output/default.rb
|
155
167
|
- lib/console/output/json.rb
|
156
168
|
- lib/console/output/sensitive.rb
|
169
|
+
- lib/console/output/split.rb
|
157
170
|
- lib/console/output/text.rb
|
158
171
|
- lib/console/output/xterm.rb
|
159
172
|
- lib/console/progress.rb
|
@@ -165,6 +178,8 @@ files:
|
|
165
178
|
- lib/console/terminal/text.rb
|
166
179
|
- lib/console/terminal/xterm.rb
|
167
180
|
- lib/console/version.rb
|
181
|
+
- license.md
|
182
|
+
- readme.md
|
168
183
|
homepage: https://github.com/socketry/console
|
169
184
|
licenses:
|
170
185
|
- MIT
|
@@ -177,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
192
|
requirements:
|
178
193
|
- - ">="
|
179
194
|
- !ruby/object:Gem::Version
|
180
|
-
version: '2.
|
195
|
+
version: '2.7'
|
181
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
197
|
requirements:
|
183
198
|
- - ">="
|
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
|