Sha256: d7f686480bbbfae201cba20da6ca247e198172f18126159c31e23a79e022ade6

Contents?: true

Size: 930 Bytes

Versions: 1

Compression:

Stored size: 930 Bytes

Contents

require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
require 'generators/rspec/install/install_generator'
require 'generators/devise/install_generator'
require 'generators/cucumber/install/install_generator'

module Noodall

  class AppBuilder < Rails::AppBuilder

    def database_yml
      template "config/database.yml", "config/database.yml"
    end

    def javascripts
      copy_file "public/javascripts/application.js"
    end

    def test
      directory 'features'
      directory 'spec'
      copy_file "config/cucumber.yml"
    end

  end

  class AppGenerator < Rails::Generators::AppGenerator

    def self.source_root
      @_source_root ||= File.expand_path('../templates', __FILE__)
    end

    def builder
      @builder ||= begin
        builder_class = AppBuilder
        builder_class.send(:include, Rails::ActionMethods)
        builder_class.new(self)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
noodall-0.0.4 lib/noodall/generator.rb