Class: Butler::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ButlerMainframe::Base
Defined in:
lib/generators/butler/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_to_localObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/generators/butler/install_generator.rb', line 13

def copy_to_local
  copy_file "butler/templates/custom_functions.rb", "config/initializers/butler_custom_functions.rb"
  copy_file "../config/settings.yml", "config/butler.yml"
  file = "config/initializers/butler.rb"
  copy_file "../config/config_EXAMPLE_#{options[:emulator]}.rb", file
  append_file file do
    <<-FILE.gsub(/^            /, '')
      ButlerMainframe::Settings.load!(File.join(Rails.root,'config','butler.yml'), :env => Rails.env)
    FILE
  end
end