Class: Daemonz::Generators::ConfigGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/daemonz/generators/config/config_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



7
8
9
# File 'lib/daemonz/generators/config/config_generator.rb', line 7

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

Instance Method Details

#create_configurationObject



11
12
13
14
15
16
17
18
# File 'lib/daemonz/generators/config/config_generator.rb', line 11

def create_configuration
  copy_file 'config.yml', 'config/daemonz.yml'

  empty_directory 'config/daemonz'
  copy_file 'prepackaged/delayed_job.yml', 'config/daemonz/delayed_job.yml'
  copy_file 'prepackaged/ferret.yml', 'config/daemonz/ferret.yml'
  copy_file 'prepackaged/starling.yml', 'config/daemonz/starling.yml'
end