mattheworiordan/capybara-screenshot
64.0
Adequate · 20 September 2026
899
lines of production code
Ruby
primary language
1
measurement over time
What this system is
This system is a Ruby gem that integrates screenshot capture and HTML page saving into various testing frameworks, including RSpec, Cucumber, Minitest, Test::Unit, and Spinach. It provides configurable drivers for capturing browser states on test failures, supports saving outputs to local storage or Amazon S3, and enhances test reports with embedded images or links. The library ensures compatibility across multiple versions of its supported testing tools through extensive multi-version test matrices.
How it got here
2011 — v1.0.27 refactor and S3 support
4 changes.
This period focused on a major architectural refactor of the capybara-screenshot library, introducing S3 upload capabilities and extensible callback hooks. The work also involved restructuring driver registration and screenshot capture methods, while establishing multi-version testing infrastructure for RSpec and Cucumber.
2012–2014 — Testing infrastructure and multi-framework integration
12 changes.
This period focused on establishing a robust testing foundation by initializing RSpec suites and expanding support for Cucumber, Minitest, Test::Unit, and Spinach. The work involved developing custom reporter formatters to integrate screenshot data directly into test outputs and implementing comprehensive unit and feature tests to verify compatibility across multiple framework versions.
Features
New RSpec reporter formatters for screenshot integration
This change introduces a new set of RSpec reporter modules (Text, HTML Link, HTML Embed, JSON, and TextMate Link) that integrate screenshot paths directly into test output. The Text reporter now prints screenshot file paths in the console, while the HTML reporters embed images or provide clickable links to saved screenshots in failure reports. The JSON reporter includes screenshot metadata in its output, and the TextMate reporter adds functionality to open screenshots directly in the editor. These reporters use a shared base module to enhance RSpec's failure handling methods, ensuring consistent screenshot information is available across different output formats.
lib/capybara-screenshot/rspec · high confidence
Behavioural changes
Add RSpec configuration and Appraisals for multi-version testing
The gem now includes a \.rspec\ file that sets the default RSpec output format to 'documentation' and enables color, ensuring consistent test reporting for users. Additionally, an \Appraisals\ file has been added to define test matrices for RSpec (3.0, 3.3) and Cucumber (1.3, 2.4), allowing the library to be validated against multiple versions of these frameworks during development and CI.
(repo-wide) · high confidence
Capybara-screenshot v1.0.27: Major refactor with S3 support and callback hooks
The capybara-screenshot library has been updated to version 1.0.27, introducing a significant architectural refactor that adds S3 upload capabilities via the new \S3Saver\ class and introduces extensible \after\_save\_html\ and \after\_save\_screenshot\ callbacks. The integration logic has been restructured to use \prepend\ for Capybara session overrides and dedicated reporter modules for RSpec formatters, while the \world.rb\ helper has been removed in favor of the new DSL methods.
lib/capybara-screenshot · high confidence
Expanded test matrix with new Appraisal gemfiles for Cucumber, RSpec, and Spinach
The project now uses Appraisal to run tests against multiple versions of testing frameworks, ensuring compatibility across different environments. New gemfiles have been added to support Cucumber 1.3 and 2.4, RSpec 3.0 and 3.3, and Spinach 0.8, alongside an updated 'latest' configuration. This allows the library to verify that it works correctly with these specific versions of the testing tools, rather than just a single default setup.
gemfiles · high confidence
Major refactoring of screenshot capture and driver registration
The library has been restructured to centralize configuration and driver handling within the main module. Screenshot capture is now managed via explicit \screenshot\_and\_save\_page\ and \screenshot\_and\_open\_image\ methods, replacing previous implicit behaviors. Driver support has been expanded and standardized, adding native registration for Selenium (including Chrome and headless variants), Poltergeist, Webkit, and Terminus, while explicitly marking RackTest and Mechanize as unsupported for screenshots. The system now supports advanced configuration options such as autosaving on failure, custom filename prefix formatters, timestamp and random suffix appending, and S3 upload capabilities. Additionally, the library respects the modern \Capybara.save\_path\ preference for output directories, falling back to the deprecated \save\_and\_open\_page\_path\ for older versions.
lib · high confidence
Test coverage
Add Cucumber support environment configuration; Added Cucumber integration tests for screenshot functionality; Added feature tests for Minitest and Test::Unit integration; Added integration tests for RSpec integration; Added test support for screenshot capture on Spinach failures; Added test support infrastructure for Aruba and Capybara integration; Added tests for Spinach integration and screenshot handling; Added unit tests for RSpec reporter implementations; Added unit tests for screenshot core, S3 integration, and pruning logic; Initialize RSpec test suite with Capybara and Aruba configuration.
Dependencies
Update gem dependencies and add development tooling
The gemspec now specifies runtime dependencies on \launchy\ and version-flexible \capybara\ (supporting versions 1.x through 3.x based on Ruby version), while removing the hard dependency on \cucumber\. Development dependencies have been expanded to include \timecop\, \sinatra\, \test-unit\, \spinach\, \minitest\, and \aws-sdk-s3\, and the Gemfile adds \rack\, \rake\, \appraisal\, and \aruba\ to support testing matrices. Metadata such as license and documentation URIs are also added to the gemspec.
(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 64.
Lenses
- Code Health 100
- Architecture 69
- Maturity 53
- Readiness 65
- Security 96
Changes since last survey
- 300 commits — 253 feature/other, 47 fixes
By area
- (root) — 95 commits
- lib/capybara-screenshot — 81 commits
- (repo) — 51 commits
- lib/capybara-screenshot.rb — 21 commits
- spec/feature — 17 commits
- spec/unit — 11 commits
- spec/cucumber — 5 commits
- spec/rspec — 5 commits
- spec/support — 4 commits
- features/support — 3 commits
- spec/spinach — 3 commits
- spec/capybara-screenshot — 2 commits
- features/cucumber.feature — 1 commit
- spec/rspec_spec.rb — 1 commit
Notable commits
- fix: fix using_session_with_screenshot rollback to previous session
- fix: Cucumber fixes for Aruba upgrade
- fix: Do not rely on RSpec being available, assume only core, fixes #95
- fix: Doc update for RSpec 3 to reflect new rails_helper, fixes #98
- fix: Fix .capybara_root with partial Rails environment loaded
- fix: Fix RSpec 3 example warning
- fix: Fix Ruby <= 2.1 bugs
- fix: Fix Travis failures for Ruby 2.0
- fix: Fix a logic error
- fix: Fix broken test & assertion
- fix: Fix capybara_root memoization
- fix: Fix custom screenshot directory docs. Closes #144.
- fix: Fix deprecation
- fix: Fix deprecation warning with cucumber 5
- fix: Fix deprecation warnings for Aruba#run_simple
- fix: Fix failing specs
- fix: Fix incorrect expectation
- fix: Fix minitest 5 integration
- fix: Fix missing 'not' in spec name.
- fix: Fix ruby version compares
- …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
mattheworiordan/capybara-screenshot 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 35b3136325ff1abc6fd4a87f4f95cd520bff1693 — 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.