Project

rack-spyup

0.0
No commit activity in last 3 years
No release in over 3 years
Spying requests and responses with rack power
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
~> 2.14.0

Runtime

>= 1.4
 Project Readme

Rack::SpyUp

Spying request and json response

wercker status

Installation

Add this line to your application's Gemfile:

gem 'rack-spyup'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-spyup

Usage

use Rack::SpyUp do |config|
  config.logger = Logger.new(STDOUT)
end

spyup command

rack-spyup is shipped with spyup command. You can use usual config.ru with request and response spyed:

$ spyup config.ru

spyup has the same options as rackup (except --builder), because she uses Rack::Server internally.

When you use rails

rack-spyup uses railtie system. In rails project, only you must do is just to set your Gemfile:

gem 'rack-spyup'

BTW, if you want to use this middleware only via spyup command, just edit Gemfile:

gem 'rack-spyup', require: false

Which does not enable middleware, and you may use the command bundle exec spyup -p 3000 or like.

Configurations

Rack::SpyUp.config do |config|
  config.logger = Rails.logger # Set your custom logger
  config.enabled_environments = %w(development staging) # Set the rails envs you want to enable in
  # By default this is set to %w(development)
end

What you will see

Just like this

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request