lol_multiple_uploads 1.1.0 → 1.2.0
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
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: be43464ed84f46376608ea92438a36c4f60eaaf7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4a68d09867075e752f8a5a96904ffb5672a7c917
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f1fc7db3df09cbe037ea62bec41fe7acf353765fa2465a2c1b4b60022655d5e2da271f52f90b1389c0449abf5d8d2bf990eda2b9896d4369fc3c0227b61543a7
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 18fddfdf455a1cd03a2952bc811cd06a066a945c66ddc65b8dbc35b3b0145cb439d38b7a46c2653093c08fd0b4a31f7c18164358a7de647d4de44d42684fdcb0
         
     | 
    
        data/app/helpers/image_helper.rb
    CHANGED
    
    | 
         @@ -1,8 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module ImageHelper 
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
              def list_photos(resource)
         
     | 
| 
      
 3 
     | 
    
         
            +
              def list_photos(resource, photo_version=:gallery_thumb)
         
     | 
| 
       4 
4 
     | 
    
         
             
                content_tag(:div, class: 'lol-multiple-uploads images-container is-sortable', 'data-resource' => 'photo', 'data-has-caption' => resource.class.caption_status) do
         
     | 
| 
       5 
     | 
    
         
            -
                  render partial: '/layouts/lol_multiple_uploads/photo', collection: resource.photos.prioritized
         
     | 
| 
      
 5 
     | 
    
         
            +
                  render partial: '/layouts/lol_multiple_uploads/photo', collection: resource.photos.prioritized, locals: {photo_version: photo_version}
         
     | 
| 
       6 
6 
     | 
    
         
             
                end
         
     | 
| 
       7 
7 
     | 
    
         
             
              end
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
         @@ -1,8 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # encoding: utf-8
         
     | 
| 
       2 
2 
     | 
    
         
             
            class ImageUploader < CarrierWave::Uploader::Base
         
     | 
| 
      
 3 
     | 
    
         
            +
              include CarrierWave::RMagick
         
     | 
| 
       3 
4 
     | 
    
         | 
| 
       4 
5 
     | 
    
         
             
              # Include RMagick or MiniMagick support:
         
     | 
| 
       5 
     | 
    
         
            -
              # include CarrierWave::RMagick
         
     | 
| 
       6 
6 
     | 
    
         
             
              # include CarrierWave::MiniMagick
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
              # Choose what kind of storage to use for this uploader:
         
     | 
| 
         @@ -20,6 +20,10 @@ class ImageUploader < CarrierWave::Uploader::Base 
     | 
|
| 
       20 
20 
     | 
    
         
             
                "/assets/fallback/no-image.jpg"
         
     | 
| 
       21 
21 
     | 
    
         
             
              end
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
      
 23 
     | 
    
         
            +
              version :gallery_thumb do
         
     | 
| 
      
 24 
     | 
    
         
            +
                process :resize_to_fill => [120, 120]
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
       23 
27 
     | 
    
         
             
              # Process files as they are uploaded:
         
     | 
| 
       24 
28 
     | 
    
         
             
              # process :scale => [200, 300]
         
     | 
| 
       25 
29 
     | 
    
         
             
              #
         
     | 
| 
         @@ -1,5 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <figure data-id="<%= photo.id %>">
         
     | 
| 
       2 
     | 
    
         
            -
              <%= image_tag(photo.image.url)%>
         
     | 
| 
      
 2 
     | 
    
         
            +
              <%= image_tag(photo.image.send(photo_version).url)%>
         
     | 
| 
       3 
3 
     | 
    
         
             
              <%= link_to "Remover", remove_image_path(photo, format: 'json'), method: :delete %>
         
     | 
| 
       4 
4 
     | 
    
         
             
              <%= render partial: '/layouts/lol_multiple_uploads/photo-caption', locals: {photo: photo} if photo.has_caption? %>
         
     | 
| 
       5 
5 
     | 
    
         
             
            </figure>
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: lol_multiple_uploads
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.2.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Eduardo Zaghi
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2013- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2013-11-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -80,6 +80,20 @@ dependencies: 
     | 
|
| 
       80 
80 
     | 
    
         
             
                - - ~>
         
     | 
| 
       81 
81 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       82 
82 
     | 
    
         
             
                    version: 0.0.1
         
     | 
| 
      
 83 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 84 
     | 
    
         
            +
              name: rmagick
         
     | 
| 
      
 85 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 86 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 87 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 88 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: 2.13.2
         
     | 
| 
      
 90 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 91 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 93 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 94 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 96 
     | 
    
         
            +
                    version: 2.13.2
         
     | 
| 
       83 
97 
     | 
    
         
             
            description: You must create one account at https://www.inkfilepicker.com/ for use
         
     | 
| 
       84 
98 
     | 
    
         
             
              this gem
         
     | 
| 
       85 
99 
     | 
    
         
             
            email:
         
     |