foreman-kicker 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Foreman
2
2
  module Kicker
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -23,6 +23,18 @@ module Foreman
23
23
  @watchdog.start(*args.map(&:to_s))
24
24
  end
25
25
 
26
+ def self.wait
27
+ loop do
28
+ begin
29
+ TCPSocket.open('127.0.0.1', self.port).close
30
+ break
31
+ rescue Errno::ECONNREFUSED
32
+ sleep 0.1
33
+ # ignored
34
+ end
35
+ end
36
+ end
37
+
26
38
  def self.stop
27
39
  @watchdog.stop
28
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-kicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: