s3utils 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -34,7 +34,7 @@ Proxy Settings
34
34
  ------------
35
35
 
36
36
  If you are behind a proxy, set the environment variable:
37
- HTTPS_PROXY_='https://user:password@my.proxy:443/'
37
+ HTTPS_PROXY='https://user:password@my.proxy:443/'
38
38
 
39
39
  Commands available after install
40
40
  ----------------------------
@@ -32,9 +32,16 @@ module S3Utils
32
32
  end
33
33
  end
34
34
 
35
- desc "deletebucket name", "deletes a bucket, if it is empty"
35
+ desc "deletebucket name [--force] ", "deletes a bucket, if it is empty or recursively with --force"
36
+ method_options :force => false
36
37
  def deletebucket(name)
37
38
  with_error_handling do
39
+ if options.force?
40
+ objects = s3.buckets[name].objects
41
+ objects.each do |o|
42
+ o.delete
43
+ end
44
+ end
38
45
  s3.buckets[name].delete
39
46
  end
40
47
  end
@@ -1,3 +1,3 @@
1
1
  module S3Utils
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3utils
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jasmeet Chhabra
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-08-07 00:00:00 Z
18
+ date: 2012-08-21 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: aws-sdk