s3cp 1.1.15 → 1.1.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 1.1.16 (2013-01-31)
2
+
3
+ * Fixed: s3ls paging (with > 1000 keys) was broken (bug introduced in s3cp 1.1.14)
4
+
1
5
  === 1.1.15 (2013-01-29)
2
6
 
3
7
  * Fixed: s3ls would raise undefined method '[]' for nil:NilClass if given
@@ -114,6 +114,7 @@ begin
114
114
  rows += 1
115
115
  keys += 1
116
116
  response = ''
117
+
117
118
  if options[:rows_per_page] && (rows % options[:rows_per_page] == 0)
118
119
  begin
119
120
  print "Continue? (Y/n) "
@@ -131,12 +132,14 @@ begin
131
132
  Struct.new("S3Entry", :key, :last_modified, :content_length)
132
133
 
133
134
  s3_options = Hash.new
135
+ s3_options[:bucket_name] = @bucket
136
+ s3_options[:prefix] = @key
134
137
  s3_options[:limit] = options[:max_keys] if options[:max_keys]
135
138
 
136
139
  stop = false
137
140
 
138
141
  begin
139
- response = @s3.client.list_objects(:bucket_name => @bucket, :prefix => @key)
142
+ response = @s3.client.list_objects(s3_options)
140
143
  response[:contents].each do |object|
141
144
  entry = Struct::S3Entry.new(object[:key], object[:last_modified], object[:size].to_i)
142
145
  stop = display.call(entry)
@@ -16,5 +16,5 @@
16
16
  # the License.
17
17
 
18
18
  module S3CP
19
- VERSION = "1.1.15"
19
+ VERSION = "1.1.16"
20
20
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3cp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 15
10
- version: 1.1.15
9
+ - 16
10
+ version: 1.1.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Boisvert
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-29 00:00:00 Z
18
+ date: 2013-01-31 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement