rec 1.0.8 → 1.0.9

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.
Files changed (4) hide show
  1. data/CHANGELOG +7 -4
  2. data/EXAMPLES +5 -4
  3. metadata +3 -4
  4. data/lib/rec/mock-notify.rb +0 -29
data/CHANGELOG CHANGED
@@ -1,11 +1,14 @@
1
- Version 1.0.7
1
+ Version 1.0.9::
2
+ Removed mock-notify.rb
3
+
4
+ Version 1.0.7::
2
5
  Simplified rdoc markup for the benefit of yard.
3
6
 
4
- Version 1.0.6
7
+ Version 1.0.6::
5
8
  Restructured for better compatibility with gem standards
6
9
 
7
- Version 1.0.4
10
+ Version 1.0.4::
8
11
  Added examples
9
12
 
10
- Version 1.0.1
13
+ Version 1.0.1::
11
14
  Initial version
data/EXAMPLES CHANGED
@@ -62,7 +62,7 @@ after he has decided to stop trying, the format is a little different. The block
62
62
  given is previous examples is stored in the +params+ as +action+.
63
63
 
64
64
  Instead, the +action+ block may be specified directly as a member of the params hash,
65
- and the +onexpiry+ must be specified in this way if it is to be used.
65
+ and the +final+ must be specified in this way if it is to be used.
66
66
 
67
67
  Rule.new(10034, {
68
68
  :pattern => /^\s+\w+\s+sudo\[\d+\]\:\s+(\w+) \:/,
@@ -83,13 +83,14 @@ and the +onexpiry+ must be specified in this way if it is to be used.
83
83
  }
84
84
  })
85
85
 
86
- When the state is about to expire, its :onexpiry block will be called. In this case,
87
- it generates a log entry using the :final message template, and sends the message
86
+ When the state is about to expire, its :final block will be called. In this case,
87
+ it generates a log entry using the :expiry message template, and sends the message
88
88
  to the administrator via normal (email) delivery.
89
89
 
90
90
  == Event compression
91
91
  Compression involves converting a stream of events into fewer, preferably one. In this example,
92
- we report when a skype conversation starts and then suppress all further noise for about 8 minutes.
92
+ we report when a skype conversation starts and then suppress all further 'noise' (messages
93
+ that add no further real information) for about 8 minutes.
93
94
 
94
95
  # suppression rule
95
96
  Rule.new(10035, {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 8
10
- version: 1.0.8
9
+ - 9
10
+ version: 1.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Kernahan
@@ -41,7 +41,6 @@ files:
41
41
  - lib/rec/state.rb
42
42
  - lib/rec/correlator.rb
43
43
  - lib/rec/notify.rb
44
- - lib/rec/mock-notify.rb
45
44
  - lib/string.rb
46
45
  - rulesets/rules.rb
47
46
  - rulesets/sample-rules.rb
@@ -1,29 +0,0 @@
1
- module REC # :nodoc:
2
-
3
- # mock the Notify class for testing purposes
4
- class Notify # :nodoc:
5
-
6
- @@emailsSent = []
7
- @@jabbersSent = []
8
- # :nodoc:
9
- def self.email(alert, recipient=@@emailTo, subject=@@defaultSubject)
10
- @@emailsSent << [alert, recipient, subject]
11
- end
12
-
13
- # :nodoc:
14
- def self.jabber(alert, recipient=@@jabberTo, subject=@@defaultSubject)
15
- @@jabbersSent << [alert, recipient, subject]
16
- end
17
-
18
- # :nodoc:
19
- def emailsSent()
20
- @@emailsSent
21
- end
22
-
23
- # :nodoc:
24
- def jabbersSent()
25
- @@jabberSent
26
- end
27
-
28
- end
29
- end