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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b9c54f1a667742fffe32c16ac5d84b26e2e0c9c4ed34492913f61ffb084a44d
4
- data.tar.gz: fbf1a1dc3293b68e3ac63e0cc1084bc27a5a99241d56df8843a87ce5f79c59db
3
+ metadata.gz: 4de0dfea35a1a0f412f7a23cee8dfb160d892299f97b5767ca35b4c49c1b9b03
4
+ data.tar.gz: e05a3a36f172ac991df40fc4505dfc279b713df97e903d4f2a89722de1cf1351
5
5
  SHA512:
6
- metadata.gz: 52b88f06001f49dac80b6aa735b252ba0760fc123a7b28a5609ef7f7c570f0db43e07a3a104efb4f3a513befa3b7e3113b556847a4b095a4521586587d3d87c7
7
- data.tar.gz: 90188577fa0935924cc01ba3e1520a3625fab2c80975cf105413f631e8e5ef8623a160aadd5fb6d03194f88c884be6b4599269296163b4ba4ca66edd0f585d9f
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-progress (1.1.8)
4
+ ruby-progress (1.1.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyProgress
4
- VERSION = '1.1.8'
5
- WORM_VERSION = '1.0.3'
4
+ VERSION = '1.1.9'
5
+ WORM_VERSION = '1.0.4'
6
6
  TWIRL_VERSION = '1.0.1'
7
7
  RIPPLE_VERSION = '1.0.5'
8
8
  end
@@ -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 restore cursor and signal handler
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
- puts "#{mark}#{message}"
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-progress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra