- 28 Apr, 2016 1 commit
-
-
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
-
- 12 Apr, 2016 1 commit
-
-
Adds failing spec to command line dup check [fixes #1670] [fixes #2169]
Christophe Chong committed
-
- 30 Mar, 2016 1 commit
-
-
`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
-
- 24 Mar, 2016 3 commits
-
-
This configuration constant was useful for supporting different versions of AWS SDK. We don't any longer, and we can set the value directly. [fixes #2148]
Tute Costa committed -
We don't support AWS SDK v1 any longer.
Tute Costa committed -
Drops Rails 3 branches. [fixes #2101]
Lucas Caton committed
-
- 23 Mar, 2016 6 commits
-
-
Rails 3 is not supported anymore. We can safely remove mentions and snippets for it. Drop unused variable definition (`options`).
Tute Costa committed -
While working on this branch, Kito found that this test fails due to: https://github.com/rails/rails/commit/6ec8ba16d85d5feaccb993c9756c1edcbbf0ba13#diff-fdcf8b65b5fb954372c6fe1ddf284c78R76 We are not yet sure if it's a bug in paperclip or in Rails itself. With current `ActiveModel::Errors` implementation the following happens: ``` record.errors # => @messages = {} record.errors.include?(:foo) # => false record.errors # => @messages = { :foo => [] } ``` Which bit us in: https://github.com/thoughtbot/paperclip/blob/69f18375333234b6f395300266e2612936bd242e/lib/paperclip/validators/attachment_file_name_validator.rb#L23 Another related Rails commit: https://github.com/rails/rails/commit/b97035df64f5b2f912425c4a7fcb6e6bb3ddab8d I worked around the issue by changing what we assert in this spec. I am still not sure that this is a bug in current Rails master. cc @kitop for review
Tute Costa committed -
Ref: https://github.com/rails/rails/commit/481e49c64f790e46f4aff3ed539ed227d2eb46cb `silence_stream` was deprecated in Rails 4.2 and removed in Rails 5 because it was not thread safe. Paperclip is not running the tests in threaded mode, it's safe to add the method back in a test support module.
Esteban Pastorino committed -
`bundle exec rails -v` was taking seconds every time, making the test suite run very slow. This changes the code to compare the version against `ActiveRecord::VERSION`, which is going to be the same one as `rails -v`, making it much, much faster. Simplifies condition: we no longer support Rails < 4.2, so we test for `>= "5.0"` or fallback to `4.2` branch.
Esteban Pastorino committed -
- Also bump Travis Ruby 2.2.x version to 2.2.4
maclover7 committed -
We found that uploading large files to S3 would result in a socket error ("connection reset by peer") occasionally and lately much more consistently. In researching this I saw that many people got this error when uploading too large of a file without multipart chunking. I would have assumed fog did this automatically but the default chunk size may be too high. In order to address this I wanted to drop the chunk size to 100MB. Rather than hard-code this I opted to expose a `fog_option` configuration option that lets me pass any additional options I want to the fog's `#create` call. This is similar to the `fog_attributes` option implemented in CarrierWave which [addresses the same problem](http://stackoverflow.com/a/11867978/201911). We've been running this now for a week in production and it seems to resolve the issue. https://github.com/thoughtbot/paperclip/pull/2135
Jeremy Wadsack committed
-
- 26 Jan, 2016 1 commit
-
-
kevcha committed
-
- 15 Jan, 2016 1 commit
-
-
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
-
- 17 Nov, 2015 1 commit
-
-
Dave Gynn committed
-
- 16 Nov, 2015 1 commit
-
-
Dave Gynn committed
-
- 15 Nov, 2015 3 commits
-
-
Tim Kennedy committed
-
this commit primarily uses frozen strings to reduce object creation during interpolation. the :basename method now uses File.basename(file, ".*") rather than a Regexp. basename may be called multiple times.
Dave Gynn committed -
by using the attachment name (symbol) and Class as keys we reduce the number of Strings created before hitting the cache
Dave Gynn committed
-
- 23 Oct, 2015 1 commit
-
-
* Regression fix * Add specs for intermediate_files var in Paperclip::Attachment [fixes #1908]
Tieg Zaharia committed
-
- 11 Sep, 2015 1 commit
-
-
$ 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
-
- 27 Aug, 2015 3 commits
-
-
Arjun Anand committed
-
Arjun Anand committed
-
Stefano B committed
-
- 20 Aug, 2015 5 commits
-
-
David Chen committed
-
David Chen committed
-
Isaac Betesh committed
-
Both v1 and v2 of the AWS Ruby SDK accept the string literal AES256, no need to differentiate. (thank you, @trevorrowe)
Isaac Betesh committed -
Isaac Betesh committed
-
- 31 Jul, 2015 1 commit
-
-
According to the ImageMagick documentation the '@' flag is a special case that can be used in conjunction with '>' to prevent IM from scaling an image up. The '<' flag is ignored when using '@'. http://www.imagemagick.org/Usage/resize/#pixel This fixes the issue I reported in #1851
Adam Lassek committed
-
- 29 Jul, 2015 1 commit
-
-
* 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
-
- 26 Jun, 2015 1 commit
-
-
It should never be the case that `url` returns `nil`. If there is no url that can be reasonable achieved, as is the case when the record the attachment is attached to is unpersisted, then `url` should return the default url.
Jon Yurek committed
-
- 19 Jun, 2015 3 commits
- 17 Jun, 2015 1 commit
-
-
Jon Yurek committed
-
- 05 Jun, 2015 2 commits
-
-
Jon Yurek committed
-
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
-
- 15 May, 2015 2 commits
-
-
consistent with public URLs, this also changes the default behavior for expiring URLs to use the https scheme rather than http.
Brian John committed -
Jon Yurek committed
-