Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from playlist-media/update-app
Browse files Browse the repository at this point in the history
Update gems and README
  • Loading branch information
mheffner committed Sep 11, 2013
2 parents 62375c7 + 19e04d0 commit f9aacdd
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 48 deletions.
17 changes: 6 additions & 11 deletions Gemfile
@@ -1,13 +1,8 @@
source :rubygems
source 'https://rubygems.org'

gem 'sinatra', '~> 1.0'
gem 'yajl-ruby', '~> 0.7.8', :require => 'yajl'
gem 'faraday', '~> 0.7.6'
gem 'activesupport', '~> 2.3', :require => 'active_support'
gem 'sinatra', '~> 1.4.3'
gem 'yajl-ruby', '~> 1.1.0', :require => 'yajl'
gem 'faraday', '~> 0.8.8'
gem 'activesupport', '~> 4.0.0', :require => 'active_support'
#gem 'always_verify_ssl_certificates'
gem 'unicorn', '~> 4.3.1'

group :development do
gem 'thin'
gem 'SystemTimer', '~> 1.2.3'
end
gem 'unicorn', '~> 4.6.3'
66 changes: 33 additions & 33 deletions Gemfile.lock
@@ -1,44 +1,44 @@
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
SystemTimer (1.2.3)
activesupport (2.3.14)
addressable (2.2.8)
daemons (1.1.8)
eventmachine (0.12.10)
faraday (0.7.6)
addressable (~> 2.2)
multipart-post (~> 1.1)
rack (~> 1.1)
kgio (2.7.4)
multipart-post (1.1.5)
rack (1.4.1)
rack-protection (1.2.0)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
atomic (1.1.14)
faraday (0.8.8)
multipart-post (~> 1.2.0)
i18n (0.6.5)
kgio (2.8.1)
minitest (4.7.5)
multi_json (1.8.0)
multipart-post (1.2.0)
rack (1.5.2)
rack-protection (1.5.0)
rack
raindrops (0.9.0)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.3)
unicorn (4.3.1)
raindrops (0.12.0)
sinatra (1.4.3)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
tzinfo (0.3.37)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
yajl-ruby (0.7.9)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
SystemTimer (~> 1.2.3)
activesupport (~> 2.3)
faraday (~> 0.7.6)
sinatra (~> 1.0)
thin
unicorn (~> 4.3.1)
yajl-ruby (~> 0.7.8)
activesupport (~> 4.0.0)
faraday (~> 0.8.8)
sinatra (~> 1.4.3)
unicorn (~> 4.6.3)
yajl-ruby (~> 1.1.0)
26 changes: 26 additions & 0 deletions README.md
Expand Up @@ -3,6 +3,26 @@
Simple Sinatra app to map third-party service webhooks to Librato
Metric's [annotations API](http://dev.librato.com/v1/annotations).

To deploy this app to Heroku:

```shell
$ git clone https://github.com/librato/librato-annotate.git
Cloning into 'librato-annotate'...
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 27 (delta 9), reused 26 (delta 8)
Unpacking objects: 100% (27/27), done.

$ cd librato-annotate

$ heroku create
Creating evening-chamber-4158... done, stack is cedar
http://evening-chamber-4158.herokuapp.com/ | git@heroku.com:evening-chamber-4158.git
Git remote heroku added

$ git push heroku master
```

## Supported Services

### Heroku HTTP Post Hook
Expand All @@ -23,3 +43,9 @@ Optional Parameters:
* `github_repo`: URL of a backing GH repo, for example:
`https://github.com/librato/myapp`. If this is set a link will be
added that points to the deployed commit.

To add as a deploy hook to a Heroku app:

```shell
$ heroku addons:add deployhooks:http --url="http://evening-chamber-4158.herokuapp.com/heroku?email=[email]&token=[token]&name=[name]&github_repo=[github repo]"
```
4 changes: 0 additions & 4 deletions app.rb
Expand Up @@ -3,8 +3,6 @@

module LibratoAnnotateHook
class App < Sinatra::Base
dir = File.dirname(File.expand_path(__FILE__))

set :app_file, __FILE__

set :uri, ENV["METRICS_API"] || "metrics-api.librato.com"
Expand All @@ -26,8 +24,6 @@ def bad_request!

conn = Faraday.new(:url => "https://#{settings.uri}") do |builder|
builder.request :json

#builder.response :logger
builder.adapter Faraday.default_adapter
end

Expand Down

0 comments on commit f9aacdd

Please sign in to comment.