bearcat 1.7.0 → 1.7.1
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/lib/bearcat/client.rb +1 -1
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/api_array_spec.rb +0 -0
- metadata +1 -2
- data/lib/bearcat/rate_limiting/functions.lua +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bfe97433e80761fdc870d544ed396e060672053808512b504a2b19f71dd42e74
|
|
4
|
+
data.tar.gz: e2416d31be63ce88b403a5ce3adb88379728300517ece655bbf91fa3372f24b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c8281941d19a94e22f1b65c2b89fdfc3486d7c756174516d4d901b59b9c31fba8c69932522338f864249e1e8ce0ccc0c709a9ea5d07ffb7b7436ba19af5ae20
|
|
7
|
+
data.tar.gz: d69451afbed2dcc290799a75f598fc692678cce684ff462e89c265dc61566fc9e30ddb585b35159c8269dbd69cf24690cfb5b3aa1095d285086ddcd29404c62f
|
data/lib/bearcat/client.rb
CHANGED
|
@@ -149,7 +149,7 @@ module Bearcat
|
|
|
149
149
|
rl = config[:rate_limiter] || Bearcat.rate_limiter
|
|
150
150
|
master_rate_limit = config.key?(:master_rate_limit) ? config[:master_rate_limit] : Bearcat.master_rate_limit
|
|
151
151
|
|
|
152
|
-
if rl.nil? && master_rate_limit.nil? && defined?(Rails) && Rails.env.
|
|
152
|
+
if rl.nil? && master_rate_limit.nil? && defined?(Rails) && !(Rails.env.development? || Rails.env.test?) && defined?(::Redis)
|
|
153
153
|
begin
|
|
154
154
|
require 'rediconn'
|
|
155
155
|
if RediConn::RedisConnection.configured?("BEARCAT", explicit: false)
|
data/lib/bearcat/version.rb
CHANGED
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bearcat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Instructure CustomDev
|
|
@@ -264,7 +264,6 @@ files:
|
|
|
264
264
|
- lib/bearcat/client_module.rb
|
|
265
265
|
- lib/bearcat/misc_exceptions/conflict.rb
|
|
266
266
|
- lib/bearcat/rate_limiting.rb
|
|
267
|
-
- lib/bearcat/rate_limiting/functions.lua
|
|
268
267
|
- lib/bearcat/rate_limiting/increment_bucket.lua
|
|
269
268
|
- lib/bearcat/rate_limiting/redis_script.rb
|
|
270
269
|
- lib/bearcat/spec_helpers.rb
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!lua name=bearcat_rate_limiting
|
|
2
|
-
|
|
3
|
-
local function checkin_time(keys, args)
|
|
4
|
-
local return_time = args[1]
|
|
5
|
-
local true_remaining = args[2]
|
|
6
|
-
|
|
7
|
-
local hash = keys[1]
|
|
8
|
-
return redis.call('HGET', hash, '_last_modified_')
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
redis.register_function('my_hset', my_hset)
|