paperclip 4.2.2 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.codeclimate.yml +17 -0
- data/.hound.yml +1055 -0
- data/.rubocop.yml +1 -0
- data/.travis.yml +17 -15
- data/Appraisals +4 -16
- data/CONTRIBUTING.md +19 -8
- data/Gemfile +5 -9
- data/LICENSE +1 -1
- data/NEWS +148 -31
- data/README.md +327 -191
- data/RELEASING.md +17 -0
- data/Rakefile +2 -2
- data/UPGRADING +12 -9
- data/features/basic_integration.feature +10 -6
- data/features/migration.feature +0 -24
- data/features/step_definitions/attachment_steps.rb +33 -27
- data/features/step_definitions/html_steps.rb +2 -2
- data/features/step_definitions/rails_steps.rb +39 -38
- data/features/step_definitions/s3_steps.rb +2 -2
- data/features/step_definitions/web_steps.rb +1 -103
- data/features/support/env.rb +1 -0
- data/features/support/file_helpers.rb +2 -2
- data/features/support/paths.rb +1 -1
- data/features/support/rails.rb +0 -24
- data/gemfiles/4.2.gemfile +6 -8
- data/gemfiles/5.0.gemfile +17 -0
- data/lib/paperclip/attachment.rb +32 -20
- data/lib/paperclip/attachment_registry.rb +3 -2
- data/lib/paperclip/callbacks.rb +8 -6
- data/lib/paperclip/content_type_detector.rb +27 -11
- data/lib/paperclip/errors.rb +3 -1
- data/lib/paperclip/file_command_content_type_detector.rb +6 -8
- data/lib/paperclip/geometry_parser_factory.rb +1 -1
- data/lib/paperclip/glue.rb +1 -1
- data/lib/paperclip/has_attached_file.rb +9 -2
- data/lib/paperclip/helpers.rb +14 -10
- data/lib/paperclip/interpolations/plural_cache.rb +6 -5
- data/lib/paperclip/interpolations.rb +19 -14
- data/lib/paperclip/io_adapters/abstract_adapter.rb +26 -3
- data/lib/paperclip/io_adapters/attachment_adapter.rb +10 -5
- data/lib/paperclip/io_adapters/data_uri_adapter.rb +8 -8
- data/lib/paperclip/io_adapters/empty_string_adapter.rb +5 -4
- data/lib/paperclip/io_adapters/file_adapter.rb +12 -6
- data/lib/paperclip/io_adapters/http_url_proxy_adapter.rb +7 -7
- data/lib/paperclip/io_adapters/identity_adapter.rb +12 -6
- data/lib/paperclip/io_adapters/nil_adapter.rb +8 -5
- data/lib/paperclip/io_adapters/registry.rb +6 -2
- data/lib/paperclip/io_adapters/stringio_adapter.rb +9 -6
- data/lib/paperclip/io_adapters/uploaded_file_adapter.rb +10 -6
- data/lib/paperclip/io_adapters/uri_adapter.rb +41 -19
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +4 -4
- data/lib/paperclip/media_type_spoof_detector.rb +2 -2
- data/lib/paperclip/processor.rb +5 -4
- data/lib/paperclip/rails_environment.rb +25 -0
- data/lib/paperclip/schema.rb +3 -9
- data/lib/paperclip/storage/filesystem.rb +13 -2
- data/lib/paperclip/storage/fog.rb +30 -18
- data/lib/paperclip/storage/s3.rb +92 -65
- data/lib/paperclip/thumbnail.rb +16 -7
- data/lib/paperclip/url_generator.rb +16 -13
- data/lib/paperclip/validators/attachment_size_validator.rb +1 -7
- data/lib/paperclip/validators.rb +1 -1
- data/lib/paperclip/version.rb +3 -1
- data/lib/paperclip.rb +25 -12
- data/lib/tasks/paperclip.rake +33 -3
- data/paperclip.gemspec +18 -15
- data/spec/paperclip/attachment_definitions_spec.rb +1 -1
- data/spec/paperclip/attachment_processing_spec.rb +2 -4
- data/spec/paperclip/attachment_registry_spec.rb +84 -13
- data/spec/paperclip/attachment_spec.rb +130 -39
- data/spec/paperclip/content_type_detector_spec.rb +8 -1
- data/spec/paperclip/file_command_content_type_detector_spec.rb +0 -1
- data/spec/paperclip/geometry_spec.rb +1 -1
- data/spec/paperclip/glue_spec.rb +44 -0
- data/spec/paperclip/has_attached_file_spec.rb +24 -8
- data/spec/paperclip/integration_spec.rb +4 -3
- data/spec/paperclip/interpolations_spec.rb +16 -13
- data/spec/paperclip/io_adapters/abstract_adapter_spec.rb +47 -23
- data/spec/paperclip/io_adapters/attachment_adapter_spec.rb +6 -3
- data/spec/paperclip/io_adapters/data_uri_adapter_spec.rb +7 -1
- data/spec/paperclip/io_adapters/file_adapter_spec.rb +6 -3
- data/spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb +26 -6
- data/spec/paperclip/io_adapters/identity_adapter_spec.rb +1 -1
- data/spec/paperclip/io_adapters/registry_spec.rb +2 -2
- data/spec/paperclip/io_adapters/stringio_adapter_spec.rb +5 -1
- data/spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb +5 -5
- data/spec/paperclip/io_adapters/uri_adapter_spec.rb +77 -7
- data/spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb +10 -0
- data/spec/paperclip/media_type_spoof_detector_spec.rb +34 -11
- data/spec/paperclip/paperclip_spec.rb +4 -29
- data/spec/paperclip/plural_cache_spec.rb +17 -16
- data/spec/paperclip/rails_environment_spec.rb +33 -0
- data/spec/paperclip/storage/fog_spec.rb +58 -3
- data/spec/paperclip/storage/s3_live_spec.rb +20 -14
- data/spec/paperclip/storage/s3_spec.rb +398 -213
- data/spec/paperclip/tempfile_factory_spec.rb +4 -0
- data/spec/paperclip/tempfile_spec.rb +35 -0
- data/spec/paperclip/thumbnail_spec.rb +51 -32
- data/spec/paperclip/url_generator_spec.rb +55 -44
- data/spec/paperclip/validators/attachment_size_validator_spec.rb +26 -20
- data/spec/paperclip/validators_spec.rb +5 -5
- data/spec/spec_helper.rb +8 -1
- data/spec/support/assertions.rb +12 -1
- data/spec/support/conditional_filter_helper.rb +5 -0
- data/spec/support/fake_model.rb +4 -0
- data/spec/support/fixtures/empty.xlsx +0 -0
- data/spec/support/matchers/have_column.rb +11 -2
- data/spec/support/mock_attachment.rb +2 -0
- data/spec/support/mock_url_generator_builder.rb +2 -2
- data/spec/support/model_reconstruction.rb +9 -1
- data/spec/support/reporting.rb +11 -0
- metadata +109 -162
- data/RUNNING_TESTS.md +0 -4
- data/cucumber/paperclip_steps.rb +0 -6
- data/gemfiles/3.2.gemfile +0 -19
- data/gemfiles/4.0.gemfile +0 -19
- data/gemfiles/4.1.gemfile +0 -19
- data/lib/paperclip/locales/de.yml +0 -18
- data/lib/paperclip/locales/es.yml +0 -18
- data/lib/paperclip/locales/ja.yml +0 -18
- data/lib/paperclip/locales/pt-BR.yml +0 -18
- data/lib/paperclip/locales/zh-CN.yml +0 -18
- data/lib/paperclip/locales/zh-HK.yml +0 -18
- data/lib/paperclip/locales/zh-TW.yml +0 -18
- data/spec/support/mock_model.rb +0 -2
- data/spec/support/rails_helpers.rb +0 -7
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
|
+
version: 5.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:
|
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -16,42 +16,42 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 4.2.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 4.2.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: activesupport
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 4.2.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 4.2.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: cocaine
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.5.
|
|
47
|
+
version: 0.5.5
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.5.
|
|
54
|
+
version: 0.5.5
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: mime-types
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,20 +66,34 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: mimemagic
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.3.0
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.3.0
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: activerecord
|
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
|
72
86
|
requirements:
|
|
73
87
|
- - ">="
|
|
74
88
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
89
|
+
version: 4.2.0
|
|
76
90
|
type: :development
|
|
77
91
|
prerelease: false
|
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
93
|
requirements:
|
|
80
94
|
- - ">="
|
|
81
95
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
96
|
+
version: 4.2.0
|
|
83
97
|
- !ruby/object:Gem::Dependency
|
|
84
98
|
name: shoulda
|
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -98,16 +112,16 @@ dependencies:
|
|
|
98
112
|
name: rspec
|
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
|
101
|
-
- - "
|
|
115
|
+
- - "~>"
|
|
102
116
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0'
|
|
117
|
+
version: '3.0'
|
|
104
118
|
type: :development
|
|
105
119
|
prerelease: false
|
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
121
|
requirements:
|
|
108
|
-
- - "
|
|
122
|
+
- - "~>"
|
|
109
123
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0'
|
|
124
|
+
version: '3.0'
|
|
111
125
|
- !ruby/object:Gem::Dependency
|
|
112
126
|
name: appraisal
|
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,14 +156,20 @@ dependencies:
|
|
|
142
156
|
requirements:
|
|
143
157
|
- - ">="
|
|
144
158
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
159
|
+
version: 2.3.0
|
|
160
|
+
- - "<"
|
|
161
|
+
- !ruby/object:Gem::Version
|
|
162
|
+
version: '3.0'
|
|
146
163
|
type: :development
|
|
147
164
|
prerelease: false
|
|
148
165
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
166
|
requirements:
|
|
150
167
|
- - ">="
|
|
151
168
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
169
|
+
version: 2.3.0
|
|
170
|
+
- - "<"
|
|
171
|
+
- !ruby/object:Gem::Version
|
|
172
|
+
version: '3.0'
|
|
153
173
|
- !ruby/object:Gem::Dependency
|
|
154
174
|
name: bourne
|
|
155
175
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -165,33 +185,47 @@ dependencies:
|
|
|
165
185
|
- !ruby/object:Gem::Version
|
|
166
186
|
version: '0'
|
|
167
187
|
- !ruby/object:Gem::Dependency
|
|
168
|
-
name: cucumber
|
|
188
|
+
name: cucumber-rails
|
|
169
189
|
requirement: !ruby/object:Gem::Requirement
|
|
170
190
|
requirements:
|
|
171
|
-
- - "
|
|
191
|
+
- - ">="
|
|
172
192
|
- !ruby/object:Gem::Version
|
|
173
|
-
version:
|
|
193
|
+
version: '0'
|
|
174
194
|
type: :development
|
|
175
195
|
prerelease: false
|
|
176
196
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
197
|
requirements:
|
|
178
|
-
- - "
|
|
198
|
+
- - ">="
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '0'
|
|
201
|
+
- !ruby/object:Gem::Dependency
|
|
202
|
+
name: cucumber-expressions
|
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
|
204
|
+
requirements:
|
|
205
|
+
- - '='
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: 4.0.3
|
|
208
|
+
type: :development
|
|
209
|
+
prerelease: false
|
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
- - '='
|
|
179
213
|
- !ruby/object:Gem::Version
|
|
180
|
-
version:
|
|
214
|
+
version: 4.0.3
|
|
181
215
|
- !ruby/object:Gem::Dependency
|
|
182
216
|
name: aruba
|
|
183
217
|
requirement: !ruby/object:Gem::Requirement
|
|
184
218
|
requirements:
|
|
185
|
-
- - "
|
|
219
|
+
- - "~>"
|
|
186
220
|
- !ruby/object:Gem::Version
|
|
187
|
-
version:
|
|
221
|
+
version: 0.9.0
|
|
188
222
|
type: :development
|
|
189
223
|
prerelease: false
|
|
190
224
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
225
|
requirements:
|
|
192
|
-
- - "
|
|
226
|
+
- - "~>"
|
|
193
227
|
- !ruby/object:Gem::Version
|
|
194
|
-
version:
|
|
228
|
+
version: 0.9.0
|
|
195
229
|
- !ruby/object:Gem::Dependency
|
|
196
230
|
name: nokogiri
|
|
197
231
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -210,16 +244,16 @@ dependencies:
|
|
|
210
244
|
name: capybara
|
|
211
245
|
requirement: !ruby/object:Gem::Requirement
|
|
212
246
|
requirements:
|
|
213
|
-
- -
|
|
247
|
+
- - ">="
|
|
214
248
|
- !ruby/object:Gem::Version
|
|
215
|
-
version:
|
|
249
|
+
version: '0'
|
|
216
250
|
type: :development
|
|
217
251
|
prerelease: false
|
|
218
252
|
version_requirements: !ruby/object:Gem::Requirement
|
|
219
253
|
requirements:
|
|
220
|
-
- -
|
|
254
|
+
- - ">="
|
|
221
255
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
256
|
+
version: '0'
|
|
223
257
|
- !ruby/object:Gem::Dependency
|
|
224
258
|
name: bundler
|
|
225
259
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -235,21 +269,21 @@ dependencies:
|
|
|
235
269
|
- !ruby/object:Gem::Version
|
|
236
270
|
version: '0'
|
|
237
271
|
- !ruby/object:Gem::Dependency
|
|
238
|
-
name: fog
|
|
272
|
+
name: fog-aws
|
|
239
273
|
requirement: !ruby/object:Gem::Requirement
|
|
240
274
|
requirements:
|
|
241
|
-
- - "
|
|
275
|
+
- - ">="
|
|
242
276
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: '
|
|
277
|
+
version: '0'
|
|
244
278
|
type: :development
|
|
245
279
|
prerelease: false
|
|
246
280
|
version_requirements: !ruby/object:Gem::Requirement
|
|
247
281
|
requirements:
|
|
248
|
-
- - "
|
|
282
|
+
- - ">="
|
|
249
283
|
- !ruby/object:Gem::Version
|
|
250
|
-
version: '
|
|
284
|
+
version: '0'
|
|
251
285
|
- !ruby/object:Gem::Dependency
|
|
252
|
-
name:
|
|
286
|
+
name: fog-local
|
|
253
287
|
requirement: !ruby/object:Gem::Requirement
|
|
254
288
|
requirements:
|
|
255
289
|
- - ">="
|
|
@@ -263,7 +297,7 @@ dependencies:
|
|
|
263
297
|
- !ruby/object:Gem::Version
|
|
264
298
|
version: '0'
|
|
265
299
|
- !ruby/object:Gem::Dependency
|
|
266
|
-
name:
|
|
300
|
+
name: launchy
|
|
267
301
|
requirement: !ruby/object:Gem::Requirement
|
|
268
302
|
requirements:
|
|
269
303
|
- - ">="
|
|
@@ -277,7 +311,7 @@ dependencies:
|
|
|
277
311
|
- !ruby/object:Gem::Version
|
|
278
312
|
version: '0'
|
|
279
313
|
- !ruby/object:Gem::Dependency
|
|
280
|
-
name:
|
|
314
|
+
name: rake
|
|
281
315
|
requirement: !ruby/object:Gem::Requirement
|
|
282
316
|
requirements:
|
|
283
317
|
- - ">="
|
|
@@ -291,7 +325,7 @@ dependencies:
|
|
|
291
325
|
- !ruby/object:Gem::Version
|
|
292
326
|
version: '0'
|
|
293
327
|
- !ruby/object:Gem::Dependency
|
|
294
|
-
name:
|
|
328
|
+
name: fakeweb
|
|
295
329
|
requirement: !ruby/object:Gem::Requirement
|
|
296
330
|
requirements:
|
|
297
331
|
- - ">="
|
|
@@ -305,19 +339,19 @@ dependencies:
|
|
|
305
339
|
- !ruby/object:Gem::Version
|
|
306
340
|
version: '0'
|
|
307
341
|
- !ruby/object:Gem::Dependency
|
|
308
|
-
name:
|
|
342
|
+
name: railties
|
|
309
343
|
requirement: !ruby/object:Gem::Requirement
|
|
310
344
|
requirements:
|
|
311
345
|
- - ">="
|
|
312
346
|
- !ruby/object:Gem::Version
|
|
313
|
-
version:
|
|
347
|
+
version: '0'
|
|
314
348
|
type: :development
|
|
315
349
|
prerelease: false
|
|
316
350
|
version_requirements: !ruby/object:Gem::Requirement
|
|
317
351
|
requirements:
|
|
318
352
|
- - ">="
|
|
319
353
|
- !ruby/object:Gem::Version
|
|
320
|
-
version:
|
|
354
|
+
version: '0'
|
|
321
355
|
- !ruby/object:Gem::Dependency
|
|
322
356
|
name: generator_spec
|
|
323
357
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -353,7 +387,10 @@ executables: []
|
|
|
353
387
|
extensions: []
|
|
354
388
|
extra_rdoc_files: []
|
|
355
389
|
files:
|
|
390
|
+
- ".codeclimate.yml"
|
|
356
391
|
- ".gitignore"
|
|
392
|
+
- ".hound.yml"
|
|
393
|
+
- ".rubocop.yml"
|
|
357
394
|
- ".travis.yml"
|
|
358
395
|
- Appraisals
|
|
359
396
|
- CONTRIBUTING.md
|
|
@@ -361,10 +398,9 @@ files:
|
|
|
361
398
|
- LICENSE
|
|
362
399
|
- NEWS
|
|
363
400
|
- README.md
|
|
364
|
-
-
|
|
401
|
+
- RELEASING.md
|
|
365
402
|
- Rakefile
|
|
366
403
|
- UPGRADING
|
|
367
|
-
- cucumber/paperclip_steps.rb
|
|
368
404
|
- features/basic_integration.feature
|
|
369
405
|
- features/migration.feature
|
|
370
406
|
- features/rake_tasks.feature
|
|
@@ -382,10 +418,8 @@ files:
|
|
|
382
418
|
- features/support/paths.rb
|
|
383
419
|
- features/support/rails.rb
|
|
384
420
|
- features/support/selectors.rb
|
|
385
|
-
- gemfiles/3.2.gemfile
|
|
386
|
-
- gemfiles/4.0.gemfile
|
|
387
|
-
- gemfiles/4.1.gemfile
|
|
388
421
|
- gemfiles/4.2.gemfile
|
|
422
|
+
- gemfiles/5.0.gemfile
|
|
389
423
|
- lib/generators/paperclip/USAGE
|
|
390
424
|
- lib/generators/paperclip/paperclip_generator.rb
|
|
391
425
|
- lib/generators/paperclip/templates/paperclip_migration.rb.erb
|
|
@@ -417,14 +451,7 @@ files:
|
|
|
417
451
|
- lib/paperclip/io_adapters/stringio_adapter.rb
|
|
418
452
|
- lib/paperclip/io_adapters/uploaded_file_adapter.rb
|
|
419
453
|
- lib/paperclip/io_adapters/uri_adapter.rb
|
|
420
|
-
- lib/paperclip/locales/de.yml
|
|
421
454
|
- lib/paperclip/locales/en.yml
|
|
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
|
|
428
455
|
- lib/paperclip/logger.rb
|
|
429
456
|
- lib/paperclip/matchers.rb
|
|
430
457
|
- lib/paperclip/matchers/have_attached_file_matcher.rb
|
|
@@ -435,6 +462,7 @@ files:
|
|
|
435
462
|
- lib/paperclip/missing_attachment_styles.rb
|
|
436
463
|
- lib/paperclip/processor.rb
|
|
437
464
|
- lib/paperclip/processor_helpers.rb
|
|
465
|
+
- lib/paperclip/rails_environment.rb
|
|
438
466
|
- lib/paperclip/railtie.rb
|
|
439
467
|
- lib/paperclip/schema.rb
|
|
440
468
|
- lib/paperclip/storage.rb
|
|
@@ -468,6 +496,7 @@ files:
|
|
|
468
496
|
- spec/paperclip/geometry_detector_spec.rb
|
|
469
497
|
- spec/paperclip/geometry_parser_spec.rb
|
|
470
498
|
- spec/paperclip/geometry_spec.rb
|
|
499
|
+
- spec/paperclip/glue_spec.rb
|
|
471
500
|
- spec/paperclip/has_attached_file_spec.rb
|
|
472
501
|
- spec/paperclip/integration_spec.rb
|
|
473
502
|
- spec/paperclip/interpolations_spec.rb
|
|
@@ -494,6 +523,7 @@ files:
|
|
|
494
523
|
- spec/paperclip/plural_cache_spec.rb
|
|
495
524
|
- spec/paperclip/processor_helpers_spec.rb
|
|
496
525
|
- spec/paperclip/processor_spec.rb
|
|
526
|
+
- spec/paperclip/rails_environment_spec.rb
|
|
497
527
|
- spec/paperclip/rake_spec.rb
|
|
498
528
|
- spec/paperclip/schema_spec.rb
|
|
499
529
|
- spec/paperclip/storage/filesystem_spec.rb
|
|
@@ -502,6 +532,7 @@ files:
|
|
|
502
532
|
- spec/paperclip/storage/s3_spec.rb
|
|
503
533
|
- spec/paperclip/style_spec.rb
|
|
504
534
|
- spec/paperclip/tempfile_factory_spec.rb
|
|
535
|
+
- spec/paperclip/tempfile_spec.rb
|
|
505
536
|
- spec/paperclip/thumbnail_spec.rb
|
|
506
537
|
- spec/paperclip/url_generator_spec.rb
|
|
507
538
|
- spec/paperclip/validators/attachment_content_type_validator_spec.rb
|
|
@@ -512,6 +543,7 @@ files:
|
|
|
512
543
|
- spec/paperclip/validators_spec.rb
|
|
513
544
|
- spec/spec_helper.rb
|
|
514
545
|
- spec/support/assertions.rb
|
|
546
|
+
- spec/support/conditional_filter_helper.rb
|
|
515
547
|
- spec/support/fake_model.rb
|
|
516
548
|
- spec/support/fake_rails.rb
|
|
517
549
|
- spec/support/fixtures/12k.png
|
|
@@ -522,6 +554,7 @@ files:
|
|
|
522
554
|
- spec/support/fixtures/animated.unknown
|
|
523
555
|
- spec/support/fixtures/bad.png
|
|
524
556
|
- spec/support/fixtures/empty.html
|
|
557
|
+
- spec/support/fixtures/empty.xlsx
|
|
525
558
|
- spec/support/fixtures/fog.yml
|
|
526
559
|
- spec/support/fixtures/rotated.jpg
|
|
527
560
|
- spec/support/fixtures/s3.yml
|
|
@@ -535,17 +568,33 @@ files:
|
|
|
535
568
|
- spec/support/matchers/have_column.rb
|
|
536
569
|
- spec/support/mock_attachment.rb
|
|
537
570
|
- spec/support/mock_interpolator.rb
|
|
538
|
-
- spec/support/mock_model.rb
|
|
539
571
|
- spec/support/mock_url_generator_builder.rb
|
|
540
572
|
- spec/support/model_reconstruction.rb
|
|
541
|
-
- spec/support/
|
|
573
|
+
- spec/support/reporting.rb
|
|
542
574
|
- spec/support/test_data.rb
|
|
543
575
|
- spec/support/version_helper.rb
|
|
544
576
|
homepage: https://github.com/thoughtbot/paperclip
|
|
545
577
|
licenses:
|
|
546
578
|
- MIT
|
|
547
579
|
metadata: {}
|
|
548
|
-
post_install_message:
|
|
580
|
+
post_install_message: |
|
|
581
|
+
##################################################
|
|
582
|
+
# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
|
|
583
|
+
##################################################
|
|
584
|
+
|
|
585
|
+
Paperclip is now compatible with aws-sdk >= 2.0.0.
|
|
586
|
+
|
|
587
|
+
If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
|
|
588
|
+
changes:
|
|
589
|
+
|
|
590
|
+
* You must set the `s3_region`
|
|
591
|
+
* If you are explicitly setting permissions anywhere, such as in an initializer,
|
|
592
|
+
note that the format of the permissions changed from using an underscore to
|
|
593
|
+
using a hyphen. For example, `:public_read` needs to be changed to
|
|
594
|
+
`public-read`.
|
|
595
|
+
|
|
596
|
+
For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
|
|
597
|
+
http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
|
|
549
598
|
rdoc_options: []
|
|
550
599
|
require_paths:
|
|
551
600
|
- lib
|
|
@@ -553,7 +602,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
553
602
|
requirements:
|
|
554
603
|
- - ">="
|
|
555
604
|
- !ruby/object:Gem::Version
|
|
556
|
-
version: 1.
|
|
605
|
+
version: 2.1.0
|
|
557
606
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
558
607
|
requirements:
|
|
559
608
|
- - ">="
|
|
@@ -561,111 +610,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
561
610
|
version: '0'
|
|
562
611
|
requirements:
|
|
563
612
|
- ImageMagick
|
|
564
|
-
rubyforge_project:
|
|
565
|
-
rubygems_version: 2.
|
|
613
|
+
rubyforge_project:
|
|
614
|
+
rubygems_version: 2.6.13
|
|
566
615
|
signing_key:
|
|
567
616
|
specification_version: 4
|
|
568
617
|
summary: File attachments as attributes for ActiveRecord
|
|
569
|
-
test_files:
|
|
570
|
-
- features/basic_integration.feature
|
|
571
|
-
- features/migration.feature
|
|
572
|
-
- features/rake_tasks.feature
|
|
573
|
-
- features/step_definitions/attachment_steps.rb
|
|
574
|
-
- features/step_definitions/html_steps.rb
|
|
575
|
-
- features/step_definitions/rails_steps.rb
|
|
576
|
-
- features/step_definitions/s3_steps.rb
|
|
577
|
-
- features/step_definitions/web_steps.rb
|
|
578
|
-
- features/support/env.rb
|
|
579
|
-
- features/support/fakeweb.rb
|
|
580
|
-
- features/support/file_helpers.rb
|
|
581
|
-
- features/support/fixtures/boot_config.txt
|
|
582
|
-
- features/support/fixtures/gemfile.txt
|
|
583
|
-
- features/support/fixtures/preinitializer.txt
|
|
584
|
-
- features/support/paths.rb
|
|
585
|
-
- features/support/rails.rb
|
|
586
|
-
- features/support/selectors.rb
|
|
587
|
-
- spec/database.yml
|
|
588
|
-
- spec/paperclip/attachment_definitions_spec.rb
|
|
589
|
-
- spec/paperclip/attachment_processing_spec.rb
|
|
590
|
-
- spec/paperclip/attachment_registry_spec.rb
|
|
591
|
-
- spec/paperclip/attachment_spec.rb
|
|
592
|
-
- spec/paperclip/content_type_detector_spec.rb
|
|
593
|
-
- spec/paperclip/file_command_content_type_detector_spec.rb
|
|
594
|
-
- spec/paperclip/filename_cleaner_spec.rb
|
|
595
|
-
- spec/paperclip/geometry_detector_spec.rb
|
|
596
|
-
- spec/paperclip/geometry_parser_spec.rb
|
|
597
|
-
- spec/paperclip/geometry_spec.rb
|
|
598
|
-
- spec/paperclip/has_attached_file_spec.rb
|
|
599
|
-
- spec/paperclip/integration_spec.rb
|
|
600
|
-
- spec/paperclip/interpolations_spec.rb
|
|
601
|
-
- spec/paperclip/io_adapters/abstract_adapter_spec.rb
|
|
602
|
-
- spec/paperclip/io_adapters/attachment_adapter_spec.rb
|
|
603
|
-
- spec/paperclip/io_adapters/data_uri_adapter_spec.rb
|
|
604
|
-
- spec/paperclip/io_adapters/empty_string_adapter_spec.rb
|
|
605
|
-
- spec/paperclip/io_adapters/file_adapter_spec.rb
|
|
606
|
-
- spec/paperclip/io_adapters/http_url_proxy_adapter_spec.rb
|
|
607
|
-
- spec/paperclip/io_adapters/identity_adapter_spec.rb
|
|
608
|
-
- spec/paperclip/io_adapters/nil_adapter_spec.rb
|
|
609
|
-
- spec/paperclip/io_adapters/registry_spec.rb
|
|
610
|
-
- spec/paperclip/io_adapters/stringio_adapter_spec.rb
|
|
611
|
-
- spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb
|
|
612
|
-
- spec/paperclip/io_adapters/uri_adapter_spec.rb
|
|
613
|
-
- spec/paperclip/matchers/have_attached_file_matcher_spec.rb
|
|
614
|
-
- spec/paperclip/matchers/validate_attachment_content_type_matcher_spec.rb
|
|
615
|
-
- spec/paperclip/matchers/validate_attachment_presence_matcher_spec.rb
|
|
616
|
-
- spec/paperclip/matchers/validate_attachment_size_matcher_spec.rb
|
|
617
|
-
- spec/paperclip/media_type_spoof_detector_spec.rb
|
|
618
|
-
- spec/paperclip/meta_class_spec.rb
|
|
619
|
-
- spec/paperclip/paperclip_missing_attachment_styles_spec.rb
|
|
620
|
-
- spec/paperclip/paperclip_spec.rb
|
|
621
|
-
- spec/paperclip/plural_cache_spec.rb
|
|
622
|
-
- spec/paperclip/processor_helpers_spec.rb
|
|
623
|
-
- spec/paperclip/processor_spec.rb
|
|
624
|
-
- spec/paperclip/rake_spec.rb
|
|
625
|
-
- spec/paperclip/schema_spec.rb
|
|
626
|
-
- spec/paperclip/storage/filesystem_spec.rb
|
|
627
|
-
- spec/paperclip/storage/fog_spec.rb
|
|
628
|
-
- spec/paperclip/storage/s3_live_spec.rb
|
|
629
|
-
- spec/paperclip/storage/s3_spec.rb
|
|
630
|
-
- spec/paperclip/style_spec.rb
|
|
631
|
-
- spec/paperclip/tempfile_factory_spec.rb
|
|
632
|
-
- spec/paperclip/thumbnail_spec.rb
|
|
633
|
-
- spec/paperclip/url_generator_spec.rb
|
|
634
|
-
- spec/paperclip/validators/attachment_content_type_validator_spec.rb
|
|
635
|
-
- spec/paperclip/validators/attachment_file_name_validator_spec.rb
|
|
636
|
-
- spec/paperclip/validators/attachment_presence_validator_spec.rb
|
|
637
|
-
- spec/paperclip/validators/attachment_size_validator_spec.rb
|
|
638
|
-
- spec/paperclip/validators/media_type_spoof_detection_validator_spec.rb
|
|
639
|
-
- spec/paperclip/validators_spec.rb
|
|
640
|
-
- spec/spec_helper.rb
|
|
641
|
-
- spec/support/assertions.rb
|
|
642
|
-
- spec/support/fake_model.rb
|
|
643
|
-
- spec/support/fake_rails.rb
|
|
644
|
-
- spec/support/fixtures/12k.png
|
|
645
|
-
- spec/support/fixtures/50x50.png
|
|
646
|
-
- spec/support/fixtures/5k.png
|
|
647
|
-
- spec/support/fixtures/animated
|
|
648
|
-
- spec/support/fixtures/animated.gif
|
|
649
|
-
- spec/support/fixtures/animated.unknown
|
|
650
|
-
- spec/support/fixtures/bad.png
|
|
651
|
-
- spec/support/fixtures/empty.html
|
|
652
|
-
- spec/support/fixtures/fog.yml
|
|
653
|
-
- spec/support/fixtures/rotated.jpg
|
|
654
|
-
- spec/support/fixtures/s3.yml
|
|
655
|
-
- spec/support/fixtures/spaced file.jpg
|
|
656
|
-
- spec/support/fixtures/spaced file.png
|
|
657
|
-
- spec/support/fixtures/text.txt
|
|
658
|
-
- spec/support/fixtures/twopage.pdf
|
|
659
|
-
- spec/support/fixtures/uppercase.PNG
|
|
660
|
-
- spec/support/matchers/accept.rb
|
|
661
|
-
- spec/support/matchers/exist.rb
|
|
662
|
-
- spec/support/matchers/have_column.rb
|
|
663
|
-
- spec/support/mock_attachment.rb
|
|
664
|
-
- spec/support/mock_interpolator.rb
|
|
665
|
-
- spec/support/mock_model.rb
|
|
666
|
-
- spec/support/mock_url_generator_builder.rb
|
|
667
|
-
- spec/support/model_reconstruction.rb
|
|
668
|
-
- spec/support/rails_helpers.rb
|
|
669
|
-
- spec/support/test_data.rb
|
|
670
|
-
- spec/support/version_helper.rb
|
|
671
|
-
has_rdoc:
|
|
618
|
+
test_files: []
|
data/RUNNING_TESTS.md
DELETED
data/cucumber/paperclip_steps.rb
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
When /^I attach an? "([^\"]*)" "([^\"]*)" file to an? "([^\"]*)" on S3$/ do |attachment, extension, model|
|
|
2
|
-
stub_paperclip_s3(model, attachment, extension)
|
|
3
|
-
attach_file attachment,
|
|
4
|
-
"features/support/paperclip/#{model.gsub(" ", "_").underscore}/#{attachment}.#{extension}"
|
|
5
|
-
end
|
|
6
|
-
|
data/gemfiles/3.2.gemfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "sqlite3", "1.3.8", :platforms => :ruby
|
|
6
|
-
gem "jruby-openssl", :platforms => :jruby
|
|
7
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
|
8
|
-
gem "rubysl", :platforms => :rbx
|
|
9
|
-
gem "racc", :platforms => :rbx
|
|
10
|
-
gem "pry"
|
|
11
|
-
gem "rails", "~> 3.2.15"
|
|
12
|
-
gem "paperclip", :path => "../"
|
|
13
|
-
|
|
14
|
-
group :development, :test do
|
|
15
|
-
gem "mime-types", "~> 1.16"
|
|
16
|
-
gem "builder"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
gemspec :path => "../"
|
data/gemfiles/4.0.gemfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "sqlite3", "1.3.8", :platforms => :ruby
|
|
6
|
-
gem "jruby-openssl", :platforms => :jruby
|
|
7
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
|
8
|
-
gem "rubysl", :platforms => :rbx
|
|
9
|
-
gem "racc", :platforms => :rbx
|
|
10
|
-
gem "pry"
|
|
11
|
-
gem "rails", "~> 4.0.0"
|
|
12
|
-
gem "paperclip", :path => "../"
|
|
13
|
-
|
|
14
|
-
group :development, :test do
|
|
15
|
-
gem "mime-types", "~> 1.16"
|
|
16
|
-
gem "builder"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
gemspec :path => "../"
|
data/gemfiles/4.1.gemfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "sqlite3", "1.3.8", :platforms => :ruby
|
|
6
|
-
gem "jruby-openssl", :platforms => :jruby
|
|
7
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
|
|
8
|
-
gem "rubysl", :platforms => :rbx
|
|
9
|
-
gem "racc", :platforms => :rbx
|
|
10
|
-
gem "pry"
|
|
11
|
-
gem "rails", "~> 4.1.0"
|
|
12
|
-
gem "paperclip", :path => "../"
|
|
13
|
-
|
|
14
|
-
group :development, :test do
|
|
15
|
-
gem "mime-types", "~> 1.16"
|
|
16
|
-
gem "builder"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
gemspec :path => "../"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
de:
|
|
2
|
-
errors:
|
|
3
|
-
messages:
|
|
4
|
-
in_between: "muss zwischen %{min} und %{max} sein"
|
|
5
|
-
spoofed_media_type: "trägt eine Dateiendung, die nicht mit dem Inhalt der Datei übereinstimmt"
|
|
6
|
-
|
|
7
|
-
number:
|
|
8
|
-
human:
|
|
9
|
-
storage_units:
|
|
10
|
-
format: "%n %u"
|
|
11
|
-
units:
|
|
12
|
-
byte:
|
|
13
|
-
one: "Byte"
|
|
14
|
-
other: "Bytes"
|
|
15
|
-
kb: "KB"
|
|
16
|
-
mb: "MB"
|
|
17
|
-
gb: "GB"
|
|
18
|
-
tb: "TB"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
es:
|
|
2
|
-
errors:
|
|
3
|
-
messages:
|
|
4
|
-
in_between: "debe estar entre %{min} y %{max}"
|
|
5
|
-
spoofed_media_type: "tiene una extensión que no coincide con su contenido"
|
|
6
|
-
|
|
7
|
-
number:
|
|
8
|
-
human:
|
|
9
|
-
storage_units:
|
|
10
|
-
format: "%n %u"
|
|
11
|
-
units:
|
|
12
|
-
byte:
|
|
13
|
-
one: "Byte"
|
|
14
|
-
other: "Bytes"
|
|
15
|
-
kb: "KB"
|
|
16
|
-
mb: "MB"
|
|
17
|
-
gb: "GB"
|
|
18
|
-
tb: "TB"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
ja:
|
|
2
|
-
errors:
|
|
3
|
-
messages:
|
|
4
|
-
in_between: "の容量は%{min}以上%{max}以下にしてください。"
|
|
5
|
-
spoofed_media_type: "の拡張子と内容が一致していません。"
|
|
6
|
-
|
|
7
|
-
number:
|
|
8
|
-
human:
|
|
9
|
-
storage_units:
|
|
10
|
-
format: "%n %u"
|
|
11
|
-
units:
|
|
12
|
-
byte:
|
|
13
|
-
one: "Byte"
|
|
14
|
-
other: "Bytes"
|
|
15
|
-
kb: "KB"
|
|
16
|
-
mb: "MB"
|
|
17
|
-
gb: "GB"
|
|
18
|
-
tb: "TB"
|