fredjean/middleman-s3_sync — pull request #38 by willglynn (2013-11-21 16:17:33+00:00)
Title: Close file handles after use

The current implementation of `Middleman::S3Sync::Resource#body` calls `File.open`, but the resulting IO is never closed. This eventually exhausts the available file descriptor. Once `Resource#body` claims the last available file descriptor, any actions that require additional file descriptors will fail, e.g. Excon performing name resolution:

lib/excon/socket.rb:135:in `getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError)

I encountered recurring issues updating large numbers of resources that have gone away since this change.