lib/review/volumeprinter.rb in review-4.2.0 vs lib/review/volumeprinter.rb in review-5.0.0
- old
+ new
@@ -26,12 +26,11 @@
@yamlfile = 'config.yml'
end
def execute(*args)
parse_options(args)
- @book = ReVIEW::Book::Base.load
- @book.config = @config
+ @book = ReVIEW::Book::Base.new('.', config: @config)
unless File.readable?(@yamlfile)
@logger.error("No such fiile or can't open #{@yamlfile}.")
exit 1
end
@book.load_config(@yamlfile)
@@ -44,10 +43,10 @@
end
part.each_chapter do |chap|
print_chapter_volume(chap)
end
end
- rescue ReVIEW::FileNotFound => e
+ rescue ReVIEW::FileNotFound, ReVIEW::CompileError => e
@logger.error e
exit 1
end
puts '============================='
print_volume(@book.volume)