guard-unicorn 0.0.9 → 0.1.0

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: cf3afb4c7342c19265f75f01c520fea71eef6bdf
4
- data.tar.gz: e72e9d35972bd3a6882c243f97cfdaf144eb07e4
3
+ metadata.gz: 69afe7689bfc2756565f14af26046045be44c42d
4
+ data.tar.gz: 33452023117e53088fbd85e54cd835bdc561aabc
5
5
  SHA512:
6
- metadata.gz: 8f67535e57107cd8180a283ec242ebda84ea831b54ccd2639b26b1241e3f8ba03a8888f62fe71ab8b6a34b9a6f54aedc4588cd2298cf55516d75bd14fdd341f6
7
- data.tar.gz: 0371d84650b45f7b0d1a738d3fa73d4a123d9ae2db5f811210007bc47788e1cb6dab31426331e1965975bf27e5da8daed8f8482bcdf6b2d351c60c120282e0af
6
+ metadata.gz: bd3bb3396e21fff141fb2202b968ab8f8ca642be81cf46041622aaaa633afd1822d87623b88c980e58eccfe4388df1151283853f3bcc9e1156573e34d6eec861
7
+ data.tar.gz: b7d9ec29ef48e2fe643d2cf5e8dc1eac3174c0222eb2ebfb7f3ce424e8f87794111da89fc080ca470ae404ebd4ba98a614d5f06a426696fee79c2a8ed1229aaa
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "guard-unicorn"
6
- s.version = "0.0.9"
6
+ s.version = "0.1.0"
7
7
  s.authors = ["Andrei Maxim"]
8
8
  s.email = ["andrei@andreimaxim.ro"]
9
9
  s.homepage = "https://github.com/xhr/guard-unicorn"
data/lib/guard/unicorn.rb CHANGED
@@ -82,9 +82,17 @@ module Guard
82
82
  # For now, let's rely on the fact that the user does know how to write
83
83
  # a good unicorn configuration and he will have a block of code that
84
84
  # will properly handle `USR2` signals.
85
- signal = @preloading ? "USR2" : "HUP"
86
- ::Process.kill signal, pid
85
+ if @preloading
86
+ oldpid = pid
87
+ UI.debug "Sending USR2 to unicorn with pid #{oldpid}"
88
+ ::Process.kill 'USR2', oldpid
89
+ UI.debug "Sending QUIT to unicorn with pid #{oldpid}"
90
+ ::Process.kill 'QUIT', oldpid
91
+ else
92
+ ::Process.kill 'HUP', pid
93
+ end
87
94
 
95
+ UI.info "Done reloading unicorn."
88
96
  success "Unicorn reloaded"
89
97
  end
90
98
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Maxim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-25 00:00:00.000000000 Z
11
+ date: 2013-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project: guard-unicorn
118
- rubygems_version: 2.0.0
118
+ rubygems_version: 2.0.3
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Guard for Unicorn