A Ruby interface to the Big Panda API.
Add this line to your application's Gemfile:
gem 'big-panda'
And then execute:
$ bundle
Or install it yourself as:
$ gem install big-panda
require 'big_panda'
panda = BigPanda::Client.new(access_token: 'my-access-token')
# => #<BigPanda::Client:0x007f8a39a07038 @target_url="https://api.bigpanda.io", @access_token="my-access-token">
panda.start_deployment({ component: 'html-editor', version: '123' })
# => {"status"=>"created", "id"=>"513382af21e4d3fc5800d01a"}
panda.finish_deployment({ component: 'html-editor', version: '123' })
# => {"status"=>"created", "id"=>"5133831091ad50246f00f089"}
require 'big_panda'
panda = BigPanda::Client.new(access_token: 'my-access-token')
# => #<BigPanda::Client:0x007f8a39a07038 @target_url="https://api.bigpanda.io", @access_token="my-access-token">
panda.start_deployment({ component: 'html-editor', version: '123',
timestamp: Time.now.to_i, description: 'Deploying new version',
owner: 'Gregory Man', env: 'Production', source: 'chef',
hosts: ['a1.wix.com', 'a2.wix.com']
})
# => {"status"=>"created", "id"=>"51338369b4a7ea843100ceb3"}
panda.finish_deployment({ component: 'html-editor', version: '123',
timestamp: Time.now.to_i, status: 'failure', errorMessage: 'Ooops',
hosts: ['a1.wix.com', 'a2.wix.com']
})
# => {"status"=>"created", "id"=>"513383e021e4d3fc5800d02d"}
You can pass ssl options to BigPanda::Client.new
BigPanda::Client.new(access_token: 'my-access-token', ssl: {ca_file: '/my/cert.pem'})
Avalible SSL options (same as in net/http):
:client_cert
:client_key
:ca_file
:ca_path
:verify_depth
:version
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request