dockerlib-remote 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmVkNjJiZmIyYTA0NDdkZmUxZTBiYTVhNzA4MzkxNDgxZDAxNDNiNg==
4
+ MTllMWQwYzhkMGY1N2RjYzdhYzJiNGExYTI2ZWRjMzQ1ODgxNmY4ZQ==
5
5
  data.tar.gz: !binary |-
6
- NTFhNzU2OTE5OTUxYWU2YTExOWQ4YmIyN2JkMDQxNmU5YzkxZjYyZA==
6
+ ZTM2NmIwYTdlNWNkZjJiODM4ZjUxYTFiZmE4YWU4NjM5ODU1ZWYwYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGNhNzJlOGEwYzkwNTc4MGY4OGU4M2M4MTYwMjczY2NjNDdjNGU0MmE0MGVj
10
- NWI5ZGJhYzljZjJhYmZkNjU5MzI4MmY3NDJkNzA2OTE1NDU4YzU0ZjBjZjcx
11
- YWQ0ZDYxOTY5MjhkOGQxY2NlNDIyMTgwZGIyNGFlMWQzZTVmMmQ=
9
+ YWRlMTg2ZmY0N2M2NjFkMmQ0YmE4ODNkMDFjMzYzNjhiN2U5ZTQwMGQzMmEx
10
+ YzExYWU4YjQ0NjE3ZGVmYjA2NjRhZmI0NDM0YWRmZTk2YThmZjAyYzEzOTM1
11
+ MjBkMTdhNmI0MWQxNmM2MjI5ZGQ1YTBmOTQ3YjdlOWE3ZGNhMjk=
12
12
  data.tar.gz: !binary |-
13
- ZTY4MjkyN2Q3Yzg1ZmU2ZTEyYzdlMWQ0MmNjMTU3Mzk0OThmOTZjNjkyM2Yy
14
- MDM3NmFiYjZlZjM2OWQyZjVmYjY4YTQ5M2EzOGQzYmI1NGZhY2Y1ZWM3ZWIx
15
- NWQ4OWI4NWQzZDkxNDE4NmM2Yjc4YTcyZmU1YTRkNTUyZjk3YTE=
13
+ N2FiNGE3ZDEzZjlhYmFlN2M0NmM0MjhlOTQ1ZjE0YjIxNzFiYmI3NDM4MWRk
14
+ YTAyNTNmYjkzZmZkOTFhNDZiYzY4YmIxODM5M2YwNTBkYzRlZjA1NmM2YWEy
15
+ MWYwMmM1Mzc1MTYxMzgyNGU2ZmVlMzgwYTcyNTAzYTNiMDAyNjk=
@@ -5,6 +5,17 @@ module Dockerlib
5
5
  @socket = socket || '/var/run/docker.sock'
6
6
  end
7
7
 
8
+ def inspect_image(name)
9
+ resp = connection.request(method: :get, path: "/images/#{name}/json")
10
+ if resp.status == 200
11
+ {data: load_body(resp)}
12
+ elsif resp.status == 404
13
+ {code: :no_such_image}
14
+ else
15
+ to_server_error resp
16
+ end
17
+ end
18
+
8
19
  def inspect_container(name)
9
20
  resp = connection.request(method: :get, path: "/containers/#{name}/json")
10
21
  if resp.status == 200
@@ -1,5 +1,5 @@
1
1
  module Dockerlib
2
2
  module Remote
3
- VERSION = '0.1.1'.freeze
3
+ VERSION = '0.1.2'.freeze
4
4
  end # Remote
5
5
  end # Dockerlib
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerlib-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - flant