congestion 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/congestion.rb +1 -1
- data/lib/congestion/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d59f5a0250e61d9968b5f465c84877d74de027e3
|
|
4
|
+
data.tar.gz: 664e2b1cd954b180b1652c1b00b4188c7b7577a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c71112f0a9ba8d2b6d3321a3d0294f69ea881c8c80e2a07014582d1168d8fbb6d8a41bc1854033c9bc24b8aa567f2517ad5034135d25fee75f3872096ff4c6eb
|
|
7
|
+
data.tar.gz: 1e756869cd2ad93afb3c9e2b4767d651b84576c93f753f0a437be785b1af748c2ead59d805211863e64fb67ed1dd5f39476a834246c97eace97a661dedade055
|
data/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Congestion
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://travis-ci.org/parrish/Congestion)
|
|
4
|
+
[](https://codeclimate.com/github/parrish/Congestion)
|
|
5
|
+
[](https://codeclimate.com/github/parrish/Congestion)
|
|
6
|
+
|
|
7
|
+
A Redis rate limiter that provides both time-based limits and quantity-based limits based on [classdojo/rolling-rate-limiter](https://github.com/classdojo/rolling-rate-limiter).
|
|
4
8
|
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
@@ -73,7 +77,7 @@ Congestion.default_options = {
|
|
|
73
77
|
interval: 1, # The timeframe to limit within in seconds
|
|
74
78
|
max_in_interval: 1, # The number of allowed requests within the interval
|
|
75
79
|
min_delay: 0.0, # The minimum amount of time in seconds between requests
|
|
76
|
-
track_rejected:
|
|
80
|
+
track_rejected: true # True if rejected request count towards the limit
|
|
77
81
|
}
|
|
78
82
|
```
|
|
79
83
|
|
data/lib/congestion.rb
CHANGED
data/lib/congestion/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: congestion
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Parrish
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-04-
|
|
11
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: redis
|