guard-unicorn 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/guard-unicorn.gemspec +2 -2
- data/lib/guard/unicorn.rb +6 -6
- metadata +13 -19
data/guard-unicorn.gemspec
CHANGED
@@ -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.
|
6
|
+
s.version = "0.0.7"
|
7
7
|
s.authors = ["Andrei Maxim"]
|
8
8
|
s.email = ["andrei@andreimaxim.ro"]
|
9
9
|
s.homepage = "https://github.com/xhr/guard-unicorn"
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
s.add_dependency "guard"
|
20
|
+
s.add_dependency "guard", ">= 1.1"
|
21
21
|
|
22
22
|
s.add_development_dependency "rake"
|
23
23
|
s.add_development_dependency "bundler"
|
data/lib/guard/unicorn.rb
CHANGED
@@ -41,7 +41,7 @@ module Guard
|
|
41
41
|
cmd << "-p #{@port}"
|
42
42
|
cmd << "-D" if @run_as_daemon
|
43
43
|
|
44
|
-
@pid = Process.fork do
|
44
|
+
@pid = ::Process.fork do
|
45
45
|
system "#{cmd.join " "}"
|
46
46
|
end
|
47
47
|
|
@@ -54,12 +54,12 @@ module Guard
|
|
54
54
|
return unless pid
|
55
55
|
|
56
56
|
begin
|
57
|
-
Process.kill("QUIT", pid) if Process.getpgid(pid)
|
57
|
+
::Process.kill("QUIT", pid) if ::Process.getpgid(pid)
|
58
58
|
|
59
59
|
# Unicorn won't always shut down right away, so we're waiting for
|
60
60
|
# the getpgid method to raise an Errno::ESRCH that will tell us
|
61
61
|
# the process is not longer active.
|
62
|
-
sleep 1 while Process.getpgid(pid)
|
62
|
+
sleep 1 while ::Process.getpgid(pid)
|
63
63
|
success "Unicorn stopped."
|
64
64
|
rescue Errno::ESRCH
|
65
65
|
# Don't do anything, the process does not exist
|
@@ -78,7 +78,7 @@ module Guard
|
|
78
78
|
# a good unicorn configuration and he will have a block of code that
|
79
79
|
# will properly handle `USR2` signals.
|
80
80
|
signal = @preloading ? "USR2" : "HUP"
|
81
|
-
Process.kill signal, pid
|
81
|
+
::Process.kill signal, pid
|
82
82
|
|
83
83
|
success "Unicorn reloaded"
|
84
84
|
end
|
@@ -92,14 +92,14 @@ module Guard
|
|
92
92
|
# Called on file(s) modifications that the Guard watches.
|
93
93
|
# @param [Array<String>] paths the changes files or paths
|
94
94
|
# @raise [:task_has_failed] when run_on_change has failed
|
95
|
-
def
|
95
|
+
def run_on_changes(paths)
|
96
96
|
reload
|
97
97
|
end
|
98
98
|
|
99
99
|
# Called on file(s) deletions that the Guard watches.
|
100
100
|
# @param [Array<String>] paths the deleted files or paths
|
101
101
|
# @raise [:task_has_failed] when run_on_change has failed
|
102
|
-
def
|
102
|
+
def run_on_removals(paths)
|
103
103
|
reload
|
104
104
|
end
|
105
105
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement: &
|
16
|
+
requirement: &70350594482520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '1.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70350594482520
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70350594498500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70350594498500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70350594498040 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70350594498040
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: minitest
|
49
|
-
requirement: &
|
49
|
+
requirement: &70350594497620 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70350594497620
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard
|
60
|
-
requirement: &
|
60
|
+
requirement: &70350594497200 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70350594497200
|
69
69
|
description: Guard plug-in that allows you to restart Unicorn
|
70
70
|
email:
|
71
71
|
- andrei@andreimaxim.ro
|
@@ -94,18 +94,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
segments:
|
98
|
-
- 0
|
99
|
-
hash: 2852090064455978205
|
100
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
98
|
none: false
|
102
99
|
requirements:
|
103
100
|
- - ! '>='
|
104
101
|
- !ruby/object:Gem::Version
|
105
102
|
version: '0'
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
hash: 2852090064455978205
|
109
103
|
requirements: []
|
110
104
|
rubyforge_project: guard-unicorn
|
111
105
|
rubygems_version: 1.8.11
|