gimite/google-drive-ruby — pull request #14 by evgenyneu (2012-06-26 10:17:07+00:00)
Title: Fix: collection is not removed from Google Drive

Thank you for pulling my collection method additions. I have found a bug here. When calling `delete` on a collection it removed the collection from its parent but did not actually delete this collection from Google Drive storage.

For example, suppose there was a collections named `sub` inside root. Calling `sub.delete()` would remove it from root, but it would still be present in Google Drive. It sounds weird to me. But I think it is because of how collections work in Google Drive. This is how I understand it: collections are more like labels or tags which are assigned to a resource. And it is possible for a resource to exist while having no parent collections.

Ok, so the collection was not deleted from storage because `document_feed_url` of the collection was incorrect. For example, it was

https://docs.google.com/feeds/default/private/full/folder%3Aroot/contents/folder%3A0B5J-5NxXCH7OOHExMTBhTXNoN1E?v=3&delete=true

while it should always be in form of

https://docs.google.com/feeds/default/private/full/folder:id

I have also added a test to ensure collections and files are completely deleted from storage.