paperclip-deflater 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2484bf0e9dfe939133883c32e3edfaac51fd857
4
- data.tar.gz: e2e4ac8803b6926125d90fe4938f001ed6ac57d0
3
+ metadata.gz: 539dd168f00b6c091360f30478cad895785a6934
4
+ data.tar.gz: be6cbe7df876926c11981631be5b21f181f886b9
5
5
  SHA512:
6
- metadata.gz: dc390b3dd9dedf724fab7a9493ca15a40c725ceabc957c9cd9f6b5f67a753ff9a0b53ba4ebf1a41dbf01bf1b2cf08acd899c3bf920fa82583a1ff3f0a09bd3d7
7
- data.tar.gz: 43c72039ca3481a4f6ade806a738fd48c43dbb826cb1f852e3ad53061423ce0719aee51eda141c506e364532e136bf6a07cb68b0c9466354fc8bf1d75d560201
6
+ metadata.gz: 8399e7e84341b206c85a97311f254b379014765f7d2d466491a69ed2b821e1b1700aea2df8c6d986b35d9919929a368348729f203b2187ba9f42d2cbd869fc65
7
+ data.tar.gz: adb2cb920abebc405886b46f2bc4d500d77a206496d5f47ba111377f28387ba0567bf41d25d2ce6f8e285bfc039172cc19eb8d60872a645f50281412e50cd5b1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -1,14 +1,15 @@
1
- require 'paperclip/processor'
1
+ require_relative 'deflater_base'
2
2
 
3
3
  module Paperclip
4
4
  module Processors
5
- class Plain < ::Paperclip::Processor
6
- def initialize(file, options = {}, attachment = nil)
7
- super
8
- end
9
-
5
+ class Plain < DeflaterBase
10
6
  def make
11
- @file
7
+ dst = create_tempfile
8
+ dst.write @file.read
9
+ @file.rewind
10
+ dst.flush
11
+ dst.rewind
12
+ dst
12
13
  end
13
14
  end
14
15
  end
@@ -11,7 +11,8 @@ describe Paperclip::Processors::Plain do
11
11
  end
12
12
  describe "#make" do
13
13
  it "returns the file" do
14
- expect(subject.make).to eq(file)
14
+ expect(subject.make).not_to be file
15
+ expect(subject.make.read).to eq test_file.read
15
16
  end
16
17
  end
17
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-deflater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daisuke Taniwaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-02 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paperclip
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 2.2.2
118
+ rubygems_version: 2.4.3
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Deflate Processor for Paperclip