fog/fog — Issue #596: AWS::Files::each not called for Enumerable methods
Author: jasonhutchens
Created: 2011-11-09 03:05:49+00:00
State: open

I have a bucket that contains 5000 files. Here's the problem:

```
connection = Fog::Storage.new(:provider => 'AWS', ...)
directory = connection.directories.get('mybucket')
files = []
directory.files.each { |f| files << f.key }
puts files.count
files = directory.files.map { |f| f.key }
puts files.count
```

This causes [AssetSync](https://github.com/rumblelabs/asset_sync), which calls AWS::Files::map, to fail when there are more than 1000 files in a bucket.