docker-rails 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker/rails/ext/container.rb +19 -3
- data/lib/docker/rails/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: 7eb88cd9b794b62bc7fedee59bcd268c70de4f1a
|
4
|
+
data.tar.gz: 6fb60e2193429ebc30293a1fb4749d6b96857afd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12a4b5f27c099df989887ebdc60e0d10575b5f4d56858eeb7844dd3c091fdb3a34b3c1a6597bde099d44c8c5c7737be08d45da3700fbc138441366fe6a500c30
|
7
|
+
data.tar.gz: c09b0928a79b8ed1e51a647f1ec94823d187d8c265ceb0c50caa97da7da13e35dd5c40e9fdd71837db732fa372370c82f2a36f7957ff9e131a92ec1b82215fb4
|
@@ -1,11 +1,27 @@
|
|
1
1
|
class Docker::Container
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
# Update the @info hash, which is the only mutable state in this object.
|
4
|
+
def refresh!
|
5
|
+
other = Docker::Container.all({all: true}, connection).find { |c|
|
6
|
+
c.id.start_with?(self.id) || self.id.start_with?(c.id)
|
7
|
+
}
|
8
|
+
|
9
|
+
info.merge!(self.json)
|
10
|
+
other && info.merge!(other.info)
|
11
|
+
self
|
5
12
|
end
|
6
13
|
|
7
14
|
def status
|
8
|
-
info
|
15
|
+
# info is cached, return the first one otherwise retrieve a new container and get the status from it
|
16
|
+
refresh!
|
17
|
+
|
18
|
+
status = info['Status']
|
19
|
+
puts status
|
20
|
+
status
|
21
|
+
end
|
22
|
+
|
23
|
+
def name
|
24
|
+
info['Names'][0].gsub(/^\//, '')
|
9
25
|
end
|
10
26
|
|
11
27
|
def up?
|
data/lib/docker/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Ross
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|