rec 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,6 @@
1
- === version 1.2.1
2
- - Recognise more date patterns
1
+ === version 1.2.2
2
+ - Recognise more date patterns
3
+ - Improved performance
3
4
 
4
5
  === Version 1.2.0
5
6
  - fixed defects in sending mail
@@ -1,4 +1,5 @@
1
1
  require 'rec/rule'
2
+ require 'io/wait'
2
3
 
3
4
  module REC # :nodoc:
4
5
 
@@ -59,7 +60,10 @@ class Correlator
59
60
  def run()
60
61
  while @running and !$stdin.closed? do
61
62
  logLine = gets()
62
- next if logLine.nil?
63
+ if logLine.nil? # wait nicely for more input
64
+ sleep 1
65
+ next
66
+ end
63
67
  logLine.strip!()
64
68
  next if logLine.empty?
65
69
  @@eventsIn += 1
data/lib/rec/state.rb CHANGED
@@ -22,6 +22,11 @@ class State
22
22
  state.generate()
23
23
  }
24
24
 
25
+ # shortcut action to ignore an event
26
+ Ignore = Proc.new { |state|
27
+ state.release()
28
+ }
29
+
25
30
  # shortcut action to generate a message and release the state immediately
26
31
  Generate_and_release = Proc.new { |state|
27
32
  state.generate()
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: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Kernahan