lib/nanoc/base/views/item_rep_view.rb in nanoc-4.6.1 vs lib/nanoc/base/views/item_rep_view.rb in nanoc-4.6.2
- old
+ new
@@ -72,16 +72,25 @@
Nanoc::ItemWithRepsView.new(@item_rep.item, @context)
end
# @api private
def raw_path(snapshot: :last)
- @context.dependency_tracker.bounce(unwrap.item, path: true)
- @item_rep.raw_path(snapshot: snapshot)
+ @context.dependency_tracker.bounce(unwrap.item, compiled_content: true)
+
+ res = @item_rep.raw_path(snapshot: snapshot)
+
+ unless @item_rep.compiled?
+ Fiber.yield(Nanoc::Int::Errors::UnmetDependency.new(@item_rep))
+ end
+
+ res
end
# @api private
def binary?
- @context.snapshot_repo.get(unwrap, :last).binary?
+ snapshot_def = unwrap.snapshot_defs.find { |sd| sd.name == :last }
+ raise Nanoc::Int::Errors::NoSuchSnapshot.new(unwrap, :last) if snapshot_def.nil?
+ snapshot_def.binary?
end
def inspect
"<#{self.class} item.identifier=#{item.identifier} name=#{name}>"
end