console 1.23.2 → 1.23.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9984686df55cf08a23326ad2399c96583b822bf45762224a30e071a8d9b20a1
4
- data.tar.gz: 6febeee8181c2d113705133e364853adec8a7c2c2ee5499e98dc7662fc66d2ed
3
+ metadata.gz: 7b083e1f81e12d9ba2dae4929c26a2f193d772edc1b32a08714bc317353b08fc
4
+ data.tar.gz: 3c560f105a74fcf8f0b75c1e8cac36abfabbfaa3fab2781e32780eb85e36a8de
5
5
  SHA512:
6
- metadata.gz: 0a31fc4b37d62d7456b80091c74735c5fab350baf3a2fc280c351a52d5219b0cfbe6871bf835ed636df15d5da68def019980f351327d5ab547971fd896f62253
7
- data.tar.gz: d9a1dc792ba4e6d97f7a6d2998a2795668ec26aaa05b27b65e89f706f0b98c80e904b0d9f916b83982bbb015a0e6e59845a23289377dc38194f156ecec28bf48
6
+ metadata.gz: cfc967d833d6522aa8a50e0482f5f2f8f436d16afbd94b47c6347e2c9bc706edacf6047ae49f344b7cbb93fdca85a4c6c98f0595af41583e368be8c1192b9ef1
7
+ data.tar.gz: da3a3e5af4b8f60bbfb69fa734ea4a17bbf7167d9ff81db02b7492ce65ea5b0bcda1ac7d607b44a17f164bc9bfda44b9226fb2996668d60feb4b518c7bf022f1
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2022, by Samuel Williams.
4
+ # Copyright, 2019-2023, by Samuel Williams.
5
5
 
6
6
  require_relative 'filter'
7
7
 
@@ -55,6 +55,10 @@ module Console
55
55
  message[:arguments] = arguments
56
56
  end
57
57
 
58
+ if annotation = Fiber.current.annotation
59
+ message[:annotation] = annotation
60
+ end
61
+
58
62
  if block_given?
59
63
  if block.arity.zero?
60
64
  message[:message] = yield
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022, by Samuel Williams.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
5
 
6
6
  require 'logger'
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2022, by Samuel Williams.
4
+ # Copyright, 2021-2023, by Samuel Williams.
5
5
 
6
6
  require_relative '../serialized/logger'
7
7
 
@@ -149,8 +149,14 @@ module Console
149
149
  buffer = +""
150
150
 
151
151
  if @verbose
152
- if annotation = Fiber.current.annotation and annotation.size > 0
153
- buffer << ": #{@terminal[:annotation]}#{annotation}#{@terminal.reset}"
152
+ if annotation = Fiber.current.annotation
153
+ # While typically annotations should be strings, that is not always the case.
154
+ annotation = annotation.to_s
155
+
156
+ # If the annotation is empty, we don't want to print it, as it will look like a formatting bug.
157
+ if annotation.size > 0
158
+ buffer << ": #{@terminal[:annotation]}#{annotation}#{@terminal.reset}"
159
+ end
154
160
  end
155
161
  end
156
162
 
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2019-2023, by Samuel Williams.
5
5
 
6
6
  module Console
7
- VERSION = "1.23.2"
7
+ VERSION = "1.23.4"
8
8
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2023, by Samuel Williams.
3
+ Copyright, 2019-2024, by Samuel Williams.
4
4
  Copyright, 2019-2021, by Bryan Powell.
5
5
  Copyright, 2019, by Cyril Roelandt.
6
6
  Copyright, 2020, by Olle Jonsson.
data/readme.md CHANGED
@@ -18,7 +18,13 @@ When Ruby decided to reverse the order of exception backtraces, I finally gave u
18
18
 
19
19
  ## Usage
20
20
 
21
- Please see the [project documentation](https://socketry.github.io/console).
21
+ Please see the [project documentation](https://socketry.github.io/console/) for more details.
22
+
23
+ - [Getting Started](https://socketry.github.io/console/guides/getting-started/index) - This guide explains how to use `console` for logging.
24
+
25
+ - [Command Line](https://socketry.github.io/console/guides/command-line/index) - This guide explains how the `console` gem can be controlled using environment variables.
26
+
27
+ - [Integration](https://socketry.github.io/console/guides/integration/index) - This guide explains how to integrate the `console` output into different systems.
22
28
 
23
29
  ## Contributing
24
30
 
@@ -36,4 +42,10 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
36
42
 
37
43
  ### Contributor Covenant
38
44
 
39
- This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
45
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
46
+
47
+ ## See Also
48
+
49
+ - [console-adapter-rails](https://github.com/socketry/console-adapter-rails)
50
+ - [console-adapter-sidekiq](https://github.com/socketry/console-adapter-sidekiq)
51
+ - [console-output-datadog](https://github.com/socketry/console-output-datadog)
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.2
4
+ version: 1.23.4
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-15 00:00:00.000000000 Z
49
+ date: 2024-02-12 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: fiber-annotation
@@ -76,6 +76,20 @@ dependencies:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
+ - !ruby/object:Gem::Dependency
80
+ name: json
81
+ requirement: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
79
93
  description:
80
94
  email:
81
95
  executables: []
@@ -117,7 +131,7 @@ files:
117
131
  - lib/console/version.rb
118
132
  - license.md
119
133
  - readme.md
120
- homepage: https://github.com/socketry/console
134
+ homepage: https://socketry.github.io/console/
121
135
  licenses:
122
136
  - MIT
123
137
  metadata: {}
@@ -136,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
150
  - !ruby/object:Gem::Version
137
151
  version: '0'
138
152
  requirements: []
139
- rubygems_version: 3.4.10
153
+ rubygems_version: 3.5.5
140
154
  signing_key:
141
155
  specification_version: 4
142
156
  summary: Beautiful logging for Ruby.
metadata.gz.sig CHANGED
Binary file