dragonfly 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dragonfly might be problematic. Click here for more details.

Files changed (58) hide show
  1. data/Gemfile +1 -1
  2. data/History.md +32 -0
  3. data/README.md +54 -32
  4. data/VERSION +1 -1
  5. data/dragonfly.gemspec +23 -21
  6. data/extra_docs/Configuration.md +0 -8
  7. data/extra_docs/DataStorage.md +13 -5
  8. data/extra_docs/ExampleUseCases.md +4 -1
  9. data/extra_docs/Heroku.md +14 -6
  10. data/extra_docs/Models.md +5 -1
  11. data/extra_docs/Rails3.md +1 -1
  12. data/extra_docs/URLs.md +8 -1
  13. data/lib/dragonfly.rb +7 -8
  14. data/lib/dragonfly/active_model_extensions/attachment.rb +37 -17
  15. data/lib/dragonfly/active_model_extensions/attachment_class_methods.rb +1 -1
  16. data/lib/dragonfly/active_model_extensions/validations.rb +53 -26
  17. data/lib/dragonfly/analyser.rb +1 -1
  18. data/lib/dragonfly/app.rb +1 -1
  19. data/lib/dragonfly/config/heroku.rb +7 -0
  20. data/lib/dragonfly/configurable.rb +19 -20
  21. data/lib/dragonfly/data_storage/couch_data_store.rb +2 -3
  22. data/lib/dragonfly/data_storage/file_data_store.rb +2 -9
  23. data/lib/dragonfly/data_storage/mongo_data_store.rb +1 -1
  24. data/lib/dragonfly/data_storage/s3data_store.rb +17 -10
  25. data/lib/dragonfly/function_manager.rb +4 -8
  26. data/lib/dragonfly/has_filename.rb +24 -0
  27. data/lib/dragonfly/image_magick/analyser.rb +1 -1
  28. data/lib/dragonfly/image_magick/generator.rb +1 -1
  29. data/lib/dragonfly/image_magick/processor.rb +5 -0
  30. data/lib/dragonfly/image_magick/utils.rb +1 -2
  31. data/lib/dragonfly/job.rb +52 -71
  32. data/lib/dragonfly/railtie.rb +1 -1
  33. data/lib/dragonfly/temp_object.rb +32 -14
  34. data/lib/dragonfly/url_attributes.rb +30 -0
  35. data/lib/dragonfly/url_mapper.rb +2 -2
  36. data/samples/DSC02119.JPG +0 -0
  37. data/samples/a.jp2 +0 -0
  38. data/samples/beach.jpg +0 -0
  39. data/spec/dragonfly/active_model_extensions/model_spec.rb +63 -40
  40. data/spec/dragonfly/active_model_extensions/spec_helper.rb +4 -0
  41. data/spec/dragonfly/app_spec.rb +11 -3
  42. data/spec/dragonfly/configurable_spec.rb +38 -20
  43. data/spec/dragonfly/data_storage/file_data_store_spec.rb +24 -36
  44. data/spec/dragonfly/data_storage/s3_data_store_spec.rb +21 -5
  45. data/spec/dragonfly/data_storage/shared_data_store_examples.rb +2 -2
  46. data/spec/dragonfly/has_filename_spec.rb +88 -0
  47. data/spec/dragonfly/image_magick/analyser_spec.rb +10 -0
  48. data/spec/dragonfly/image_magick/processor_spec.rb +11 -0
  49. data/spec/dragonfly/job_spec.rb +173 -167
  50. data/spec/dragonfly/temp_object_spec.rb +82 -10
  51. data/spec/dragonfly/url_attributes.rb +47 -0
  52. data/spec/dragonfly/url_mapper_spec.rb +9 -1
  53. data/spec/functional/model_urls_spec.rb +36 -1
  54. metadata +179 -250
  55. data/lib/dragonfly/core_ext/string.rb +0 -9
  56. data/lib/dragonfly/core_ext/symbol.rb +0 -9
  57. data/spec/dragonfly/core_ext/string_spec.rb +0 -17
  58. data/spec/dragonfly/core_ext/symbol_spec.rb +0 -17
@@ -1,9 +0,0 @@
1
- class String
2
-
3
- # Ruby 1.8 reports methods as strings,
4
- # whereas 1.9 reports them as symbols
5
- def to_method_name
6
- RUBY_VERSION =~ /^1.8/ ? self : to_sym
7
- end
8
-
9
- end
@@ -1,9 +0,0 @@
1
- class Symbol
2
-
3
- # Ruby 1.8 reports methods as strings,
4
- # whereas 1.9 reports them as symbols
5
- def to_method_name
6
- RUBY_VERSION =~ /^1.8/ ? to_s : self
7
- end
8
-
9
- end
@@ -1,17 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe String do
4
-
5
- describe "to_method_name" do
6
- if RUBY_VERSION =~ /^1.8/
7
- it "should return a string" do
8
- 'hello'.to_method_name.should == 'hello'
9
- end
10
- else
11
- it "should return a symbol" do
12
- 'hello'.to_method_name.should == :hello
13
- end
14
- end
15
- end
16
-
17
- end
@@ -1,17 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Symbol do
4
-
5
- describe "to_method_name" do
6
- if RUBY_VERSION =~ /^1.8/
7
- it "should return a string" do
8
- :hello.to_method_name.should == 'hello'
9
- end
10
- else
11
- it "should return a symbol" do
12
- :hello.to_method_name.should == :hello
13
- end
14
- end
15
- end
16
-
17
- end