CONTRIBUTING.md in slack-ruby-client-0.3.1 vs CONTRIBUTING.md in slack-ruby-client-0.4.0

- old
+ new

@@ -61,9 +61,29 @@ Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop). Run `bundle exec rubocop` and fix any style issues highlighted, auto-correct issues when possible with `bundle exec rubocop -a`. To silence generally ingored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`. Make sure that `bundle exec rake` completes without errors. +### Update Slack Web API + +Slack Web API is updated from https://github.com/dblock/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task. + +``` +rake slack:web:api:update +``` + +#### Patching Slack Web API + +Sometimes it's necessary to patch auto-generated Slack Web API methods. For example, we want to help clients with calling `to_json` on the `attachments` parameter sent to `chat_postMessage`. See [#20](https://github.com/dblock/slack-ruby-client/issues/20). + +Make a change to a generated file, for example `lib/slack/web/api/endpoints/chat.rb` and generate a patch. + +``` +git diff HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.1.patch +``` + +Run `rake slack:web:api:update` to ensure that the patch is cleanly applied. Implement a test for the added or modified functionality and commit the patch file. + ### Write Documentation Document any external behavior in the [README](README.md). ### Update Changelog