13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# 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"
copy_file "../config/private.yml", "config/butler_private.yml"
file = "config/initializers/butler.rb"
copy_file "../config/config_EXAMPLE_#{options[:emulator]}.rb", file
append_file file do
" raise \"Define your host gateway in the rails initializer file!\" unless ButlerMainframe.configuration.host_gateway\n require \"mainframe/emulators/\\\#{ButlerMainframe.configuration.host_gateway.to_s.downcase}\"\n\n %w(butler.yml butler_private.yml).each do |file|\n filepath = File.join(Rails.root,'config',file)\n ButlerMainframe::Settings.load!(filepath, :env => Rails.env) if File.exist? filepath\n end\n FILE\n end\nend\n".gsub(/^ /, '')
|