threshold 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b015463dff88e20e4d903cb380d5e0301b841ee
4
- data.tar.gz: 89c5bb791bd7d1899d61b000e68deaa8453d9e07
3
+ metadata.gz: a595437c5a3c85288a7dfba97a0359719fec9757
4
+ data.tar.gz: 5a0c0e9290e14a89ff58dc9dc9ea79092348fd5a
5
5
  SHA512:
6
- metadata.gz: 949126bde1abdf49df5489e011d415ca99d1e74c8cbc79ee84ac5f5a8e7807e7b804783d3f76ef881a693044daa2416fe86d6d54ddd9a612b74daf784458f067
7
- data.tar.gz: 4804ed44bc0233eec2bf2bdada4d31db030549c060ec4414ec0ab6337aef2a806cbfb75e2ea23056e58cdb43d0748c1aded21008a50c1c2e72c0ed1206ed982c
6
+ metadata.gz: 889e86ab47cc43a20f2b66428ecc3c521cb319db2efa8193eac0145e366cbb054618313ab4f6a200e390ffc33daaf838089bf348fea96b3daa104d958734aebf
7
+ data.tar.gz: 99f4949c3c0b4d60a049516ffc4cbf305bfdae37302ba92f577ed989e16b809dd6485f24c47c63a7e0548ddc949293417dad1b7f0bbe9a3f8b0cffcdd48a427a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # snort-thresholds
2
2
  [![Gem Version](https://badge.fury.io/rb/threshold.png)](http://badge.fury.io/rb/threshold)
3
- [![Gem](https://img.shields.io/gem/dt/threshold.svg)]()
3
+ [![Gem](https://img.shields.io/gem/dt/threshold.svg)](http://badge.fury.io/rb/threshold)
4
4
 
5
5
  Threshold is an ORM to map to Snort 2.9.x threshold.conf files.
6
6
 
@@ -174,6 +174,34 @@ module Threshold
174
174
  Thresholds.new(@thresholds - an0ther.to_a)
175
175
  end
176
176
 
177
+ # Returns a new Threshold Object with just suppressions
178
+ def suppressions(&blk)
179
+ if block_given?
180
+ self.suppressions.select(&blk)
181
+ else
182
+ Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::Suppression"})
183
+ end
184
+ end
185
+
186
+ # Returns a new Threshold Object with just event_filters
187
+ def event_filters(&blk)
188
+ if block_given?
189
+ self.event_filters.select(&blk)
190
+ else
191
+ Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::EventFilter"})
192
+ end
193
+ end
194
+
195
+ # Returns a new Threshold Object with just rate_filters
196
+ def rate_filters(&blk)
197
+ if block_given?
198
+ self.rate_filters.select(&blk)
199
+ else
200
+ Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::RateFilter"})
201
+ end
202
+ end
203
+
204
+
177
205
  private
178
206
 
179
207
  def stored_hash=(foo)
@@ -1,4 +1,4 @@
1
1
  module Threshold
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  SNORT_VERSION='~>2.9.3'
4
4
  end
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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shadowbq
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-23 00:00:00.000000000 Z
12
+ date: 2015-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: veto