README.md in wix-apps-0.0.1 vs README.md in wix-apps-0.0.2

- old
+ new

@@ -1,9 +1,10 @@ # Wix::Apps [![Build Status](https://secure.travis-ci.org/wix/wix-apps-ruby.png?branch=master)](http://travis-ci.org/wix/wix-apps-ruby) -TODO: Write a gem description +Rack middleware use with "Third Party Applications". +It checks signature and passes the parsed_instance param to you application ## Installation Add this line to your application's Gemfile: @@ -17,10 +18,21 @@ $ gem install wix-apps ## Usage -TODO: Write usage instructions here +### Any Rack Application +Add Wix::Apps::SignedInstanceMiddleware as any other middleware. +```ruby +use Wix::Apps::SignedInstanceMiddleware, secured_paths: ['/yours', '/paths'], secret_key: 'secret_key' +``` +### Rails +In application.rb, add: +```ruby +config.middleware.use Wix::Apps::SignedInstanceMiddleware, + secured_paths: ['/yours', '/paths'], secret_key: 'your-secret-key' +``` + ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)