{"id":22282607,"url":"https://github.com/carbonfive/regret","last_synced_at":"2025-10-17T17:33:47.954Z","repository":{"id":66259838,"uuid":"75435824","full_name":"carbonfive/regret","owner":"carbonfive","description":"Image comparison library for specs","archived":false,"fork":false,"pushed_at":"2016-12-09T22:55:14.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-30T17:36:57.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carbonfive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-02T22:28:16.000Z","updated_at":"2016-12-02T22:29:23.000Z","dependencies_parsed_at":"2023-02-23T09:45:21.349Z","dependency_job_id":null,"html_url":"https://github.com/carbonfive/regret","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fregret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fregret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fregret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fregret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carbonfive","download_url":"https://codeload.github.com/carbonfive/regret/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245534527,"owners_count":20631285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T16:33:55.358Z","updated_at":"2025-10-17T17:33:42.914Z","avatar_url":"https://github.com/carbonfive.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"#regret\n\nProvides a simple workflow for specifying and maintaining screenshot-based test assertions.\n\n## Installation and Usage\n\n```\n\u003e bundle\n```\n\n```ruby\n# Before your specs run\n\nrequire 'regret/configuration'\n\nRegret::Configuration.configure do |config|\n  #specify a tmp_path for temporary screenshot files\n  config.tmp_path = YOUR_PROJECT_TMP_FOLDER\nend\n```\n\nAnd in any spec of your choosing...\n\n```ruby\nrequire 'regret/test_helper'\n\nRegret::TestHelper.compare(page, name: 'My Test 1')\n```\n\n## Dependencies\n\nHere are some dependencies not (yet) specified in the gemspec:\n\n- Capybara\n- A driver of your choosing (poltergeist, capybara-webkit, etc), depending on how screenshots are taken\n\n## Goals\n\nThe goals of this gem are to remain agnostic, slim, and provide a simplified workflow. Some specifics:\n\n- Stay free of test framework dependencies\n- Stay free of app framework dependencies\n- Use one-size-fits-all rake tasks to manage the workflow\n- Ability to use test helper methods within the test framework of your choosing.\n\n## How it works\n\n1. `Regret::TestHelper` methods are used within your test suite\n2. regret compares the state of the current page to a named screenshot\n3. Return `false` for mismatched screenshots, `true` for matched\n4. If no screenshot exists, create a new one and return `true`\n\nIt is up to you to wrap the method calls in assertions, should you want test failures.\n\n## Other features\n\n```ruby\n# Take a screenshot of a section of the page (driver must support)\n\nRegret::TestHelper.compare(page, name: 'Test', selector: '.my-element')\n```\n\n## Running Tests\n\n```\n\u003e brew install phantomjs\n\u003e rake\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbonfive%2Fregret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarbonfive%2Fregret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbonfive%2Fregret/lists"}