carrierwave 1.3.0 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of carrierwave might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +120 -43
- data/lib/carrierwave/downloader/base.rb +93 -0
- data/lib/carrierwave/downloader/remote_file.rb +65 -0
- data/lib/carrierwave/locale/en.yml +5 -4
- data/lib/carrierwave/mount.rb +25 -19
- data/lib/carrierwave/mounter.rb +71 -48
- data/lib/carrierwave/orm/activerecord.rb +14 -8
- data/lib/carrierwave/processing/mini_magick.rb +100 -117
- data/lib/carrierwave/processing/rmagick.rb +11 -5
- data/lib/carrierwave/processing/vips.rb +284 -0
- data/lib/carrierwave/processing.rb +1 -0
- data/lib/carrierwave/sanitized_file.rb +44 -23
- data/lib/carrierwave/storage/file.rb +2 -2
- data/lib/carrierwave/storage/fog.rb +46 -17
- data/lib/carrierwave/storage.rb +1 -0
- data/lib/carrierwave/uploader/cache.rb +24 -16
- data/lib/carrierwave/uploader/configuration.rb +28 -15
- data/lib/carrierwave/uploader/content_type_blacklist.rb +17 -8
- data/lib/carrierwave/uploader/content_type_whitelist.rb +20 -8
- data/lib/carrierwave/uploader/download.rb +2 -80
- data/lib/carrierwave/uploader/extension_blacklist.rb +18 -10
- data/lib/carrierwave/uploader/extension_whitelist.rb +19 -10
- data/lib/carrierwave/uploader/mountable.rb +6 -0
- data/lib/carrierwave/uploader/proxy.rb +2 -2
- data/lib/carrierwave/uploader/serialization.rb +1 -1
- data/lib/carrierwave/uploader/store.rb +5 -3
- data/lib/carrierwave/uploader/url.rb +6 -3
- data/lib/carrierwave/uploader/versions.rb +43 -13
- data/lib/carrierwave/uploader.rb +0 -9
- data/lib/carrierwave/validations/active_model.rb +3 -3
- data/lib/carrierwave/version.rb +1 -1
- data/lib/carrierwave.rb +4 -0
- data/lib/generators/templates/uploader.rb +2 -2
- metadata +113 -21
@@ -11,7 +11,7 @@ module CarrierWave
|
|
11
11
|
class ProcessingValidator < ::ActiveModel::EachValidator
|
12
12
|
|
13
13
|
def validate_each(record, attribute, value)
|
14
|
-
|
14
|
+
record.__send__("#{attribute}_processing_errors").each do |e|
|
15
15
|
message = (e.message == e.class.to_s) ? :carrierwave_processing_error : e.message
|
16
16
|
record.errors.add(attribute, message)
|
17
17
|
end
|
@@ -21,7 +21,7 @@ module CarrierWave
|
|
21
21
|
class IntegrityValidator < ::ActiveModel::EachValidator
|
22
22
|
|
23
23
|
def validate_each(record, attribute, value)
|
24
|
-
|
24
|
+
record.__send__("#{attribute}_integrity_errors").each do |e|
|
25
25
|
message = (e.message == e.class.to_s) ? :carrierwave_integrity_error : e.message
|
26
26
|
record.errors.add(attribute, message)
|
27
27
|
end
|
@@ -31,7 +31,7 @@ module CarrierWave
|
|
31
31
|
class DownloadValidator < ::ActiveModel::EachValidator
|
32
32
|
|
33
33
|
def validate_each(record, attribute, value)
|
34
|
-
|
34
|
+
record.__send__("#{attribute}_download_errors").each do |e|
|
35
35
|
message = (e.message == e.class.to_s) ? :carrierwave_download_error : e.message
|
36
36
|
record.errors.add(attribute, message)
|
37
37
|
end
|
data/lib/carrierwave/version.rb
CHANGED
data/lib/carrierwave.rb
CHANGED
@@ -33,9 +33,9 @@ class <%= class_name %>Uploader < CarrierWave::Uploader::Base
|
|
33
33
|
# process resize_to_fit: [50, 50]
|
34
34
|
# end
|
35
35
|
|
36
|
-
# Add
|
36
|
+
# Add an allowlist of extensions which are allowed to be uploaded.
|
37
37
|
# For images you might use something like this:
|
38
|
-
# def
|
38
|
+
# def extension_allowlist
|
39
39
|
# %w(jpg jpeg gif png)
|
40
40
|
# end
|
41
41
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,42 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.0.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: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activemodel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 5.0.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: 5.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: mini_mime
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.1.3
|
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:
|
54
|
+
version: 0.1.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: image_processing
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: marcel
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.0.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: addressable
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.6'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.6'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: ssrf_filter
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
55
111
|
- !ruby/object:Gem::Dependency
|
56
112
|
name: pg
|
57
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +128,14 @@ dependencies:
|
|
72
128
|
requirements:
|
73
129
|
- - ">="
|
74
130
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
131
|
+
version: 5.0.0
|
76
132
|
type: :development
|
77
133
|
prerelease: false
|
78
134
|
version_requirements: !ruby/object:Gem::Requirement
|
79
135
|
requirements:
|
80
136
|
- - ">="
|
81
137
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
138
|
+
version: 5.0.0
|
83
139
|
- !ruby/object:Gem::Dependency
|
84
140
|
name: cucumber
|
85
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +164,20 @@ dependencies:
|
|
108
164
|
- - "~>"
|
109
165
|
- !ruby/object:Gem::Version
|
110
166
|
version: '3.4'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rspec-retry
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
111
181
|
- !ruby/object:Gem::Dependency
|
112
182
|
name: webmock
|
113
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +212,20 @@ dependencies:
|
|
142
212
|
requirements:
|
143
213
|
- - "~>"
|
144
214
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.7
|
215
|
+
version: '1.7'
|
216
|
+
- - "!="
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: 1.12.1
|
146
219
|
type: :development
|
147
220
|
prerelease: false
|
148
221
|
version_requirements: !ruby/object:Gem::Requirement
|
149
222
|
requirements:
|
150
223
|
- - "~>"
|
151
224
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.7
|
225
|
+
version: '1.7'
|
226
|
+
- - "!="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: 1.12.1
|
153
229
|
- !ruby/object:Gem::Dependency
|
154
230
|
name: fog-local
|
155
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,14 +274,14 @@ dependencies:
|
|
198
274
|
requirements:
|
199
275
|
- - ">="
|
200
276
|
- !ruby/object:Gem::Version
|
201
|
-
version: '
|
277
|
+
version: '2.16'
|
202
278
|
type: :development
|
203
279
|
prerelease: false
|
204
280
|
version_requirements: !ruby/object:Gem::Requirement
|
205
281
|
requirements:
|
206
282
|
- - ">="
|
207
283
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
284
|
+
version: '2.16'
|
209
285
|
- !ruby/object:Gem::Dependency
|
210
286
|
name: timecop
|
211
287
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,6 +324,20 @@ dependencies:
|
|
248
324
|
- - ">="
|
249
325
|
- !ruby/object:Gem::Version
|
250
326
|
version: '0'
|
327
|
+
- !ruby/object:Gem::Dependency
|
328
|
+
name: pry-byebug
|
329
|
+
requirement: !ruby/object:Gem::Requirement
|
330
|
+
requirements:
|
331
|
+
- - ">="
|
332
|
+
- !ruby/object:Gem::Version
|
333
|
+
version: '0'
|
334
|
+
type: :development
|
335
|
+
prerelease: false
|
336
|
+
version_requirements: !ruby/object:Gem::Requirement
|
337
|
+
requirements:
|
338
|
+
- - ">="
|
339
|
+
- !ruby/object:Gem::Version
|
340
|
+
version: '0'
|
251
341
|
description: Upload files in your Ruby applications, map them to a range of ORMs,
|
252
342
|
store them on different backends.
|
253
343
|
email:
|
@@ -260,6 +350,8 @@ files:
|
|
260
350
|
- README.md
|
261
351
|
- lib/carrierwave.rb
|
262
352
|
- lib/carrierwave/compatibility/paperclip.rb
|
353
|
+
- lib/carrierwave/downloader/base.rb
|
354
|
+
- lib/carrierwave/downloader/remote_file.rb
|
263
355
|
- lib/carrierwave/error.rb
|
264
356
|
- lib/carrierwave/locale/en.yml
|
265
357
|
- lib/carrierwave/mount.rb
|
@@ -268,6 +360,7 @@ files:
|
|
268
360
|
- lib/carrierwave/processing.rb
|
269
361
|
- lib/carrierwave/processing/mini_magick.rb
|
270
362
|
- lib/carrierwave/processing/rmagick.rb
|
363
|
+
- lib/carrierwave/processing/vips.rb
|
271
364
|
- lib/carrierwave/sanitized_file.rb
|
272
365
|
- lib/carrierwave/storage.rb
|
273
366
|
- lib/carrierwave/storage/abstract.rb
|
@@ -303,7 +396,7 @@ homepage: https://github.com/carrierwaveuploader/carrierwave
|
|
303
396
|
licenses:
|
304
397
|
- MIT
|
305
398
|
metadata: {}
|
306
|
-
post_install_message:
|
399
|
+
post_install_message:
|
307
400
|
rdoc_options:
|
308
401
|
- "--main"
|
309
402
|
require_paths:
|
@@ -312,16 +405,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
312
405
|
requirements:
|
313
406
|
- - ">="
|
314
407
|
- !ruby/object:Gem::Version
|
315
|
-
version: 2.
|
408
|
+
version: 2.2.2
|
316
409
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
317
410
|
requirements:
|
318
411
|
- - ">="
|
319
412
|
- !ruby/object:Gem::Version
|
320
413
|
version: '0'
|
321
414
|
requirements: []
|
322
|
-
|
323
|
-
|
324
|
-
signing_key:
|
415
|
+
rubygems_version: 3.3.7
|
416
|
+
signing_key:
|
325
417
|
specification_version: 4
|
326
418
|
summary: Ruby file upload library
|
327
419
|
test_files: []
|