lib/nanoc/base/entities/item_rep.rb in nanoc-4.3.7 vs lib/nanoc/base/entities/item_rep.rb in nanoc-4.3.8
- old
+ new
@@ -87,11 +87,12 @@
when :pre
snapshot_def.nil? || !snapshot_def.final?
end
is_usable_snapshot = @snapshot_contents[snapshot_name] && (compiled? || !is_still_moving)
unless is_usable_snapshot
- raise Nanoc::Int::Errors::UnmetDependency.new(self)
+ Fiber.yield(Nanoc::Int::Errors::UnmetDependency.new(self))
+ return compiled_content(snapshot: snapshot)
end
@snapshot_contents[snapshot_name].string
end
@@ -129,21 +130,9 @@
# returned
#
# @return [String] The item rep’s path
def path(snapshot: :last)
@paths[snapshot]
- end
-
- contract C::None => nil
- # Resets the compilation progress for this item representation. This is
- # necessary when an unmet dependency is detected during compilation.
- #
- # @api private
- #
- # @return [void]
- def forget_progress
- initialize_content
- nil
end
# Returns an object that can be used for uniquely identifying objects.
#
# @api private