lib/paperdragon/task.rb in paperdragon-0.0.3 vs lib/paperdragon/task.rb in paperdragon-0.0.4
- old
+ new
@@ -23,14 +23,14 @@
end
# fingerprint optional => filename is gonna remain the same
# original nil => use [:original]
def reprocess!(style, fingerprint=nil, original=nil, &block)
- original ||= file(:original)
- version = file(style)
- new_uid = @attachment.rebuild_uid(version, fingerprint)
+ @original ||= file(:original) # this is cached per task instance.
+ version = file(style)
+ new_uid = @attachment.rebuild_uid(version, fingerprint)
- @metadata.merge!(style => version.reprocess!(new_uid, original, &block))
+ @metadata.merge!(style => version.reprocess!(new_uid, @original, &block))
end
def rename!(style, fingerprint, &block)
version = file(style)
new_uid = @attachment.rebuild_uid(version, fingerprint)
\ No newline at end of file