{"id":16058661,"url":"https://github.com/jonathanhefner/mini_sanity","last_synced_at":"2025-11-11T20:25:20.859Z","repository":{"id":56883869,"uuid":"101502538","full_name":"jonathanhefner/mini_sanity","owner":"jonathanhefner","description":"In-line sanity checks in Ruby","archived":false,"fork":false,"pushed_at":"2023-03-18T21:01:50.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T11:54:36.286Z","etag":null,"topics":["assertions","ruby","sanity-check","utility"],"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/jonathanhefner.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":"2017-08-26T17:43:12.000Z","updated_at":"2022-01-24T19:14:16.000Z","dependencies_parsed_at":"2025-02-10T15:54:55.295Z","dependency_job_id":null,"html_url":"https://github.com/jonathanhefner/mini_sanity","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fmini_sanity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fmini_sanity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fmini_sanity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fmini_sanity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanhefner","download_url":"https://codeload.github.com/jonathanhefner/mini_sanity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305946,"owners_count":20917208,"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":["assertions","ruby","sanity-check","utility"],"created_at":"2024-10-09T03:22:10.753Z","updated_at":"2025-11-11T20:25:20.814Z","avatar_url":"https://github.com/jonathanhefner.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini_sanity\n\nIn-line [sanity checks], written as extensions to core Ruby objects.\nSee API listing below, or browse the [full documentation].\n\n[sanity checks]: https://en.wikipedia.org/wiki/Sanity_check\n[full documentation]: https://www.rubydoc.info/gems/mini_sanity/\n\n\n## Example\n\n```ruby\nrequire \"json\"\nrequire \"pathname\"\n\npath = Pathname.new(\"hosted_files.json\").assert!(\u0026:exist?)\n\nhosted_files = JSON.parse(path.read).assert!(Array)\n\nurls = hosted_files.flat_map do |file_info|\n  file_info.fetch(\"mirror_urls\").refute!(\u0026:empty?)\nend\n\ndomains = urls.map do |url|\n  url.assert!(%r\"^https?://\").split(\"/\")[2]\nend.uniq\n```\n\n\n## API\n\n- `\"mini_sanity/assert\"`\n  - [Object#assert!](https://www.rubydoc.info/gems/mini_sanity/Object:assert%21)\n  - [Object#refute!](https://www.rubydoc.info/gems/mini_sanity/Object:refute%21)\n- `\"mini_sanity/change\"`\n  - [String#change](https://www.rubydoc.info/gems/mini_sanity/String:change)\n  - [String#change!](https://www.rubydoc.info/gems/mini_sanity/String:change%21)\n- `\"mini_sanity/match\"`\n  - [Regexp#match!](https://www.rubydoc.info/gems/mini_sanity/Regexp:match%21)\n  - [String#match!](https://www.rubydoc.info/gems/mini_sanity/String:match%21)\n- `\"mini_sanity/results\"`\n  - [Enumerator#result!](https://www.rubydoc.info/gems/mini_sanity/Enumerator:result%21)\n  - [Enumerator#results!](https://www.rubydoc.info/gems/mini_sanity/Enumerator:results%21)\n\n\n## Installation\n\nInstall the [`mini_sanity` gem](https://rubygems.org/gems/mini_sanity).\n\n\n## Contributing\n\nRun `rake test` to run the tests.\n\n\n## License\n\n[MIT License](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanhefner%2Fmini_sanity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanhefner%2Fmini_sanity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanhefner%2Fmini_sanity/lists"}