Class: Configatron::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/configatron/install/install_generator.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details


12
13
14
# File 'lib/generators/configatron/install/install_generator.rb', line 12

def self.banner
  "rails generate configatron:install"
end

.source_rootObject


8
9
10
# File 'lib/generators/configatron/install/install_generator.rb', line 8

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

Instance Method Details

#copy_filesObject


16
17
18
19
20
21
# File 'lib/generators/configatron/install/install_generator.rb', line 16

def copy_files
  template 'initializers/configatron.rb', 'config/initializers/configatron.rb'
  %w{defaults development production test}.each do |env|
    template "configatron/#{env}.rb", "config/configatron/#{env}.rb"
  end
end