Merge branch 'v2'
Update Gemspec and bump to v1.0.0.
We can't File.exist?(UploadedFile).
When trying to check if a ActionDispatch::Http::UploadedFile we need to
explicitly call #path on it to make it work.
Add a Gemfile for easy developer setup.
Rename README and add a note about testing.
Add spec for attachment without upload.
We now use a full path in test models.
Remove deprecated :order from associations.
Set polymorphic source for all attachments.
In the tests we need to set the polymorphic source for all attachments or Rails
will try to find the foreign key.
Fix tests for difference with Peck.
Peck has some assertions which work a little bit different from test/spec so we
need to make some changes here and there.
Only try upload when there is an original file.
When someone tries to create assets without an upload we don't want it to
Don't memoize filename methods.
It's not a slow operation and can only make problems in the future.
Don't assume test/unit in the test helper.
Add support for instrumentation.
Adds an instrument for attachement_san.process_variant and .process_original.
This allows you to catch these events and log them in your Rails app if wanted.
Don't use #class_method for attachment options.
For some reason defining the global attachment options as a class_variable mis-
behaves on Rails 4.1. Because the options are copied over to subclasses when
defining them anyway we use a regular class accessor.
Switch to Peck in test helper.
Fix the documentation task in the Rakefile.
Rename the test schema file.
Open files in binary mode
Add variant_reflections attributes to Variant
Use run_callbacks instead of calls to callback
Use define_callbacks and add (after|before)_upload
Use class_attribute instead of class_inheritable_accessor
Move lib/active_record/attachment_san to lib/attachment_san
Require 'rdoc/task instead of rake/rdoctask'
Remove Nap gem tasks
Some last cleanups. The README could stil do with some more text.
And more docs, hopefully the last for now...
Started writing docs…
Any options given to has_attachment(s) that matches MODEL_OPTIONS wil…
…l be merged on the attachment model subclasses's attachment_san_options.
Drops support for defining variants with an Array for now.
Damn, lost this during stashing. So _don't_ use classes outside the n…