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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b196a7dc955a47503b40b8cbf9216465c30b7f56
4
- data.tar.gz: fb8631f41ee2bb5252b2fb82e37137ebb9219bb3
3
+ metadata.gz: 62a7edab5ae0d0d3ce41e5ab5926bd0cad5e252c
4
+ data.tar.gz: 8bb263645637c62b0dd8bcfb0b7167bb8dd8d739
5
5
  SHA512:
6
- metadata.gz: 3c0661ca417643b37acf5b66a74947d70ad43ebfa62700716f22515a7db875d6d64329f47abaaa835e6eed2a697747bd7a358e9612a21c2cfb87139003054ab3
7
- data.tar.gz: e2de539fa82076db90a64c1eefe5949f2f36c84f4c2dafedbbfd0f68806e1ef2c817b19deee6d9b98905d65fe410c69d731aa5bf64cfe284a632b7f6d59115cb
6
+ metadata.gz: 418f0372d984321f9755ef738e764d63f4d15f38cae06faf9cfe1d4724f4fdea59150e20d747f1231fa27bd90be93689e0e4dabb86e67b3702150b9164c2ecb5
7
+ data.tar.gz: 5dc9eff4681ad9f2aa070b73625de5d37cec486308455a25c2ffb9b32c65ca3b7e117d0ce5c95789de41e229324cb02bb361920c5dd891be28f2d2e0a257a168
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.6
@@ -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,15 @@
1
+ require 'paperclip/processor'
2
+
3
+ module Paperclip
4
+ module Processors
5
+ class Plain < ::Paperclip::Processor
6
+ def initialize(file, options = {}, attachment = nil)
7
+ super
8
+ end
9
+
10
+ def make
11
+ @file
12
+ end
13
+ end
14
+ end
15
+ 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
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