console 1.34.3 → 1.35.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7e414a46e5716a01454dd3de08d555a2532b0e44410a79aa69c1087d532c8a8
4
- data.tar.gz: e816f35382d5e52ac66573dfa22fa862a2ee058eac5d5a0226cbc13c6a4bd8af
3
+ metadata.gz: '0498b53c4327442b097e48fac79fdb92b4bcb12df58c80aa2a28490ff5d36738'
4
+ data.tar.gz: 7960eed0fca16ba4ce614837ac861925565053cb6694d0a6107d27f89ce9042d
5
5
  SHA512:
6
- metadata.gz: 6372b6d01aa3246fa609a46ce66c7c73051ea629f7975f2d26e5a22709d5f73d8f9962cd9cdd7f6431faa3e4a4f5287db1938df6327ed834d9d6aab7d111b6a2
7
- data.tar.gz: 1f99ff50e204fef43b73b54bc0fc19861b51d797b62ebcd136065189632e6365a4fa2115a6cb155e3947aad250d728f6a5d5987e63ad583f677ab67042bdc83b
6
+ metadata.gz: d1248d88a76092de60f134b6deea1cb066edf2abb6d3bb040c8eada3801338e4e5f2139ffec9ca9a12a29a1d4e13a4b3083760979a9b16f1a498742b1d255c70
7
+ data.tar.gz: a8bf531686c47214706d623d9169b6718c6fc72f7e7517dffe7d048fcac86db6f0f4aa7f3d97cb9053287f906b401c113bea601b796e94b9ea5b9007e8e287f8
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/console/clock.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2025, by Samuel Williams.
5
+ # Copyright, 2026, by William T. Nelson.
5
6
 
6
7
  module Console
7
8
  # A simple clock utility for tracking and formatting time.
@@ -12,7 +13,7 @@ module Console
12
13
  # @returns [String] The formatted duration.
13
14
  def self.formatted_duration(duration)
14
15
  if duration < 60.0
15
- return "#{duration.round(2)}s"
16
+ return format("%.2fs", duration)
16
17
  end
17
18
 
18
19
  duration /= 60.0
@@ -5,6 +5,7 @@
5
5
  # Copyright, 2019, by Bryan Powell.
6
6
  # Copyright, 2020, by Michael Adams.
7
7
  # Copyright, 2021, by Robert Schulze.
8
+ # Copyright, 2026, by Copilot.
8
9
 
9
10
  module Console
10
11
  UNKNOWN = :unknown
@@ -46,7 +46,7 @@ module Console
46
46
  # The size of the terminal.
47
47
  def size
48
48
  @stream.winsize
49
- rescue Errno::ENOTTY
49
+ rescue Errno::ENOTTY, Errno::ENODEV
50
50
  # Fake it...
51
51
  [24, 80]
52
52
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2025, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  module Console
7
- VERSION = "1.34.3"
7
+ VERSION = "1.35.0"
8
8
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2025, by Samuel Williams.
3
+ Copyright, 2019-2026, 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.
@@ -8,11 +8,12 @@ Copyright, 2020, by Michael Adams.
8
8
  Copyright, 2021, by Cédric Boutillier.
9
9
  Copyright, 2021, by Robert Schulze.
10
10
  Copyright, 2022, by Anton Sozontov.
11
- Copyright, 2022, by William T. Nelson.
11
+ Copyright, 2022-2026, by William T. Nelson.
12
12
  Copyright, 2023, by Felix Yan.
13
13
  Copyright, 2024-2025, by Patrik Wenger.
14
14
  Copyright, 2025, by Shigeru Nakajima.
15
15
  Copyright, 2025, by Yasha Krasnou.
16
+ Copyright, 2026, by Copilot.
16
17
 
17
18
  Permission is hereby granted, free of charge, to any person obtaining a copy
18
19
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -34,6 +34,10 @@ Please see the [project documentation](https://socketry.github.io/console/) for
34
34
 
35
35
  Please see the [project releases](https://socketry.github.io/console/releases/index) for all releases.
36
36
 
37
+ ### v1.35.0
38
+
39
+ - Fix handling of `Errno::ENODEV` errors when calculating the width of a terminal that was been re-opened to `File::NULL`.
40
+
37
41
  ### v1.34.1
38
42
 
39
43
  - Add `process_id` to serialized output records for clarity (`pid` is still included for backwards compatibility).
@@ -76,10 +80,6 @@ Please see the [project releases](https://socketry.github.io/console/releases/in
76
80
  - Remove deprecated `Console::Logger#failure`.
77
81
  - [Consistent handling of exceptions.](https://socketry.github.io/console/releases/index#consistent-handling-of-exceptions.)
78
82
 
79
- ### v1.28.0
80
-
81
- - Add support for `Kernel#warn` redirection to `Console.warn`.
82
-
83
83
  ## Contributing
84
84
 
85
85
  We welcome contributions to this project.
@@ -90,6 +90,22 @@ We welcome contributions to this project.
90
90
  4. Push to the branch (`git push origin my-new-feature`).
91
91
  5. Create new Pull Request.
92
92
 
93
+ ### Running Tests
94
+
95
+ To run the test suite:
96
+
97
+ ``` shell
98
+ bundle exec sus
99
+ ```
100
+
101
+ ### Making Releases
102
+
103
+ To make a new release:
104
+
105
+ ``` shell
106
+ bundle exec bake gem:release:patch # or minor or major
107
+ ```
108
+
93
109
  ### Developer Certificate of Origin
94
110
 
95
111
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v1.35.0
4
+
5
+ - Fix handling of `Errno::ENODEV` errors when calculating the width of a terminal that was been re-opened to `File::NULL`.
6
+
3
7
  ## v1.34.1
4
8
 
5
9
  - Add `process_id` to serialized output records for clarity (`pid` is still included for backwards compatibility).
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.34.3
4
+ version: 1.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -9,13 +9,14 @@ authors:
9
9
  - Bryan Powell
10
10
  - Michael Adams
11
11
  - Patrik Wenger
12
+ - William T. Nelson
12
13
  - Anton Sozontov
14
+ - Copilot
13
15
  - Cyril Roelandt
14
16
  - Cédric Boutillier
15
17
  - Felix Yan
16
18
  - Olle Jonsson
17
19
  - Shigeru Nakajima
18
- - William T. Nelson
19
20
  - Yasha Krasnou
20
21
  bindir: bin
21
22
  cert_chain:
@@ -147,14 +148,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
148
  requirements:
148
149
  - - ">="
149
150
  - !ruby/object:Gem::Version
150
- version: '3.2'
151
+ version: '3.3'
151
152
  required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  requirements:
153
154
  - - ">="
154
155
  - !ruby/object:Gem::Version
155
156
  version: '0'
156
157
  requirements: []
157
- rubygems_version: 4.0.3
158
+ rubygems_version: 4.0.6
158
159
  specification_version: 4
159
160
  summary: Beautiful logging for Ruby.
160
161
  test_files: []
metadata.gz.sig CHANGED
Binary file