Permalink
Browse files

replace uuid with uuidtools

  • Loading branch information...
1 parent e575d88 commit 4858cf9058da1f3519b7058af2917c7d01a50cd1 @filiptepper filiptepper committed Mar 26, 2013
Showing with 4 additions and 5 deletions.
  1. +1 −1 carrierwave_direct.gemspec
  2. +1 −2 lib/carrierwave_direct.rb
  3. +2 −2 lib/carrierwave_direct/uploader.rb
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
s.rubyforge_project = "carrierwave_direct"
s.add_dependency "carrierwave"
- s.add_dependency "uuid"
+ s.add_dependency "uuidtools"
s.add_dependency "fog"
s.add_development_dependency "rspec"
@@ -3,10 +3,9 @@
require "carrierwave_direct/version"
require "carrierwave"
+require "uuidtools"
require "fog"
-autoload :UUID, "uuid"
-
module CarrierWaveDirect
autoload :Uploader, "carrierwave_direct/uploader"
@@ -31,7 +31,7 @@ def direct_fog_url(options = {})
end
def guid
- UUID.generate
+ UUIDTools::UUID.random_create
end
def key=(k)
@@ -61,7 +61,7 @@ def policy(options = {})
options[:expiration] ||= self.class.upload_expiration
options[:min_file_size] ||= self.class.min_file_size
options[:max_file_size] ||= self.class.max_file_size
-
+
conditions = [ ["starts-with", "$utf8", ""], ["starts-with", "$key", store_dir] ]
conditions << ["starts-with", "$Content-Type", ""] if self.class.will_include_content_type

0 comments on commit 4858cf9

Please sign in to comment.