curbit 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.rdoc +4 -5
  2. data/curbit.gemspec +1 -1
  3. data/lib/curbit.rb +1 -0
  4. metadata +1 -1
data/README.rdoc CHANGED
@@ -155,11 +155,10 @@ Then include in your controllers:
155
155
  Curbit::Controller will automatically be added to your controllers so you
156
156
  can call the rate_limit macro whenever you want.
157
157
 
158
- = Requirements
159
- * Rails >= 2.0
160
- * memcached or other compatible caching support in Rails. CurbIt has to store information about requests and assumes your cache implementation will be able to take calls like:
161
-
162
- Rails.cache.write(key, value, :expires_in => wait_time)
158
+ = Dependencies
159
+ CurbIt utilizes Rails.cache to store information about requests. Be
160
+ mindful that if you are running a cluster, you'll want to make sure
161
+ you're using a shared cache like memcached.
163
162
 
164
163
  That's it!
165
164
 
data/curbit.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{curbit}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Scott Sayles"]
data/lib/curbit.rb CHANGED
@@ -91,6 +91,7 @@ module Curbit
91
91
  val = Rails.cache.read(cache_key)
92
92
 
93
93
  if (val)
94
+ val = val.dup
94
95
  started_at = val[:started]
95
96
  count = val[:count]
96
97
  val[:count] = count + 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Sayles