lib/softcover/commands/generator.rb in softcover-0.7.11 vs lib/softcover/commands/generator.rb in softcover-0.8.0
- old
+ new
@@ -38,11 +38,12 @@
(cp_path = path.dup).slice! template_dir + "/"
if path =~ /book\.tex/
cp_path = "#{name}.tex"
elsif path =~ /\.erb/
- cp_path = File.basename path.dup, '.erb'
+ cp_path = File.join(File.dirname(cp_path),
+ File.basename(path.dup, '.erb'))
elsif path =~ /gitignore/
cp_path = '.gitignore'
end
display_path = File.join name, cp_path
@@ -75,14 +76,15 @@
Dir.chdir "html"
FileUtils.rm_f("images") if File.directory?("images")
File.symlink("../images", "images")
Dir.chdir "../.."
- puts "Done. Please update book.yml"
+ book_yml = File.join(Softcover::Directories::CONFIG, 'book')
+ puts "Done. Please update #{book_yml}"
end
def template_dir
- File.expand_path File.join File.dirname(__FILE__), "../template"
+ File.expand_path File.join File.dirname(__FILE__), "..", "template"
end
# Returns a list of all the files and directories used to build the book.
def all_files_and_directories
files_directories_maybe_markdown