Sha256: a1c94f2859f7aea7ed6ed835538cfe674c761b8661f4c0c662bf2cc747fc4c57

Contents?: true

Size: 427 Bytes

Versions: 1

Compression:

Stored size: 427 Bytes

Contents

require 'rails/generators'

class PorterGenerator < Rails::Generators::Base

  attr_accessor :app, :domain

  def self.source_root
    @source_root ||= File.join(File.dirname(__FILE__), 'templates')
  end

  def create_config_file
    @app    = Rails.root.to_s.split('/').last
    @domain = @app + (@app.include?('.') ? '' : '.com')

    template 'porter_config.yml', 'config/porter_config.yml'
    readme 'INSTALL'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
porter-1.0.2 lib/generators/porter/porter_generator.rb