Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move to canonical path

Tweak docs
Add sinatra recipe first so it ends up filling the default box
Increment version for gem
  • Loading branch information...
commit 64341135a6935222a245c2ba206f2bcd76299dde 1 parent 4d85d0b
@bruce bruce authored
View
10 README.rdoc
@@ -12,9 +12,15 @@ This library is released as a gem from the official repository at http://github.
== Usage
-First you'll need a token for your Sinatra application. Create a new Ruby app in Dash and then copy the token. Now, in your configure block, start up Dash:
+First you'll need a token for your Sinatra application. Create a new Ruby app in Dash (http://dash.fiveruns.com) and copy the token.
- Fiveruns::Dash::Sinatra.start('some_dash_token')
+Make sure you require the Dash Sinatra recipe:
+
+ require 'fiveruns/dash/sinatra'
+
+Now, in your configure block, start up Dash:
+
+ Fiveruns::Dash::Sinatra.start('the-dash-token-you-copied')
Fire up your Sinatra app; you should see it send some environmental information to Dash. Periodically, a background thread will upload your metrics to Dash.
View
26 lib/fiveruns_dash_sinatra.rb → lib/fiveruns/dash/sinatra.rb
@@ -1,33 +1,23 @@
-gem 'fiveruns-dash-ruby'
require 'fiveruns/dash'
+Fiveruns::Dash.logger.level = Logger::INFO
+
Fiveruns::Dash.register_recipe :sinatra, :url => 'http://dash.fiveruns.com' do |recipe|
-
# NOTE: Captures static requests in addition to Sinatra app requests. Can't
# find a good way around that.
recipe.counter :requests, :incremented_by => 'Sinatra::Application#dispatch!'
-
recipe.time :response_time, :method => 'Sinatra::Application#dispatch!'
-
recipe.time :render_time, :method => 'Sinatra::Application#render'
end
-module Fiveruns
+module Fiveruns::Dash::Sinatra
- module Dash
-
- module Sinatra
-
- def self.start(token)
- return if Fiveruns::Dash.session.reporter.started?
- Fiveruns::Dash.start(:app => token) do |config|
- config.add_recipe :ruby
- config.add_recipe :sinatra
- end
- end
-
+ def self.start(token)
+ return if Fiveruns::Dash.session.reporter.started?
+ Fiveruns::Dash.start(:app => token) do |config|
+ config.add_recipe :sinatra
+ config.add_recipe :ruby
end
-
end
end
View
2  version.yml
@@ -1,4 +1,4 @@
---
:major: 0
:minor: 7
-:patch: 4
+:patch: 5
Please sign in to comment.
Something went wrong with that request. Please try again.