lib/genit/project_creator.rb in genit-0.3 vs lib/genit/project_creator.rb in genit-0.4
- old
+ new
@@ -18,19 +18,20 @@
# files and folders.
#
# Returns nothing.
def create
begin
- FileUtils.makedirs @name
- create_dirs ['fragments', 'news', 'pages', 'scripts', 'styles', 'templates', 'www']
- create_dirs ['styles/alsa', 'styles/yui', 'styles/images']
+ FileUtils.makedirs @name
+ create_dirs ['fragments', 'news', 'pages', 'scripts', 'styles', 'templates', 'www',
+ 'styles/alsa', 'styles/yui', 'styles/images']
copy_files ['templates/main.html', 'templates/menu.html',
'pages/index.html', 'styles/handheld.css', 'styles/print.css',
'styles/screen.css', 'styles/alsa/all.css', 'styles/yui/all.css', 'styles/yui/base.css',
'styles/yui/fonts.css', 'styles/yui/reset.css']
- rescue SystemCallError
- puts "Cannot create project..."
- end
+ FileUtils.touch "#{@name}/.genit"
+ rescue SystemCallError
+ puts "Cannot create project..."
+ end
end
private
# Create some subfolders inside the project folder.