* Uses Paperclip's Tempfile instead of Ruby's in Thumbnail * Also includes a test for TempfileFactory to be sure it does not revert to similar behavior * In the tests, give the OS some wiggle room in the Tempfile name to ensure the error does not occur before we are ready for it. The wiggle room is needed because the randomized part of the name has a variable number of characters.
http://docs.travis-ci.com/user/workers/container-based-infrastructure/ With Container based CI, public projects can cache the results of bundle install
It's useless because there is the same conditional in https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/railtie.rb#L25, and if ActiveRecord is not defined, Glue will not run.
The container infrastructure (beta) has many advantages: * More memory * More CPU * builds start much faster. * builds run much faster (usually) However, `sudo` cannot be used when running in this environment (which is enabled with the `sudo: false` configuration.
… merging them
The reason behind this I'm trying to use StringioAdapter inside the mailer, and it fails because `length` used in one of the `mail` gem: https://github.com/mikel/mail/blob/master/lib/mail/message.rb#L1997 Also you can see that normally `size` has `length` alias, for example in a `StringIO` class: http://ruby-doc.org/stdlib-1.9.3/libdoc/stringio/rdoc/StringIO.html#method-i-length Let me know, if this change requires test case, I will add it.
As referenced in #1739 Just because the `Rails` constant is defined, it doesn't mean we're actually in a Rails app. Since there are people who use Paperclip outside of Rails, and there's no reason we shouldn't be able to run in those situations. This commit checks for `Rails.env` instead of just checking for `Rails` and assuming `Rails.env` works.
This reverts commit 0680225.