threshold 0.2.1 → 0.2.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 +4 -4
- data/lib/threshold/event_filter.rb +2 -2
- data/lib/threshold/rate_filter.rb +2 -2
- data/lib/threshold/standalone.rb +12 -0
- data/lib/threshold/suppression.rb +2 -2
- data/lib/threshold/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33c2806304e5938f76507449b1594424ba47403e
|
4
|
+
data.tar.gz: 99a23f1a99c452b1149375098162e6bd8cd9a32e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e121ca66252cdce457ef1dc97ba83caca4e2d293a0e21a5883a811d92a639c2dc0cde5363866a8a9e12391968e87ee5455f044366e7cb9a1007ac7e9f1dd87a
|
7
|
+
data.tar.gz: 3579311658b35e1a86440239a5d3f364fa52d382382c7f7d02c5b15ed85035d23b72bfcc89be1a15133441082c8ac34ceb1a4ff7cc7ae8c21244518e9d62bd77
|
@@ -128,13 +128,13 @@ module Threshold
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
private
|
132
|
-
|
133
131
|
#State does not track comments
|
134
132
|
def state
|
135
133
|
[@gid, @sid, @track_by, @count, @seconds, @new_action, @timeout, @apply_to]
|
136
134
|
end
|
137
135
|
|
136
|
+
private
|
137
|
+
|
138
138
|
def transform(result)
|
139
139
|
begin
|
140
140
|
self.gid = result["GID"].compact.first.to_i
|
data/lib/threshold/standalone.rb
CHANGED
@@ -25,6 +25,18 @@ module Threshold
|
|
25
25
|
state.hash
|
26
26
|
end
|
27
27
|
|
28
|
+
def include?(an0ther)
|
29
|
+
return false unless an0ther.class == self.class
|
30
|
+
|
31
|
+
state.zip(an0ther.state).each{ |item|
|
32
|
+
if !(item[1].nil?)
|
33
|
+
return false unless item[0] == item[1]
|
34
|
+
end
|
35
|
+
}
|
36
|
+
|
37
|
+
return true
|
38
|
+
end
|
39
|
+
|
28
40
|
#Comparable
|
29
41
|
def <=>(anOther)
|
30
42
|
#gid <=> anOther.gid
|
data/lib/threshold/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: threshold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shadowbq
|
@@ -39,6 +39,20 @@ dependencies:
|
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.11.0
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: pry
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: rake
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|