Sha256: f98a563e865da89911c32204895afd75f8fa96be0d5d749b0f2bd597b9ee3a3b
Contents?: true
Size: 1.07 KB
Versions: 10
Compression:
Stored size: 1.07 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require 'templater' module CucumberNagiosGenerators extend Templater::Manifold # feature generator class FeatureGenerator < Templater::Generator def self.source_root File.join(File.dirname(__FILE__), '..', 'lib', 'generators', 'feature') end desc <<-DESC Generate a cucumber feature. Takes a two arguments: bin/cucumber-nagios-gen feature <site-name> <feature-name> DESC first_argument :site, :required => true, :desc => "Site name" second_argument :feature, :required => true, :desc => "Feature name" template :feature do |template| template.source = "%feature_name%.feature" template.destination = "features/#{site}/#{feature}.feature" end template :step do |template| template.source = "%feature_name%_steps.rb" template.destination = "features/#{site}/steps/#{feature}_steps.rb" end end desc "Generators for a cucumber-nagios project" add :feature, FeatureGenerator end CucumberNagiosGenerators.run_cli Dir.pwd, 'cucumber-nagios-gen', '0.1', ARGV
Version data entries
10 entries across 10 versions & 1 rubygems