Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only require fog if it's available (needed after removing autoload), …

…closes #912
  • Loading branch information...
commit abb88f1dcb860d26f6bca45bf3d6dae568a094f9 1 parent 1c38f96
@bensie bensie authored
Showing with 8 additions and 6 deletions.
  1. +7 −1 lib/carrierwave/storage.rb
  2. +1 −5 lib/carrierwave/storage/fog.rb
View
8 lib/carrierwave/storage.rb
@@ -1,3 +1,9 @@
require "carrierwave/storage/abstract"
require "carrierwave/storage/file"
-require "carrierwave/storage/fog"
+
+begin
+ require "fog"
+rescue LoadError
+end
+
+require "carrierwave/storage/fog" if defined?(Fog)
View
6 lib/carrierwave/storage/fog.rb
@@ -1,10 +1,6 @@
# encoding: utf-8
-begin
- require 'fog'
-rescue LoadError
- raise "You don't have the 'fog' gem installed"
-end
+require "fog"
module CarrierWave
module Storage
Please sign in to comment.
Something went wrong with that request. Please try again.