-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The information returned by the api request on Images/all should be available within the Docker::Image #43
Conversation
@@ -96,7 +96,7 @@ def create(opts = {}, conn = Docker.connection) | |||
# Return every Image. | |||
def all(opts = {}, conn = Docker.connection) | |||
hashes = Docker::Util.parse_json(conn.get('/images/json', opts)) || [] | |||
hashes.map { |hash| new(conn, hash['Id']) } | |||
hashes.map { |hash| new(conn, hash['Id'], hash) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the 'Id'
key is already stored in it's own instance variable, how about deleting it when you pass it to new? Something like: new(conn, hash['Id'], hash.tap { |h| h.delete('Id') })
.
@yelvert Could you please add a for this? Also, see my comment I left on |
@nahiluhmot Add a what? |
@yelvert I think the word he left out was "test". |
@yelvert thanks for adding the tests. Looks like you have some line length cane violations in the latest build. Can you split those long lines up? |
It looks like this was only added to the single creation of an image through all. I wonder if there is anywhere else that we get information back that this would be helpful. |
@tlunter good thought. Let's open issues for any more as we identify them and merge this as soon as we have a passing build. |
This will make Repository, Tag, Id, Created, Size, and VirtualSize available for use since it is what is returned from the actual api request.