{"id":18936631,"url":"https://github.com/cloudevents/sdk-ruby","last_synced_at":"2026-03-05T23:02:59.425Z","repository":{"id":33744875,"uuid":"160887022","full_name":"cloudevents/sdk-ruby","owner":"cloudevents","description":"Ruby SDK for CloudEvents ","archived":false,"fork":false,"pushed_at":"2026-02-10T00:13:50.000Z","size":766,"stargazers_count":48,"open_issues_count":1,"forks_count":13,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-25T07:34:00.911Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudevents.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-07T23:52:46.000Z","updated_at":"2026-02-10T00:13:54.000Z","dependencies_parsed_at":"2026-02-08T11:01:25.214Z","dependency_job_id":null,"html_url":"https://github.com/cloudevents/sdk-ruby","commit_stats":{"total_commits":67,"total_committers":5,"mean_commits":13.4,"dds":0.582089552238806,"last_synced_commit":"95590bf06c836823603fbe627a4086e0224deeda"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/cloudevents/sdk-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fsdk-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fsdk-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fsdk-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fsdk-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudevents","download_url":"https://codeload.github.com/cloudevents/sdk-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fsdk-ruby/sbom","scorecard":{"id":292489,"data":{"date":"2025-08-11","repo":{"name":"github.com/cloudevents/sdk-ruby","commit":"49985976f0bb5e3a1225c297b8e34598f7e55bda"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-hook-on-closed.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-hook-on-closed.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-hook-on-closed.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-hook-on-closed.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-hook-on-push.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-hook-on-push.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-hook-on-push.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-hook-on-push.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-perform.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-perform.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-perform.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-perform.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-request.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-request.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-request.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-retry.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-retry.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-retry.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/cloudevents/sdk-ruby/release-retry.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release-hook-on-closed.yml:1","Warn: no topLevel permission defined: .github/workflows/release-hook-on-push.yml:1","Warn: no topLevel permission defined: .github/workflows/release-perform.yml:1","Warn: no topLevel permission defined: .github/workflows/release-request.yml:1","Warn: no topLevel permission defined: .github/workflows/release-retry.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T18:38:18.495Z","repository_id":33744875,"created_at":"2025-08-17T18:38:18.495Z","updated_at":"2025-08-17T18:38:18.495Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29965306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-11-08T12:08:18.200Z","updated_at":"2026-03-05T23:02:59.419Z","avatar_url":"https://github.com/cloudevents.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ruby SDK for [CloudEvents](https://github.com/cloudevents/spec)\n\n## CloudEvents Ruby SDK\n\nA [Ruby](https://ruby-lang.org) language implementation of the\n[CloudEvents specification](https://github.com/cloudevents/spec).\n\nFeatures:\n\n *  Ruby classes for representing CloudEvents, including support for standard\n    and extension attributes.\n *  Support for serializing and deserializing from JSON Structure Format and\n    JSON Batch Format.\n *  Support for sending and receiving CloudEvents via HTTP Bindings.\n *  Supports the [CloudEvent 0.3](https://github.com/cloudevents/spec/tree/v0.3)\n    and [CloudEvents 1.0](https://github.com/cloudevents/spec/tree/v1.0.2)\n    specifications.\n *  Extensible to additional formats and protocol bindings, and future\n    specification versions.\n *  Compatible with Ruby 2.7 or later, or JRuby 9.2.x or later. No runtime gem\n    dependencies.\n\n## Quickstart\n\nInstall the `cloud_events` gem or add it to your bundle.\n\n```sh\ngem install cloud_events\n```\n\n### Receiving a CloudEvent in a Sinatra app\n\nA simple [Sinatra](https://sinatrarb.com) app that receives CloudEvents:\n\n```ruby\n# examples/server/Gemfile\nsource \"https://rubygems.org\"\ngem \"cloud_events\", \"~\u003e 0.8\"\ngem \"sinatra\", \"~\u003e 4.0\"\ngem \"rackup\"\ngem \"puma\"\n```\n\n```ruby\n# examples/server/app.rb\nrequire \"sinatra\"\nrequire \"cloud_events\"\n\ncloud_events_http = CloudEvents::HttpBinding.default\n\npost(\"/\") do\n  event = cloud_events_http.decode_event(request.env)\n  logger.info(\"Received CloudEvent: #{event.to_h}\")\nend\n```\n\n### Sending a CloudEvent\n\nA simple Ruby script that sends a CloudEvent:\n\n```ruby\n# examples/client/Gemfile\nsource \"https://rubygems.org\"\ngem \"cloud_events\", \"~\u003e 0.8\"\n```\n\n```ruby\n# examples/client/send.rb\nrequire \"cloud_events\"\nrequire \"net/http\"\nrequire \"uri\"\n\ndata = { message: \"Hello, CloudEvents!\" }\nevent = CloudEvents::Event.create(\n  spec_version:      \"1.0\",\n  id:                \"1234-1234-1234\",\n  source:            \"/mycontext\",\n  type:              \"com.example.someevent\",\n  data_content_type: \"application/json\",\n  data:              data\n)\n\ncloud_events_http = CloudEvents::HttpBinding.default\nheaders, body = cloud_events_http.encode_event(event)\nNet::HTTP.post(URI(\"http://localhost:4567\"), body, headers)\n```\n\n### Putting it together\n\nStart the server on localhost:\n\n```sh\ncd server\nbundle install\nbundle exec ruby app.rb\n```\n\nThis will run the server in the foreground and start logging to the console.\n\nIn a separate terminal shell, send it an event from the client:\n\n```sh\ncd client\nbundle install\nbundle exec ruby send.rb\n```\n\nThe event should be logged in the server logs.\n\nHit `CTRL+C` to stop the server.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/cloudevents/sdk-ruby.\n\n### Development\n\nAfter cloning the repo locally, install the bundle, and install the `toys` gem\nif you do not already have it.\n\n```sh\nbundle install\ngem install toys\n```\n\nA variety of Toys scripts are provided for running tests and builds. For\nexample:\n\n```sh\n# Run the unit tests\ntoys test\n\n# Run CI locally, including unit tests, doc tests, and rubocop\ntoys ci\n\n# Build and install the gem locally\ntoys install\n\n# Clean temporary and build files\ntoys clean\n\n# List all available scripts\ntoys\n\n# Show online help for the \"test\" script\ntoys test --help\n```\n\n### Code style\n\nRuby code style is enforced by Rubocop rules. We've left the configuration\nlargely on the Rubocop defaults, with a few exceptions, notably:\n\n* We prefer double-quoted strings rather than single-quoted strings.\n* We prefer trailing commas in multi-line array and hash literals.\n* Line length limit is 120\n* We've loosened a few additional checks that we felt were not helpful.\n\nYou can run rubocop directly using the\n`rubocop` binary:\n\n```sh\nbundle exec rubocop\n```\n\nor via Toys:\n\n```sh\ntoys rubocop\n```\n\nThat said, we are not style sticklers, and if a break is necessary for code\nreadability or practicality, Rubocop rules can be selectively disabled.\n\n### Pull requests\n\nWe welcome contributions from the community! Please take some time to become\nacquainted with the process before submitting a pull request. There are just a\nfew things to keep in mind.\n\n *  **Typically a pull request should relate to an existing issue.** If you\n    have found a bug, want to add an improvement, or suggest an API change,\n    please create an issue before proceeding with a pull request. For very\n    minor changes such as typos in the documentation this isn't necessary.\n *  **Use Conventional Commit messages.** All commit messages should follow the\n    [Conventional Commits Specification](https://conventionalcommits.org) to\n    make it clear how your change should appear in release notes.\n *  **Sign your work.** Each PR must be signed. Be sure your git `user.name`\n    and `user.email` are configured then use the `--signoff` flag for your\n    commits. e.g. `git commit --signoff`.\n *  **Make sure CI passes.** Invoke `toys ci` to run the tests locally before\n    opening a pull request. This will include code style checks.\n\n### For more information\n\n *  Library documentation: https://cloudevents.github.io/sdk-ruby\n *  Issue tracker: https://github.com/cloudevents/sdk-ruby/issues\n *  Changelog: https://cloudevents.github.io/sdk-ruby/latest/file.CHANGELOG.html\n\n## Community\n\n *  **Weekly meetings:** There are bi-weekly calls immediately following the\n    [Serverless/CloudEvents call](https://github.com/cloudevents/spec#meeting-time)\n    at 9am PT (US Pacific). Which means they will typically start at 10am PT,\n    but if the other call ends early then the SDK call will start early as\n    well. See the\n    [CloudEvents meeting minutes](https://docs.google.com/document/d/1OVF68rpuPK5shIHILK9JOqlZBbfe91RNzQ7u_P7YCDE/edit)\n    to determine which week will have the call.\n\n *  **Slack:** The `#cloudeventssdk` channel under\n    [CNCF's Slack workspace](https://slack.cncf.io/).\n\n *  **Email:** https://lists.cncf.io/g/cncf-cloudevents-sdk\n\n *  For additional information, contact Daniel Azuma (`@dazuma` on Slack).\n\nEach SDK may have its own unique processes, tooling and guidelines, common\ngovernance related material can be found in the\n[CloudEvents `community`](https://github.com/cloudevents/spec/tree/master/community)\ndirectory. In particular, in there you will find information concerning\nhow SDK projects are\n[managed](https://github.com/cloudevents/spec/blob/master/community/SDK-GOVERNANCE.md),\n[guidelines](https://github.com/cloudevents/spec/blob/master/community/SDK-maintainer-guidelines.md)\nfor how PR reviews and approval, and our\n[Code of Conduct](https://github.com/cloudevents/spec/blob/master/community/GOVERNANCE.md#additional-information)\ninformation.\n\nIf there is a security concern with one of the CloudEvents specifications, or\nwith one of the project's SDKs, please send an email to\n[cncf-cloudevents-security@lists.cncf.io](mailto:cncf-cloudevents-security@lists.cncf.io).\n\n## Additional SDK Resources\n\n- [List of current active maintainers](MAINTAINERS.md)\n- [How to contribute to the project](CONTRIBUTING.md)\n- [SDK's License](LICENSE)\n- [SDK's Release process](RELEASING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudevents%2Fsdk-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudevents%2Fsdk-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudevents%2Fsdk-ruby/lists"}