docker_toolkit 0.1.11 → 0.1.12
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/Gemfile.lock +1 -1
- data/lib/docker_toolkit/runner.rb +18 -0
- data/lib/docker_toolkit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16607a50a2e8821a42816dcf9793576c67858acc80dcd99ae45a5240a43c1e1
|
4
|
+
data.tar.gz: 93efc51ea006962e6af5c9cc17f806b69b6e95a00c3c81907cc306db22558c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bd5eed066256cb59744381a5ddef6e0b4a6936561c7b2e91201abacb10865f92c06889de54e6d481b3b36c10e67ceb182da3aee777be3237f2b8d353168b95a
|
7
|
+
data.tar.gz: f82e50fa54fa61268249f8c186984951a586bf57c35ce36ba0f314308075458dc18a82e9bc63c9b9fceb4cbfe3177273b76b800405aa2c6e9871d7d5f65010bf
|
data/Gemfile.lock
CHANGED
@@ -37,6 +37,24 @@ module DockerToolkit
|
|
37
37
|
env[key]
|
38
38
|
end
|
39
39
|
|
40
|
+
def envsubst *paths
|
41
|
+
paths = paths.flatten.map{|c| c.to_s.strip}.reject(&:empty?)
|
42
|
+
paths.each do |path|
|
43
|
+
Dir.glob("#{path}/**/*.in") do |templ|
|
44
|
+
output = templ.sub(/\.in$/, '')
|
45
|
+
cmd = "cat '#{templ}' | envsubst > '#{output}'"
|
46
|
+
system(cmd) || die("envsubst failed: #{cmd}")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def envsubst_file templ, output = nil
|
52
|
+
output ||= templ.sub(/\.in$/, '')
|
53
|
+
die("filename must ends with .in or output must be provided") if output.strip == templ.strip
|
54
|
+
cmd = "cat '#{templ}' | envsubst > '#{output}'"
|
55
|
+
system(cmd) || die("envsubst failed: #{cmd}")
|
56
|
+
end
|
57
|
+
|
40
58
|
end
|
41
59
|
|
42
60
|
end
|