{"id":19316010,"url":"https://github.com/socketry/async-bus","last_synced_at":"2025-04-22T16:32:59.735Z","repository":{"id":47484192,"uuid":"401173289","full_name":"socketry/async-bus","owner":"socketry","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-30T08:42:55.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-31T13:28:11.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/socketry.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":"2021-08-30T00:37:55.000Z","updated_at":"2023-06-13T06:14:04.000Z","dependencies_parsed_at":"2022-08-20T00:40:49.390Z","dependency_job_id":null,"html_url":"https://github.com/socketry/async-bus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fasync-bus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fasync-bus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fasync-bus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fasync-bus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socketry","download_url":"https://codeload.github.com/socketry/async-bus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223900219,"owners_count":17222028,"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":[],"created_at":"2024-11-10T01:09:25.499Z","updated_at":"2024-11-10T01:09:26.178Z","avatar_url":"https://github.com/socketry.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Async::Bus\n\nProvides a distributed client-server bus for executing Ruby code.\n\n[![Development Status](https://github.com/socketry/supervisor/workflows/Development/badge.svg)](https://github.com/socketry/supervisor/actions?workflow=Development)\n\n## Installation\n\n``` shell\nbundle add async-bus\n```\n\n## Usage\n\n```ruby\nclass Counter\n\tdef initialize(count = 0)\n\t\t@count = count\n\tend\n\t\n\tattr :count\n\t\n\tdef increment\n\t\t@count += 1\n\tend\nend\n\nserver = Async::Bus::Server.new\nclient = Async::Bus::Client.new\n\n# Server Process\nserver_task = Async do\n\tserver.accept do |connection|\n\t\tconnection.bind(:counter, Counter.new)\n\tend\nend\n\n# Client Process\nclient.connect do |connection|\n\t3.times do\n\t\tconnection[:counter].increment\n\tend\n\t\n\texpect(connection[:counter].count).to be == 3\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/\\[USERNAME\\]/supervisor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketry%2Fasync-bus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketry%2Fasync-bus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketry%2Fasync-bus/lists"}