Sha256: 3d718d4c4fde2db54d933667f32371507a9ab230dfc8893eb55adf504f91cb06
Contents?: true
Size: 804 Bytes
Versions: 2
Compression:
Stored size: 804 Bytes
Contents
#!/usr/bin/env ruby unless ARGV[0] puts "Usage: #{__FILE__} <feature>" exit 99 end __DIR__ = File.expand_path(File.dirname(__FILE__)) features_dir = File.expand_path(File.join(__DIR__, '..', 'features')) feature = ARGV[0] unless File.exists?(feature) feature = File.join(features_dir, ARGV[0]) end unless File.exist?(feature) puts "Error: feature file doesn't exist!" exit 98 end command_parts = [] command_parts << "#{__DIR__}/cucumber" command_parts << "--require #{features_dir}" if ARGV.grep(/^\-\-pretty$/).size > 0 command_parts << "--format pretty" else command_parts << "--format Cucumber::Formatter::Nagios" end command_parts << feature command = command_parts.join(' ') if ARGV.grep(/^\-\-debug$/).size > 0 puts command puts end system(command) ? exit(0) : exit(2)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber-nagios-0.6.6 | lib/generators/project/bin/cucumber-nagios |
cucumber-nagios-0.6.5 | lib/generators/project/bin/cucumber-nagios |