carrierwave 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,6 +108,4 @@ elsif defined?(Sinatra)
108
108
 
109
109
  end
110
110
 
111
- require 'carrierwave/orm/datamapper' if defined?(DataMapper)
112
- require 'carrierwave/orm/sequel' if defined?(Sequel)
113
111
  require 'carrierwave/orm/mongoid' if defined?(Mongoid)
@@ -70,8 +70,16 @@ module CarrierWave
70
70
  #
71
71
  def delete_cache_id
72
72
  if @cache_id
73
- path = File.join(cache_dir, @cache_id)
74
- FileUtils.rm_rf(path) if File.exists?(path) && File.directory?(path)
73
+ path = File.expand_path(File.join(cache_dir, @cache_id), CarrierWave.root)
74
+ begin
75
+ Dir.rmdir(path)
76
+ rescue Errno::ENOENT
77
+ # Ignore: path does not exist
78
+ rescue Errno::ENOTDIR
79
+ # Ignore: path is not a dir
80
+ rescue Errno::ENOTEMPTY, Errno::EEXIST
81
+ # Ignore: dir is not empty
82
+ end
75
83
  end
76
84
  end
77
85
 
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'active_support/deprecation'
4
+
3
5
  module CarrierWave
4
6
  module Uploader
5
7
  module Versions
@@ -1,3 +1,3 @@
1
1
  module CarrierWave
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 5
10
- version: 0.5.5
9
+ - 6
10
+ version: 0.5.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonas Nicklas
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-09 00:00:00 -05:00
18
+ date: 2011-07-12 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency