{"id":18728611,"url":"https://github.com/rubyonworld/slack-ruby-block-kit","last_synced_at":"2026-04-30T14:31:32.190Z","repository":{"id":174008154,"uuid":"542165962","full_name":"RubyOnWorld/slack-ruby-block-kit","owner":"RubyOnWorld","description":"A collection of ruby objects that represent Slack's block kit.","archived":false,"fork":false,"pushed_at":"2023-02-16T02:57:59.000Z","size":243,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:32:19.434Z","etag":null,"topics":["block","ruby","slack"],"latest_commit_sha":null,"homepage":"","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/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2022-09-27T15:46:53.000Z","updated_at":"2024-02-29T15:11:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"31d042b8-c5fc-4038-a229-7c67561b538a","html_url":"https://github.com/RubyOnWorld/slack-ruby-block-kit","commit_stats":null,"previous_names":["rubyonworld/slack-ruby-block-kit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/slack-ruby-block-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fslack-ruby-block-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fslack-ruby-block-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fslack-ruby-block-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fslack-ruby-block-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/slack-ruby-block-kit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fslack-ruby-block-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32468009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["block","ruby","slack"],"created_at":"2024-11-07T14:22:15.901Z","updated_at":"2026-04-30T14:31:32.185Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/slack-ruby-block-kit.svg)](https://badge.fury.io/rb/slack-ruby-block-kit)\n[![codecov](https://codecov.io/gh/CGA1123/slack-ruby-block-kit/branch/master/graph/badge.svg)](https://codecov.io/gh/CGA1123/slack-ruby-block-kit)\n[![DeepSource](https://deepsource.io/gh/CGA1123/slack-ruby-block-kit.svg/?label=active+issues\u0026show_trend=true)](https://deepsource.io/gh/CGA1123/slack-ruby-block-kit/?ref=repository-badge)\n[![DeepSource](https://deepsource.io/gh/CGA1123/slack-ruby-block-kit.svg/?label=resolved+issues\u0026show_trend=true)](https://deepsource.io/gh/CGA1123/slack-ruby-block-kit/?ref=repository-badge)\n\n# Slack::BlockKit\n\nA collection of ruby objects that represent Slack's block kit.\n\nYou can play around with the block kit using [Slack's block kit builder!](https://api.slack.com/tools/block-kit-builder)\n\nThe 'blocks' availables are split in line with how Slack documents them, that is:\n\n- `Slack::BlockKit::Layout` contains the [Layout blocks](https://api.slack.com/reference/messaging/blocks)\n- `Slack::BlockKit::Element` contains the [Block elements](https://api.slack.com/reference/messaging/block-elements)\n- `Slack::BlockKit::Composition` contains the [Message composition objects](https://api.slack.com/reference/messaging/composition-objects)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'slack-ruby-block-kit'\n```\n\n\nAnd then execute:\n\n    $ bundle\n\n\nOr install it yourself as:\n\n    $ gem install slack-ruby-block-kit\n\nFinally, require this:\n\n```ruby\nrequire 'slack-ruby-block-kit'\n```\n\n## Examples\n\nHere are a few examples that might help you get started!\n\n```ruby\nrequire 'faraday'\nrequire 'slack-ruby-block-kit'\nrequire 'json'\n\na_prebuilt_block = Slack::BlockKit::Layout::Section.new\ntext = Slack::BlockKit::Composition::Mrkdwn.new(text: ':wave: *hello*')\nan_image = Slack::BlockKit::Element::Image.new(image_url: 'https://git.io/fjDW8', alt_text: 'a picture')\na_prebuilt_block.accessorise(an_image)\na_prebuilt_block.text = text\n\nblocks = Slack::BlockKit.blocks do |b|\n  b.section do |s|\n    s.plain_text(text: 'Some plain text message!')\n    s.button(text: 'A button that is important', style: 'primary', action_id: 'id')\n  end\n\n  b.divider\n\n  b.context do |c|\n    c.mrkdwn(text: '_some italicised text for context_')\n  end\n\n  b.append(a_prebuilt_block)\nend\n\nwebhook_url = 'https://hooks.slack.com/services/your/webhook/url'\nbody = { blocks: blocks.as_json, text: 'New block message!' }\n\nresponse = Faraday.post(\n  webhook_url,\n  body.to_json,\n  'Content-Type' =\u003e 'application/json'\n)\n```\n\nThis will create a message like this:\n\n![example block message](https://git.io/fjDWR)\n\nYou can also check out the [`slackerduty`](https://github.com/CGA1123/slackerduty) project for some example,\n[`Slackerduty::Alert`](https://github.com/CGA1123/slackerduty/blob/b33d708124ddf36d1432080ba7e16e66fefa6993/lib/slackerduty/alert.rb#L28-L34) and [`Slackerduty::Blocks`](https://github.com/CGA1123/slackerduty/blob/master/lib/slackerduty/blocks) may be helpful places to start.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/CGA1123/slack-ruby-block-kit\n\nSee [issues](https://github.com/CGA1123/slack-ruby-block-kit/issues) if you want any inspiration as to what to help with!\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Releasing\n\nReleasing is automated via the `.github/workflows/release.yml` which allows for\nan OTP code to be passed in to authorize the release with MFA. If GitHub\nActions is running slow it might take another attempt to make sure the OTP code\nis still valid when the workflow tries to push.\n\n- Update `CHANGELOG` for the latest version (remember to update the comparison links + add in an `Unreleased` section again)\n- Update `lib/slack/block_kit/version.rb` and run `bundle` to update the `Gemfile.lock`\n- Push that!\n- Run the `Release` workflow\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fslack-ruby-block-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fslack-ruby-block-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fslack-ruby-block-kit/lists"}