Bump carrierwave
This commit is contained in:
parent
17b51beeda
commit
31e85f32ac
6 changed files with 14 additions and 19 deletions
2
Gemfile
2
Gemfile
|
|
@ -73,8 +73,8 @@ gem "activerecord-import", "0.19.1"
|
|||
|
||||
# File uploading
|
||||
|
||||
gem "carrierwave", "1.1.0"
|
||||
gem "fog-aws", "1.4.0"
|
||||
gem "carrierwave", "0.11.2"
|
||||
gem "mini_magick", "4.6.1"
|
||||
|
||||
# GUID generation
|
||||
|
|
|
|||
11
Gemfile.lock
11
Gemfile.lock
|
|
@ -74,12 +74,10 @@ GEM
|
|||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
carrierwave (0.11.2)
|
||||
activemodel (>= 3.2.0)
|
||||
activesupport (>= 3.2.0)
|
||||
json (>= 1.7)
|
||||
carrierwave (1.1.0)
|
||||
activemodel (>= 4.0.0)
|
||||
activesupport (>= 4.0.0)
|
||||
mime-types (>= 1.16)
|
||||
mimemagic (>= 0.3.0)
|
||||
celluloid (0.17.3)
|
||||
celluloid-essentials
|
||||
celluloid-extras
|
||||
|
|
@ -367,7 +365,6 @@ GEM
|
|||
mime-types (3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mimemagic (0.3.2)
|
||||
mini_magick (4.6.1)
|
||||
mini_portile2 (2.1.0)
|
||||
minitest (5.10.2)
|
||||
|
|
@ -768,7 +765,7 @@ DEPENDENCIES
|
|||
bootstrap-sass (= 3.3.7)
|
||||
bootstrap-switch-rails (= 3.3.3)
|
||||
capybara (= 2.12.1)
|
||||
carrierwave (= 0.11.2)
|
||||
carrierwave (= 1.1.0)
|
||||
compass-rails (= 3.0.2)
|
||||
configurate (= 0.3.1)
|
||||
coveralls
|
||||
|
|
|
|||
|
|
@ -3,17 +3,15 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
class ExportedUser < SecureUploader
|
||||
|
||||
def store_dir
|
||||
"uploads/users"
|
||||
end
|
||||
|
||||
def extension_white_list
|
||||
%w(gz)
|
||||
def extension_whitelist
|
||||
%w[gz]
|
||||
end
|
||||
|
||||
def filename
|
||||
"#{model.username}_diaspora_data_#{secure_token}.json.gz"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ class ProcessedImage < CarrierWave::Uploader::Base
|
|||
"uploads/images"
|
||||
end
|
||||
|
||||
def extension_white_list
|
||||
%w(jpg jpeg png gif tiff)
|
||||
def extension_whitelist
|
||||
%w[jpg jpeg png gif tiff]
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class UnprocessedImage < CarrierWave::Uploader::Base
|
|||
include CarrierWave::MiniMagick
|
||||
|
||||
attr_accessor :strip_exif
|
||||
|
||||
|
||||
def strip_exif
|
||||
@strip_exif || false
|
||||
end
|
||||
|
|
@ -15,8 +15,8 @@ class UnprocessedImage < CarrierWave::Uploader::Base
|
|||
"uploads/images"
|
||||
end
|
||||
|
||||
def extension_white_list
|
||||
%w(jpg jpeg png gif)
|
||||
def extension_whitelist
|
||||
%w[jpg jpeg png gif]
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
@ -38,7 +38,7 @@ class UnprocessedImage < CarrierWave::Uploader::Base
|
|||
version :thumb_medium
|
||||
version :thumb_large
|
||||
version :scaled_full do
|
||||
process :get_version_dimensions
|
||||
process :get_version_dimensions
|
||||
end
|
||||
|
||||
def get_version_dimensions
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ describe Photo, :type => :model do
|
|||
file = File.open(@fail_fixture_name)
|
||||
expect {
|
||||
@photo.unprocessed_image.store! file
|
||||
}.to raise_error CarrierWave::IntegrityError, 'You are not allowed to upload "xml" files, allowed types: jpg, jpeg, png, gif'
|
||||
}.to raise_error CarrierWave::IntegrityError
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue