This is an extension or set of overrides that sit on top of RocketPants. This is not an elegant extension by any means, but rather a set of modules that leverage the RocketPants load order to monkey-patch functionality.
Why RocketShorts over RocketPants?
There are a few differentiators: (neither is the 'right way', its personal preference)
Note Support for points 3 and 4 are planned, but not included in the current gem.
- Version control is done through the
AcceptHTTP Header instead of a
- Support for a default version. Making HTTP testing possible for a single version.
- Pagination should use the
linkHTTP Header and not the content body.
- Clean up the payload body to avoid nesting under a
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install rocket_shorts
rocket_pants from your Gemfile and replace with
config/inititalizers/rocket_shorts.rb and specify what header format
your API should look for.
# config/initializers/rocket_shorts.rb require 'rocket_shorts' RocketShorts.header_format = /application\/vnd\.yourcompany\.v/
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request