paperclip-deflater 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/paperclip/deflater.rb +2 -0
- data/lib/paperclip/processors/plain.rb +15 -0
- data/spec/paperclip/processors/plain_spec.rb +17 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62a7edab5ae0d0d3ce41e5ab5926bd0cad5e252c
|
4
|
+
data.tar.gz: 8bb263645637c62b0dd8bcfb0b7167bb8dd8d739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 418f0372d984321f9755ef738e764d63f4d15f38cae06faf9cfe1d4724f4fdea59150e20d747f1231fa27bd90be93689e0e4dabb86e67b3702150b9164c2ecb5
|
7
|
+
data.tar.gz: 5dc9eff4681ad9f2aa070b73625de5d37cec486308455a25c2ffb9b32c65ca3b7e117d0ce5c95789de41e229324cb02bb361920c5dd891be28f2d2e0a257a168
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/lib/paperclip/deflater.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require 'paperclip'
|
2
|
+
require 'paperclip/processors/plain'
|
2
3
|
require 'paperclip/processors/deflater'
|
3
4
|
require 'paperclip/processors/gzip'
|
4
5
|
|
5
6
|
Paperclip.configure do |c|
|
7
|
+
c.register_processor :plain, Paperclip::Processors::Plain
|
6
8
|
c.register_processor :deflater, Paperclip::Processors::Deflater
|
7
9
|
c.register_processor :gzip, Paperclip::Processors::Gzip
|
8
10
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Paperclip::Processors::Plain do
|
4
|
+
let(:attachment) { double }
|
5
|
+
let(:no_deflate) { nil }
|
6
|
+
let(:options) { {} }
|
7
|
+
let(:file) { test_file }
|
8
|
+
subject { Paperclip::Processors::Plain.new(file, options, attachment) }
|
9
|
+
before do
|
10
|
+
allow(attachment).to receive(:instance_read).with(:no_deflate).and_return(no_deflate)
|
11
|
+
end
|
12
|
+
describe "#make" do
|
13
|
+
it "returns the file" do
|
14
|
+
expect(subject.make).to eq(file)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip-deflater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daisuke Taniwaki
|
@@ -86,11 +86,13 @@ files:
|
|
86
86
|
- lib/paperclip/processors/deflater.rb
|
87
87
|
- lib/paperclip/processors/deflater_base.rb
|
88
88
|
- lib/paperclip/processors/gzip.rb
|
89
|
+
- lib/paperclip/processors/plain.rb
|
89
90
|
- paperclip-deflater.gemspec
|
90
91
|
- spec/fixtures/files/test.txt
|
91
92
|
- spec/paperclip/processors/deflater_base_spec.rb
|
92
93
|
- spec/paperclip/processors/deflater_spec.rb
|
93
94
|
- spec/paperclip/processors/gzip_spec.rb
|
95
|
+
- spec/paperclip/processors/plain_spec.rb
|
94
96
|
- spec/spec_helper.rb
|
95
97
|
- spec/support/files.rb
|
96
98
|
homepage: https://github.com/dtaniwaki/paperclip-deflater
|
@@ -122,5 +124,6 @@ test_files:
|
|
122
124
|
- spec/paperclip/processors/deflater_base_spec.rb
|
123
125
|
- spec/paperclip/processors/deflater_spec.rb
|
124
126
|
- spec/paperclip/processors/gzip_spec.rb
|
127
|
+
- spec/paperclip/processors/plain_spec.rb
|
125
128
|
- spec/spec_helper.rb
|
126
129
|
- spec/support/files.rb
|