Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Dec 2, 2009
1 parent dd01765 commit fd17ee2
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions README.markdown
Expand Up @@ -10,33 +10,45 @@ Install
sudo gem install lilypad --source http://gemcutter.org
</pre>

Use it
------
Rails
-----

<pre>
In **config/environment.rb**:

<pre>
require 'rack/lilypad'
use Rack::Lilypad, 'hoptoad_api_key_goes_here'
Rails::Initializer.run do |config|
ENV['RACK_ENV'] = ENV['RAILS_ENV']
config.middleware.use Rack::Lilypad, 'hoptoad_api_key_goes_here'
end
</pre>

To specify environment filters:
Sinatra
-------

<pre>
use Rack::Lilypad, 'hoptoad_api_key_goes_here' do |hoptoad|
hoptoad.filters << %w(AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY AWS_ACCOUNT SSH_AUTH_SOCK)
require 'rack/lilypad'
class MyApp < Sinatra::Default
enable :raise_errors
use Rack::Lilypad, 'hoptoad_api_key_goes_here'
end
</pre>

In Rails, you will need to do this in the <code>Rails::Initializer.run</code> block in environment.rb:
Filters
-------

Don't send certain environment variables to Hoptoad.

<pre>
ENV['RACK_ENV'] = ENV['RAILS_ENV']
config.middleware.use Rack::Lilypad, 'hoptoad_api_key_goes_here'
use Rack::Lilypad, 'hoptoad_api_key_goes_here' do |hoptoad|
hoptoad.filters << %w(AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY AWS_ACCOUNT SSH_AUTH_SOCK)
end
</pre>

Debug
-----

Use the log option to see what is happening:
See what you are sending and receiving from Hoptoad.

<pre>
use Rack::Lilypad, 'hoptoad_api_key_goes_here' do |hoptoad|
Expand Down

0 comments on commit fd17ee2

Please sign in to comment.