cucumber-nagios 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/cucumber-nagios.gemspec +2 -2
- data/features/steps/installing_steps.rb +2 -2
- data/lib/cucumber/formatter/nagios.rb +6 -4
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.3
|
data/cucumber-nagios.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{cucumber-nagios}
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Lindsay Holmwood"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-31}
|
13
13
|
s.default_executable = %q{cucumber-nagios-gen}
|
14
14
|
s.description = %q{cucumber-nagios helps you write high-level behavioural tests for your web applications and Unix infrastructure that can be plugged into Nagios.}
|
15
15
|
s.email = %q{lindsay@holmwood.id.au}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
When /^I build the gem$/ do
|
2
|
-
project_root =
|
3
|
-
rakefile
|
2
|
+
project_root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path
|
3
|
+
rakefile = project_root.join('Rakefile')
|
4
4
|
File.exist?(rakefile).should be_true
|
5
5
|
|
6
6
|
silent_system("rake -f #{rakefile} build").should be_true
|
@@ -9,6 +9,7 @@ module Cucumber
|
|
9
9
|
@passed = []
|
10
10
|
@warning = []
|
11
11
|
@io = io
|
12
|
+
@start_time = Time.now
|
12
13
|
end
|
13
14
|
|
14
15
|
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
|
@@ -32,13 +33,15 @@ module Cucumber
|
|
32
33
|
|
33
34
|
private
|
34
35
|
def print_summary
|
35
|
-
@total
|
36
|
-
@status
|
36
|
+
@total = @failed.size + @passed.size + @warning.size
|
37
|
+
@status = @failed.size > 0 && "CRITICAL" || @warning.size > 0 && "WARNING" || "OK"
|
38
|
+
@run_time = (Time.now - @start_time).to_i
|
37
39
|
|
38
40
|
service_output = [ "CUCUMBER #{@status} - Critical: #{@failed.size}",
|
39
41
|
"Warning: #{@warning.size}", "#{@passed.size} okay" ]
|
40
42
|
performance_data = [ "passed=#{@passed.size}", "failed=#{@failed.size}",
|
41
|
-
"nosteps=#{@warning.size}", "total=#{@total}"
|
43
|
+
"nosteps=#{@warning.size}", "total=#{@total}",
|
44
|
+
"time=#{@run_time}" ]
|
42
45
|
message = "#{service_output.join(', ')} | #{performance_data.join('; ')}\n"
|
43
46
|
|
44
47
|
@io.print(message)
|
@@ -57,7 +60,6 @@ module Cucumber
|
|
57
60
|
end
|
58
61
|
end
|
59
62
|
|
60
|
-
|
61
63
|
end
|
62
64
|
end
|
63
65
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-nagios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 57
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 3
|
10
|
+
version: 0.8.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lindsay Holmwood
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-31 00:00:00 +11:00
|
19
19
|
default_executable: cucumber-nagios-gen
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|