lib/nanoc/helpers/capturing.rb in nanoc-3.6.5 vs lib/nanoc/helpers/capturing.rb in nanoc-3.6.6
- old
+ new
@@ -99,11 +99,11 @@
# @return [String] The stored captured content
def content_for(*args, &block)
if block_given? # Set content
# Get args
if args.size != 1
- raise ArgumentError, "expected 1 argument (the name " +
+ raise ArgumentError, "expected 1 argument (the name " +
"of the capture) but got #{args.size} instead"
end
name = args[0]
# Capture and store
@@ -127,15 +127,15 @@
# This is an extremely ugly hack to get the compiler to recompile the
# item from which we use content. For this, we need to manually edit
# the content attribute to reset it. :(
# FIXME clean this up
if !@site.captures_store_compiled_items.include? item
- @site.captures_store_compiled_items << item
+ @site.captures_store_compiled_items << item
item.forced_outdated = true
item.reps.each do |r|
raw_content = item.raw_content
r.content = { :raw => raw_content, :last => raw_content }
- @site.compiler.send(:compile_rep, r)
+ raise Nanoc::Errors::UnmetDependency.new(r)
end
end
end
# Get content