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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff6d6d1426d021f6c2e7146de2884ecd9eb721b5529e56e49e25e82332dc3ddf
4
- data.tar.gz: c59d392750a2b15b877c47efd96c317ce65299089aab856fa0944a0da5601cfe
3
+ metadata.gz: bfe97433e80761fdc870d544ed396e060672053808512b504a2b19f71dd42e74
4
+ data.tar.gz: e2416d31be63ce88b403a5ce3adb88379728300517ece655bbf91fa3372f24b9
5
5
  SHA512:
6
- metadata.gz: 359e37b3e095419a8d74276b06dfeb2b41e5c68b5a19e4bd8c846abb5442e0dd0453738ceac3f121dd81099ee75b89c9ce8b3c01126f6e5327c5ef661d1743b2
7
- data.tar.gz: 8f15f81e9d1ac4392104c4b8d3e65936ccfe4eeff9cf39ae77407086a8418eb82513ee984fc923e7a50b4169a8ee63c5795c4fa3768575119e8986a0d1264887
6
+ metadata.gz: 5c8281941d19a94e22f1b65c2b89fdfc3486d7c756174516d4d901b59b9c31fba8c69932522338f864249e1e8ce0ccc0c709a9ea5d07ffb7b7436ba19af5ae20
7
+ data.tar.gz: d69451afbed2dcc290799a75f598fc692678cce684ff462e89c265dc61566fc9e30ddb585b35159c8269dbd69cf24690cfb5b3aa1095d285086ddcd29404c62f
@@ -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.production? && defined?(::Redis)
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)
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.7.0' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.7.1' unless defined?(Bearcat::VERSION)
3
3
  end
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.0
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)