cprobert-s3sync 1.3.7 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.rdoc +3 -0
- data/VERSION +1 -1
- data/bin/s3cmd +18 -9
- data/bin/s3sync +4 -4
- data/cprobert-s3sync.gemspec +50 -0
- data/lib/s3sync/S3encoder.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGRlOTNhOTIwYWE4YmEzODhiNzU1ZDczYjNlZGFiMGJkMDViNDkzNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjU5NzJiZDVjNWRjZWFlMjcxNWEzNzExNTdhM2Q2ZTBkMmMzODRmZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTRjZTA2OGJjYmFiNDNlOTgzMWQzYWQyMzI4NDY0YjA3NzJkM2JlOTRhODUw
|
10
|
+
ZDEwM2M2N2VjMjc1OWQ1NmQ1NWZmZTUyMWVkYmJlOWVkMWQ4OTVjMjE0ZTA0
|
11
|
+
NzNmY2ZmOGYzMmZmZjY1ZjNiMWViNjQ5YmJiYzk3NDkzM2M1OTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWVlMTJjNWE4YzU4ODRiYzc5ZWZkZjVmZmQ5MTZlZDQ2ZjgxOWNiY2JkOGEw
|
14
|
+
MDc4NDNmNzFiYzZhODVmMzIzNmVkYTJhZjE0NWRlMGRmZDgyNzlkOTA0NDNm
|
15
|
+
OWNiZDJiOGE5NGVjMGZkMGU5ODJhNGIyNzE5YzFhMWEyZmU0Nzk=
|
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.9
|
data/bin/s3cmd
CHANGED
@@ -114,7 +114,8 @@ ENDUSAGE
|
|
114
114
|
res = s3cmdList(bucket, path, nil, nil, marker)
|
115
115
|
res.entries.each do |item|
|
116
116
|
# the s3 commands (with my modified UTF-8 conversion) expect native char encoding input
|
117
|
-
key = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
117
|
+
#key = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
118
|
+
key = item.key.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
118
119
|
$stderr.puts "delete #{bucket}:#{key} #{headers.inspect if headers}" if $S3syncOptions['--verbose']
|
119
120
|
S3try(:delete, bucket, key) unless $S3syncOptions['--dryrun']
|
120
121
|
end
|
@@ -122,7 +123,8 @@ ENDUSAGE
|
|
122
123
|
more = res.properties.is_truncated
|
123
124
|
marker = (res.properties.next_marker)? res.properties.next_marker : ((res.entries.length > 0) ? res.entries.last.key : nil)
|
124
125
|
# get this into local charset; when we pass it to s3 that is what's expected
|
125
|
-
marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
126
|
+
#marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
127
|
+
marker = marker.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "") if marker
|
126
128
|
end
|
127
129
|
|
128
130
|
when "list"
|
@@ -138,19 +140,22 @@ ENDUSAGE
|
|
138
140
|
res = s3cmdList(bucket, path, max, delim, marker, headers)
|
139
141
|
if delim
|
140
142
|
res.common_prefix_entries.each do |item|
|
141
|
-
puts "dir: " +
|
143
|
+
puts "dir: " + item.prefix.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
144
|
+
#puts "dir: " + Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.prefix).join
|
142
145
|
end
|
143
146
|
puts "--------------------"
|
144
147
|
end
|
145
148
|
res.entries.each do |item|
|
146
|
-
puts
|
149
|
+
puts item.key.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
150
|
+
#puts Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
147
151
|
end
|
148
152
|
if res.properties.is_truncated
|
149
153
|
printf "More? Y/n: "
|
150
154
|
more = (STDIN.gets.match('^[Yy]?$'))
|
151
155
|
marker = (res.properties.next_marker)? res.properties.next_marker : ((res.entries.length > 0) ? res.entries.last.key : nil)
|
152
156
|
# get this into local charset; when we pass it to s3 that is what's expected
|
153
|
-
marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
157
|
+
#marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
158
|
+
marker = marker.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "") if marker
|
154
159
|
else
|
155
160
|
more = false
|
156
161
|
end
|
@@ -264,7 +269,8 @@ ENDUSAGE
|
|
264
269
|
res = s3cmdList(bucket, path, nil, nil, marker)
|
265
270
|
res.entries.each do |item|
|
266
271
|
# the s3 commands (with my modified UTF-8 conversion) expect native char encoding input
|
267
|
-
path = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
272
|
+
#path = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
273
|
+
path = item.key.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
268
274
|
|
269
275
|
file = path.gsub(src_path, dest_key)
|
270
276
|
|
@@ -284,7 +290,8 @@ ENDUSAGE
|
|
284
290
|
more = res.properties.is_truncated
|
285
291
|
marker = (res.properties.next_marker)? res.properties.next_marker : ((res.entries.length > 0) ? res.entries.last.key : nil)
|
286
292
|
# get this into local charset; when we pass it to s3 that is what's expected
|
287
|
-
marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
293
|
+
#marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
294
|
+
marker = marker.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "") if marker
|
288
295
|
end
|
289
296
|
|
290
297
|
when "headers"
|
@@ -300,7 +307,8 @@ ENDUSAGE
|
|
300
307
|
res = s3cmdList(bucket, path, nil, nil, marker)
|
301
308
|
res.entries.each do |item|
|
302
309
|
# the s3 commands (with my modified UTF-8 conversion) expect native char encoding input
|
303
|
-
key = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
310
|
+
#key = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
311
|
+
key = item.key.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
304
312
|
|
305
313
|
tmpHeaders = headers.merge({
|
306
314
|
"x-amz-copy-source" => "/#{bucket}/#{URI.escape(key)}",
|
@@ -322,7 +330,8 @@ ENDUSAGE
|
|
322
330
|
more = res.properties.is_truncated
|
323
331
|
marker = (res.properties.next_marker)? res.properties.next_marker : ((res.entries.length > 0) ? res.entries.last.key : nil)
|
324
332
|
# get this into local charset; when we pass it to s3 that is what's expected
|
325
|
-
marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
333
|
+
#marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join if marker
|
334
|
+
marker = marker.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "") if marker
|
326
335
|
end
|
327
336
|
|
328
337
|
|
data/bin/s3sync
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
module S3sync
|
12
12
|
|
13
13
|
$S3SYNC_MIME_TYPES_FILE = (ENV["S3SYNC_MIME_TYPES_FILE"] or '/etc/mime.types')
|
14
|
-
$S3SYNC_VERSION = '1.3.
|
14
|
+
$S3SYNC_VERSION = '1.3.8'
|
15
15
|
|
16
16
|
# always look "here" for include files (thanks aktxyz)
|
17
17
|
$LOAD_PATH << File.join(File.expand_path(File.dirname(__FILE__)), "../lib/")
|
@@ -306,18 +306,18 @@ ENDUSAGE
|
|
306
306
|
items = tItems.collect do |item|
|
307
307
|
if item.respond_to?('key')
|
308
308
|
#key = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.key).join
|
309
|
-
key = item.key.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "
|
309
|
+
key = item.key.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
310
310
|
Node.new(key, item.size, item.etag, item.last_modified)
|
311
311
|
else
|
312
312
|
#Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", item.prefix).join
|
313
|
-
item.prefix.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "
|
313
|
+
item.prefix.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
314
314
|
end
|
315
315
|
end
|
316
316
|
nextPage = d.properties.is_truncated
|
317
317
|
marker = (d.properties.next_marker)? d.properties.next_marker : ((d.entries.length > 0)? d.entries.last.key : '')
|
318
318
|
# get this into native char set (because when we feed it back to s3 that's what it will expect)
|
319
319
|
#marker = Iconv.iconv($S3SYNC_NATIVE_CHARSET, "UTF-8", marker).join
|
320
|
-
marker = marker.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "
|
320
|
+
marker = marker.encode($S3SYNC_NATIVE_CHARSET, :invalid => :replace, :undef => :replace, :replace => "")
|
321
321
|
tItems = nil
|
322
322
|
d = nil # get rid of this before recursing; it's big
|
323
323
|
item = nil
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: cprobert-s3sync 1.3.9 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "cprobert-s3sync"
|
9
|
+
s.version = "1.3.9"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.authors = ["cprobert"]
|
13
|
+
s.date = "2013-10-25"
|
14
|
+
s.email = "cprobert@gmail.com"
|
15
|
+
s.executables = ["s3sync", "s3cmd"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"History.txt",
|
21
|
+
"Manifest.txt",
|
22
|
+
"PostInstall.txt",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"bin/s3cmd",
|
27
|
+
"bin/s3sync",
|
28
|
+
"cprobert-s3sync.gemspec",
|
29
|
+
"docs/README.txt",
|
30
|
+
"docs/README_s3cmd.txt",
|
31
|
+
"docs/s3config.yml.example",
|
32
|
+
"lib/s3sync.rb",
|
33
|
+
"lib/s3sync/HTTPStreaming.rb",
|
34
|
+
"lib/s3sync/S3.rb",
|
35
|
+
"lib/s3sync/S3_s3sync_mod.rb",
|
36
|
+
"lib/s3sync/S3encoder.rb",
|
37
|
+
"lib/s3sync/s3config.rb",
|
38
|
+
"lib/s3sync/s3try.rb",
|
39
|
+
"script/console",
|
40
|
+
"script/destroy",
|
41
|
+
"script/generate",
|
42
|
+
"test/test_helper.rb",
|
43
|
+
"test/test_s3sync.rb"
|
44
|
+
]
|
45
|
+
s.homepage = "http://s3sync.net"
|
46
|
+
s.require_paths = ["lib"]
|
47
|
+
s.rubygems_version = "2.1.10"
|
48
|
+
s.summary = "Fork of s3sync to be compatible with ruby 1.9.3"
|
49
|
+
end
|
50
|
+
|
data/lib/s3sync/S3encoder.rb
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
# to the underlying lib this stuff will need updating.
|
15
15
|
|
16
16
|
require 'cgi'
|
17
|
-
require 'iconv' # for UTF-8 conversion
|
17
|
+
##require 'iconv' # for UTF-8 conversion
|
18
18
|
|
19
19
|
# thanks to http://www.redhillconsulting.com.au/blogs/simon/archives/000326.html
|
20
20
|
module S3ExtendCGI
|
@@ -40,7 +40,7 @@ module S3ExtendCGI
|
|
40
40
|
def S3Extend_escape(string)
|
41
41
|
result = string
|
42
42
|
|
43
|
-
result = string.encode(@nativeCharacterEncoding, :invalid => :replace, :undef => :replace, :replace => "
|
43
|
+
result = string.encode(@nativeCharacterEncoding, :invalid => :replace, :undef => :replace, :replace => "") if @useUTF8InEscape
|
44
44
|
#result = Iconv.iconv("UTF-8", @nativeCharacterEncoding, string).join if @useUTF8InEscape
|
45
45
|
|
46
46
|
result = S3Extend_escape_orig(result)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cprobert-s3sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cprobert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: cprobert@gmail.com
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- VERSION
|
28
28
|
- bin/s3cmd
|
29
29
|
- bin/s3sync
|
30
|
+
- cprobert-s3sync.gemspec
|
30
31
|
- docs/README.txt
|
31
32
|
- docs/README_s3cmd.txt
|
32
33
|
- docs/s3config.yml.example
|
@@ -61,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
62
|
version: '0'
|
62
63
|
requirements: []
|
63
64
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.1.
|
65
|
+
rubygems_version: 2.1.10
|
65
66
|
signing_key:
|
66
67
|
specification_version: 4
|
67
68
|
summary: Fork of s3sync to be compatible with ruby 1.9.3
|