README.md in sinatra-contrib-1.4.7 vs README.md in sinatra-contrib-2.0.0.beta1
- old
+ new
@@ -1,18 +1,18 @@
-[](http://travis-ci.org/sinatra/sinatra-contrib)
+# Sinatra::Contrib
Collection of common Sinatra extensions, semi-officially supported.
-# Goals
+## Goals
* For every future Sinatra release, have at least one fully compatible release
* High code quality, high test coverage
* Include plugins people usually ask for a lot
-# Included extensions
+## Included extensions
-## Common Extensions
+### Common Extensions
These are common extension which will not add significant overhead or change any
behavior of already existing APIs. They do not add any dependencies not already
installed with this gem.
@@ -47,39 +47,50 @@
* `sinatra/custom_logger`: This extension allows you to define your own
logger instance using +logger+ setting. That logger then will
be available as #logger helper method in your routes and views.
-## Custom Extensions
+* `sinatra/required_params`: Ensure if required query parameters exist
+### Custom Extensions
+
These extensions may add additional dependencies and enhance the behavior of the
existing APIs.
Currently included:
-* `sinatra/decompile`: Recreates path patterns from Sinatra's internal data
- structures (used by other extensions).
-
* `sinatra/reloader`: Automatically reloads Ruby files on code changes.
-## Other Tools
+### Other Tools
* `sinatra/extension`: Mixin for writing your own Sinatra extensions.
* `sinatra/test_helpers`: Helper methods to ease testing your Sinatra
application. Partly extracted from Sinatra. Testing framework agnostic
-# Installation
-Add `gem 'sinatra-contrib'` to *Gemfile*, then execute `bundle install`.
+## Installation
+Add `gem 'sinatra-contrib'` to *Gemfile*, then execute `bundle install`.
+
If you don't use Bundler, install the gem manually by executing `gem install sinatra-contrib` in your command line.
+### Git
-# Usage
+If you want to use the gem from git, for whatever reason, you can do the following:
-## Classic Style
+```ruby
+github 'sinatra/sinatra' do
+ gem 'sinatra-contrib'
+end
+```
+Within this block you can also specify other gems from this git repository.
+
+## Usage
+
+### Classic Style
+
A single extension (example: sinatra-content-for):
``` ruby
require 'sinatra'
require 'sinatra/content_for'
@@ -97,11 +108,11 @@
``` ruby
require 'sinatra'
require 'sinatra/contrib/all'
```
-## Modular Style
+### Modular Style
A single extension (example: sinatra-content-for):
``` ruby
require 'sinatra/base'
@@ -136,9 +147,9 @@
class MyApp < Sinatra::Base
register Sinatra::Contrib
end
```
-## Documentation
+### Documentation
For more info check the [official docs](http://www.sinatrarb.com/contrib/) and
-[api docs](http://rubydoc.info/gems/sinatra-contrib/1.4.0/frames).
+[api docs](http://www.rubydoc.info/gems/sinatra-contrib).