cuba-bin 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d271605c9cf10e628963a2aadaab65d5c132f0b1
4
- data.tar.gz: 7704976ed93639c639ff0e4702de310f8bad3f50
3
+ metadata.gz: 5471f061b980ac798d6e21b38d1988f2b3854a73
4
+ data.tar.gz: 84862272e88b6297ce7a210169ceeab576cec453
5
5
  SHA512:
6
- metadata.gz: 59588d3c98ebc48747feb39642efbe4d59568e796f6566c0fb64017fe70708f7e10338740b7f0d15791a1d18371bce34606d3685e7ba91a6dd4f79234f6e9f09
7
- data.tar.gz: 8f3bee67056ab3d279acb7e74ecb9c889dba4a30cc43068d5b675125ef7914cb96078afd82a2e344ed6d14b10f647c77c4b0d38c1b278859341a8c1ce01a1a73
6
+ metadata.gz: a5c5850c7bce7d206e3852df9619d9fbe19efa2ad0ec71ae5be9b6514ad6cf74cf0c75dea7a2819763e883c4ecd8d534e73b0d1a01a79a50afeb99dc1a78f0e0
7
+ data.tar.gz: 47eeffabc1f98deb57459279bd75d288d3808acb91e981b68523fece4693179aa175c4f74030ddad585a78b7eee6f84e5b6b0710a99b8bd831e610bc93cd2fd8
@@ -61,7 +61,6 @@ module Cuba
61
61
 
62
62
  # TODO maybe consider doing like: http://puma.bogomips.org/SIGNALS.html
63
63
  def reload_everything
64
- log 'reloading everything'
65
64
  Process.kill(:QUIT, puma_pid)
66
65
  Process.wait(puma_pid)
67
66
  start_puma
@@ -76,12 +75,15 @@ module Cuba
76
75
 
77
76
  # tell puma to gracefully shut down workers
78
77
  def graceful_restart
79
- log 'graceful restart'
80
- Process.kill(:SIGUSR2, puma_pid)
78
+ pid = puma_pid
79
+ Process.kill(:INT, pid)
80
+ Process.wait(pid)
81
+ start_puma
81
82
  end
82
83
 
83
84
  def handle_change(modified, added, removed)
84
85
  log "File change event detected: #{{modified: modified, added: added, removed: removed}.inspect}"
86
+
85
87
  if (modified + added + removed).index {|f| f =~ options[:full]}
86
88
  reload_everything
87
89
  else
@@ -1,5 +1,5 @@
1
1
  module Cuba
2
2
  module Bin
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuba-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj