Project

big-panda

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Ruby interface to the Big Panda API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.13
~> 2.4
~> 1.10

Runtime

 Project Readme

BigPanda

Build Status Dependency Status

A Ruby interface to the Big Panda API.

Installation

Add this line to your application's Gemfile:

gem 'big-panda'

And then execute:

$ bundle

Or install it yourself as:

$ gem install big-panda

Usage

Simple Usage:

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"}

Advanced Usage:

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"}

SSL Options

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

Contributing

  1. Fork it
  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 new Pull Request