ratelimit-ruby 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/ratelimit-ruby.rb +1 -0
- data/ratelimit-ruby.gemspec +3 -3
- 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: e049a2442815416b238c75f42f0dc6f05061fa90
|
4
|
+
data.tar.gz: ff77f6029c57298bf27570ab05dac5012b34510a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a284c4d6281a528480db2d225e54b3792290a309fa9fc1a61eae3b76d0b65a8adefa346882c03c8835a7bd7d6a9cb8c56dfddd9f4451b21e6a50e03ccc68ef9
|
7
|
+
data.tar.gz: 410765381df103ccb7b4665e7d911d0aaacd21b0a5aae68d5256d5f193713d1c1f7cf3e295256f6782ee2eef20a5956e5ebe64e33ebfe370d8cf447f8afa475c
|
data/README.md
CHANGED
@@ -44,9 +44,9 @@ limiter = RateLimit::Limiter.new(
|
|
44
44
|
## Full Example with Feature Flags
|
45
45
|
```ruby
|
46
46
|
@limiter = RateLimit::Limiter.new(apikey: "",
|
47
|
-
shared_cache
|
48
|
-
logger
|
49
|
-
|
47
|
+
shared_cache: Rails.cache,
|
48
|
+
logger: Rails.logger,
|
49
|
+
in_process_cache: ActiveSupport::Cache::MemoryStore.new(size: 1.megabytes)
|
50
50
|
)
|
51
51
|
|
52
52
|
@limiter.create_limit("event:pageload", 1, RateLimIt::HOURLY_ROLLING)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.10
|
data/lib/ratelimit-ruby.rb
CHANGED
@@ -27,6 +27,7 @@ module RateLimit
|
|
27
27
|
@use_expiry_cache = use_expiry_cache
|
28
28
|
@conn = Faraday.new(:url => self.base_url(local)) do |faraday|
|
29
29
|
faraday.request :json # form-encode POST params
|
30
|
+
faraday.headers["accept"] = "application/json"
|
30
31
|
faraday.response :logger if debug
|
31
32
|
faraday.options[:open_timeout] = 2
|
32
33
|
faraday.options[:timeout] = 5
|
data/ratelimit-ruby.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ratelimit-ruby 0.1.
|
5
|
+
# stub: ratelimit-ruby 0.1.10 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ratelimit-ruby"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.10"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Jeff Dwyer"]
|
14
|
-
s.date = "2017-
|
14
|
+
s.date = "2017-02-16"
|
15
15
|
s.description = "rate limit your ruby"
|
16
16
|
s.email = "jdwyah@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ratelimit-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dwyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|