boutons 0.1.1 → 0.1.2

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: 8ec175f742c494f7844019f5d9da20f1423b17a3
4
- data.tar.gz: 73e654abe24c50c02b0af78e1caa0b63d9f3aeca
3
+ metadata.gz: e7041dfd8e993793754620b9849f1418dccad29e
4
+ data.tar.gz: 8d9d44f235b999e6c135d68471bf96f853ba83cf
5
5
  SHA512:
6
- metadata.gz: a18f4121679a9c329178e4757d29fe2ccddb41d9f9494062c41ce08fa5d85bd96f4b57981e2d02a45b70a50b9d2bad0e06b79b7db75519b21e2299f1413d1c4d
7
- data.tar.gz: 6296b2968f17d81ede93e48c29fb87e307b27d41b32f72e5ec2fcbb9f5c84f18dbad550db0dce516480e8d6ef0549c2a001ccc1be6199140d677f1b462e4a63b
6
+ metadata.gz: 48d86dd4232b5c6cee3f1f044680b750a537bf94cedc6558b9158799070da11e16f7b15d1a8e11c756b58126b1b7a24083c2edf2a8413ba3b81de10731087143
7
+ data.tar.gz: c2a27bf4957c8c8abc2b41dd4abfe1e0e4b54ad4c4c28314de302637a60107127c3d6010d86fea7faa7439c8e1f4d4b2772607a81e647d7c57ef8668287250a2
@@ -28,7 +28,7 @@ module Boutons
28
28
  end
29
29
  def with_loggers
30
30
  [@@logger,@@synapse.logger,@@synapse.service_watchers.collect{|s|s.logger}].each do |logger|
31
- yield(logger) if block_given
31
+ yield(logger) if block_given?
32
32
  end
33
33
  end
34
34
  def log_with logger, synapses:nil
@@ -65,7 +65,17 @@ module Boutons
65
65
  end
66
66
  wait
67
67
  at_exit do
68
- @@logger.info "Clean up!"
68
+ @@logger.info "HAproxy cleanup begin"
69
+ pf = @@haproxy.pid_file_path
70
+ cf = @@haproxy.config_file_path
71
+ sf = @@haproxy.socket_file_path
72
+ pids = File.read(pf).strip
73
+ @@logger.info "HAproxy stop: `kill -9 #{pids}`"
74
+ `kill -9 #{pids}`
75
+ File.unlink(pf)
76
+ File.unlink(sf)
77
+ File.unlink(cf)
78
+ @@logger.info "HAproxy cleanup finish"
69
79
  end
70
80
  end
71
81
  def wait
@@ -1,3 +1,3 @@
1
1
  module Boutons
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boutons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann