{"id":21385267,"url":"https://github.com/mikhailvs/simple-event-bus","last_synced_at":"2025-07-27T05:33:08.754Z","repository":{"id":62558777,"uuid":"154729131","full_name":"mikhailvs/simple-event-bus","owner":"mikhailvs","description":"Simple event bus for Ruby","archived":false,"fork":false,"pushed_at":"2025-01-28T21:47:51.000Z","size":18,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T01:04:33.208Z","etag":null,"topics":["emit-events","event-bus","publish-subscribe","rails","ruby"],"latest_commit_sha":null,"homepage":null,"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/mikhailvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-10-25T19:53:05.000Z","updated_at":"2025-01-28T21:47:00.000Z","dependencies_parsed_at":"2025-01-28T22:34:56.236Z","dependency_job_id":null,"html_url":"https://github.com/mikhailvs/simple-event-bus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikhailvs/simple-event-bus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailvs%2Fsimple-event-bus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailvs%2Fsimple-event-bus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailvs%2Fsimple-event-bus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailvs%2Fsimple-event-bus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikhailvs","download_url":"https://codeload.github.com/mikhailvs/simple-event-bus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailvs%2Fsimple-event-bus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267306770,"owners_count":24067035,"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-07-27T02:00:11.917Z","response_time":82,"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":["emit-events","event-bus","publish-subscribe","rails","ruby"],"created_at":"2024-11-22T11:46:17.996Z","updated_at":"2025-07-27T05:33:08.463Z","avatar_url":"https://github.com/mikhailvs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleEventBus\n[![Gem Version](https://badge.fury.io/rb/simple-event-bus.svg)](https://badge.fury.io/rb/simple-event-bus)\n\n## Install\n\nGemfile:\n```ruby\ngem 'simple-event-bus'\n```\n\nShell:\n```sh\ngem install simple-event-bus\n```\n\n## Usage\nUse the `SimpleEventBus` class as a singleton, or instantiate new instances of it.\n\n```ruby\nrequire 'event-bus'\n\nSimpleEventBus.subscribe(:event_happened) do |params|\n  puts \"Event handled with block: #{params.inspect}\"\nend\n\nclass EventHandler\n  def event_happened(params)\n    puts \"Event handled with method: #{params.inspect}\"\n  end\nend\n\nSimpleEventBus.emit(:event_happened, param1: 'hello', param2: 'world')\n\nbus = SimpleEventBus.new\n\nbus.subscribe(:event_happened, EventHandler.new, once: true)\n\nbus.emit(:event_happened, request: 'handle THIS')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikhailvs%2Fsimple-event-bus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikhailvs%2Fsimple-event-bus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikhailvs%2Fsimple-event-bus/lists"}