cucumber-nagios 0.8.10 → 0.8.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/{lib/generators/project/bin → bin}/cucumber-nagios +3 -7
- data/cucumber-nagios.gemspec +4 -5
- data/features/installing.feature +2 -1
- data/features/steps/creating_steps.rb +2 -1
- data/features/steps/installing_steps.rb +2 -2
- data/features/steps/using_steps.rb +3 -3
- data/lib/cucumber/nagios/version.rb +1 -1
- data/lib/generators/project/README +2 -2
- metadata +7 -6
data/Rakefile
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler/setup'
|
5
3
|
require 'pathname'
|
6
4
|
|
7
5
|
unless ARGV[0]
|
8
|
-
puts "Usage: #{__FILE__} <feature> [--debug|--pretty]"
|
6
|
+
puts "Usage: #{File.basename(__FILE__)} <feature> [--debug|--pretty]"
|
9
7
|
exit 4
|
10
8
|
end
|
11
9
|
|
12
|
-
|
13
|
-
feature_dir = root.join('..', 'features').expand_path
|
10
|
+
feature_dir = Pathname.new('features').expand_path
|
14
11
|
feature, line = ARGV[0].split(':')
|
15
12
|
|
16
13
|
unless File.exist?(feature)
|
@@ -20,7 +17,7 @@ end
|
|
20
17
|
|
21
18
|
parts = []
|
22
19
|
parts << "cucumber"
|
23
|
-
parts << "--require #{feature_dir}"
|
20
|
+
parts << "--require #{feature_dir}" if feature_dir.exist?
|
24
21
|
parts << "--format pretty" if ARGV.include?("--pretty")
|
25
22
|
parts << "--format Cucumber::Formatter::Nagios" unless ARGV.include?("--pretty")
|
26
23
|
parts << "#{line ? "#{feature}:#{line}" : feature }"
|
@@ -32,4 +29,3 @@ if ARGV.grep(/^\-\-debug$/).size > 0
|
|
32
29
|
end
|
33
30
|
|
34
31
|
system(command) ? exit(0) : exit(2)
|
35
|
-
|
data/cucumber-nagios.gemspec
CHANGED
@@ -5,15 +5,14 @@
|
|
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.11"
|
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{2011-
|
13
|
-
s.default_executable = %q{cucumber-nagios-gen}
|
12
|
+
s.date = %q{2011-03-06}
|
14
13
|
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
14
|
s.email = %q{lindsay@holmwood.id.au}
|
16
|
-
s.executables = ["cucumber-nagios-gen"]
|
15
|
+
s.executables = ["cucumber-nagios-gen", "cucumber-nagios"]
|
17
16
|
s.extra_rdoc_files = [
|
18
17
|
"LICENSE",
|
19
18
|
"README.md",
|
@@ -27,6 +26,7 @@ Gem::Specification.new do |s|
|
|
27
26
|
"README.md",
|
28
27
|
"Rakefile",
|
29
28
|
"TODO",
|
29
|
+
"bin/cucumber-nagios",
|
30
30
|
"bin/cucumber-nagios-gen",
|
31
31
|
"cucumber-nagios.gemspec",
|
32
32
|
"features/commands.feature",
|
@@ -64,7 +64,6 @@ Gem::Specification.new do |s|
|
|
64
64
|
"lib/generators/project/.gitignore",
|
65
65
|
"lib/generators/project/Gemfile",
|
66
66
|
"lib/generators/project/README",
|
67
|
-
"lib/generators/project/bin/cucumber-nagios",
|
68
67
|
"man/cucumber-nagios.1.ronn"
|
69
68
|
]
|
70
69
|
s.has_rdoc = false
|
data/features/installing.feature
CHANGED
@@ -7,6 +7,7 @@ Feature: Installation
|
|
7
7
|
Scenario: Installing the gem
|
8
8
|
When I build the gem
|
9
9
|
And I install the latest gem
|
10
|
-
Then I should have cucumber-nagios-gen on my path
|
10
|
+
Then I should have "cucumber-nagios-gen" on my path
|
11
|
+
And I should have "cucumber-nagios" on my path
|
11
12
|
And I can generate a new project
|
12
13
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
Given /^cucumber\-nagios is installed$/ do
|
2
2
|
When 'I build the gem'
|
3
3
|
And 'I install the latest gem'
|
4
|
-
Then 'I should have cucumber-nagios-gen on my path'
|
4
|
+
Then 'I should have "cucumber-nagios-gen" on my path'
|
5
|
+
And 'I should have "cucumber-nagios" on my path'
|
5
6
|
end
|
6
7
|
|
7
8
|
When /^I create a new project called "([^\"]*)"$/ do |project_name|
|
@@ -15,8 +15,8 @@ When /^I install the latest gem$/ do
|
|
15
15
|
silent_system("gem install --local #{latest}").should be_true
|
16
16
|
end
|
17
17
|
|
18
|
-
Then /^I should have
|
19
|
-
silent_system("which
|
18
|
+
Then /^I should have "([^"]*)" on my path$/ do |file|
|
19
|
+
silent_system("which #{file}").should be_true
|
20
20
|
end
|
21
21
|
|
22
22
|
Then /^I can generate a new project$/ do
|
@@ -15,11 +15,11 @@ Then /^a feature file should exist for "([^\"]*)" on "([^\"]*)"$/ do |feature, s
|
|
15
15
|
end
|
16
16
|
|
17
17
|
Then /^the "([^\"]*)" feature on "([^\"]*)" should exit cleanly$/ do |feature, site|
|
18
|
-
silent_system("cd /tmp/#{@project_name} ;
|
18
|
+
silent_system("cd /tmp/#{@project_name} ; cucumber-nagios features/#{site}/#{feature}.feature").should be_true
|
19
19
|
end
|
20
20
|
|
21
21
|
Then /^the "([^\"]*)" feature on "([^\"]*)" should not exit cleanly$/ do |feature, site|
|
22
|
-
silent_system("cd /tmp/#{@project_name} ;
|
22
|
+
silent_system("cd /tmp/#{@project_name} ; cucumber-nagios features/#{site}/#{feature}.feature").should be_false
|
23
23
|
end
|
24
24
|
|
25
25
|
When /^the "([^\"]*)" feature on "([^\"]*)" checks for something preposterous$/ do |feature, site|
|
@@ -35,7 +35,7 @@ Then /^"([^"]*)" in the "([^"]*)" project should not exist$/ do |file, project_n
|
|
35
35
|
end
|
36
36
|
|
37
37
|
Then /^the "([^"]*)" feature on "([^"]*)" should produce multiline output$/ do |feature, site|
|
38
|
-
command = "cd /tmp/#{@project_name} ;
|
38
|
+
command = "cd /tmp/#{@project_name} ; cucumber-nagios features/#{site}/#{feature}.feature"
|
39
39
|
@output = `#{command}`
|
40
40
|
@output.split("\n").size.should > 1
|
41
41
|
end
|
@@ -107,11 +107,11 @@ Running
|
|
107
107
|
|
108
108
|
Invoke the Cucumber feature with the cucumber-nagios script:
|
109
109
|
|
110
|
-
|
110
|
+
cucumber-nagios features/smh.com.au/smh.feature
|
111
111
|
|
112
112
|
cucumber-nagios can be run from anywhere:
|
113
113
|
|
114
|
-
|
114
|
+
cucumber-nagios /path/to/features/smh/smh.feature
|
115
115
|
|
116
116
|
It should return a standard Nagios-formatted response string:
|
117
117
|
|
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: 41
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 11
|
10
|
+
version: 0.8.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lindsay Holmwood
|
@@ -15,8 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-03-06 00:00:00 +11:00
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: cucumber
|
@@ -166,6 +166,7 @@ description: cucumber-nagios helps you write high-level behavioural tests for yo
|
|
166
166
|
email: lindsay@holmwood.id.au
|
167
167
|
executables:
|
168
168
|
- cucumber-nagios-gen
|
169
|
+
- cucumber-nagios
|
169
170
|
extensions: []
|
170
171
|
|
171
172
|
extra_rdoc_files:
|
@@ -180,6 +181,7 @@ files:
|
|
180
181
|
- README.md
|
181
182
|
- Rakefile
|
182
183
|
- TODO
|
184
|
+
- bin/cucumber-nagios
|
183
185
|
- bin/cucumber-nagios-gen
|
184
186
|
- cucumber-nagios.gemspec
|
185
187
|
- features/commands.feature
|
@@ -217,7 +219,6 @@ files:
|
|
217
219
|
- lib/generators/project/.gitignore
|
218
220
|
- lib/generators/project/Gemfile
|
219
221
|
- lib/generators/project/README
|
220
|
-
- lib/generators/project/bin/cucumber-nagios
|
221
222
|
- man/cucumber-nagios.1.ronn
|
222
223
|
has_rdoc: false
|
223
224
|
homepage: http://cucumber-nagios.org/
|