Skip to content
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

Merged
merged 2 commits into from
Sep 30, 2013

Conversation

yelvert
Copy link
Contributor

@yelvert yelvert commented Sep 25, 2013

This will make Repository, Tag, Id, Created, Size, and VirtualSize available for use since it is what is returned from the actual api request.

@@ -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) }
Copy link
Contributor

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') }).

@nahiluhmot
Copy link
Contributor

@yelvert Could you please add a for this? Also, see my comment I left on lib/docker/image.rb. Aside from that, looks good 👍

@yelvert
Copy link
Contributor Author

yelvert commented Sep 25, 2013

Could you please add a for this?

@nahiluhmot Add a what?

@ucarion
Copy link
Contributor

ucarion commented Sep 25, 2013

@yelvert I think the word he left out was "test".

@bfulton
Copy link
Contributor

bfulton commented Sep 26, 2013

@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?

@tlunter
Copy link
Contributor

tlunter commented Sep 27, 2013

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.

@bfulton
Copy link
Contributor

bfulton commented Sep 27, 2013

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants