lib/paperclip/processors/plain.rb in paperclip-deflater-0.1.0 vs lib/paperclip/processors/plain.rb in paperclip-deflater-0.1.1
- old
+ new
@@ -1,15 +1,16 @@
-require 'paperclip/processor'
+require_relative 'deflater_base'
module Paperclip
module Processors
- class Plain < ::Paperclip::Processor
- def initialize(file, options = {}, attachment = nil)
- super
- end
-
+ class Plain < DeflaterBase
def make
- @file
+ dst = create_tempfile
+ dst.write @file.read
+ @file.rewind
+ dst.flush
+ dst.rewind
+ dst
end
end
end
end