bin/review-check in review-1.4.0 vs bin/review-check in review-1.5.0
- old
+ new
@@ -35,11 +35,11 @@
@config = ReVIEW::Configure.values
@config.merge!({
"inencoding" => "UTF-8",
"outencoding" => "UTF-8"
})
- @book = ReVIEW::Book::Base.load_default
+ @book = ReVIEW::Book::Base.load
@book.config = @config
modes = nil
files = ARGV unless ARGV.empty?
opts = OptionParser.new
@@ -52,10 +52,10 @@
}
opts.on('-a', '--all-chapters', 'Check all chapters.') {
files = @book.chapters.map {|ent| ent.path }
}
opts.on('-s', '--section N', 'Check section N. (deprecated)') {|n|
- ents = ReVIEW.env.parts[Integer(n) - 1] or
+ ents = @book.parts[Integer(n) - 1] or
raise ReVIEW::ApplicationError, "section #{n} not exist"
files = ents.map {|ent| ent.path }
}
opts.on('--text', 'Check text.') {
(modes ||= []).push :text