leejarvis/slop
60.7
Adequate · 20 September 2026
712
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is the Slop library, a command-line argument parser for Ruby. It provides a modular architecture for defining, parsing, and validating command-line options, supporting various data types and structured error handling. The project includes a comprehensive test suite using Minitest to verify parsing logic and option configuration.
Behavioural changes
Slop 4.0 rewrite: new option types, strict validation, and structured error handling
The \lib/slop\ library has been rewritten for version 4.0, introducing a modular architecture with separate files for options, parsing, and result handling. Users now have access to new built-in option types including \Symbol\, \Regexp\, and \Array\ (with configurable delimiters and limits), alongside existing \String\, \Integer\, \Float\, and \Bool\ types. The parser now supports \--no-\ prefixes for inverting boolean options, grouped short flags (e.g., \-abc\), and strict type validation via the \validate\_types\ config option. Error handling is more granular, with distinct exception classes (\MissingArgument\, \UnknownOption\, \MissingRequiredOption\, \InvalidOptionValue\) that can be suppressed globally. The API exposes \Result\#fetch\ for safe option retrieval, \Result\#to\_hash\ for serialization, and tracks option usage counts and tail arguments.
lib/slop · high confidence
Slop library rewritten to version 4.10.1 with modular architecture
The Slop command-line parsing library has been completely rewritten, upgrading the version from 0.1.0 to 4.10.1. The internal structure has shifted from a single monolithic class to a modular design using separate files for options, parsing, results, types, and errors. The public API has changed significantly: \Slop.parse\ now accepts a configuration hash and returns a \Slop::Result\ object instead of the \Slop\ instance itself, and new class methods like \option\_defined?\ and \string\_to\_option\ have been added to support dynamic option handling.
lib · high confidence
Test coverage
Initial test suite for Slop command-line parser; Removed legacy RSpec test suite.
Dependencies
Updated gemspec and added Gemfile for modern Ruby development
The project now uses a Gemfile that loads the gemspec, simplifying dependency management. The gemspec has been updated to read the version from the codebase (Slop::VERSION) instead of hardcoding it, switched the test framework from RSpec to Minitest (version \~\> 5.0.0), added Rake as a development dependency, specified the MIT license, and raised the minimum required Ruby version to 2.0.0.
(dependencies) · 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 61.
Lenses
- Code Health 100
- Architecture 69
- Maturity 48
- Readiness 62
- Security 97
Changes since last survey
- 300 commits — 273 feature/other, 27 fixes
By area
- (root) — 127 commits
- lib/slop — 92 commits
- (repo) — 51 commits
- lib/slop.rb — 17 commits
- .github/workflows — 4 commits
- test/slop_test.rb — 3 commits
- test/error_test.rb — 2 commits
- test/result_test.rb — 2 commits
- test/types_test.rb — 2 commits
Notable commits
- fix: Fix Ruby 2.0.0 broken private def ...
- fix: Fix Ruby 2.0.0 broken private def ...
- fix: Fix a bug that flag value is processed as flag
- fix: Fix arguments removed with option arguments
- fix: Fix booleans without validate_type with arguments
- fix: Fix bug preventing '--' being passed as the first argument.
- fix: Fix bug regarding --foo=bar style options
- fix: Fix bug where true is passed to BoolOption block regardless of --no- prefix
- fix: Fix bug with separators around help: false opts
- fix: Fix deprecation warning in tests
- fix: Fix explicitly false booleans
- fix: Fix non-deterministic test
- fix: Fix non-deterministic test
- fix: Fix one more keyword argument warning
- fix: Fix ridiculous minitest warning
- fix: Fix separator so it doesn't mutate user data
- fix: Fix support for parsing -x5
- fix: Fix table
- fix: Merge pull request #193 from kch/order-fix
- fix: Merge pull request #221 from woodruffw/readme-example-fix
- …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
leejarvis/slop 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 20 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 131616dccd5d559a0b207e6983fe71dc162cb01c — 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-b51f968c9b10.