singel 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/singel +1 -0
- data/lib/executor.rb +13 -4
- data/singel.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b044c6a0f921fc3cd684571e5be6c2dd48e7788b
|
4
|
+
data.tar.gz: 7d5117ca9e6e7a4d9d7f7248d3aca4bc053f877c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c2f627068266abe8fa919e4264aab32829b9335ddcbbb3c982a5c6fa70024c3f795e7b30e94328b5578c5d86cbace13345a3773f94bc8a43cad00d875ce134
|
7
|
+
data.tar.gz: 23c68854c622fc10268c5e736ea1ade9117ef586ee6f8b422464b3d9846505b73d838813232da42d29c1097395d5efd706f73158e76e7c3deab76c6f386ea5a7
|
data/bin/singel
CHANGED
data/lib/executor.rb
CHANGED
@@ -39,15 +39,24 @@ class PackerExecutor
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
def build
|
43
|
+
puts "Building #{File.basename(@file_path, '.json')}:".to_green
|
44
|
+
stream_cmd("packer build #{build_options} #{@file_path}")
|
45
|
+
end
|
46
|
+
|
42
47
|
# specify the builders if any were passed
|
43
48
|
def build_options
|
44
49
|
"-only=#{@specified_builders.join(',')}" unless @specified_builders.empty?
|
45
50
|
end
|
46
51
|
|
47
|
-
def
|
48
|
-
|
49
|
-
|
50
|
-
|
52
|
+
def stream_cmd(command)
|
53
|
+
PTY.spawn(command) do |r, _w, _pid|
|
54
|
+
begin
|
55
|
+
r.each { |line| print line; }
|
56
|
+
rescue Errno::EIO
|
57
|
+
end
|
51
58
|
end
|
59
|
+
rescue PTY::ChildExited
|
60
|
+
puts 'The child process exited!'
|
52
61
|
end
|
53
62
|
end
|
data/singel.gemspec
CHANGED