vlad-unicorn 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.hgignore +1 -0
- data/.hgtags +1 -0
- data/History.txt +6 -0
- data/Rakefile +7 -1
- data/lib/vlad/unicorn_common.rb +5 -5
- metadata +4 -4
data/.hgignore
CHANGED
data/.hgtags
CHANGED
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ require 'hoe'
|
|
5
5
|
|
6
6
|
Hoe.plugin :hg
|
7
7
|
|
8
|
-
Hoe.spec 'vlad-unicorn' do
|
8
|
+
spec = Hoe.spec 'vlad-unicorn' do
|
9
9
|
self.rubyforge_name = 'hitsquad'
|
10
10
|
developer('Kevin R. Bullock', 'kbullock@ringworld.org')
|
11
11
|
extra_deps << ['vlad', '~> 2.0']
|
@@ -15,4 +15,10 @@ Hoe.spec 'vlad-unicorn' do
|
|
15
15
|
"rubyforge.org:/var/www/gforge-projects/hitsquad/#{remote_rdoc_dir}"
|
16
16
|
end
|
17
17
|
|
18
|
+
task :gemspec do
|
19
|
+
File.open 'vlad-unicorn.gemspec', 'w' do |f|
|
20
|
+
f.write spec.spec.to_ruby
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
18
24
|
# vim: syntax=ruby
|
data/lib/vlad/unicorn_common.rb
CHANGED
@@ -2,12 +2,12 @@ require 'vlad'
|
|
2
2
|
|
3
3
|
module Vlad
|
4
4
|
module Unicorn
|
5
|
-
VERSION = '2.2.
|
5
|
+
VERSION = '2.2.1' #:nodoc:
|
6
6
|
|
7
7
|
# Runs +cmd+ using sudo if the +:unicorn_use_sudo+ variable is set.
|
8
8
|
def self.maybe_sudo(cmd)
|
9
9
|
if unicorn_use_sudo
|
10
|
-
sudo cmd
|
10
|
+
sudo %(sh -c '#{cmd.gsub(/'/, "'\''")}')
|
11
11
|
else
|
12
12
|
run cmd
|
13
13
|
end
|
@@ -20,19 +20,19 @@ module Vlad
|
|
20
20
|
def self.start(opts = '')
|
21
21
|
cmd = signal('HUP')
|
22
22
|
cmd << %( || (#{unicorn_command} -D --config-file #{unicorn_config} #{opts}))
|
23
|
-
maybe_sudo
|
23
|
+
maybe_sudo cmd
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.reload(opts = '')
|
27
27
|
cmd = signal('USR2')
|
28
28
|
cmd << %( || (#{unicorn_command} -D --config-file #{unicorn_config} #{opts}))
|
29
|
-
maybe_sudo
|
29
|
+
maybe_sudo cmd
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.stop
|
33
33
|
cmd = signal('QUIT')
|
34
34
|
cmd << %( || echo "stale pid file #{unicorn_pid}")
|
35
|
-
maybe_sudo
|
35
|
+
maybe_sudo cmd
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vlad-unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
9
|
+
- 1
|
10
|
+
version: 2.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kevin R. Bullock
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2013-03-08 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|