{"id":17649982,"url":"https://github.com/hrs/bringhurst","last_synced_at":"2026-02-04T16:39:31.483Z","repository":{"id":59151686,"uuid":"61760280","full_name":"hrs/bringhurst","owner":"hrs","description":"Dynamically record type signatures of Ruby methods.","archived":false,"fork":false,"pushed_at":"2020-06-11T16:47:08.000Z","size":31,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T13:15:00.206Z","etag":null,"topics":["ruby","type-detection"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-23T00:21:19.000Z","updated_at":"2017-02-17T07:40:13.000Z","dependencies_parsed_at":"2022-09-13T11:00:44.146Z","dependency_job_id":null,"html_url":"https://github.com/hrs/bringhurst","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hrs/bringhurst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrs%2Fbringhurst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrs%2Fbringhurst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrs%2Fbringhurst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrs%2Fbringhurst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrs","download_url":"https://codeload.github.com/hrs/bringhurst/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrs%2Fbringhurst/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29091195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["ruby","type-detection"],"created_at":"2024-10-23T11:34:30.172Z","updated_at":"2026-02-04T16:39:31.437Z","avatar_url":"https://github.com/hrs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Bringhurst [![Build Status](https://secure.travis-ci.org/hrs/bringhurst.png?branch=master\u0026.png)](http://travis-ci.org/hrs/bringhurst)\n\nBringhurst watches you run your methods, infers their types, and formats the\nresults. It does this by aliasing each method in a user-defined collection of\nclasses and noting the types of their arguments and results.\n\n**Disclaimer**: This is still just a prototype! Don't use it for anything\nserious just yet!\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"bringhurst\"\n```\n\nAnd then execute:\n\n```\n$ bundle\n```\n\nOr install it yourself as:\n\n```\n$ gem install bringhurst\n```\n\n## Usage\n\nOnce Bringhurst is installed, you'll need to tell it which classes to observe\nand when to display the results. I recommend setting it up in your `spec_helper`\nby doing something like:\n\n```ruby\nrequire \"bringhurst\"\n\nRSpec.configure do |config|\n  # ...\n  observer = Bringhurst::TypeObserver.new\n\n  config.before(:suite) do\n    observer.observe_class(Gitsh::CapturingEnvironment)\n    observer.observe_class(Gitsh::Completer)\n    observer.observe_class(Gitsh::Environment)\n  end\n\n  config.after(:suite) do\n    puts Bringhurst::Formatter.new(observer.method_calls)\n  end\n  # ...\nend\n```\n\nNext, run the tests:\n\n```\n$ rspec\n```\n\nAnd see the results:\n\n```\n...........................................\nObserved Type Signatures\n========================\nGitsh::CapturingEnvironment#captured_output :: String\nGitsh::CapturingEnvironment#output_stream :: IO\nGitsh::Completer#call :: String -\u003e Array\nGitsh::Environment#[]= :: String -\u003e String -\u003e String\nGitsh::Environment#[]= :: Symbol -\u003e String -\u003e String\nGitsh::Environment#config_variables :: Hash\nGitsh::Environment#error_stream :: StringIO\nGitsh::Environment#fetch :: String -\u003e Proc -\u003e NilClass\nGitsh::Environment#fetch :: String -\u003e Proc -\u003e String\nGitsh::Environment#fetch :: String -\u003e String\nGitsh::Environment#fetch :: String -\u003e TrueClass -\u003e Proc -\u003e String\nGitsh::Environment#fetch :: Symbol -\u003e Proc -\u003e String\nGitsh::Environment#fetch :: Symbol -\u003e String\nGitsh::Environment#git_aliases :: Array\nGitsh::Environment#git_command :: FalseClass -\u003e String\nGitsh::Environment#git_command :: String\nGitsh::Environment#git_command :: TrueClass -\u003e String\nGitsh::Environment#git_command= :: String -\u003e String\nGitsh::Environment#git_commands :: RSpec::Mocks::Double\nGitsh::Environment#input_stream :: IO\nGitsh::Environment#input_stream :: RSpec::Mocks::Double\nGitsh::Environment#output_stream :: IO\nGitsh::Environment#output_stream :: RSpec::Mocks::Double\nGitsh::Environment#output_stream :: StringIO\nGitsh::Environment#print :: String -\u003e NilClass\nGitsh::Environment#puts :: String -\u003e NilClass\nGitsh::Environment#puts_error :: String -\u003e NilClass\nGitsh::Environment#readline_version :: String\nGitsh::Environment#repo_config_color :: String -\u003e String -\u003e RSpec::Mocks::Double\nGitsh::Environment#repo_current_head :: RSpec::Mocks::Double\nGitsh::Environment#repo_has_modified_files? :: RSpec::Mocks::Double\nGitsh::Environment#repo_has_untracked_files? :: RSpec::Mocks::Double\nGitsh::Environment#repo_heads :: RSpec::Mocks::Double\nGitsh::Environment#repo_initialized? :: RSpec::Mocks::Double\nGitsh::Environment#tty? :: FalseClass\nGitsh::Environment#tty? :: TrueClass\n```\n\n(I'm hijacking the lovely [gitsh](https://github.com/thoughtbot/gitsh) here for\nmy examples.)\n\nYou can use it in places other than tests, but I wouldn't recommend it -- it'll\ndefinitely adversely affect performance.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`rake spec` to run the tests. You can also run `bin/console` for an interactive\nprompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To\nrelease a new version, update the version number in `version.rb`, and then run\n`bundle exec rake release`, which will create a git tag for the version, push\ngit commits and tags, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/hrs/bringhurst.\n\n## Weird name.\n\n\"Bringhurst\" references one of my favorite\n[observers of types](https://en.wikipedia.org/wiki/The_Elements_of_Typographic_Style).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrs%2Fbringhurst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrs%2Fbringhurst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrs%2Fbringhurst/lists"}