Permalink
Browse files

readme fixup

  • Loading branch information...
1 parent c77b37e commit c2aba3c0bd14594444967d06d98df3e95d112bad @seanvikoren committed Dec 9, 2011
Showing with 58 additions and 25 deletions.
  1. +19 −0 LICENCE
  2. +39 −0 README.md
  3. +0 −25 README.txt
View
19 LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Sean Vikoren
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,39 @@
+redis-expiring_counter
+======================
+
+The redis-expiring_counter gem builds a counter on top of redis allowing for fast and
+accurate rate limiting. Currently, it should work fine for limiting actions up to a
+couple thousand per second.
+
+Please let me know if you find a way to make this better.
+
+Cheers,
+Sean Vikoren
+<sean@vikoren.com>
+
+<br />
+
+Example Usage:
+
+ require "redis-expiring_counter"
+
+ google_duration_of_limit_in_seconds = 24 * 60 * 60
+ google_max_calls_per_day = 2500
+
+ google_counter = RedisExpiringCounter.new("google", google_duration_of_limit_in_seconds, google_max_calls_per_day)
+
+ 20.times do
+ if google_counter.increment
+ # call google api
+ end
+ end
+
+<br />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br />
+
View
@@ -1,25 +0,0 @@
-The redis-expiring_counter gem builds a counter on top of redis allowing for fast and accurate rate limiting.
-Currently, it should work fine for limiting actions up to a couple thousand per second.
-The first use of it will be to limit api calls within a 24 hour window.
-Please let me know if you find a way to make this better.
-
-Cheers,
-Sean Vikoren
-sean@vikoren.com
-
-
-Example Usage:
-
-require "redis-expiring_counter"
-
-google_duration_of_limit_in_seconds = 24 * 60 * 60
-google_max_calls_per_day = 2500
-
-google_counter = RedisExpiringCounter.new("google", google_duration_of_limit_in_seconds, google_max_calls_per_day)
-
-20.times do
- if google_counter.increment
- # call google api
- end
-end
-

0 comments on commit c2aba3c

Please sign in to comment.