dolores/ruby-crowdflower — pull request #13 by smathieu (2014-04-22 19:48:50+00:00)
Title: Api Hook

This add the ability to define custom hooks around API request by this gem. We use to monitor a few metrics using [Librato](librato.com).

We use is as such in `config/initializers/crowd_flower.rb`

```ruby
::CrowdFlower.request_hook = Proc.new do |method, path, options, &block|
identifier = "#{method}-#{path}"

Librato.increment "crowd_flower.request", source: identifier
Librato.timing "crowd_flower.request_time", source: identifier do
block.call
end
end
```