paperclip 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of paperclip might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Appraisals +6 -1
- data/Gemfile +1 -1
- data/NEWS +33 -0
- data/README.md +85 -7
- data/features/basic_integration.feature +15 -0
- data/features/step_definitions/rails_steps.rb +29 -0
- data/gemfiles/3.2.gemfile +13 -7
- data/gemfiles/4.0.gemfile +13 -7
- data/gemfiles/4.1.gemfile +15 -9
- data/gemfiles/4.2.gemfile +19 -0
- data/lib/paperclip.rb +1 -0
- data/lib/paperclip/attachment.rb +16 -8
- data/lib/paperclip/has_attached_file.rb +5 -3
- data/lib/paperclip/interpolations.rb +1 -1
- data/lib/paperclip/io_adapters/abstract_adapter.rb +1 -0
- data/lib/paperclip/locales/ja.yml +18 -0
- data/lib/paperclip/locales/pt-BR.yml +18 -0
- data/lib/paperclip/locales/zh-CN.yml +18 -0
- data/lib/paperclip/locales/zh-HK.yml +18 -0
- data/lib/paperclip/locales/zh-TW.yml +18 -0
- data/lib/paperclip/processor.rb +0 -37
- data/lib/paperclip/processor_helpers.rb +50 -0
- data/lib/paperclip/schema.rb +11 -3
- data/lib/paperclip/storage/fog.rb +6 -1
- data/lib/paperclip/storage/s3.rb +16 -6
- data/lib/paperclip/url_generator.rb +11 -3
- data/lib/paperclip/version.rb +1 -1
- data/spec/paperclip/has_attached_file_spec.rb +24 -0
- data/spec/paperclip/interpolations_spec.rb +11 -4
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +7 -0
- data/spec/paperclip/meta_class_spec.rb +1 -1
- data/spec/paperclip/processor_helpers_spec.rb +57 -0
- data/spec/paperclip/schema_spec.rb +50 -8
- data/spec/paperclip/storage/fog_spec.rb +30 -2
- data/spec/paperclip/storage/s3_spec.rb +33 -0
- data/spec/paperclip/url_generator_spec.rb +25 -0
- data/spec/paperclip/validators/media_type_spoof_detection_validator_spec.rb +5 -0
- data/spec/support/matchers/have_column.rb +14 -0
- metadata +13 -2
data/lib/paperclip/version.rb
CHANGED
@@ -41,6 +41,14 @@ describe Paperclip::HasAttachedFile do
|
|
41
41
|
it 'defines the Paperclip-specific callbacks' do
|
42
42
|
assert_adding_attachment('avatar').defines_callback('define_paperclip_callbacks')
|
43
43
|
end
|
44
|
+
|
45
|
+
it 'does not define a media_type check if told not to' do
|
46
|
+
assert_adding_attachment('avatar').does_not_set_up_media_type_check_validation
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'does define a media_type check if told to' do
|
50
|
+
assert_adding_attachment('avatar').sets_up_media_type_check_validation
|
51
|
+
end
|
44
52
|
end
|
45
53
|
|
46
54
|
private
|
@@ -99,6 +107,22 @@ describe Paperclip::HasAttachedFile do
|
|
99
107
|
expect(a_class).to have_received(callback_name.to_sym)
|
100
108
|
end
|
101
109
|
|
110
|
+
def does_not_set_up_media_type_check_validation
|
111
|
+
a_class = stub_class
|
112
|
+
|
113
|
+
Paperclip::HasAttachedFile.define_on(a_class, @attachment_name, { validate_media_type: false })
|
114
|
+
|
115
|
+
expect(a_class).to have_received(:validates_media_type_spoof_detection).never
|
116
|
+
end
|
117
|
+
|
118
|
+
def sets_up_media_type_check_validation
|
119
|
+
a_class = stub_class
|
120
|
+
|
121
|
+
Paperclip::HasAttachedFile.define_on(a_class, @attachment_name, { validate_media_type: true })
|
122
|
+
|
123
|
+
expect(a_class).to have_received(:validates_media_type_spoof_detection)
|
124
|
+
end
|
125
|
+
|
102
126
|
private
|
103
127
|
|
104
128
|
def stub_class
|
@@ -55,11 +55,11 @@ describe Paperclip::Interpolations do
|
|
55
55
|
|
56
56
|
it "returns the extension of the file based on the content type" do
|
57
57
|
attachment = mock
|
58
|
-
attachment.expects(:content_type).returns('image/
|
58
|
+
attachment.expects(:content_type).returns('image/png')
|
59
59
|
attachment.expects(:styles).returns({})
|
60
60
|
interpolations = Paperclip::Interpolations
|
61
61
|
interpolations.expects(:extension).returns('random')
|
62
|
-
assert_equal "
|
62
|
+
assert_equal "png", interpolations.content_type_extension(attachment, :style)
|
63
63
|
end
|
64
64
|
|
65
65
|
it "returns the original extension of the file if it matches a content type extension" do
|
@@ -138,7 +138,14 @@ describe Paperclip::Interpolations do
|
|
138
138
|
assert_equal "000/000/023", Paperclip::Interpolations.id_partition(attachment, :style)
|
139
139
|
end
|
140
140
|
|
141
|
-
it "returns the partitioned id of the attachment when the id is a string" do
|
141
|
+
it "returns the partitioned id of the attachment when the id is a short string" do
|
142
|
+
attachment = mock
|
143
|
+
attachment.expects(:id).returns("fnj23")
|
144
|
+
attachment.expects(:instance).returns(attachment)
|
145
|
+
assert_equal "000/0fn/j23", Paperclip::Interpolations.id_partition(attachment, :style)
|
146
|
+
end
|
147
|
+
|
148
|
+
it "returns the partitioned id of the attachment when the id is a long string" do
|
142
149
|
attachment = mock
|
143
150
|
attachment.expects(:id).returns("32fnj23oio2f")
|
144
151
|
attachment.expects(:instance).returns(attachment)
|
@@ -204,7 +211,7 @@ describe Paperclip::Interpolations do
|
|
204
211
|
attachment.stubs(:original_filename).returns("one")
|
205
212
|
assert_equal "one", Paperclip::Interpolations.filename(attachment, :style)
|
206
213
|
end
|
207
|
-
|
214
|
+
|
208
215
|
it "returns the basename when the extension contains regexp special characters" do
|
209
216
|
attachment = mock
|
210
217
|
attachment.stubs(:styles).returns({})
|
@@ -67,4 +67,11 @@ describe Paperclip::AbstractAdapter do
|
|
67
67
|
@adapter.original_filename = "file.png"
|
68
68
|
expect(@adapter.send(:destination).path).to end_with(".png")
|
69
69
|
end
|
70
|
+
|
71
|
+
context "#original_filename=" do
|
72
|
+
it "should not fail with a nil original filename" do
|
73
|
+
adapter = TestAdapter.new
|
74
|
+
expect{ adapter.original_filename = nil }.not_to raise_error
|
75
|
+
end
|
76
|
+
end
|
70
77
|
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Paperclip::ProcessorHelpers do
|
4
|
+
describe '.load_processor' do
|
5
|
+
context 'when the file exists in lib/paperclip' do
|
6
|
+
it 'loads it correctly' do
|
7
|
+
pathname = Pathname.new('my_app')
|
8
|
+
main_path = 'main_path'
|
9
|
+
alternate_path = 'alternate_path'
|
10
|
+
|
11
|
+
Rails.stubs(:root).returns(pathname)
|
12
|
+
File.expects(:expand_path).with(pathname.join('lib/paperclip', 'custom.rb')).returns(main_path)
|
13
|
+
File.expects(:expand_path).with(pathname.join('lib/paperclip_processors', 'custom.rb')).returns(alternate_path)
|
14
|
+
File.expects(:exist?).with(main_path).returns(true)
|
15
|
+
File.expects(:exist?).with(alternate_path).returns(false)
|
16
|
+
|
17
|
+
Paperclip.expects(:require).with(main_path)
|
18
|
+
|
19
|
+
Paperclip.load_processor(:custom)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'when the file exists in lib/paperclip_processors' do
|
24
|
+
it 'loads it correctly' do
|
25
|
+
pathname = Pathname.new('my_app')
|
26
|
+
main_path = 'main_path'
|
27
|
+
alternate_path = 'alternate_path'
|
28
|
+
|
29
|
+
Rails.stubs(:root).returns(pathname)
|
30
|
+
File.expects(:expand_path).with(pathname.join('lib/paperclip', 'custom.rb')).returns(main_path)
|
31
|
+
File.expects(:expand_path).with(pathname.join('lib/paperclip_processors', 'custom.rb')).returns(alternate_path)
|
32
|
+
File.expects(:exist?).with(main_path).returns(false)
|
33
|
+
File.expects(:exist?).with(alternate_path).returns(true)
|
34
|
+
|
35
|
+
Paperclip.expects(:require).with(alternate_path)
|
36
|
+
|
37
|
+
Paperclip.load_processor(:custom)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'when the file does not exist in lib/paperclip_processors' do
|
42
|
+
it 'raises an error' do
|
43
|
+
pathname = Pathname.new('my_app')
|
44
|
+
main_path = 'main_path'
|
45
|
+
alternate_path = 'alternate_path'
|
46
|
+
|
47
|
+
Rails.stubs(:root).returns(pathname)
|
48
|
+
File.stubs(:expand_path).with(pathname.join('lib/paperclip', 'custom.rb')).returns(main_path)
|
49
|
+
File.stubs(:expand_path).with(pathname.join('lib/paperclip_processors', 'custom.rb')).returns(alternate_path)
|
50
|
+
File.stubs(:exist?).with(main_path).returns(false)
|
51
|
+
File.stubs(:exist?).with(alternate_path).returns(false)
|
52
|
+
|
53
|
+
assert_raises(LoadError) { Paperclip.processor(:custom) }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -24,7 +24,6 @@ describe Paperclip::Schema do
|
|
24
24
|
t.has_attached_file :avatar
|
25
25
|
end
|
26
26
|
end
|
27
|
-
rebuild_class
|
28
27
|
|
29
28
|
columns = Dummy.columns.map{ |column| [column.name, column.type] }
|
30
29
|
|
@@ -48,7 +47,6 @@ describe Paperclip::Schema do
|
|
48
47
|
Dummy.connection.create_table :dummies, force: true do |t|
|
49
48
|
t.attachment :avatar
|
50
49
|
end
|
51
|
-
rebuild_class
|
52
50
|
end
|
53
51
|
|
54
52
|
it "creates attachment columns" do
|
@@ -60,6 +58,23 @@ describe Paperclip::Schema do
|
|
60
58
|
expect(columns).to include(['avatar_updated_at', :datetime])
|
61
59
|
end
|
62
60
|
end
|
61
|
+
|
62
|
+
context "using #attachment with options" do
|
63
|
+
before do
|
64
|
+
Dummy.connection.create_table :dummies, force: true do |t|
|
65
|
+
t.attachment :avatar, default: 1, file_name: { default: 'default' }
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
it "sets defaults on columns" do
|
70
|
+
defaults_columns = ["avatar_file_name", "avatar_content_type", "avatar_file_size"]
|
71
|
+
columns = Dummy.columns.select { |e| defaults_columns.include? e.name }
|
72
|
+
|
73
|
+
expect(columns).to have_column("avatar_file_name").with_default("default")
|
74
|
+
expect(columns).to have_column("avatar_content_type").with_default("1")
|
75
|
+
expect(columns).to have_column("avatar_file_size").with_default(1)
|
76
|
+
end
|
77
|
+
end
|
63
78
|
end
|
64
79
|
|
65
80
|
context "within schema statement" do
|
@@ -71,7 +86,6 @@ describe Paperclip::Schema do
|
|
71
86
|
context "with single attachment" do
|
72
87
|
before do
|
73
88
|
Dummy.connection.add_attachment :dummies, :avatar
|
74
|
-
rebuild_class
|
75
89
|
end
|
76
90
|
|
77
91
|
it "creates attachment columns" do
|
@@ -84,10 +98,24 @@ describe Paperclip::Schema do
|
|
84
98
|
end
|
85
99
|
end
|
86
100
|
|
101
|
+
context "with single attachment and options" do
|
102
|
+
before do
|
103
|
+
Dummy.connection.add_attachment :dummies, :avatar, default: '1', file_name: { default: 'default' }
|
104
|
+
end
|
105
|
+
|
106
|
+
it "sets defaults on columns" do
|
107
|
+
defaults_columns = ["avatar_file_name", "avatar_content_type", "avatar_file_size"]
|
108
|
+
columns = Dummy.columns.select { |e| defaults_columns.include? e.name }
|
109
|
+
|
110
|
+
expect(columns).to have_column("avatar_file_name").with_default("default")
|
111
|
+
expect(columns).to have_column("avatar_content_type").with_default("1")
|
112
|
+
expect(columns).to have_column("avatar_file_size").with_default(1)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
87
116
|
context "with multiple attachments" do
|
88
117
|
before do
|
89
118
|
Dummy.connection.add_attachment :dummies, :avatar, :photo
|
90
|
-
rebuild_class
|
91
119
|
end
|
92
120
|
|
93
121
|
it "creates attachment columns" do
|
@@ -104,11 +132,28 @@ describe Paperclip::Schema do
|
|
104
132
|
end
|
105
133
|
end
|
106
134
|
|
135
|
+
context "with multiple attachments and options" do
|
136
|
+
before do
|
137
|
+
Dummy.connection.add_attachment :dummies, :avatar, :photo, default: '1', file_name: { default: 'default' }
|
138
|
+
end
|
139
|
+
|
140
|
+
it "sets defaults on columns" do
|
141
|
+
defaults_columns = ["avatar_file_name", "avatar_content_type", "avatar_file_size", "photo_file_name", "photo_content_type", "photo_file_size"]
|
142
|
+
columns = Dummy.columns.select { |e| defaults_columns.include? e.name }
|
143
|
+
|
144
|
+
expect(columns).to have_column("avatar_file_name").with_default("default")
|
145
|
+
expect(columns).to have_column("avatar_content_type").with_default("1")
|
146
|
+
expect(columns).to have_column("avatar_file_size").with_default(1)
|
147
|
+
expect(columns).to have_column("photo_file_name").with_default("default")
|
148
|
+
expect(columns).to have_column("photo_content_type").with_default("1")
|
149
|
+
expect(columns).to have_column("photo_file_size").with_default(1)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
107
153
|
context "with no attachment" do
|
108
154
|
it "raises an error" do
|
109
155
|
assert_raises ArgumentError do
|
110
156
|
Dummy.connection.add_attachment :dummies
|
111
|
-
rebuild_class
|
112
157
|
end
|
113
158
|
end
|
114
159
|
end
|
@@ -132,7 +177,6 @@ describe Paperclip::Schema do
|
|
132
177
|
ActiveSupport::Deprecation.silence do
|
133
178
|
Dummy.connection.drop_attached_file :dummies, :avatar
|
134
179
|
end
|
135
|
-
rebuild_class
|
136
180
|
|
137
181
|
columns = Dummy.columns.map{ |column| [column.name, column.type] }
|
138
182
|
|
@@ -153,7 +197,6 @@ describe Paperclip::Schema do
|
|
153
197
|
context "with single attachment" do
|
154
198
|
before do
|
155
199
|
Dummy.connection.remove_attachment :dummies, :avatar
|
156
|
-
rebuild_class
|
157
200
|
end
|
158
201
|
|
159
202
|
it "removes the attachment columns" do
|
@@ -176,7 +219,6 @@ describe Paperclip::Schema do
|
|
176
219
|
end
|
177
220
|
|
178
221
|
Dummy.connection.remove_attachment :dummies, :avatar, :photo
|
179
|
-
rebuild_class
|
180
222
|
end
|
181
223
|
|
182
224
|
it "removes the attachment columns" do
|
@@ -308,13 +308,41 @@ describe Paperclip::Storage::Fog do
|
|
308
308
|
end
|
309
309
|
end
|
310
310
|
|
311
|
+
context "with scheme set" do
|
312
|
+
before do
|
313
|
+
rebuild_model(@options.merge(:fog_credentials => @credentials.merge(:scheme => 'http')))
|
314
|
+
@file = File.new(fixture_file('5k.png'), 'rb')
|
315
|
+
@dummy = Dummy.new
|
316
|
+
@dummy.avatar = @file
|
317
|
+
@dummy.save
|
318
|
+
end
|
319
|
+
|
320
|
+
it "honors the scheme in public url" do
|
321
|
+
assert_match(/^http:\/\//, @dummy.avatar.url)
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
context "with scheme not set" do
|
326
|
+
before do
|
327
|
+
rebuild_model(@options)
|
328
|
+
@file = File.new(fixture_file('5k.png'), 'rb')
|
329
|
+
@dummy = Dummy.new
|
330
|
+
@dummy.avatar = @file
|
331
|
+
@dummy.save
|
332
|
+
end
|
333
|
+
|
334
|
+
it "provides HTTPS public url" do
|
335
|
+
assert_match(/^https:\/\//, @dummy.avatar.url)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
311
339
|
context "with a valid bucket name for a subdomain" do
|
312
340
|
it "provides an url in subdomain style" do
|
313
341
|
assert_match(/^https:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png/, @dummy.avatar.url)
|
314
342
|
end
|
315
343
|
|
316
344
|
it "provides an url that expires in subdomain style" do
|
317
|
-
assert_match(/^http:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png
|
345
|
+
assert_match(/^http:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png.+Expires=.+$/, @dummy.avatar.expiring_url)
|
318
346
|
end
|
319
347
|
end
|
320
348
|
|
@@ -362,7 +390,7 @@ describe Paperclip::Storage::Fog do
|
|
362
390
|
end
|
363
391
|
|
364
392
|
it "provides a url that expires in folder style" do
|
365
|
-
assert_match(/^http:\/\/s3.amazonaws.com\/this_is_invalid\/avatars\/5k.png
|
393
|
+
assert_match(/^http:\/\/s3.amazonaws.com\/this_is_invalid\/avatars\/5k.png.+Expires=.+$/, @dummy.avatar.expiring_url)
|
366
394
|
end
|
367
395
|
|
368
396
|
end
|
@@ -711,6 +711,19 @@ describe Paperclip::Storage::S3 do
|
|
711
711
|
"Expect all the files to be deleted."
|
712
712
|
end
|
713
713
|
|
714
|
+
it "will retry to save again but back off on SlowDown" do
|
715
|
+
@dummy.avatar.stubs(:sleep)
|
716
|
+
AWS::S3::S3Object.any_instance.stubs(:write).
|
717
|
+
raises(AWS::S3::Errors::SlowDown.new(stub, stub(status: 503, body: "")))
|
718
|
+
|
719
|
+
expect {@dummy.save}.to raise_error(AWS::S3::Errors::SlowDown)
|
720
|
+
expect(@dummy.avatar).to have_received(:sleep).with(1)
|
721
|
+
expect(@dummy.avatar).to have_received(:sleep).with(2)
|
722
|
+
expect(@dummy.avatar).to have_received(:sleep).with(4)
|
723
|
+
expect(@dummy.avatar).to have_received(:sleep).with(8)
|
724
|
+
expect(@dummy.avatar).to have_received(:sleep).with(16)
|
725
|
+
end
|
726
|
+
|
714
727
|
context "and saved" do
|
715
728
|
before do
|
716
729
|
object = stub
|
@@ -1461,6 +1474,26 @@ describe Paperclip::Storage::S3 do
|
|
1461
1474
|
end
|
1462
1475
|
end
|
1463
1476
|
|
1477
|
+
context "path is a proc" do
|
1478
|
+
before do
|
1479
|
+
rebuild_model storage: :s3,
|
1480
|
+
path: ->(attachment) { attachment.instance.attachment_path }
|
1481
|
+
|
1482
|
+
@dummy = Dummy.new
|
1483
|
+
@dummy.class_eval do
|
1484
|
+
def attachment_path
|
1485
|
+
'/some/dynamic/path'
|
1486
|
+
end
|
1487
|
+
end
|
1488
|
+
@dummy.avatar = stringy_file
|
1489
|
+
end
|
1490
|
+
|
1491
|
+
it "returns a correct path" do
|
1492
|
+
assert_match '/some/dynamic/path', @dummy.avatar.path
|
1493
|
+
end
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
|
1464
1497
|
private
|
1465
1498
|
|
1466
1499
|
def rails_env(env)
|
@@ -183,4 +183,29 @@ describe Paperclip::UrlGenerator do
|
|
183
183
|
assert mock_interpolator.has_interpolated_pattern?(expected),
|
184
184
|
"expected the interpolator to be passed #{expected.inspect} but it wasn't"
|
185
185
|
end
|
186
|
+
|
187
|
+
describe "should be able to escape (, ), [, and ]." do
|
188
|
+
def generate(expected, updated_at=nil)
|
189
|
+
mock_attachment = MockAttachment.new(updated_at: updated_at)
|
190
|
+
mock_interpolator = MockInterpolator.new(result: expected)
|
191
|
+
options = { interpolator: mock_interpolator }
|
192
|
+
url_generator = Paperclip::UrlGenerator.new(mock_attachment, options)
|
193
|
+
def url_generator.respond_to(params)
|
194
|
+
false if params == :escape
|
195
|
+
end
|
196
|
+
url_generator.for(:style_name, {escape: true, timestamp: !!updated_at})
|
197
|
+
end
|
198
|
+
|
199
|
+
it "not timestamp" do
|
200
|
+
expected = "the(expected)result[]"
|
201
|
+
assert_equal "the%28expected%29result%5B%5D", generate(expected)
|
202
|
+
end
|
203
|
+
|
204
|
+
it "timestamp" do
|
205
|
+
expected = "the(expected)result[]"
|
206
|
+
updated_at = 1231231234
|
207
|
+
assert_equal "the%28expected%29result%5B%5D?#{updated_at}",
|
208
|
+
generate(expected, updated_at)
|
209
|
+
end
|
210
|
+
end
|
186
211
|
end
|
@@ -16,6 +16,11 @@ describe Paperclip::Validators::MediaTypeSpoofDetectionValidator do
|
|
16
16
|
assert Dummy.validators_on(:avatar).any?{ |validator| validator.kind == :media_type_spoof_detection }
|
17
17
|
end
|
18
18
|
|
19
|
+
it "is not on the attachment when explicitly rejected" do
|
20
|
+
rebuild_model validate_media_type: false
|
21
|
+
assert Dummy.validators_on(:avatar).none?{ |validator| validator.kind == :media_type_spoof_detection }
|
22
|
+
end
|
23
|
+
|
19
24
|
it "returns default error message for spoofed media type" do
|
20
25
|
build_validator
|
21
26
|
file = File.new(fixture_file("5k.png"), "rb")
|
@@ -0,0 +1,14 @@
|
|
1
|
+
RSpec::Matchers.define :have_column do |column_name|
|
2
|
+
chain :with_default do |default|
|
3
|
+
@default = default
|
4
|
+
end
|
5
|
+
|
6
|
+
match do |columns|
|
7
|
+
column = columns.detect{|column| column.name == column_name }
|
8
|
+
column && column.default.to_s == @default.to_s
|
9
|
+
end
|
10
|
+
|
11
|
+
failure_message_for_should do |columns|
|
12
|
+
"expected to find '#{column_name}', default '#{@default}' in #{columns.map{|column| [column.name, column.default] }}"
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Yurek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -385,6 +385,7 @@ files:
|
|
385
385
|
- gemfiles/3.2.gemfile
|
386
386
|
- gemfiles/4.0.gemfile
|
387
387
|
- gemfiles/4.1.gemfile
|
388
|
+
- gemfiles/4.2.gemfile
|
388
389
|
- lib/generators/paperclip/USAGE
|
389
390
|
- lib/generators/paperclip/paperclip_generator.rb
|
390
391
|
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
@@ -419,6 +420,11 @@ files:
|
|
419
420
|
- lib/paperclip/locales/de.yml
|
420
421
|
- lib/paperclip/locales/en.yml
|
421
422
|
- lib/paperclip/locales/es.yml
|
423
|
+
- lib/paperclip/locales/ja.yml
|
424
|
+
- lib/paperclip/locales/pt-BR.yml
|
425
|
+
- lib/paperclip/locales/zh-CN.yml
|
426
|
+
- lib/paperclip/locales/zh-HK.yml
|
427
|
+
- lib/paperclip/locales/zh-TW.yml
|
422
428
|
- lib/paperclip/logger.rb
|
423
429
|
- lib/paperclip/matchers.rb
|
424
430
|
- lib/paperclip/matchers/have_attached_file_matcher.rb
|
@@ -428,6 +434,7 @@ files:
|
|
428
434
|
- lib/paperclip/media_type_spoof_detector.rb
|
429
435
|
- lib/paperclip/missing_attachment_styles.rb
|
430
436
|
- lib/paperclip/processor.rb
|
437
|
+
- lib/paperclip/processor_helpers.rb
|
431
438
|
- lib/paperclip/railtie.rb
|
432
439
|
- lib/paperclip/schema.rb
|
433
440
|
- lib/paperclip/storage.rb
|
@@ -485,6 +492,7 @@ files:
|
|
485
492
|
- spec/paperclip/paperclip_missing_attachment_styles_spec.rb
|
486
493
|
- spec/paperclip/paperclip_spec.rb
|
487
494
|
- spec/paperclip/plural_cache_spec.rb
|
495
|
+
- spec/paperclip/processor_helpers_spec.rb
|
488
496
|
- spec/paperclip/processor_spec.rb
|
489
497
|
- spec/paperclip/rake_spec.rb
|
490
498
|
- spec/paperclip/schema_spec.rb
|
@@ -524,6 +532,7 @@ files:
|
|
524
532
|
- spec/support/fixtures/uppercase.PNG
|
525
533
|
- spec/support/matchers/accept.rb
|
526
534
|
- spec/support/matchers/exist.rb
|
535
|
+
- spec/support/matchers/have_column.rb
|
527
536
|
- spec/support/mock_attachment.rb
|
528
537
|
- spec/support/mock_interpolator.rb
|
529
538
|
- spec/support/mock_model.rb
|
@@ -610,6 +619,7 @@ test_files:
|
|
610
619
|
- spec/paperclip/paperclip_missing_attachment_styles_spec.rb
|
611
620
|
- spec/paperclip/paperclip_spec.rb
|
612
621
|
- spec/paperclip/plural_cache_spec.rb
|
622
|
+
- spec/paperclip/processor_helpers_spec.rb
|
613
623
|
- spec/paperclip/processor_spec.rb
|
614
624
|
- spec/paperclip/rake_spec.rb
|
615
625
|
- spec/paperclip/schema_spec.rb
|
@@ -649,6 +659,7 @@ test_files:
|
|
649
659
|
- spec/support/fixtures/uppercase.PNG
|
650
660
|
- spec/support/matchers/accept.rb
|
651
661
|
- spec/support/matchers/exist.rb
|
662
|
+
- spec/support/matchers/have_column.rb
|
652
663
|
- spec/support/mock_attachment.rb
|
653
664
|
- spec/support/mock_interpolator.rb
|
654
665
|
- spec/support/mock_model.rb
|