lib/hylafax/send_fax.rb in hylafax-0.2.0 vs lib/hylafax/send_fax.rb in hylafax-0.2.1

- old
+ new

@@ -1,8 +1,9 @@ module HylaFAX class SendFax < Command DEFAULT_TMP_DIR = 'tmp' + DOCUMENT_PREFIX = 'doc.' attr_reader :dialstring, :document, :tmp_dir, :job_id def initialize(opts = {}) super @@ -33,10 +34,11 @@ def remote_document File.join(tmp_dir, document_filename) end def document_filename - @document_filename ||= Digest::MD5.file(document).hexdigest + @document_filename ||= DOCUMENT_PREFIX + + Digest::MD5.file(document).hexdigest end def document_uploaded? ftp.list(tmp_dir).map { |l| l.split.last }.include?(document_filename) end