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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16e2c7689805fd59071ed37c3ca3948706b9523d
4
- data.tar.gz: 96c12215e6403a4bf5f68f6668f4f5bc7384c8d4
3
+ metadata.gz: d59f5a0250e61d9968b5f465c84877d74de027e3
4
+ data.tar.gz: 664e2b1cd954b180b1652c1b00b4188c7b7577a6
5
5
  SHA512:
6
- metadata.gz: d68a8e3a27f4cb38bcb4ae72d2ac45f84171abb4c0e5dc86e0f3b19ad61417d70f8957d11d8ef9204933e48ae6aa0eba8f6851847e1b03ff1fafca19500bb729
7
- data.tar.gz: 982bc455e6a47aba8e950c1c96d0dfed4024bbf65fe92d93a0b6a25ab08892c0d8ebe04fa6b524525c908fac2d4aa091c8c1d2dc1456e492c8852ef7a6d83ab4
6
+ metadata.gz: c71112f0a9ba8d2b6d3321a3d0294f69ea881c8c80e2a07014582d1168d8fbb6d8a41bc1854033c9bc24b8aa567f2517ad5034135d25fee75f3872096ff4c6eb
7
+ data.tar.gz: 1e756869cd2ad93afb3c9e2b4767d651b84576c93f753f0a437be785b1af748c2ead59d805211863e64fb67ed1dd5f39476a834246c97eace97a661dedade055
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Congestion
2
2
 
3
- A Redis rate limiter that provides both time-based limits and quantity-based limits.
3
+ [![Build Status](https://travis-ci.org/parrish/Congestion.svg?branch=master)](https://travis-ci.org/parrish/Congestion)
4
+ [![Test Coverage](https://codeclimate.com/github/parrish/Congestion/badges/coverage.svg)](https://codeclimate.com/github/parrish/Congestion)
5
+ [![Code Climate](https://codeclimate.com/github/parrish/Congestion/badges/gpa.svg)](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: false # True if rejected request count towards the limit
80
+ track_rejected: true # True if rejected request count towards the limit
77
81
  }
78
82
  ```
79
83
 
data/lib/congestion.rb CHANGED
@@ -13,7 +13,7 @@ module Congestion
13
13
  interval: 1, # 1 second
14
14
  max_in_interval: 1, # 1 / second
15
15
  min_delay: 0, # none
16
- track_rejected: false
16
+ track_rejected: true
17
17
  }
18
18
 
19
19
  self.redis = ->{
@@ -1,3 +1,3 @@
1
1
  module Congestion
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
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.2
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-10 00:00:00.000000000 Z
11
+ date: 2015-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis