console 1.23.2 → 1.23.3

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: dd6108c241ee21f1f785bd0686d958e586d647c0320b0edfcbae7fdaff275155
4
+ data.tar.gz: eac618496cbeedb26503082d99a1e34904229b00bd213e38acaf2d5044af7a2c
5
5
  SHA512:
6
- metadata.gz: 0a31fc4b37d62d7456b80091c74735c5fab350baf3a2fc280c351a52d5219b0cfbe6871bf835ed636df15d5da68def019980f351327d5ab547971fd896f62253
7
- data.tar.gz: d9a1dc792ba4e6d97f7a6d2998a2795668ec26aaa05b27b65e89f706f0b98c80e904b0d9f916b83982bbb015a0e6e59845a23289377dc38194f156ecec28bf48
6
+ metadata.gz: 3b0335cc888c818b29cc1f12fbb62228107b7838e526481110383abb896c7f46bd006e324781a08a872bf90f047bcbf3507a6c638f4bda2b32008b1e10765315
7
+ data.tar.gz: 3e7db728a24bc033c6e2c8338996efc19d8cfdecc8f3d9f22857112500c99f00633483f2ec5ebd6a935aaece3f02ca1d7033a3e7c9c3987de60b81517bae5777
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.3"
8
8
  end
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
 
@@ -37,3 +43,9 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
37
43
  ### Contributor Covenant
38
44
 
39
45
  This project is governed by [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.3
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: 2023-12-03 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: fiber-annotation
@@ -117,7 +117,7 @@ files:
117
117
  - lib/console/version.rb
118
118
  - license.md
119
119
  - readme.md
120
- homepage: https://github.com/socketry/console
120
+ homepage: https://socketry.github.io/console/
121
121
  licenses:
122
122
  - MIT
123
123
  metadata: {}
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.4.10
139
+ rubygems_version: 3.4.22
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Beautiful logging for Ruby.
metadata.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- �<��Y+s��rhm�ǥ��;?�px%X9�ۥ��nǷ?�T�� X��]A��aM�$��b�Y!�Λ�+�F5UX�<�lߛ���'vY6�R6��ޕME��C�9�W�7�����n�R&�f������e $AV9A,���o��m��!�����
2
- �:,Cng����AOsLt��j��:���Ezr�*㉇�4��z�
3
- <��9 Zrf�|�I+yvP�k;�hC�A�B¶><���gɩlJ�Ss�d/�������p{����w���D�~���8�9$��v{Oz��pBHj6��zfLΊ7 �L�V"���,��;lh�A]c��������'V�F.x
1
+ �Y�1F ��dS<��t��A[2Oαp]��(����jy��ЃVD!���2�8 ��0Vt{��X��[4���%J��m
2
+ ��Hz���6{/�ow <��Nu�Y� ��@��g/aK|�`I��AScd���[��h7O�I?�f���ȹH�zNP;�7�3��� �������@YP�$��bVĢ 䬀�Ȓ0�&���z�.@��<����DZ?~ Q�SI�� �[�B����I��=eKqx��9[W=ѸօN�{O4@.�XD:P�5k)܏�J�G
3
+ ��<bĊ�_F\NLcQnN1e7��"㉾�a���J�n_��*�km�A�%�F�x�"fB���ѡ�4$��I���