{"id":16737337,"url":"https://github.com/yasaichi/standard_assert","last_synced_at":"2026-02-28T22:31:55.537Z","repository":{"id":36502288,"uuid":"227955180","full_name":"yasaichi/standard_assert","owner":"yasaichi","description":"Standard Library-like library for assertions in Ruby. Encourages us to use assertion methods anywhere.","archived":false,"fork":false,"pushed_at":"2022-06-08T10:30:42.000Z","size":31,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-21T23:53:15.855Z","etag":null,"topics":["assert","ruby"],"latest_commit_sha":null,"homepage":"","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/yasaichi.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}},"created_at":"2019-12-14T02:33:35.000Z","updated_at":"2024-04-03T10:39:36.000Z","dependencies_parsed_at":"2022-08-24T14:25:26.612Z","dependency_job_id":null,"html_url":"https://github.com/yasaichi/standard_assert","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/yasaichi/standard_assert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasaichi%2Fstandard_assert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasaichi%2Fstandard_assert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasaichi%2Fstandard_assert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasaichi%2Fstandard_assert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yasaichi","download_url":"https://codeload.github.com/yasaichi/standard_assert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasaichi%2Fstandard_assert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29953287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["assert","ruby"],"created_at":"2024-10-13T00:25:54.868Z","updated_at":"2026-02-28T22:31:55.497Z","avatar_url":"https://github.com/yasaichi.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# standard_assert\n\n[![Gem Version](https://badge.fury.io/rb/standard_assert.svg)](http://badge.fury.io/rb/standard_assert)\n[![Build Status](https://travis-ci.org/yasaichi/standard_assert.svg?branch=master)](https://travis-ci.org/yasaichi/standard_assert)\n[![Code Climate](https://codeclimate.com/github/yasaichi/standard_assert/badges/gpa.svg)](https://codeclimate.com/github/yasaichi/standard_assert)\n[![Test Coverage](https://codeclimate.com/github/yasaichi/standard_assert/badges/coverage.svg)](https://codeclimate.com/github/yasaichi/standard_assert/coverage)\n\n`standard_assert` is a Standard Library-like library for assertions in Ruby.  \nIt is aimed at encouraging us to use assertion methods anywhere; Not only testing but also production.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'standard_assert'\n```\n\nAnd then execute:\n\n```\n$ bundle\n```\n\n## Usage\n\nInclude `Assert` module in a class, and you can use the assertion methods as its private methods:\n\n```ruby\nrequire 'standard_assert'\n\nclass Stack\n  include ::Assert\n\n  def initialize\n    @store = []\n  end\n\n  def pop\n    assert(!@store.empty?)\n    @store.pop\n  end\n\n  def push(element)\n    @store.push(element)\n    self\n  end\nend\n\nStack.new.pop #=\u003e AssertionError (Expected false to be truthy.)\n```\n\nOr just call them with the module as a receiver:\n\n```ruby\nclass Stack\n  def peek\n    ::Assert.assert(!@store.empty?)\n    @store.last\n  end\nend\n\nStack.new.peek #=\u003e AssertionError (Expected false to be truthy.)\n```\n\n## API\n\n`Assert` provides `aseert` and `assert_*` methods as its module functions.  \nThe method interfaces are basically the same as ones of `minitest` gem except that\nthey throw not `Minitest::Assertion` but `AssertionError` when an assertion fails.\n\nSee also: http://docs.seattlerb.org/minitest/Minitest/Assertions.html\n\n## Contributing\n\nYou should follow the steps below.\n\n1. [Fork the repository](https://help.github.com/articles/fork-a-repo/)\n2. Create a feature branch: `git checkout -b add-new-feature`\n3. Commit your changes: `git commit -am 'Add new feature'`\n4. Push the branch: `git push origin add-new-feature`\n5. [Send us a pull request](https://help.github.com/articles/about-pull-requests/)\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%2Fyasaichi%2Fstandard_assert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyasaichi%2Fstandard_assert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasaichi%2Fstandard_assert/lists"}