lib/bones/main.rb in bones-1.3.2 vs lib/bones/main.rb in bones-1.3.3

- old
+ new

@@ -1,6 +1,6 @@ -# $Id: main.rb 462 2008-01-04 20:56:16Z tim_pease $ +# $Id: main.rb 536 2008-02-18 23:07:49Z tim_pease $ require 'fileutils' require 'optparse' require 'erb' @@ -208,10 +208,10 @@ # Copy a file from the Bones prototype project location to the user # specified project location. A message will be displayed to the screen # indicating that the file is being created. # def cp( file ) - dir = File.dirname(file) + dir = File.dirname(file).sub('NAME', name) dir = (dir == '.' ? name : File.join(name, dir)) dst = File.join(dir, File.basename(file, '.erb').sub('NAME', name)) src = File.join(data, file) puts (test(?e, dst) ? "updating #{dst}" : "creating #{dst}") if verbose