{"id":20237749,"url":"https://github.com/ragmaanir/besked","last_synced_at":"2026-06-09T10:31:27.437Z","repository":{"id":136217762,"uuid":"45352774","full_name":"Ragmaanir/besked","owner":"Ragmaanir","description":"Small typed PubSub library for crystal.","archived":false,"fork":false,"pushed_at":"2016-11-13T05:42:37.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T14:47:26.023Z","etag":null,"topics":["crystal","pubsub"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/Ragmaanir.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":"2015-11-01T18:45:58.000Z","updated_at":"2017-07-27T20:21:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"98a9d6b6-0b66-4c51-ba2f-2d5a00a5ffd8","html_url":"https://github.com/Ragmaanir/besked","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ragmaanir/besked","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragmaanir%2Fbesked","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragmaanir%2Fbesked/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragmaanir%2Fbesked/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragmaanir%2Fbesked/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ragmaanir","download_url":"https://codeload.github.com/Ragmaanir/besked/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragmaanir%2Fbesked/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34103355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["crystal","pubsub"],"created_at":"2024-11-14T08:28:41.083Z","updated_at":"2026-06-09T10:31:27.417Z","avatar_url":"https://github.com/Ragmaanir.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# besked [![Build Status](https://travis-ci.org/Ragmaanir/besked.svg?branch=master)](https://travis-ci.org/Ragmaanir/besked)\n\nEvent System for notifications similar to ActiveSupport Instrumentation.\n\n## Installation\n\n\nAdd this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  besked:\n    github: ragmaanir/besked\n```\n\n\n## Usage\n\n\n```crystal\nrequire \"besked\"\n\nclass MyPub\n  include Besked::Publisher(Int32)\nend\n\nclass MySub\n  include Besked::Subscriber(Int32)\n\n  getter? received : Bool\n  getter events : Array(Int32)\n\n  def initialize\n    @received = false\n    @events = [] of Int32\n  end\n\n  def receive(event : Int32)\n    @received = true\n    @events \u003c\u003c event\n  end\nend\n\ntest \"local publishers and subscribers\" do\n  pub = MyPub.new\n  sub = MySub.new\n\n  pub.subscribe(sub)\n\n  assert !sub.received?\n\n  pub.publish(1337)\n\n  assert sub.received?\n  assert sub.events == [1337]\nend\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragmaanir%2Fbesked","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragmaanir%2Fbesked","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragmaanir%2Fbesked/lists"}