Rack::FaradayInspector

Rack::FaradayInspector renders a bit of HTML at the bottom of your pages that allows you to inspect all of the requests Faraday made for the current request.

rack-faraday_inspector

Currently only supports Rails. Requires SASS and jQuery.

Installation

Add this line to your application's Gemfile:

gem 'rack-faraday_inspector', github: 'chrisb/rack-faraday_inspector'

I'm still actively working on this Gem, so it has not been pushed to Rubygems yet.

Usage

To view requests, simply add the middleware to each of the Faraday connections you want to inspect:

require 'rack/faraday_inspector'

Faraday.new url: 'http://www.sushi.com' do |faraday|
  faraday.use :inspector
  # ...
end

Note: only in the development environment will requests be instrumented and the inspector rendered.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/chrisb/rack-faraday_inspector.