Q:

How do I find a specific entry inside a zipped directory using the rubyzip gem?

I have a zip file named test.zip which contains a directory named invoice.  Inside the invoice directory there are documents each with different names.  I would like to find a specific document named summary.txt which is inside the invoice directory.
I am able to get a handle to test.zip using the following:
zip = Zip::ZipFile.open("/path/to/test.zip")

but when I use 
zip.find_entry("summary.txt")

I get nil.  
On the other hand, if summary.txt is not inside the the invoices directory, but rather at the root of the zip file itself, the find_entry method as described above seems to work.
It seems that somehow I must navigate down into the invoices directory before searching for summary.txt.
Is this correct?  If so, how do I do it?  If not, what I am I doing wrong.

A:

You need to specify the full path to the file:
zip.find_entry 'invoices/summary.txt'

