Backstop::Deploys
An extension to backstop to allow submission to Librato Metrics
Installation
Add this line to your application's Gemfile:
gem 'backstop-deploys'
And then execute:
$ bundle
Or install it yourself as:
$ gem install backstop-deploys
Usage
This is generally meant to be coupled with your backstop
Rack app, but doesn't necessarily have to be. An example config.ru
:
$:.unshift File.dirname(__FILE__) + '/lib'
require "backstop/web"
require "backstop-deploys"
run Rack::Cascade.new [Backstop::Application, Backstop::Deploys::Web]
It assumes the pressence of LIBRATO_EMAIL
and LIBRATO_KEY
in ENV
.
Example curl interaction:
$ curl -X PUT localhost:5000/deploys/my_app.v73.1350581323 -d 'source=production&end_time=1350581423'
The resource id is broken down into component.version.epoch_time
. source
is required in the body and represents the environment that is reporting the deploy, end_time
is optional.
Contributing
- 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