right_aws 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -131,4 +131,14 @@ updates.
131
131
  r2922 | todd | 2008-03-03 15:26:42 -0800 (Mon, 03 Mar 2008) | 2 lines
132
132
  couple of documentation tweaks in prep for 1.6.0
133
133
 
134
+ == 1.6.1 2008-03-14
135
+ ------------------------------------------------------------------------
136
+ r2963 | todd | 2008-03-06 19:10:23 -0800 (Thu, 06 Mar 2008) | 3 lines
137
+
138
+ (#950) Many minor fixes in incrementally_list_bucket to prevent a death loop
139
+ in
140
+ certain rare conditions
141
+
142
+
143
+
134
144
 
data/lib/right_aws.rb CHANGED
@@ -52,7 +52,7 @@ module RightAws #:nodoc:
52
52
  module VERSION #:nodoc:
53
53
  MAJOR = 1
54
54
  MINOR = 6
55
- TINY = 0
55
+ TINY = 1
56
56
 
57
57
  STRING = [MAJOR, MINOR, TINY].join('.')
58
58
  end
@@ -284,14 +284,21 @@ module RightAws
284
284
  there_are_more_keys = response[:is_truncated]
285
285
  if(there_are_more_keys)
286
286
  if(response[:next_marker])
287
- internal_options[:marker] = response[:next_marker]
287
+ # Dup from response so that no one can mess with these values in the
288
+ # yield block
289
+ internal_options[:marker] = response[:next_marker].dup
288
290
  else
289
- internal_options[:marker] = response[:contents].last[:key]
291
+ if( response[:contents].last[:key] > response[:common_prefixes].last )
292
+ internal_options[:marker] = response[:contents].last[:key].dup
293
+ else
294
+ internal_options[:marker] = response[:common_prefixes].last.dup
295
+ end
290
296
  end
291
- internal_options[:'max-keys'] ? (internal_options[:'max-keys'] -= response[:contents].length) : nil
297
+ total_results = response[:contents].length + response[:common_prefixes].length
298
+ internal_options[:'max-keys'] ? (internal_options[:'max-keys'] -= total_results) : nil
292
299
  end
293
300
  yield response
294
- end while there_are_more_keys
301
+ end while there_are_more_keys && internal_options[:'max-keys'] > 0
295
302
  true
296
303
  rescue
297
304
  on_exception
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: right_aws
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.6.0
7
- date: 2008-03-03 00:00:00 -08:00
6
+ version: 1.6.1
7
+ date: 2008-03-14 00:00:00 -07:00
8
8
  summary: Interface classes for the Amazon EC2, SQS, and S3 Web Services
9
9
  require_paths:
10
10
  - lib