carrierwave 1.2.1 → 1.2.2
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.
Potentially problematic release.
This version of carrierwave might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +13 -5
- data/lib/carrierwave/processing/mini_magick.rb +1 -0
- data/lib/carrierwave/processing/rmagick.rb +1 -0
- data/lib/carrierwave/version.rb +1 -1
- data/lib/generators/templates/uploader.rb +0 -2
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 35c836a3a970d4f900cc30a3a601199a629a8554
         | 
| 4 | 
            +
              data.tar.gz: 22b99a337562f2be3c60731377de38b8a204d73f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f4602848d9c82f60537acb7e3cfaa0ca7bdffe0a0d737224b62400e52c52277109ee1090aa148755ba5ba84f11fa5cdd11bc4209c533cf5c1df7475feda2ad66
         | 
| 7 | 
            +
              data.tar.gz: 95e296300604fc0d41013302cd667d5713f56cb5faa64e5f2ff4d43708e04fdd59c1df6c55414848f526f5eb56618923de9d2a177fb5e2f49be62b383e95b085
         | 
    
        data/README.md
    CHANGED
    
    | @@ -301,8 +301,16 @@ end | |
| 301 301 | 
             
            ```
         | 
| 302 302 |  | 
| 303 303 | 
             
            When this uploader is used, an uploaded image would be scaled to be no larger
         | 
| 304 | 
            -
            than 800 by 800 pixels.  | 
| 305 | 
            -
             | 
| 304 | 
            +
            than 800 by 800 pixels. The original aspect ratio will be kept.
         | 
| 305 | 
            +
            A version called thumb is then created, which is scaled
         | 
| 306 | 
            +
            to exactly 200 by 200 pixels.
         | 
| 307 | 
            +
             | 
| 308 | 
            +
            If you would like to crop images to a specific height and width you
         | 
| 309 | 
            +
            can use the alternative option of '''resize_to_fill'''. It will make sure
         | 
| 310 | 
            +
            that the width and height specified are filled, only copping 
         | 
| 311 | 
            +
            if the aspect ratio requires it.
         | 
| 312 | 
            +
             | 
| 313 | 
            +
            The uploader could be used like this:
         | 
| 306 314 |  | 
| 307 315 | 
             
            ```ruby
         | 
| 308 316 | 
             
            uploader = AvatarUploader.new
         | 
| @@ -665,9 +673,9 @@ CarrierWave.configure do |config| | |
| 665 673 | 
             
                host:                  's3.example.com',             # optional, defaults to nil
         | 
| 666 674 | 
             
                endpoint:              'https://s3.example.com:8080' # optional, defaults to nil
         | 
| 667 675 | 
             
              }
         | 
| 668 | 
            -
              config.fog_directory  = 'name_of_directory' | 
| 669 | 
            -
              config.fog_public     = false | 
| 670 | 
            -
              config.fog_attributes = { cache_control: "public, max-age=#{365. | 
| 676 | 
            +
              config.fog_directory  = 'name_of_directory'                                   # required
         | 
| 677 | 
            +
              config.fog_public     = false                                                 # optional, defaults to true
         | 
| 678 | 
            +
              config.fog_attributes = { cache_control: "public, max-age=#{365.days.to_i}" } # optional, defaults to {}
         | 
| 671 679 | 
             
            end
         | 
| 672 680 | 
             
            ```
         | 
| 673 681 |  | 
| @@ -303,6 +303,7 @@ module CarrierWave | |
| 303 303 |  | 
| 304 304 | 
             
                    if @format
         | 
| 305 305 | 
             
                      move_to = current_path.chomp(File.extname(current_path)) + ".#{@format}"
         | 
| 306 | 
            +
                      file.content_type = ::MIME::Types.type_for(move_to).first.to_s
         | 
| 306 307 | 
             
                      file.move_to(move_to, permissions, directory_permissions)
         | 
| 307 308 | 
             
                    end
         | 
| 308 309 |  | 
| @@ -356,6 +356,7 @@ module CarrierWave | |
| 356 356 | 
             
                  if options[:format] || @format
         | 
| 357 357 | 
             
                    frames.write("#{options[:format] || @format}:#{current_path}", &write_block)
         | 
| 358 358 | 
             
                    move_to = current_path.chomp(File.extname(current_path)) + ".#{options[:format] || @format}"
         | 
| 359 | 
            +
                    file.content_type = ::MIME::Types.type_for(move_to).first.to_s
         | 
| 359 360 | 
             
                    file.move_to(move_to, permissions, directory_permissions)
         | 
| 360 361 | 
             
                  else
         | 
| 361 362 | 
             
                    frames.write(current_path, &write_block)
         | 
    
        data/lib/carrierwave/version.rb
    CHANGED
    
    
| @@ -1,5 +1,4 @@ | |
| 1 1 | 
             
            class <%= class_name %>Uploader < CarrierWave::Uploader::Base
         | 
| 2 | 
            -
             | 
| 3 2 | 
             
              # Include RMagick or MiniMagick support:
         | 
| 4 3 | 
             
              # include CarrierWave::RMagick
         | 
| 5 4 | 
             
              # include CarrierWave::MiniMagick
         | 
| @@ -45,5 +44,4 @@ class <%= class_name %>Uploader < CarrierWave::Uploader::Base | |
| 45 44 | 
             
              # def filename
         | 
| 46 45 | 
             
              #   "something.jpg" if original_filename
         | 
| 47 46 | 
             
              # end
         | 
| 48 | 
            -
             | 
| 49 47 | 
             
            end
         | 
    
        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: 1.2. | 
| 4 | 
            +
              version: 1.2.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jonas Nicklas
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2018-01-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activesupport
         |