cucumber-nagios 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -25,3 +25,17 @@ task :build do
25
25
  puts "New gem in #{dest}"
26
26
  end
27
27
  end
28
+
29
+ desc "push gem"
30
+ task :push do
31
+ filenames = Dir.glob("pkg/*.gem")
32
+ filenames_with_times = filenames.map do |filename|
33
+ [filename, File.mtime(filename)]
34
+ end
35
+
36
+ oldest = filenames_with_times.sort_by { |tuple| tuple.last }.last
37
+ oldest_filename = oldest.first
38
+
39
+ command = "gem push #{oldest_filename}"
40
+ system(command)
41
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'templater'
5
+ require 'cucumber-nagios'
5
6
 
6
7
  module CucumberNagiosGenerators
7
8
 
@@ -22,6 +23,7 @@ module CucumberNagiosGenerators
22
23
 
23
24
  file '.gitignore', '.gitignore'
24
25
  file '.bzrignore', '.bzrignore'
26
+
25
27
  glob!
26
28
 
27
29
  end
@@ -32,7 +34,7 @@ module CucumberNagiosGenerators
32
34
  end
33
35
 
34
36
 
35
- CucumberNagiosGenerators.run_cli Dir.pwd, 'cucumber-nagios-gen', '0.1', ARGV
37
+ CucumberNagiosGenerators.run_cli Dir.pwd, 'cucumber-nagios-gen', Cucumber::Nagios::VERSION, ARGV
36
38
 
37
39
  puts <<-README
38
40
  Your new cucumber-nagios project is set up.
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ module Cucumber
4
+ class Nagios
5
+ VERSION = '0.6.3'
6
+ end
7
+ end
@@ -17,13 +17,21 @@ unless File.exist?(feature)
17
17
  exit 98
18
18
  end
19
19
 
20
- command = "#{__DIR__}/cucumber"
21
- command += " --require features/"
22
- command += " --format Cucumber::Formatter::Nagios"
23
- command += " #{feature}"
20
+ command_parts = []
21
+ command_parts << "#{__DIR__}/cucumber"
22
+ command_parts << "--require features/"
23
+
24
+ if ARGV.grep(/^\-\-pretty$/).size > 0
25
+ command_parts << "--format pretty"
26
+ else
27
+ command_parts << "--format Cucumber::Formatter::Nagios"
28
+ end
29
+
30
+ command_parts << feature
31
+ command = command_parts.join(' ')
24
32
 
25
- if ARGV[1] == "--debug"
26
- puts command
33
+ if ARGV.grep(/^\-\-debug$/).size > 0
34
+ puts command
27
35
  puts
28
36
  end
29
37
 
@@ -49,4 +49,4 @@ module CucumberNagiosGenerators
49
49
 
50
50
  end
51
51
 
52
- CucumberNagiosGenerators.run_cli Dir.pwd, 'cucumber-nagios-gen', '0.5', ARGV
52
+ CucumberNagiosGenerators.run_cli Dir.pwd, 'cucumber-nagios-gen', '0.6.3', ARGV
@@ -52,6 +52,8 @@ Given /^I have the following public keys:$/ do |table|
52
52
  end
53
53
 
54
54
  When /^I ssh to "([^\"]*)" with the following credentials:$/ do |hostname, table|
55
+ @keys = []
56
+ @auth_methods ||= %w(password)
55
57
  session = table.hashes.first
56
58
  session_keys = Array.new(@keys)
57
59
  session_auth_methods = Array.new(@auth_methods)
@@ -3,6 +3,7 @@
3
3
  require 'rubygems'
4
4
  require 'webrat'
5
5
  require 'webrat/mechanize'
6
+ require 'net/ssh'
6
7
 
7
8
  class ResponseHelper
8
9
  def response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-nagios
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lindsay Holmwood
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-18 00:00:00 +01:00
12
+ date: 2009-11-25 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -52,6 +52,7 @@ extra_rdoc_files: []
52
52
 
53
53
  files:
54
54
  - bin/cucumber-nagios-gen
55
+ - lib/cucumber-nagios.rb
55
56
  - lib/generators/project/Gemfile
56
57
  - lib/generators/project/features/steps/benchmark_steps.rb
57
58
  - lib/generators/project/features/steps/ssh_steps.rb