prop 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/lib/prop.rb +1 -1
- data/lib/prop/middleware.rb +7 -1
- data/prop.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -28,6 +28,9 @@ The `:mails_per_hour` in the above is called the "handle". You can now put the t
|
|
28
28
|
# Throws Prop::RateLimitExceededError if the threshold/interval has been reached
|
29
29
|
Prop.throttle!(:mails_per_hour)
|
30
30
|
|
31
|
+
# Prop can be used to guard a block of code
|
32
|
+
Prop.throttle!(:expensive_request) { calculator.something_very_hard }
|
33
|
+
|
31
34
|
# Returns true if the threshold/interval has been reached
|
32
35
|
Prop.throttled?(:mails_per_hour)
|
33
36
|
|
data/lib/prop.rb
CHANGED
data/lib/prop/middleware.rb
CHANGED
data/prop.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'prop'
|
16
|
-
s.version = '0.7.
|
16
|
+
s.version = '0.7.4'
|
17
17
|
s.date = '2012-04-06'
|
18
18
|
s.rubyforge_project = 'prop'
|
19
19
|
|
metadata
CHANGED