pothoven-attachment_fu 3.3.1 → 3.3.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.
- checksums.yaml +8 -8
 - data/CHANGELOG +4 -0
 - data/lib/technoweenie/attachment_fu/processors/core_image_processor.rb +2 -2
 - data/lib/technoweenie/attachment_fu/processors/gd2_processor.rb +2 -2
 - data/lib/technoweenie/attachment_fu/processors/image_science_processor.rb +2 -2
 - data/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb +2 -2
 - data/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb +3 -3
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                NDU0NTdlZGU0ZTU0OTlkZjcwMjU2ZDA0ZjQxY2FhMDA5YTVlOWY1YQ==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                ZGU1ODRhMjQ2OWM3NDcxYTJkOWEzY2FlOTAyMzMzMDI0NThkYzgzYQ==
         
     | 
| 
       7 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                YTkxNDIwNGQzNzM2NWY3NzE5MDQ5ODA4MmVkNjdiZjRkYTU3OTM3NWJiMjA3
         
     | 
| 
      
 10 
     | 
    
         
            +
                ZjdhMTlhYTEyNmQ3YWJmZGE3Nzg5Y2E3OTVkMjczNTE0NWJjNDg5MDA5YmFi
         
     | 
| 
      
 11 
     | 
    
         
            +
                OTNiNjMxYjRlNjBiNmJkODRlYzY4YTQxMmM1NDczNTRlMjJiOTY=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                Yzg3MGNmN2JkYjI0MjA2ODdmMmViNDYwYjEzMDY4YjRjNjZjYmU4MTMxNjgz
         
     | 
| 
      
 14 
     | 
    
         
            +
                MzYwNTZmMWY0ZWVmYTVhYWUyZjg1OTMxNGY2NDJlY2FmNzQyZDVjZmY3NjY3
         
     | 
| 
      
 15 
     | 
    
         
            +
                YjQ1ODkyMTI0OWJlNGJkYTdmMjc0NDJkNjdjYTExNmE2MjY5NGI=
         
     | 
    
        data/CHANGELOG
    CHANGED
    
    | 
         @@ -1,3 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            * Oct 19, 2017 *
         
     | 
| 
      
 2 
     | 
    
         
            +
            * Pull in changes from michaelsauter to replace Fixnum with Integer as Fixnum was depricated in Ruby 2.4
         
     | 
| 
      
 3 
     | 
    
         
            +
            * Bump version to 3.3.2 *
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
       1 
5 
     | 
    
         
             
            * Oct 18, 2017 *
         
     | 
| 
       2 
6 
     | 
    
         
             
            * Pull in changes from michaelsauter to replace alias_method_chain with alias_method for Rails 5 support *
         
     | 
| 
       3 
7 
     | 
    
         
             
            * Update michaelsauter's alias_method changes to work in older Rails *
         
     | 
| 
         @@ -32,8 +32,8 @@ module Technoweenie # :nodoc: 
     | 
|
| 
       32 
32 
     | 
    
         
             
                      def resize_image(img, size)
         
     | 
| 
       33 
33 
     | 
    
         
             
                        processor = ::RedArtisan::CoreImage::Processor.new(img)
         
     | 
| 
       34 
34 
     | 
    
         
             
                        size = size.first if size.is_a?(Array) && size.length == 1
         
     | 
| 
       35 
     | 
    
         
            -
                        if size.is_a?( 
     | 
| 
       36 
     | 
    
         
            -
                          if size.is_a?( 
     | 
| 
      
 35 
     | 
    
         
            +
                        if size.is_a?(Integer) || (size.is_a?(Array) && size.first.is_a?(Integer))
         
     | 
| 
      
 36 
     | 
    
         
            +
                          if size.is_a?(Integer)
         
     | 
| 
       37 
37 
     | 
    
         
             
                            processor.fit(size)
         
     | 
| 
       38 
38 
     | 
    
         
             
                          else
         
     | 
| 
       39 
39 
     | 
    
         
             
                            processor.resize(size[0], size[1])
         
     | 
| 
         @@ -32,8 +32,8 @@ module Technoweenie # :nodoc: 
     | 
|
| 
       32 
32 
     | 
    
         
             
                      # Performs the actual resizing operation for a thumbnail
         
     | 
| 
       33 
33 
     | 
    
         
             
                      def resize_image(img, size)
         
     | 
| 
       34 
34 
     | 
    
         
             
                        size = size.first if size.is_a?(Array) && size.length == 1
         
     | 
| 
       35 
     | 
    
         
            -
                        if size.is_a?( 
     | 
| 
       36 
     | 
    
         
            -
                          if size.is_a?( 
     | 
| 
      
 35 
     | 
    
         
            +
                        if size.is_a?(Integer) || (size.is_a?(Array) && size.first.is_a?(Integer))
         
     | 
| 
      
 36 
     | 
    
         
            +
                          if size.is_a?(Integer)
         
     | 
| 
       37 
37 
     | 
    
         
             
                            # Borrowed from image science's #thumbnail method and adapted 
         
     | 
| 
       38 
38 
     | 
    
         
             
                            # for this.
         
     | 
| 
       39 
39 
     | 
    
         
             
                            scale = size.to_f / (img.width > img.height ? img.width.to_f : img.height.to_f)
         
     | 
| 
         @@ -53,8 +53,8 @@ module Technoweenie # :nodoc: 
     | 
|
| 
       53 
53 
     | 
    
         
             
                        end
         
     | 
| 
       54 
54 
     | 
    
         | 
| 
       55 
55 
     | 
    
         
             
                        size = size.first if size.is_a?(Array) && size.length == 1
         
     | 
| 
       56 
     | 
    
         
            -
                        if size.is_a?( 
     | 
| 
       57 
     | 
    
         
            -
                          if size.is_a?( 
     | 
| 
      
 56 
     | 
    
         
            +
                        if size.is_a?(Integer) || (size.is_a?(Array) && size.first.is_a?(Integer))
         
     | 
| 
      
 57 
     | 
    
         
            +
                          if size.is_a?(Integer)
         
     | 
| 
       58 
58 
     | 
    
         
             
                            img.thumbnail(size, &grab_dimensions)
         
     | 
| 
       59 
59 
     | 
    
         
             
                          else
         
     | 
| 
       60 
60 
     | 
    
         
             
                            img.resize(size[0], size[1], &grab_dimensions)
         
     | 
| 
         @@ -49,8 +49,8 @@ module Technoweenie # :nodoc: 
     | 
|
| 
       49 
49 
     | 
    
         
             
                          img.format('PNG')
         
     | 
| 
       50 
50 
     | 
    
         
             
                        end
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
                        if size.is_a?( 
     | 
| 
       53 
     | 
    
         
            -
                          if size.is_a?( 
     | 
| 
      
 52 
     | 
    
         
            +
                        if size.is_a?(Integer) || (size.is_a?(Array) && size.first.is_a?(Integer))
         
     | 
| 
      
 53 
     | 
    
         
            +
                          if size.is_a?(Integer)
         
     | 
| 
       54 
54 
     | 
    
         
             
                            size = [size, size]
         
     | 
| 
       55 
55 
     | 
    
         
             
                            commands.resize(size.join('x'))
         
     | 
| 
       56 
56 
     | 
    
         
             
                          else
         
     | 
| 
         @@ -48,9 +48,9 @@ module Technoweenie # :nodoc: 
     | 
|
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
                    # Performs the actual resizing operation for a thumbnail
         
     | 
| 
       50 
50 
     | 
    
         
             
                    def resize_image(img, size)
         
     | 
| 
       51 
     | 
    
         
            -
                      size = size.first if size.is_a?(Array) && size.length == 1 && !size.first.is_a?( 
     | 
| 
       52 
     | 
    
         
            -
                      if size.is_a?( 
     | 
| 
       53 
     | 
    
         
            -
                        size = [size, size] if size.is_a?( 
     | 
| 
      
 51 
     | 
    
         
            +
                      size = size.first if size.is_a?(Array) && size.length == 1 && !size.first.is_a?(Integer)
         
     | 
| 
      
 52 
     | 
    
         
            +
                      if size.is_a?(Integer) || (size.is_a?(Array) && size.first.is_a?(Integer))
         
     | 
| 
      
 53 
     | 
    
         
            +
                        size = [size, size] if size.is_a?(Integer)
         
     | 
| 
       54 
54 
     | 
    
         
             
                        img.thumbnail!(*size)
         
     | 
| 
       55 
55 
     | 
    
         
             
                      elsif size.is_a?(String) && size =~ /^c.*$/ # Image cropping - example geometry string: c75x75
         
     | 
| 
       56 
56 
     | 
    
         
             
                        dimensions = size[1..size.size].split("x")
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pothoven-attachment_fu
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 3.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 3.3.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Rick Olson
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2017-10- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2017-10-19 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       14 
14 
     | 
    
         
             
            description: This is a fork of Rick Olson's attachment_fu adding Ruby 1.9 and Rails
         
     | 
| 
       15 
15 
     | 
    
         
             
              3.2 and Rails 4 support as well as some other enhancements.
         
     |