4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/generators/project_files/project_files_generator.rb', line 4
def copy_template_files
gem_template_dir = File.expand_path('../templates', __FILE__) app_root = destination_root
cmd = "mkdir -v #{app_root}/lib/templates"
puts `#{cmd}`
cmd = "cp -vR #{gem_template_dir}/view_templates/* #{app_root}/lib/templates/"
puts `#{cmd}`
cmd = "mkdir -v #{app_root}/app/views/shared/"
puts `#{cmd}`
cmd = "cp -vR #{gem_template_dir}/views/shared/* #{app_root}/app/views/shared/"
puts `#{cmd}`
cmd = "cp -vR #{gem_template_dir}/views/application.html.haml #{app_root}/app/views/layouts/"
puts `#{cmd}`
cmd = "rm #{app_root}/app/views/layouts/application.html.erb"
puts `#{cmd}`
cmd = "cp -vR #{gem_template_dir}/images/* #{app_root}/public/images/"
puts `#{cmd}`
cmd = "cp -vR #{gem_template_dir}/stylesheets/* #{app_root}/public/stylesheets/"
puts `#{cmd}`
end
|