docker_registry 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7a6bead9882e3c98315038502c3cbd7398fd47
|
4
|
+
data.tar.gz: b5f5bb94d8d1e34714ae2f43567825b11110ab3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4bdce6ec246fc208521ea4b84f345de9cd5e26fb052212dbd2b72371982b4ad8cad0c36006b3a7073bf06551094a9fe5f5a64f6c3b1806bbc9e7d151abd3fef
|
7
|
+
data.tar.gz: 5b41c5c59121a53407f7213502c7d0efee708f1e2a92a1d5c8c8620d12b27f753c115af0a046f494e6b512c9a22229c7b3a944762a18c12240353946514ac535
|
@@ -26,7 +26,7 @@ class DockerRegistry::Client
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def ping
|
29
|
-
@faraday.get('/v1/_ping').body
|
29
|
+
@faraday.get('/v1/_ping').body
|
30
30
|
end
|
31
31
|
|
32
32
|
# @param [#to_s] query Seach query
|
@@ -38,6 +38,10 @@ class DockerRegistry::Client
|
|
38
38
|
@faraday.get("/v1/repositories/#{name}/tags").body
|
39
39
|
end
|
40
40
|
|
41
|
+
def repositry_tag(name, tag)
|
42
|
+
@faraday.get("/v1/repositories/#{name}/tags/#{tag}").body
|
43
|
+
end
|
44
|
+
|
41
45
|
def delete_repository(name)
|
42
46
|
@faraday.delete("/v1/repositories/#{name}/").status == 200
|
43
47
|
end
|
@@ -35,12 +35,21 @@ class DockerRegistry::Registry
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
def [](name)
|
39
|
+
DockerRegistry::Repository.new({ name: name }, self)
|
40
|
+
end
|
41
|
+
|
38
42
|
def repositry_tags(repository)
|
39
43
|
(@client.repositry_tags(repository.name) || {}).map do |name, image_id|
|
40
44
|
DockerRegistry::Tag.new(name, image_id, repository)
|
41
45
|
end
|
42
46
|
end
|
43
47
|
|
48
|
+
def repositry_tag(repository, tag)
|
49
|
+
image_id = (@client.repositry_tag(repository.name, tag) || "")
|
50
|
+
DockerRegistry::Tag.new(tag, image_id, repository)
|
51
|
+
end
|
52
|
+
|
44
53
|
def delete_repository(repository)
|
45
54
|
@client.delete_repository(repository.name)
|
46
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_registry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|