ruby-progress 1.1.8 → 1.1.9
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 +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -1
- data/lib/ruby-progress/version.rb +2 -2
- data/lib/ruby-progress/worm.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4de0dfea35a1a0f412f7a23cee8dfb160d892299f97b5767ca35b4c49c1b9b03
|
4
|
+
data.tar.gz: e05a3a36f172ac991df40fc4505dfc279b713df97e903d4f2a89722de1cf1351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d7b2506163351012ca4bd30eb4d6e1da55a80b4097bce58e0b8233520a6504798ceefa99d98e745a529808027fead28135d139153767d964bae0405c2fb0b2
|
7
|
+
data.tar.gz: 3f8165ca4dcb8facf61a91508776e92afd53e99a1b2e013b0735870392dc0bff1abae61d94a60c26e4e58b602813bc1a5f670c9a1b10f0de7cc0dcac6aa41c77
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [1.1.9] - 2025-10-10
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- **Worm animation line clearing**: Resolved issue where completion messages appeared alongside animation characters
|
13
|
+
- Fixed stream mismatch where animations used stderr but completion messages used stdout
|
14
|
+
- Implemented atomic operation combining line clearing and message output on stderr
|
15
|
+
- Ensured clean line clearing for all scenarios (success, error, no completion message)
|
16
|
+
- Updated tests to match new stderr-based completion message output
|
17
|
+
- Clean output format: animation disappears completely before completion message appears
|
18
|
+
|
19
|
+
### Technical
|
20
|
+
|
21
|
+
- **Stream consistency**: All worm animation output (including completion messages) now uses stderr consistently
|
22
|
+
- **Enhanced completion message display**: Single atomic stderr operation prevents race conditions between line clearing and message display
|
23
|
+
|
8
24
|
## [1.1.8] - 2025-10-10
|
9
25
|
|
10
26
|
### Added
|
data/Gemfile.lock
CHANGED
data/lib/ruby-progress/worm.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'optparse'
|
4
4
|
require 'open3'
|
5
5
|
require 'json'
|
6
|
+
require_relative 'utils'
|
6
7
|
|
7
8
|
module RubyProgress
|
8
9
|
# Animated progress indicator with ripple effect using Unicode combining characters
|
@@ -101,7 +102,8 @@ module RubyProgress
|
|
101
102
|
display_completion_message(@error_text || "Error: #{e.message}", false)
|
102
103
|
nil # Return nil instead of re-raising when used as a progress indicator
|
103
104
|
ensure
|
104
|
-
# Always
|
105
|
+
# Always clear animation line and restore cursor
|
106
|
+
$stderr.print "\r\e[2K"
|
105
107
|
RubyProgress::Utils.show_cursor
|
106
108
|
Signal.trap('INT', original_int_handler) if original_int_handler
|
107
109
|
end
|
@@ -242,13 +244,14 @@ module RubyProgress
|
|
242
244
|
|
243
245
|
def display_completion_message(message, success)
|
244
246
|
return unless message
|
245
|
-
|
247
|
+
|
246
248
|
mark = ''
|
247
249
|
if @show_checkmark
|
248
250
|
mark = success ? '✅ ' : '🛑 '
|
249
251
|
end
|
250
252
|
|
251
|
-
|
253
|
+
# Clear animation line and output completion message on stderr
|
254
|
+
$stderr.print "\r\e[2K#{mark}#{message}\n"
|
252
255
|
end
|
253
256
|
|
254
257
|
def parse_speed(speed_input)
|