lib/epub/maker.rb in epub-maker-0.0.3 vs lib/epub/maker.rb in epub-maker-0.0.4

- old
+ new

@@ -54,11 +54,13 @@ backtrace = error.backtrace error = error.exception([ error.message, "[#{self}]Working directory remained at: #{dir}" ].join($RS)) - backtrace.unshift("#{__FILE__}:#{__LINE__}:in `rescue in #{__method__}'"); error.set_backtrace backtrace; raise error + backtrace.unshift("#{__FILE__}:#{__LINE__}:in `rescue in #{__method__}'") + error.set_backtrace backtrace + raise error end end end module Book::Features @@ -69,13 +71,16 @@ end ocf end def make_package - self.package = Publication::Package.new + package = Publication::Package.new + package.book = self package.make do |package| yield package if block_given? end + no_package_rootfile = rootfiles.find {|rf| rf.package.nil?} + no_package_rootfile.package = package if no_package_rootfile package end # @param archive [OCF::PhysicalContainer] def save