Sha256: 42b20e63b3b5e8cef07948cb6149d87fea472c81e77bb43b3aeda03e59566c06

Contents?: true

Size: 921 Bytes

Versions: 9

Compression:

Stored size: 921 Bytes

Contents

require 'rbconfig'

# This generator bootstraps a Rails project for use with Cucumber
class InstallCucumberGenerator < RubiGen::Base
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
                              Config::CONFIG['ruby_install_name'])

  attr_reader :project_name
  
  def initialize(runtime_args, runtime_options = {})
    super
    @project_name = File.basename(File.expand_path(destination_root))
  end

  def manifest
    record do |m|
      script_options     = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }

      m.directory 'features/steps'
      m.file      'features/development.feature', 'features/development.feature'
      m.file      'features/steps/common.rb', 'features/steps/common.rb'
      m.template  'features/steps/env.rb.erb', 'features/steps/env.rb'
    end
  end

protected

  def banner
    "Usage: #{$0} cucumber"
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
newgem-1.0.4 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.0.5 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.0.6 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.0.7 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.1.0 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.2.0 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.2.1 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.2.2 rubygems_generators/install_cucumber/install_cucumber_generator.rb
newgem-1.2.3 rubygems_generators/install_cucumber/install_cucumber_generator.rb