{"id":16071337,"url":"https://github.com/mvz/iba","last_synced_at":"2025-08-15T22:09:33.798Z","repository":{"id":1274694,"uuid":"1213948","full_name":"mvz/iba","owner":"mvz","description":"Introspective Block Assertions","archived":false,"fork":false,"pushed_at":"2025-03-26T07:20:30.000Z","size":178,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-12T23:54:31.040Z","etag":null,"topics":["hacktoberfest","ruby","testing-tools"],"latest_commit_sha":null,"homepage":"https://github.com/mvz/iba","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING.LESSER","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,"zenodo":null}},"created_at":"2011-01-02T11:54:39.000Z","updated_at":"2025-03-26T07:20:33.000Z","dependencies_parsed_at":"2023-12-27T14:29:02.872Z","dependency_job_id":"874a79c8-edf4-42f4-a07a-e74a3c12d9d5","html_url":"https://github.com/mvz/iba","commit_stats":{"total_commits":212,"total_committers":2,"mean_commits":106.0,"dds":0.1556603773584906,"last_synced_commit":"a66d528cb62cb8dc3d2dd4c6a12ca4f4e2312816"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mvz/iba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fiba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fiba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fiba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fiba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvz","download_url":"https://codeload.github.com/mvz/iba/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fiba/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270636727,"owners_count":24620424,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hacktoberfest","ruby","testing-tools"],"created_at":"2024-10-09T07:24:00.833Z","updated_at":"2025-08-15T22:09:33.740Z","avatar_url":"https://github.com/mvz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iba\n\nby Matijs van Zuijlen\n\n## Description\n\nIntrospective Block Assertions\n\n## Features/Problems\n\n* Write assertions as a (one-expression) block\n* Assertion message deconstructs the block's expression.\n* Not done yet.\n\n## Synopsis\n\n```ruby\n# In your test helper:\nrequire 'iba'\nclass Test::Unit::TestCase\n  include Iba::BlockAssertion\nend\n\n# In your test:\nfoo = 24\nassert { foo == 23 } # =\u003e \"(foo == 23) is false\n                     #     foo is 24.\"\n```\n\n## Details\n\nIba provides an assert method that takes a block. If the block returns\nfalse, it will try to construct an insightful error message based on the\ncontents of the block.\n\nIba's functionality is inspired by [Wrong], but doesn't use an external\nRuby parser. This means it will work in contexts where Wrong does not\n(generated code, on the command line). It also means there are more limits\nto the contents of the block.\n\nCurrent limits:\n\n* Only single-expression blocks are supported.\n* The expression must start with a method-like identifier or an instance\n  variable (like `foo`  or `@foo`, but not `Foo` or `23`). In practice,\n  this produces quite natural results.\n* Local and instance variables whose names start with an underscore should\n  not be used inside the block.\n\nIba's implementation is inspired by [Arlo], a generic combinator library\nfor Python. The implementation of Arlo is now [on github][arlo-code].\n\n## Install\n\n```\ngem install iba\n```\n\n\u003c!-- Links --\u003e\n\n[Wrong]: https://github.com/sconover/wrong\n[Arlo]: https://web.archive.org/web/20081228090759/http://withoutane.com:80/rants/2008/12/arlo-generic-combinators-for-python\n[arlo-code]: https://github.com/tangentstorm/workshop/blob/main/code/arlo.py\n\n## Licence\n\nSee the LICENSE file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvz%2Fiba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvz%2Fiba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvz%2Fiba/lists"}