s3cp 1.1.40 → 1.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +3 -0
- data/lib/s3cp/s3rm.rb +13 -0
- data/lib/s3cp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 547c783a85db260be45e507a599714debb2076d1
|
4
|
+
data.tar.gz: 1e1b8831f9d793eb7a456501bea6a67a1f786281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268f7df890f20eaef4c8dccecf66b3615179d97261f3c1a7c3031ec64e9bdac3e49a14d4b21b69993c28f9bfb85f71d555116a5421aa059663b0fa929535d7b6
|
7
|
+
data.tar.gz: 403dd0e3399e0fd06676fe1130ffd3d1f4e91b51b00381ed664dcc066ff03334fd0c445242bdcb921eaacf99e2be62ac3b517cc1bfe0e8f3f8903011465bea23
|
data/History.txt
CHANGED
data/lib/s3cp/s3rm.rb
CHANGED
@@ -25,6 +25,7 @@ options[:exclude_regex] = nil
|
|
25
25
|
options[:test] = false
|
26
26
|
options[:silent] = false
|
27
27
|
options[:fail_if_not_exist] = false
|
28
|
+
options[:batch_size] = 10000
|
28
29
|
|
29
30
|
op = OptionParser.new do |opts|
|
30
31
|
opts.banner = "s3rm [path]"
|
@@ -54,6 +55,10 @@ op = OptionParser.new do |opts|
|
|
54
55
|
options[:silent] = true
|
55
56
|
end
|
56
57
|
|
58
|
+
opts.on("--batch", "Delete batch size.") do |batch|
|
59
|
+
options[:batch_size] = batch.to_i
|
60
|
+
end
|
61
|
+
|
57
62
|
opts.on("--verbose", "Verbose mode") do
|
58
63
|
options[:verbose] = true
|
59
64
|
end
|
@@ -123,6 +128,14 @@ S3CP.standard_exception_handling(options) do
|
|
123
128
|
matching_keys << entry.key
|
124
129
|
puts key unless options[:silent] || options[:verbose]
|
125
130
|
end
|
131
|
+
|
132
|
+
if matching_keys.size > options[:batch_size]
|
133
|
+
if options[:verbose]
|
134
|
+
puts "Deleting batch..."
|
135
|
+
end
|
136
|
+
@s3.buckets[@bucket].objects.delete(matching_keys) unless options[:test]
|
137
|
+
matching_keys = []
|
138
|
+
end
|
126
139
|
end
|
127
140
|
|
128
141
|
if options[:fail_if_not_exist] && matching_keys.length == 0
|
data/lib/s3cp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3cp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Boisvert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: extensions
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: 1.3.6
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.0.14
|
194
|
+
rubygems_version: 2.0.14.1
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Amazon S3 tools to, e.g., list, copy, delete S3 files
|