10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/generators/silmarails/install/install_generator.rb', line 10
def install_files
templates = self.class.source_root.join "templates"
Dir[templates.join "**/*.*"].each do |file|
copy_file file, "lib/templates/#{file.gsub(templates.to_s, "")}"
end
framework = options[:framework] || "bootstrap"
framework_templates = self.class.source_root.join "#{framework}/templates"
Dir[framework_templates.join "**/*.*"].each do |file|
copy_file file, "lib/templates/#{file.gsub(framework_templates.to_s, "")}"
end
spec_support = self.class.source_root.join "spec/support"
Dir[spec_support.join "**/*.*"].each do |file|
copy_file file, "spec/support/#{file.gsub(spec_support.to_s, "")}"
end
end
|