rec 1.3.0 → 1.3.1

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 (3) hide show
  1. data/CHANGELOG +3 -0
  2. data/lib/rec/state.rb +3 -3
  3. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ === Version 1.3.1
2
+ - fixed defect in State#find referring to class method of same name
3
+
1
4
  === Version 1.3.0
2
5
  - Allow for pre-setting the file descriptors: $stdin, $stdout, $stderr, $miss
3
6
  - Prevent events being logged as missed when they matched but not fully
data/lib/rec/state.rb CHANGED
@@ -59,7 +59,7 @@ class State
59
59
 
60
60
  Notify_duration = Proc.new { |state|
61
61
  # We must have only one allstate, which is the original state (eg. "server down")
62
- orig = state.params[:allstates][0] # get the original state's key
62
+ original = state.params[:allstates][0] # get the original state's key
63
63
  duration = state.find(original).age
64
64
  # we expect to have :alert containing "%duration$d minutes"
65
65
  state.details["duration"] = duration.to_i()/60 # store the outage duration
@@ -70,7 +70,7 @@ class State
70
70
 
71
71
  Log_duration = Proc.new { |state|
72
72
  # We must have only one allstate, which is the original state (eg. "process started")
73
- orig = state.params[:allstates][0] # get the original state's key
73
+ original = state.params[:allstates][0] # get the original state's key
74
74
  duration = state.find(original).age
75
75
  # we expect to have :alert containing "%duration$d minutes"
76
76
  state.details["duration"] = duration.to_i()/60 # store the duration
@@ -271,7 +271,7 @@ class State
271
271
 
272
272
  # Convenience method to find another state, based on parameters in this state
273
273
  def find(template)
274
- self.find(template, self)
274
+ State::find(template, self)
275
275
  end
276
276
 
277
277
  # Allow access to any parameter by a convenience method
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 0
10
- version: 1.3.0
9
+ - 1
10
+ version: 1.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Kernahan