carrierwave_gallery 0.0.1 → 0.0.2

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: bf833d3347259d11afea9c49d94ccc01bd598efb
4
- data.tar.gz: 216fa340f57f360a6b0975ee850d29f5823c3fc2
3
+ metadata.gz: 659c4daef7fbac3e5e6abc07c1028967cb620113
4
+ data.tar.gz: f366451e4a34b512645cac9dbc37a594a5e3347d
5
5
  SHA512:
6
- metadata.gz: 0be9adc7b469280987ac4d589af16772d62d04cd27e3541fcdf1824daee4007cc3040b4f23c9425090363a6ef6a524ca8e4fbb3be08a892ff1bb7dba25b5ef78
7
- data.tar.gz: 5e69083c0dae22a38ea6d85da382d18a573194a905813c5b744a99e31c718132beb269f5f836b7bffd8cab61a19ffd25f4abcc6caf0188bad626a199940dea90
6
+ metadata.gz: 4ba4ea4116e757f1bd88bc8d4deebaf5aa2676163b47078f0139ce89e89708f8abeef42f9fcfda5a6c995c816459664d1f7dee5b8b16e0efb0287b03a043fcc5
7
+ data.tar.gz: d512490925af91acea933d3f478c701d4593882c94a06dcb637220049b6864f4338a8d7c956c4f2e6b25f284c91e3d24d2fadde762524c27a034ecaccf4920e9
@@ -1,56 +1,22 @@
1
- # encoding: utf-8
2
-
3
1
  class ImageUploader < CarrierWave::Uploader::Base
4
- # Include RMagick or MiniMagick support:
5
2
  include CarrierWave::RMagick
6
- # include CarrierWave::MiniMagick
7
3
 
8
- # Choose what kind of storage to use for this uploader:
9
4
  storage :file
10
- # storage :fog
11
5
 
12
- # Override the directory where uploaded files will be stored.
13
- # This is a sensible default for uploaders that are meant to be mounted:
14
6
  def store_dir
15
7
  "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
16
8
  end
17
9
 
18
- # Provide a default URL as a default if there hasn't been a file uploaded:
19
- # def default_url
20
- # # For Rails 3.1+ asset pipeline compatibility:
21
- # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
22
- #
23
- # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
24
- # end
25
-
26
- # Process files as they are uploaded:
27
- # process :scale => [200, 300]
28
- #
29
- # def scale(width, height)
30
- # # do something
31
- # end
32
-
33
- #process :resize_to_fill => [800, 800]
10
+ version :medium do
11
+ process :resize_to_fit => [800, 800]
12
+ end
34
13
 
35
- # Create different versions of your uploaded files:
36
14
  version :thumb do
37
15
  process :resize_to_fill => [160, 160]
38
16
  end
39
17
 
40
- version :medium do
41
- process :resize_to_fill => [800, 800]
18
+ def extension_white_list
19
+ %w(jpg jpeg gif png)
42
20
  end
43
-
44
- # Add a white list of extensions which are allowed to be uploaded.
45
- # For images you might use something like this:
46
- # def extension_white_list
47
- # %w(jpg jpeg gif png)
48
- # end
49
-
50
- # Override the filename of the uploaded files:
51
- # Avoid using model.id or version_name here, see uploader/store.rb for details.
52
- # def filename
53
- # "something.jpg" if original_filename
54
- # end
55
-
56
21
  end
22
+
@@ -1,3 +1,3 @@
1
1
  module CarrierwaveGallery
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave_gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tab