docker-porcelain 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/docker/porcelain/container.rb +14 -0
- data/lib/docker/porcelain/extensions.rb +1 -0
- data/lib/docker/porcelain/image.rb +1 -0
- data/lib/docker/porcelain/refinements.rb +4 -0
- data/lib/docker/porcelain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acbbeaece88fb50e2ab2c5a09ac595c1744c98f4
|
4
|
+
data.tar.gz: 4b07eaf27c0a074b6b0f9cdd1605847eff342ed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56a09b2edc22dd7187dce2e11091caefb0440035f482079ee8bc435af89093db3cf2c685f017c1ebf0e3f9c3fe2ba3e2c2c2a026261077089d236f17daa2302d
|
7
|
+
data.tar.gz: b8c0884746948fb3cf3c3da29c7f8bcabc34b80ecb4b9c9baffcf25a8f8b3f5d9797b1623610ef7e6140ec1693fed4fefd94f415d10f4496178c17364b25ee63
|
data/README.md
CHANGED
@@ -65,6 +65,7 @@ container.write '/tmp/foo', 'This is the foo file!'
|
|
65
65
|
## Synopsis
|
66
66
|
|
67
67
|
```ruby
|
68
|
+
container = Docker::Container['my-container']
|
68
69
|
container.write '/tmp/foo', 'This is the foo file!'
|
69
70
|
container.system 'true' or fail "there's no truth in the container!"
|
70
71
|
uptime = container.` 'uptime'
|
@@ -95,6 +95,20 @@ module Docker
|
|
95
95
|
# @return [Fixnum] exit status of the last command ran with {#system}
|
96
96
|
# or {#`}
|
97
97
|
attr_reader :last_exitstatus
|
98
|
+
|
99
|
+
# Class-level container porcelain methods
|
100
|
+
module ClassMethods
|
101
|
+
# Get container specified by id or name
|
102
|
+
# @param id [String] identifier or name of the container to get
|
103
|
+
# @return [Docker::Container, nil] container or nil if not found
|
104
|
+
def [] id
|
105
|
+
Docker::Container.get id
|
106
|
+
rescue Docker::Error::NotFoundError
|
107
|
+
nil
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
extend ClassMethods
|
98
112
|
end
|
99
113
|
end
|
100
114
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-porcelain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafał Rzepecki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|