README.md in rails_rate_limiter-0.1.0 vs README.md in rails_rate_limiter-0.1.1
- old
+ new
@@ -1,8 +1,8 @@
# RailsRateLimiter
-This is a high level rate limiting gem for Ruby on Rails using Redis. It limits amount of requests on controllers level, that allows you to customize rate limiting options using everything that available in your action, e.g. `current_user`.
+This is a high level rate limiting gem for Ruby on Rails using Redis. It limits amount of requests on controller's level, that allows you to customize rate limiting options using everything that available in your action, e.g. `current_user`.
## Installation
Add this line to your application's Gemfile:
@@ -24,10 +24,12 @@
### Example
```ruby
class Posts < ApplicationController
+ include RailsRateLimiter
+
rate_limit limit: 100, per: 1.hour, only: :index do |info|
render plain: I18n.t('rate_limit_exceeded', seconds: info.time_left),
status: :too_many_requests
end
@@ -63,10 +65,10 @@
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
-Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails_rate_limiter.
+Bug reports and pull requests are welcome on GitHub at https://github.com/rkotov93/rails_rate_limiter.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).