s3cp 1.1.0.pre.3 → 1.1.0
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.
- data/History.txt +8 -0
- data/lib/s3cp/s3ls.rb +11 -6
- data/lib/s3cp/s3up.rb +1 -0
- data/lib/s3cp/version.rb +1 -1
- metadata +3 -5
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 1.1.0 / (2012-08-22)
|
2
|
+
|
3
|
+
* First stable release using the aws-sdk gem. No changes from 1.1.0.pre.4.
|
4
|
+
|
5
|
+
=== 1.1.0.pre.4 / (2012-08-22)
|
6
|
+
|
7
|
+
* Fixed: s3dir was not correctly displaying directories
|
8
|
+
|
1
9
|
=== 1.1.0.pre.3 / (2012-08-22)
|
2
10
|
|
3
11
|
* Fixed: s3cp >5GB file uploads (Peter Tan)
|
data/lib/s3cp/s3ls.rb
CHANGED
@@ -90,10 +90,17 @@ end
|
|
90
90
|
|
91
91
|
keys = 0
|
92
92
|
rows = 0
|
93
|
+
directories = true
|
93
94
|
|
94
95
|
begin
|
95
96
|
display = lambda do |entry|
|
96
|
-
|
97
|
+
# add '---' separator line between directories and files
|
98
|
+
if options[:delimiter] && directories && entry.is_a?(AWS::S3::Tree::LeafNode)
|
99
|
+
directories = false
|
100
|
+
puts "---"
|
101
|
+
end
|
102
|
+
|
103
|
+
key = "s3://#{@bucket}/#{entry.respond_to?(:key) ? entry.key : entry.prefix}"
|
97
104
|
if options[:long_format] && entry.last_modified && entry.content_length
|
98
105
|
size = entry.content_length
|
99
106
|
size = S3CP.format_filesize(size, :unit => options[:unit], :precision => options[:precision])
|
@@ -104,21 +111,19 @@ begin
|
|
104
111
|
end
|
105
112
|
rows += 1
|
106
113
|
keys += 1
|
114
|
+
response = ''
|
107
115
|
if options[:rows_per_page] && (rows % options[:rows_per_page] == 0)
|
108
116
|
begin
|
109
117
|
print "Continue? (Y/n) "
|
110
118
|
response = STDIN.gets.chomp.downcase
|
111
119
|
end until response == 'n' || response == 'y' || response == ''
|
112
|
-
exit if response == 'n'
|
113
120
|
end
|
121
|
+
(response == 'n')
|
114
122
|
end
|
115
123
|
|
116
124
|
if options[:delimiter]
|
117
125
|
@s3.objects.with_prefix(@key).as_tree(:delimier => options[:delimiter], :append => false).children.each do |entry|
|
118
|
-
if entry
|
119
|
-
entry = @s3.objects[entry.key]
|
120
|
-
break if display.call(entry)
|
121
|
-
end
|
126
|
+
break if display.call(entry)
|
122
127
|
end
|
123
128
|
else
|
124
129
|
s3_options = Hash.new
|
data/lib/s3cp/s3up.rb
CHANGED
data/lib/s3cp/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3cp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
9
|
- 0
|
10
|
-
|
11
|
-
- 3
|
12
|
-
version: 1.1.0.pre.3
|
10
|
+
version: 1.1.0
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- Alex Boisvert
|