asciibuild 0.8.0 → 0.9.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f074e7c7526f2b071d6809b80d239bd3d280350
4
- data.tar.gz: f984087cb0c58d830201cc1f9e7184b1bd986df6
3
+ metadata.gz: d34d1e30d52b9a69e2b25b8590da070267ad1dae
4
+ data.tar.gz: 48512a7ca2df6562d48da6b7d60b6bf1260cce93
5
5
  SHA512:
6
- metadata.gz: a43def929086de1f35e8e031a2035c4f24a7c23d6c8ed2a83bf9f5a11616e904b205a66f03d7ff26192511260cdfa023302d0f8777c47f5c4dff2baa57ef9801
7
- data.tar.gz: 290ba347414cfbb7da3360d88daa176a9016132ed09967fab54deb153e116f865ced022366be9cf72867e022c5261e790b96a0573c7dd1060c43c5570951b999
6
+ metadata.gz: 68cf290df84b6baebfe9fa5d49338b379d82957057f775a24f5fdd14ff2604fc9103675b9772344c623a0c43e017061cd24b68d8955137364f6dbd6d1b099109
7
+ data.tar.gz: 4ccce1c39a57a3157c2d0ae28e85a13eda6119193a713b876e49c86048a110dd8f0e6182ac0fdc989bcf75cfc19d41e4dc2d65ad1f9465148d17b74d96ff39a0
@@ -75,6 +75,15 @@ def normalize parent, attrs, lines
75
75
  new_lines
76
76
  end
77
77
 
78
+ def wait_for_container cid
79
+ cmd = "docker inspect -f {{.State.Running}} %s" % cid
80
+ cout, cerr, cstatus = Open3.capture3(cmd)
81
+ until cstatus != 0 or cout.chomp == "true" do
82
+ sleep 0.1
83
+ cout, cerr, cstatus = Open3.capture3(cmd)
84
+ end
85
+ end
86
+
78
87
  module Asciibuild
79
88
  module Extensions
80
89
  @failed = false
@@ -197,7 +206,9 @@ module Asciibuild
197
206
  rout, rerr, status = Open3.capture3(docker_run)
198
207
  puts rout, rerr
199
208
  if status == 0
200
- parent.document.attributes["#{name} container"] = rout.chomp
209
+ cid = rout.chomp
210
+ wait_for_container cid
211
+ parent.document.attributes["#{name} container"] = cid
201
212
  else
202
213
  Asciibuild::Extensions.failed = true
203
214
  end
@@ -250,7 +261,7 @@ module Asciibuild
250
261
  when 'docker-compose'
251
262
  dc_cmd = attrs['command'] ||= 'build'
252
263
  fname = write_file attrs, 'docker-compose.yml', body
253
- "docker-compose -f #{fname} #{compose_opts} #{dc_cmd}"
264
+ "docker-compose -f #{fname} #{attrs['compose_opts']} #{dc_cmd}"
254
265
  when 'erlang'
255
266
  fname = write_file attrs, 'escript.erl', body
256
267
  "escript #{fname} #{attrs['escript_opts']}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciibuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Brisbin
@@ -63,7 +63,6 @@ files:
63
63
  - bin/asciibuild
64
64
  - lib/asciibuild.rb
65
65
  - lib/asciibuild/extensions.rb
66
- - lib/asciibuild/slackbot.rb
67
66
  - stylesheets/colony.css
68
67
  homepage: http://github.com/jbrisbin/asciibuild
69
68
  licenses:
File without changes