1. 28 Apr, 2016 1 commit
    • Bugfix for when file is not present on cloud · 511f3bc9
      Currently paperclip fails with `NoMethodError` on `nil` when file is not
      present. Since `nil` is proper response from fog on missing files, and
      this method already returns `false` if any error happen (see line 178),
      returning `false` here would be properly handled on client code.
      
      [closes #2173]
      Mark Guk committed
  2. 12 Apr, 2016 1 commit
  3. 30 Mar, 2016 1 commit
    • Respect dynamic fog directory option · 84a5d41c
      `Paperclip::Storage::Fog#host_name_for_directory` assumes a String-like
      object is set and doesn't check if `@options[:fog_directory]` is
      callable, while `Paperclip::Storage::Fog#directory` does. This extracts
      a new method with the condition and refactors the other two methods to
      call it.
      
      Fixes #2018, #2093.
      Thomas Ingram committed
  4. 24 Mar, 2016 3 commits
  5. 23 Mar, 2016 6 commits
  6. 26 Jan, 2016 1 commit
  7. 15 Jan, 2016 1 commit
    • Skip calculating fingerprint when it is not used · 53a386c5
      The MD5 sum of an attachment is only necessary if the model has a corresponding
      _fingerprint column. If this column is absent, there is no need to calculate the
      MD5, which can be an expensive operation for large files.
      
      Accomplish this by deferring the fingerprint calculation using a block. If the
      _fingerprint column is absent, the block is never called, and the calculation
      is avoided.
      Matt Brictson committed
  8. 17 Nov, 2015 1 commit
  9. 16 Nov, 2015 1 commit
  10. 15 Nov, 2015 3 commits
  11. 23 Oct, 2015 1 commit
  12. 11 Sep, 2015 1 commit
    • Make specs run faster · 11090027
        $ rspec spec/paperclip/integration_spec.rb --profile 1
        Testing against version 4.1.7
        ..................................
      
        Finished in 15.19 seconds (files took 0.60155 seconds to load)
        34 examples, 0 failures
      
        Top 1 slowest examples (9.54 seconds, 62.8% of total time):
          Paperclip Many models at once does not exceed the open file limit
            9.54 seconds ./spec/paperclip/integration_spec.rb:18
      
      to
      
        $ rspec spec/paperclip/integration_spec.rb --profile 1
        Testing against version 4.1.7
        ..................................
      
        Finished in 10.95 seconds (files took 0.59585 seconds to load)
        34 examples, 0 failures
      
        Top 1 slowest examples (5.33 seconds, 48.7% of total time):
          Paperclip Many models at once does not exceed the open file limit
            5.33 seconds ./spec/paperclip/integration_spec.rb:18
      
      Updates gemfiles to Ruby 2 hash syntax.
      
      [closes #1700]
      soramugi committed
  13. 27 Aug, 2015 3 commits
  14. 20 Aug, 2015 5 commits
  15. 31 Jul, 2015 1 commit
  16. 29 Jul, 2015 1 commit
    • Address spec deprecation warnings and failures · c783b1fc
      * update aruba methods for in_current_dir and check_file_presence
      * switch rspec syntax from should to expect
      * configure raise_in_transactional_callbacks if AR >= 4.2
      * remove paperclip itself from Appraisal
      This also updates Travis to use the default bundler (to enable caching) and to build primary rubies first
      Dave Gynn committed
  17. 26 Jun, 2015 1 commit
  18. 19 Jun, 2015 3 commits
  19. 17 Jun, 2015 1 commit
  20. 05 Jun, 2015 2 commits
    • Fixes failing tests · 2e540f89
      Jon Yurek committed
    • Fix a possible security issue with spoofing · 9aee4112
      Thanks to MORI Shingo of DeNA Co., Ltd. for reporting this.
      
      There is an issue where if an HTML file is uploaded with a .html
      extension, but the content type is listed as being `image/jpeg`, this
      will bypass a validation checking for images. But it will also pass the
      spoof check, because a file named .html and containing actual HTML
      passes the spoof check.
      
      This change makes it so that we also check the supplied content type. So
      even if the file contains HTML and ends with .html, it doesn't match the
      content type of `image/jpeg` and so it fails.
      Jon Yurek committed
  21. 15 May, 2015 2 commits