ruby-progress 1.1.2 → 1.1.4

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: 49879f3480e89d03b3f7448dc582514f20e0637fc9e2c0252c9c0782eecbbd05
4
- data.tar.gz: aa099474b01118ef950d1e9c4dd50059f0f0acf8d9bb8a256e72d9e9e257fc37
3
+ metadata.gz: 599c6e45e09421994859e63461afbe8291cc1e0580ea04f5ec6cce11ce24af6c
4
+ data.tar.gz: '08cd819f0e15c121ae19af452a12aa666c68ecf1a63f448c657e8f09499a9b23'
5
5
  SHA512:
6
- metadata.gz: 3665c5d3f73d04d9fc890d4360165a177c4d26fd5bc01765dc49ab654c60b6a069b3364fbfc87e2226038d2af92c226dc1d89b739a98464dbdaf9d93b5903025
7
- data.tar.gz: f4335241b770d265cd400eb535a6d65be9d0097d391524604ab7d84307ab5fccc49a8a2874acf9f51ac33f074f556fcfaa51a7c11e215045d08e3f873f7d09f1
6
+ metadata.gz: 934d646d83e178445ca8d4f6c0deac2df5e7a4f3c24c6397f871ee6c2d6af1d01a15d28ddf5fc35b24f9c072a22da05a5133edb6256117647fbd662ad971b75c
7
+ data.tar.gz: b703ffa90548a16e8e71b35ec6f12550937aab9be5f46d3f7a4e1754d64fb7dac75104128bf5db4d95cc911b9285a383d20897d2d313c2a5d77d981e70f0c71b
data/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ 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.4] - 2025-10-09
9
+
10
+ ### Fixed
11
+
12
+ - **Worm default message behavior**: Removed default "Processing" message from worm subcommand when no `--message` is provided for consistent behavior across all progress indicators
13
+ - **Development environment**: Fixed `bin/prg` to use local library files instead of installed gem versions during development
14
+
15
+ ## [1.1.3] - 2025-10-09
16
+
17
+ ### Fixed
18
+
19
+ - **Twirl spinner animation**: Fixed spinner freezing during command execution by ensuring continuous animation loop
20
+ - **Default message behavior**: Removed default "Processing" message when no `--message` is provided - now shows only spinner
21
+ - **Daemon termination output**: Removed verbose "Stop signal sent to process" message for cleaner daemon workflows
22
+
8
23
  ## [1.1.2] - 2025-10-09
9
24
 
10
25
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-progress (1.1.2)
4
+ ruby-progress (1.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/bin/prg CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'ruby-progress'
4
+ require_relative '../lib/ruby-progress'
5
5
  require 'fileutils'
6
6
  require 'optparse'
7
7
  require 'json'
@@ -573,7 +573,7 @@ module TwirlCLI
573
573
  end
574
574
 
575
575
  def self.run_with_command(options)
576
- message = options[:message] || 'Processing'
576
+ message = options[:message]
577
577
  captured_output = nil
578
578
 
579
579
  spinner = TwirlSpinner.new(message, options)
@@ -581,7 +581,7 @@ module TwirlCLI
581
581
 
582
582
  begin
583
583
  RubyProgress::Utils.hide_cursor
584
- spinner_thread = Thread.new { spinner.animate }
584
+ spinner_thread = Thread.new { loop { spinner.animate } }
585
585
 
586
586
  captured_output = `#{options[:command]} 2>&1`
587
587
  success = $CHILD_STATUS.success?
@@ -609,7 +609,7 @@ module TwirlCLI
609
609
  end
610
610
 
611
611
  def self.run_indefinitely(options)
612
- message = options[:message] || 'Processing'
612
+ message = options[:message]
613
613
  spinner = TwirlSpinner.new(message, options)
614
614
 
615
615
  begin
@@ -632,7 +632,7 @@ module TwirlCLI
632
632
  FileUtils.mkdir_p(File.dirname(pid_file))
633
633
  File.write(pid_file, Process.pid.to_s)
634
634
 
635
- message = options[:message] || 'Processing'
635
+ message = options[:message]
636
636
  spinner = TwirlSpinner.new(message, options)
637
637
  stop_requested = false
638
638
 
@@ -806,7 +806,11 @@ class TwirlSpinner
806
806
  end
807
807
 
808
808
  def animate
809
- print "\r#{@message} #{@frames[@index]}"
809
+ if @message && !@message.empty?
810
+ print "\r#{@message} #{@frames[@index]}"
811
+ else
812
+ print "\r#{@frames[@index]}"
813
+ end
810
814
  @index = (@index + 1) % @frames.length
811
815
  sleep @speed
812
816
  end
@@ -44,7 +44,6 @@ module RubyProgress
44
44
 
45
45
  begin
46
46
  Process.kill('USR1', pid)
47
- puts "Stop signal sent to process #{pid}"
48
47
  sleep 0.5
49
48
  File.delete(pid_file) if File.exist?(pid_file)
50
49
  rescue Errno::ESRCH
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyProgress
4
- VERSION = '1.1.2'
4
+ VERSION = '1.1.4'
5
5
  end
@@ -35,7 +35,7 @@ module RubyProgress
35
35
 
36
36
  def initialize(options = {})
37
37
  @length = options[:length] || 3
38
- @message = options[:message] || 'Processing'
38
+ @message = options[:message]
39
39
  @speed = parse_speed(options[:speed] || 'medium')
40
40
  @style = parse_style(options[:style] || 'circles')
41
41
  @command = options[:command]
@@ -206,7 +206,8 @@ module RubyProgress
206
206
  @position ||= 0
207
207
  @direction ||= 1
208
208
 
209
- print "\r#{@message}#{generate_dots(@position, @direction)}"
209
+ message_part = @message && !@message.empty? ? @message : ''
210
+ print "\r#{message_part}#{generate_dots(@position, @direction)}"
210
211
  $stdout.flush
211
212
 
212
213
  sleep @speed
@@ -281,7 +282,8 @@ module RubyProgress
281
282
  direction = 1
282
283
 
283
284
  while @running
284
- print "\r#{@message}#{generate_dots(position, direction)}"
285
+ message_part = @message && !@message.empty? ? @message : ''
286
+ print "\r#{message_part}#{generate_dots(position, direction)}"
285
287
  $stdout.flush
286
288
 
287
289
  sleep @speed
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.2
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
@@ -101,7 +101,6 @@ files:
101
101
  - lib/ruby-progress/utils.rb
102
102
  - lib/ruby-progress/version.rb
103
103
  - lib/ruby-progress/worm.rb
104
- - ruby-progress.gemspec
105
104
  - test_worm_flags.rb
106
105
  - worm.rb
107
106
  homepage: https://github.com/ttscoff/ruby-progress
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/ruby-progress/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'ruby-progress'
7
- spec.version = RubyProgress::VERSION
8
- spec.authors = ['Brett Terpstra']
9
- spec.email = ['me@brettterpstra.com']
10
-
11
- spec.summary = 'Animated terminal progress indicators'
12
- spec.description = 'Animated progress indicators for Ruby: Ripple (text ripple effects), Worm (Unicode wave animations), and Twirl (spinner indicators)'
13
- spec.homepage = 'https://github.com/ttscoff/ruby-progress'
14
- spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 2.5.0'
16
-
17
- spec.metadata['homepage_uri'] = spec.homepage
18
- spec.metadata['source_code_uri'] = spec.homepage
19
- spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
20
-
21
- # Specify which files should be added to the gem when it is released.
22
- spec.files = Dir.chdir(__dir__) do
23
- `git ls-files -z`.split("\x0").reject do |f|
24
- (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
- end
26
- end
27
- spec.bindir = 'bin'
28
- spec.executables = %w[prg ripple worm twirl]
29
- spec.require_paths = ['lib']
30
-
31
- # Runtime dependencies
32
- # None required - uses only standard library
33
-
34
- # Development dependencies
35
- spec.add_development_dependency 'rake', '~> 13.0'
36
- spec.add_development_dependency 'rspec', '~> 3.0'
37
- spec.add_development_dependency 'rubocop', '~> 1.21'
38
- spec.add_development_dependency 'simplecov', '~> 0.21'
39
- end