{"id":15022434,"url":"https://github.com/hidakatsuya/pdf_matcher-testing","last_synced_at":"2026-02-23T09:47:28.544Z","repository":{"id":56887696,"uuid":"365437652","full_name":"hidakatsuya/pdf_matcher-testing","owner":"hidakatsuya","description":"This gem allows testing frameworks such as Test::Unit, RSpec and Minitest to perform PDF matching tests with the pdf_matcher gem.","archived":false,"fork":false,"pushed_at":"2025-03-25T12:47:30.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T13:42:10.165Z","etag":null,"topics":["minitest","pdf","rspec","test-unit"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/pdf_matcher-testing","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/hidakatsuya.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-05-08T06:30:57.000Z","updated_at":"2025-03-25T12:47:34.000Z","dependencies_parsed_at":"2023-12-30T15:30:24.940Z","dependency_job_id":"380b7452-b679-4b02-a434-a3d9a652a5c4","html_url":"https://github.com/hidakatsuya/pdf_matcher-testing","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"dc47f00ad06c2bb62cee6ef67b336b2fdd289dcd"},"previous_names":["hidakatsuya/pdf_matcher-test_adapters"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hidakatsuya/pdf_matcher-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fpdf_matcher-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fpdf_matcher-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fpdf_matcher-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fpdf_matcher-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hidakatsuya","download_url":"https://codeload.github.com/hidakatsuya/pdf_matcher-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidakatsuya%2Fpdf_matcher-testing/sbom","scorecard":{"id":464079,"data":{"date":"2025-08-11","repo":{"name":"github.com/hidakatsuya/pdf_matcher-testing","commit":"c59fb1ab41ff896c69b43939e655fac97fec15f7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   1 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T11:58:29.267Z","repository_id":56887696,"created_at":"2025-08-19T11:58:29.267Z","updated_at":"2025-08-19T11:58:29.267Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["minitest","pdf","rspec","test-unit"],"created_at":"2024-09-24T19:57:56.705Z","updated_at":"2026-02-23T09:47:28.523Z","avatar_url":"https://github.com/hidakatsuya.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PdfMatcher::Testing\n\n[![Gem Version](https://badge.fury.io/rb/pdf_matcher-testing.svg)](https://badge.fury.io/rb/pdf_matcher-testing)\n[![Test](https://github.com/hidakatsuya/pdf_matcher-testing/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/hidakatsuya/pdf_matcher-testing/actions/workflows/test.yml)\n\nThis gem allows testing frameworks such as [Test::Unit](https://github.com/test-unit/test-unit), [RSpec](https://github.com/rspec/rspec) and [Minitest](https://github.com/seattlerb/minitest) to perform PDF matching tests with the [pdf_matcher gem](https://github.com/hidakatsuya/pdf_matcher).\n\n## Prerequisites\n\nThis gem works with diff-pdf and pdf_matcher gem. See [the documentation of the pdf_matcher gem](https://github.com/hidakatsuya/pdf_matcher#prerequisites).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'pdf_matcher-testing', require: false\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install pdf_matcher-testing\n\n## Usage\n\n### Test::Unit\n\n```ruby\nrequire 'pdf_matcher/testing/test_unit_adapter'\n```\n\nYou will be able to use the `assert_match_pdf`:\n\n```ruby\nassert_match_pdf expected_pdf_data, actual_pdf_data\nassert_match_pdf '/path/to/expected.pdf', '/path/to/actual.pdf'\nassert_match_pdf Pathname('/path/to/expected.pdf'), Pathname('/path/to/actual.pdf')\n\n# Generating a difference PDF\nassert_match_pdf expected_pdf_data, actual_pdf_data, output_diff: '/path/to/diff.pdf'\n```\n\nOr, you can enable the assertion manually:\n\n```ruby\nrequire 'pdf_matcher/testing/assertion'\n\n# Enabling globally\nclass Test::Unit::TestCase\n  include PdfMatcher::Testing::Assertion\nend\n\n# Enabling individually\nclass FooTest \u003c Test::Unit::TestCase\n  include PdfMatcher::Testing::Assertion\nend\n```\n\n### Minitest\n\n```ruby\nrequire 'pdf_matcher/testing/minitest_adapter'\n```\n\nYou will be able to use the `assert_match_pdf` and the `must_match_pdf`:\n\nAssertion:\n```ruby\nassert_match_pdf expected_pdf_data, actual_pdf_data\n```\n\nExpectation:\n```ruby\n_(actual_pdf_data).must_match_pdf(expected_pdf_data)\n_('/path/to/actual.pdf').must_match_pdf('/path/to/expected.pdf')\n_(Pathname('/path/to/actual.pdf')).must_match_pdf(Pathname('/path/to/expected.pdf'))\n\n# Generating a difference PDF\n_(actual_pdf_data).must_match_pdf(expected_pdf_data, output_diff: '/path/to/diff.pdf')\n```\n\nOr, you can setup the assertion manually as described in Test::Unit.\n\n### RSpec\n\n```ruby\nrequire 'pdf_matcher/testing/rspec_adapter'\n```\n\nYou will be able to use the `match_pdf`:\n\n```ruby\nexpect(actual_pdf_data).to match_pdf(expected_pdf_data)\nexpect('/path/to/actual.pdf').to match_pdf('/path/to/expected.pdf')\nexpect(Pathname('/path/to/actual.pdf')).to match_pdf(Pathname('/path/to/expected.pdf'))\n\n# Generating a differnce PDF\nexpect(actual_pdf_data).to match_pdf(expected_pdf_data, output_diff: '/path/to/diff.pdf')\n```\n\nOr, you can enable the matcher manually:\n\n```ruby\nrequire 'pdf_matcher/testing/matcher'\n\n# Enabling globally\nRSpec.configure do |config|\n  config.include PdfMatcher::Testing::Matcher\nend\n\n# Enabling individually\nRSpec.describe 'foo' do\n  include PdfMatcher::Testing::Matcher\nend\n```\n\n### Configuring diff-pdf command options\n\n```ruby\nPdfMatcher.config.diff_pdf_opts = %w(\n  --mark-differences\n  --channel-tolerance=40\n)\n```\n\nSee `diff-pdf --help` for the available diff-pdf options.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/hidakatsuya/pdf_matcher-testing.\n\n## Testing\n\n```\n$ bundle install\n$ bundle exec rake test\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidakatsuya%2Fpdf_matcher-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhidakatsuya%2Fpdf_matcher-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidakatsuya%2Fpdf_matcher-testing/lists"}