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 +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/bin/prg +10 -6
- data/lib/ruby-progress/daemon.rb +0 -1
- data/lib/ruby-progress/version.rb +1 -1
- data/lib/ruby-progress/worm.rb +5 -3
- metadata +1 -2
- data/ruby-progress.gemspec +0 -39
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 599c6e45e09421994859e63461afbe8291cc1e0580ea04f5ec6cce11ce24af6c
|
|
4
|
+
data.tar.gz: '08cd819f0e15c121ae19af452a12aa666c68ecf1a63f448c657e8f09499a9b23'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
data/bin/prg
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
|
|
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]
|
|
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]
|
|
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]
|
|
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
|
-
|
|
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
|
data/lib/ruby-progress/daemon.rb
CHANGED
data/lib/ruby-progress/worm.rb
CHANGED
|
@@ -35,7 +35,7 @@ module RubyProgress
|
|
|
35
35
|
|
|
36
36
|
def initialize(options = {})
|
|
37
37
|
@length = options[:length] || 3
|
|
38
|
-
@message = options[:message]
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
data/ruby-progress.gemspec
DELETED
|
@@ -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
|