wafris 0.8.0 → 0.8.2

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: bc80b768ee486f172f3eb2d617fde7622bff15fca6078819e89ddbae2b112f97
4
- data.tar.gz: 6a2528038d9ca8d278ce2a599051e74803635626ee35a67f224bc531d9fa1d7d
3
+ metadata.gz: 4648b968fb97b4c210848c124e505d4fd352f4d5c4342aff63aa972f82967db0
4
+ data.tar.gz: 7a13b0c631ba0dd8b7730c08743ca038e45da6bf2aee84e16c85ea4e87c57c73
5
5
  SHA512:
6
- metadata.gz: a0401a246649e42b5b2f801dae3ae5b362aca9d42446c45e93f3aa8e1c32e23c63b0e065cc8ae6e5f9131be420090d80d72fa5f1d0e85e9cdb9073036657db3b
7
- data.tar.gz: 2bf8cf0a8b1a0d13e0aef0c8bd08d869c619b3655b68a4de6a631b60f620212d171be294c9edfcb500bdfb1a856dc3e1fe578815e8d2b0ba6aa1ab9a57fb6324
6
+ metadata.gz: 6e6fba1bd54b344308e61629d1763d503c501d55304c84725ae55743410691ea7d92a6542cca96df26415126a3d6993bca062b5c88b315d33dff748e5182ad73
7
+ data.tar.gz: fe7c14c52b91ad41c8c8f2d92d7f6ddfe2c1285880e34c18904140f0cd9ffe41ee0de677bd84f39af198c97a4a6735bdc39bf255078a1e436551be74f27b75e5
@@ -67,7 +67,7 @@ local function add_to_graph_timebucket(timebucket, request_id)
67
67
  local key = wafris_prefix .. "gr-ct:"
68
68
  redis.call("PFADD", key .. timebucket, request_id)
69
69
  -- Expire the key after 25 hours if it has no expiry
70
- redis.call("EXPIRE", key, 90000, "NX")
70
+ redis.call("EXPIRE", key, 90000)
71
71
  end
72
72
 
73
73
  -- For: Leaderboard of IPs with Request count as score
@@ -75,7 +75,7 @@ local function increment_timebucket_for(type, timebucket, property)
75
75
  local key = wafris_prefix .. type .. "lb:" .. timebucket
76
76
  redis.call("ZINCRBY", key, 1, property)
77
77
  -- Expire the key after 25 hours if it has no expiry
78
- redis.call("EXPIRE", key, 90000, "NX")
78
+ redis.call("EXPIRE", key, 90000)
79
79
  end
80
80
 
81
81
  local function increment_partial_hourly_request_counters(unix_time_milliseconds)
@@ -85,7 +85,7 @@ local function increment_partial_hourly_request_counters(unix_time_milliseconds)
85
85
  local key = wafris_prefix .. "hr-ct:" .. timebucket
86
86
  redis.call("INCR", key)
87
87
  -- Expire the key after 61 minutes if it has no expiry
88
- redis.call("EXPIRE", key, 3660, "NX")
88
+ redis.call("EXPIRE", key, 3660)
89
89
  end
90
90
  end
91
91
 
@@ -11,7 +11,6 @@ module Wafris
11
11
  ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
12
12
  )
13
13
  @redis_pool_size = 20
14
- set_version
15
14
  end
16
15
 
17
16
  def connection_pool
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wafris
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.2"
5
5
  end
data/lib/wafris.rb CHANGED
@@ -13,6 +13,7 @@ module Wafris
13
13
  class << self
14
14
  def configure
15
15
  yield configuration
16
+ configuration.set_version
16
17
  end
17
18
 
18
19
  def configuration
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wafris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micahel Buckbee