jfelchner/ruby-progressbar
53.5
Adequate · 19 September 2026
1k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is a Ruby library that provides a customizable progress bar for command-line and non-terminal environments. It features modular components for rendering status, dynamic terminal width detection, and an enumerator refinement for seamless integration with iteration loops. The codebase includes comprehensive test coverage and tooling for gem signing and multi-version Ruby compatibility.
How it got here
2009–2013 — Modular refactoring and test expansion
13 changes.
The project underwent a significant architectural refactoring, breaking down the monolithic progress bar logic into modular component classes for formatting, state management, and output. This structural overhaul was accompanied by the establishment of a comprehensive RSpec test suite to ensure reliability and the introduction of new features like unknown progress support and custom error handling.
2014–2023 — dynamic terminal support and developer tooling
8 changes.
The project introduced dynamic terminal width detection to ensure progress bars adapt correctly to the current window size, replacing static behavior. It also expanded output modes for better control in non-terminal environments and added a Ruby Enumerator refinement for seamless progress bar integration during iteration. Additionally, the period saw the addition of developer convenience scripts, gem signing infrastructure, and comprehensive test coverage for the new features.
Features
Add Enumerator refinement for progress bar integration
Introduces a new refinement module that adds a \with\_progressbar\ method to Ruby's \Enumerator\ class. This allows users to iterate over enumerables while automatically updating a progress bar, handling argument passing based on the block's arity.
lib/ruby-progressbar/refinements · high confidence
Added Ruby gem signing certificate
A new public certificate (jfelchner.pem) has been added to the repository to enable signing of Ruby gems. This certificate is valid from February 2023 to February 2026 and is associated with the account [e-mail redacted], allowing for secure distribution and verification of signed gem packages.
certs · high confidence
New bin/console and bin/setup scripts for interactive and initial project configuration
Added a new bin/console script that launches an IRB session with the project's default and console Bundler groups loaded, enabling interactive development. Additionally, introduced a bin/setup script that automates initial project configuration by installing Ruby and NPM dependencies, configuring Bundler credentials via environment variables, setting local Git configuration values (such as application name and deployment profile), and installing the overcommit gem to manage Git hooks.
bin · high confidence
New output modes and environment variable support
The library now supports three distinct output modes: TTY (default, respects the new RUBY\_PROGRESS\_BAR\_FORMAT environment variable), NonTty (optimized for non-terminal environments to prevent errors on decrement), and Null (silences all output). Users can now explicitly choose to suppress progress bar output entirely or customize the format string via an environment variable.
lib/ruby-progressbar/outputs · high confidence
Behavioural changes
Add InvalidProgressError for invalid progress states
A new InvalidProgressError class has been added to the library, inheriting from RuntimeError. This allows parent libraries to specifically catch and handle errors related to invalid progress values, rather than relying on generic error handling.
lib/ruby-progressbar/errors · high confidence
New dynamic terminal width calculation for progress bar length
The progress bar now automatically detects the terminal width to adjust its length dynamically, replacing the previous static or environment-variable-only behavior. This is achieved by introducing a new \ProgressBar::Calculators::Length\ class that attempts to determine the column count via the \winsize\ attribute on the output stream, the \IO.console\ object, or by falling back to shell commands (\stty\ or \tput\) if the standard libraries are unavailable. This ensures the progress bar fits the current terminal window size correctly, especially in environments like Spring where dynamic length detection was previously broken.
lib/ruby-progressbar/calculators · high confidence
Progress bar components refactored into modular classes
The internal structure of the progress bar has been refactored to separate concerns into distinct component classes (Bar, Percentage, Rate, Time, Title). This change introduces support for a configurable 'remainder\_mark' to customize the appearance of the uncompleted portion of the bar, adds a wall clock time completion estimate (%W flag), and allows the rate component to be scaled via a custom lambda. The refactoring also standardizes time formatting with 2-decimal precision for rates and handles unknown progress states with a configurable animation.
lib/ruby-progressbar/components · high confidence
Progress bar state management and output behavior updates
The progress bar now prevents duplicate output when methods like finish, resume, or stop are called multiple times, and it no longer allows progress changes (such as setting total or progress) while the bar is in a stopped state. Additionally, the library now supports an 'unknown' total amount of progress, displaying '??' for the total and using a specific animation for unknown progress steps, while the deprecated 'smoothing' and 'running\_average\_rate' options now trigger warnings directing users to the new projector configuration.
lib/ruby-progressbar · high confidence
Refactored progress bar formatting into modular components
The formatting logic for the progress bar has been restructured into distinct, reusable components (title, percentage, time, bar, and rate) to improve maintainability and consistency. This change introduces new format flags, including %R for rate display with two decimal places of precision, %u to show a placeholder when the total is unknown, and %W for a complete bar with percentage. It also adds support for right-justified percentages via %j and %J, and displays wall clock time to completion using %l. The underlying parsing engine now uses a molecule-based approach to handle format strings, ensuring that bar and non-bar elements are processed separately for accurate length calculations.
lib/ruby-progressbar/format · high confidence
Standardize entry point and add backward-compatible factory method
The library now exposes a unified entry point via \lib/progressbar.rb\ (and \lib/ruby-progressbar.rb\) that loads the core \ProgressBar::Base\ and conditionally loads refinements. To maintain backward compatibility with pre-1.0 usage patterns, a \ProgressBar.create\ factory method is provided, which delegates to \ProgressBar::Base.new\, allowing existing code to instantiate progress bars without immediate refactoring.
lib · high confidence
Test coverage
Add RSpec test configuration and support files; Added benchmark fixture script; Added comprehensive RSpec test suite for Ruby Progressbar components; Added comprehensive test coverage for progress bar components; Added test infrastructure for time mocking and warning filtering; Added tests for the Length calculator; Added tests for the Progress Enumerator refinement; Added tests for the progress bar format components.
Dependencies
Add development dependencies and multi-version Gemfile scaffolding
The project now includes a structured set of development dependencies and a multi-version Gemfile configuration to support testing across different Ruby environments. The gemspec defines development dependencies for rspec (\~\> 3.7), rspectacular (\~\> 0.70.6), fuubar (\~\> 2.3), and timecop (\~\> 0.9). Additionally, a new \gemfiles/\ directory introduces version-specific Gemfiles (v1, v2.3, v2.4, v2.7, v4.0) that pin specific versions of \ruby-prof\ (ranging from 0.15.8 to 1.6+) and \awesome\_print\ (\~\> 1.6) for MRI platforms, alongside updated lockfiles reflecting these dependency resolutions.
(dependencies) · high confidence
Added checksums for ruby-progressbar gem versions
Added MD5, SHA256, and SHA512 checksum files for the ruby-progressbar gem versions 1.8.0, 1.8.1, 1.8.3, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, and 1.13.0, as well as the progressbar gem versions 1.8.1, 1.8.2, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, and 1.13.0. These checksums allow for verification of the integrity of the respective gem packages.
checksum · high confidence
Housekeeping
Repository initialization with comprehensive configuration and documentation
This change establishes the project's foundational structure by adding a complete set of configuration files, including a detailed .gitignore, .ruby-version (3.4.8), and an extensive suite of RuboCop configuration files (.rubocop.yml and its modular includes for Capybara, FactoryBot, RSpec, Performance, and Thread Safety). It also introduces a .remarkrc for Markdown linting, a .yamllint configuration, an .overcommit.yml for Git hooks, and a .chamber.pub.pem for secret management. Documentation is standardized with a new CHANGELOG.md, README.md, LICENSE.txt, and CODE-OF-CONDUCT.md, while legacy files like ChangeLog and progressbar.en.rd are removed.
(repo-wide) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 53.
Lenses
- Code Health 100
- Architecture 69
- Maturity 30
- Readiness 69
- Security 87
Changes since last survey
- 300 commits — 272 feature/other, 28 fixes
By area
- lib/ruby-progressbar — 110 commits
- (root) — 102 commits
- spec/ruby-progressbar — 26 commits
- (repo) — 10 commits
- spec/lib — 9 commits
- .github/workflows — 5 commits
- gemfiles/v2 — 5 commits
- certs/jfelchner.pem — 4 commits
- gemfiles/v1 — 2 commits
- spec/fixtures — 2 commits
- spec/spec_helper.rb — 2 commits
- .github/FUNDING.yml — 1 commit
- .github/labels.yml — 1 commit
- bin/console — 1 commit
- checksum/progressbar-1.10.0.gem.md5 — 1 commit
- checksum/progressbar-1.10.1.gem.md5 — 1 commit
- checksum/progressbar-1.11.0.gem.md5 — 1 commit
- checksum/progressbar-1.12.0.gem.md5 — 1 commit
- checksum/progressbar-1.13.0.gem.md5 — 1 commit
- checksum/progressbar-1.8.1.gem.md5 — 1 commit
Notable commits
- fix: Bugfix: ETA works again, when ProgressBar is initialized with a non zero starting_at.
- fix: Change: Issue Caused By Ruby Bug
- fix: Chore: Fix CI Badge
- fix: Chore: Fix Gemfile.lock
- fix: Chore: Fix Older Gemfile.lock
- fix: Chore: Fix Rakefile permissions
- fix: Chore: Fix Rubocop issues
- fix: Chore: Fix Test Setup
- fix: Chore: Fix v1 Gemfile
- fix: Chore: Partially Fix Linting Workflow
- fix: Chore: Revert rspectacular for 1.8.7 compatibility
- fix: Chore: Rubocop Fixes
- fix: Fix no method error on decrement when output is not TTY enabled
- fix: Fix: CHANGELOG URI in both gemspecs to point to master CHANGELOG.md
- fix: Fix: Components::Time to allow #estimated_seconds_remaining to be called
- fix: Fix: NoMethodError on decrement when output is non-TTY
- fix: Fix: Predicates not available on 1.8.7
- fix: Fix: Ruby 1.8/1.9 IO Doesn't Respond to winsize
- fix: Fix: Show Unknown Time Remaining After Bar Is Reset
- fix: Fixed: Progress#finish causing an exception when total was unknown
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jfelchner/ruby-progressbar was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit bafa278bfb14353282c2ae3207060f69615db7ae — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.