console 1.28.0 → 1.28.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf762e4b31732049aa1f34fcc17bdb2430489efd671c74f435bfa214ef6290a5
4
- data.tar.gz: 97ba24a40404eebfd1e2bf6544a673b5131628167ff82e7c933a05322ae5e0bf
3
+ metadata.gz: 8c1e55ddfff39c11445d128d77669db8d27047b5bb52451c0dcd41986b9efe99
4
+ data.tar.gz: 314cd06dc220bc184899c393d68ef8e0387e92bbeb39522b2ec9ab11b408cb01
5
5
  SHA512:
6
- metadata.gz: d0c1e8fec40b694b8d98f37a4525017e45171160338272c4ca586b58d62575f117e8a36b80226246c43a8476b66d354d56650af70aa96f00489ba8dc8e7e8963
7
- data.tar.gz: f2f2197d633d2427c4ac9b29706fe59555bbf16bfce0036470c265c0acc86dab8d52884fc844eb7f041ba29c7c330f9d341cbd813859fe4297f59decb56716d7
6
+ metadata.gz: e2b5c3d3d01818a45f7680e07417c5c6bb805caa81c5a598d7a4c83fa77363cdbf241eb5f00327ff835c130ebe53994f34c923c50304c972d01b714fba638263
7
+ data.tar.gz: 6cc85f8a898133e9af736f89b0d12cda37fdc46f2467131e89b6784842a8cdff9757f0981cf18c7ae0cbf1b21d005aaf4f7b9f647c891ec96b790833446c4fcd
checksums.yaml.gz.sig CHANGED
Binary file
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
6
  module Console
7
- VERSION = "1.28.0"
7
+ VERSION = "1.28.1"
8
8
  end
data/lib/console/warn.rb CHANGED
@@ -18,11 +18,17 @@ module Console
18
18
  options[:backtrace] = caller(uplevel, 1)
19
19
  end
20
20
 
21
- begin
22
- fiber.console_warn = true
23
- Console.warn(*arguments, **options)
24
- ensure
25
- fiber.console_warn = false
21
+ if arguments.last.is_a?(Exception)
22
+ exception = arguments.pop
23
+
24
+ Console::Event::Failure.for(exception).emit(*arguments, severity: :warn)
25
+ else
26
+ begin
27
+ fiber.console_warn = true
28
+ Console.warn(*arguments, **options)
29
+ ensure
30
+ fiber.console_warn = false
31
+ end
26
32
  end
27
33
  end
28
34
  end
data/readme.md CHANGED
@@ -28,6 +28,14 @@ Please see the [project documentation](https://socketry.github.io/console/) for
28
28
 
29
29
  - [Events](https://socketry.github.io/console/guides/events/index) - This guide explains how to log structured events with a well-defined schema.
30
30
 
31
+ ## Releases
32
+
33
+ Please see the [project releases](https://socketry.github.io/console/releases/index) for all releases.
34
+
35
+ ### v1.28.0
36
+
37
+ - Add support for `Kernel#warn` redirection to `Console.warn`.
38
+
31
39
  ## Contributing
32
40
 
33
41
  We welcome contributions to this project.
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.28.0
4
+ version: 1.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file