lib/carrierwave/processing/rmagick.rb in carrierwave-0.2.1 vs lib/carrierwave/processing/rmagick.rb in carrierwave-0.2.3
- old
+ new
@@ -1,6 +1,10 @@
-require 'rmagick'
+begin
+ require 'rmagick'
+rescue LoadError
+ require 'RMagick'
+end
module CarrierWave
##
# This module simplifies manipulation with RMagick by providing a set
@@ -9,29 +13,26 @@
#
# require 'carrierwave/processing/rmagick'
#
# And then include it in your uploader:
#
- # class MyUploader
- # include CarrierWave::Uploader
+ # class MyUploader < CarrierWave::Uploader::Base
# include CarrierWave::RMagick
# end
#
# You can now use the provided helpers:
#
- # class MyUploader
- # include CarrierWave::Uploader
+ # class MyUploader < CarrierWave::Uploader::Base
# include CarrierWave::RMagick
#
# process :resize_to_fit => [200, 200]
# end
#
# Or create your own helpers with the powerful manipulate! method. Check
# out the RMagick docs at http://www.imagemagick.org/RMagick/doc/ for more
# info
#
- # class MyUploader
- # include CarrierWave::Uploader
+ # class MyUploader < CarrierWave::Uploader::Base
# include CarrierWave::RMagick
#
# process :do_stuff => 10.0
#
# def do_stuff(blur_factor)