dg 0.6.4 → 0.6.5
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 +4 -4
- data/lib/dg/docker.rb +9 -3
- data/lib/dg/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: d54a7630e338fb23a616e729563b508007dcf3a8
|
4
|
+
data.tar.gz: 8e6462693033f4269257d4946874b58c7fa13923
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41d35b4af2f4f186c1a23f3056473e2783267098f2cc781898492104ae2118a06bf7293bad463356f7eb614366710594b3e2ca93b40805e824329e30a21290ac
|
7
|
+
data.tar.gz: 9e8c585f0659e82971c1b01473d30fa41491e6b200e9b7c4c97bfc33da135ac07a5a2c19d0d467544e639f8eb6496f11046e902ffdd3bb78fda68c836a0cc79b
|
data/lib/dg/docker.rb
CHANGED
@@ -85,6 +85,12 @@ module DG
|
|
85
85
|
|
86
86
|
private
|
87
87
|
|
88
|
+
def fig_binary
|
89
|
+
@@fig_binary_cached ||= %w(docker-compose fig).detect do |binary|
|
90
|
+
run_with_output(%(which #{binary}), false, return_hash = true)[:status_code] == 0
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
88
94
|
def error!(e, step = "executing")
|
89
95
|
STDERR.puts "An error occurred while #{step}: #{e.message}"
|
90
96
|
exit 1
|
@@ -97,7 +103,7 @@ module DG
|
|
97
103
|
begin
|
98
104
|
buffer = ''
|
99
105
|
PTY.spawn(sudo_command) do |stdin, stdout, pid|
|
100
|
-
callback = capture ?
|
106
|
+
callback = (capture || return_hash) ?
|
101
107
|
->(line) {
|
102
108
|
print line unless return_hash
|
103
109
|
buffer << line
|
@@ -183,13 +189,13 @@ module DG
|
|
183
189
|
end
|
184
190
|
|
185
191
|
def run_tests
|
186
|
-
run_with_output("
|
192
|
+
run_with_output("#{fig_binary} -f #{FIG_GEN_PATH} run --rm test")
|
187
193
|
rescue => e
|
188
194
|
error!(e, "running tests")
|
189
195
|
end
|
190
196
|
|
191
197
|
def run_app
|
192
|
-
run_with_output("
|
198
|
+
run_with_output("#{fig_binary} -f #{FIG_GEN_PATH} up -d web")
|
193
199
|
end
|
194
200
|
|
195
201
|
def debug_app
|
data/lib/dg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Malet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
DockerGo (DG)
|