Sha256: 75ccafd13e38bdc4e8fe90f37f42ce55beb61e7d7cef4b39b3a5a6854c459a99

Contents?: true

Size: 883 Bytes

Versions: 4

Compression:

Stored size: 883 Bytes

Contents

require 'thor/group'

class Combustion::Generator < Thor::Group
  include Thor::Actions

  def self.source_root
    File.expand_path File.join(File.dirname(__FILE__), '..', '..')
  end

  def create_directories
    empty_directory 'spec/internal'
    empty_directory 'spec/internal/config'
    empty_directory 'spec/internal/db'
    empty_directory 'spec/internal/log'
    empty_directory 'spec/internal/public'
  end

  def create_files
    template 'templates/routes.rb',    'spec/internal/config/routes.rb'
    template 'templates/database.yml', 'spec/internal/config/database.yml'
    template 'templates/schema.rb',    'spec/internal/db/schema.rb'
    template 'templates/config.ru',    'config.ru'
    create_file                        'spec/internal/public/favicon.ico'
    create_file                        'spec/internal/log/.gitignore' do
      '*.log'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
combustion-0.3.3 lib/combustion/generator.rb
combustion-0.3.2 lib/combustion/generator.rb
combustion-0.3.1 lib/combustion/generator.rb
combustion-0.3.0 lib/combustion/generator.rb