Sha256: 7f26fd743a8ed1d88843746a21cf3627bb59a114f93966d2bdedbca6b1c04bf8
Contents?: true
Size: 1.7 KB
Versions: 1
Compression:
Stored size: 1.7 KB
Contents
# Octogate [](https://travis-ci.org/joker1007/octogate) [](https://codeclimate.com/github/joker1007/octogate) Github hook proxy server of Sinatra Framework. You can write about request destination in Ruby DSL ## Installation Add this line to your application's Gemfile: gem 'octogate' And then execute: $ bundle Or install it yourself as: $ gem install octogate ## Usage Write config.rb. ```ruby token "token_string" target "jenkins" do hook_type [:push, :pull_request] url "http://targethost.dev/job/CommitStage" http_method :get parameter_type :query params key1: "value1", key2: "value2" match -> { hook.ref =~ /master/ } end target "jenkins2" do hook_type [:push, :pull_request] url "http://targethost2.dev/job/CommitStage" http_method :get parameter_type :json params key1: "value1", key2: "value2" match -> { !(hook.ref =~ /master/) } end ``` And launch server. ```sh % bundle exec octogate -h Usage: octogate [options] -c config Set config file (default = ./config.rb) -p port Set port number (default = 4567) -o address Set address to bind (default = 0.0.0.0) % bundle exec octogate -c config.rb # => Endpoint is http://hostname:4567/token_string ``` ## Contributing 1. Fork it ( https://github.com/joker1007/octogate/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octogate-0.1.0 | README.md |