{"id":26402381,"url":"https://github.com/kazuomatz/slack500","last_synced_at":"2025-03-17T15:18:41.545Z","repository":{"id":56896044,"uuid":"193642089","full_name":"kazuomatz/Slack500","owner":"kazuomatz","description":"Post Rails Exceptions to Slack.","archived":false,"fork":false,"pushed_at":"2024-01-25T02:48:30.000Z","size":28,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T13:52:39.937Z","etag":null,"topics":["error-reporting","rails","slack"],"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/kazuomatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-25T05:43:29.000Z","updated_at":"2020-10-15T01:20:14.000Z","dependencies_parsed_at":"2022-08-21T01:50:21.485Z","dependency_job_id":null,"html_url":"https://github.com/kazuomatz/Slack500","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuomatz%2FSlack500","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuomatz%2FSlack500/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuomatz%2FSlack500/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuomatz%2FSlack500/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazuomatz","download_url":"https://codeload.github.com/kazuomatz/Slack500/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056430,"owners_count":20390720,"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":["error-reporting","rails","slack"],"created_at":"2025-03-17T15:18:40.958Z","updated_at":"2025-03-17T15:18:41.538Z","avatar_url":"https://github.com/kazuomatz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slack500\n\nSlack500 is a gem that notifies exceptions raised by Rails to your Slack channel using incomming WebHooks URL.\n\nThe following items are displayed in the Slack message.\n\n- http method\n- Controller and Action\n- Query Parameters\n- Body Content (Query / JSON )\n- Remote IP\n- User Agent\n- Error Message\n- Backtrace\n\n\u003cimg src=\"https://user-images.githubusercontent.com/2704723/60161177-ee479980-9831-11e9-9861-360ce28ffdef.png\" width=\"70%\"/\u003e\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'slack_500'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install slack_500\n\nExecute rake task to create configuration file.\n\n    $ rake slack_500:config\n\n\nand edit \"/config/initializers/slack_500.rb\"\n\n```\nrequire 'slack_500'\nSlack500.setup do |config|\n    # report pretext of slack message\n    config.pretext = 'Slack Report Title'\n\n    # report title of slack message\n    config.title = 'Rendering 500 with exception.'\n\n    # color of slack message\n    config.color = '#FF0000'\n\n    # footer text of slack message\n    config.footer = 'via Slack 500 Report.'\n\n    # WebHook URL\n    # see https://slack.com/services/new/incoming-webhook\n    config.webhook_url = \"https://hooks.slack.com/services/xxxxxxxxx/xxxx\"\nend\n```\n\n## Usage\n\n```\nclass ApplicationController \u003c ActionController::Base\n\n  if !Rails.env.production?\n    rescue_from Exception, with: :rescue_500\n  end\n\n  :\n  :\n\n  def rescue_500(exception=nil)\n\n    # Report Exception to Slack\n    Slack500.post(request,exception)\n\n    render 'error/500', status: :internal_server_error, layout: 'application'\n    end\n\n  :\n  :\n\nend\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/kazuomatz/slack_500. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\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## Code of Conduct\n\nEveryone interacting in the Slack500 projects codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/slack_500/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazuomatz%2Fslack500","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazuomatz%2Fslack500","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazuomatz%2Fslack500/lists"}