Sha256: 30bb432ec8e48cc89c6b612030e78ec1e1f3b6bde5aa210a4496f59b0f91b738

Contents?: true

Size: 909 Bytes

Versions: 5

Compression:

Stored size: 909 Bytes

Contents

= RailsLimiter

{<img src="https://travis-ci.org/idolweb/rails_limiter.png?branch=master" alt="Build Status" />}[https://travis-ci.org/idolweb/rails_limiter]

== Installation

You can install rails_limiter by adding this line in your Gemfile :

  gem "rails_limiter", "~> 0.0.1"

And then :

  bundle install 

== Configuration

To use this gem, configure RailsLimiter :

  RailsLimiter::Init.configure do |config|
    config.connexion   = Redis.new
  end

== Use

In your controller :
  before_filter :only => action do
    limit(
      key,
      key_max,
      expires_in,
      url
    )
  end

key         : your custom key
key_max     : the maximum requests number
expires_in  : the timeout
url         : the url where the user will be redirect if it reaches the max resquests

== TODO

- Use any key-value store instead of Redis only.

== Copyright

Copyright (c) 2013 Independent Distribution On Line

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_limiter-0.3.3 README.rdoc
rails_limiter-0.3.1 README.rdoc
rails_limiter-0.3.0 README.rdoc
rails_limiter-0.2.0 README.rdoc
rails_limiter-0.1.0 README.rdoc