WebHook plugin for tumugi
tumugi-plugin-webhook is a plugin for integrate various WebHooks and tumugi.
Add this line to your application's Gemfile:
gem 'tumugi-plugin-webhook'
And then execute bundle install
.
Tumugi::Plugin::WebhookTask
is a task to send a HTTP request for any WebHooks.
- url WebHook URL (string, required)
- http_method HTTP method (string, optional, default: "post")
- body WebHook body (string or hash, optional, default:
nil
) - body_encoding WebHook body encoding type (string, optional, default: "json")
- "json": MIME type is
application/json
- "url_encoded": MIME type is
application/x-www-form-urlencoded
- "json": MIME type is
task :main, type: :webhook do
url "http://httpbin.org/post"
body {
{ text: "message" }
}
end
After checking out the repo, run bundle install
to install dependencies.
Then run bundle exec rake test
to run the tests.
Run this plugin with tumugi, run
$ bundle exec tumugi run -f examples/example.rb main
The gem is available as open source under the terms of the Apache License Version 2.0.