Sha256: c7c2bc2cc2c36549361329be6231054076b4bfd3caeb92db7637fa920c1508d7

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'templater'
require 'cucumber/nagios'

module CucumberNagiosGenerators

  extend Templater::Manifold

  class ProjectGenerator < Templater::Generator
    def self.source_root
      File.join(File.dirname(__FILE__), '..', 'lib', 'generators', 'project')
    end

    def destination_root
      # takes :name from first_argument
      File.join(@destination_root, name)
    end

    desc "Generate a new self-contained cucumber-nagios project."
    first_argument :name, :required => true, :desc => "Project name"

    file '.gitignore', '.gitignore'
    file '.bzrignore', '.bzrignore'

    directory :steps, ::File.join(File.dirname(__FILE__), '..', 'lib', 'cucumber', 'nagios', 'steps'), 'features/steps'
    directory :features, ::File.join(File.dirname(__FILE__), '..', 'lib', 'cucumber', 'nagios', 'support'), 'features/support'

    glob!

  end

  desc "Generate a cucumber-nagios project."
  add :project, ProjectGenerator

end


CucumberNagiosGenerators.run_cli Dir.pwd, 'cucumber-nagios-gen', Cucumber::Nagios::VERSION, ARGV

puts <<-README
Your new cucumber-nagios project is set up.

To get going, you'll need to bundle gems into the project:
  
  $ gem bundle

It's highly recommended you version control your projects:
  
  - with Git: git init ; git add . 
  - with Bazaar: bzr init ; bzr add 

README

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-nagios-0.7.2 bin/cucumber-nagios-gen
cucumber-nagios-0.7.1 bin/cucumber-nagios-gen
cucumber-nagios-0.7.0 bin/cucumber-nagios-gen