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 CHANGED
@@ -9,3 +9,4 @@ syntax: regexp
9
9
  ^pkg/
10
10
  ^doc/
11
11
  ^.yardoc$
12
+ ^vlad-unicorn\.gemspec$
data/.hgtags CHANGED
@@ -2,3 +2,4 @@ d25315ab65a371c98cca14a63572a18356417738 rel-2.0.0
2
2
  bdc7c2851152cf080888a2c6d5d5bf22fc04f5b2 v2.1.0
3
3
  bdc7c2851152cf080888a2c6d5d5bf22fc04f5b2 semver
4
4
  90fa0693a4a0b49241357d1b7b03df6b064a14e9 v2.1.1
5
+ 0fa4ab85e99e8676d791db49fae89f81f164674f v2.2.0
@@ -1,3 +1,9 @@
1
+ === 2.2.1 / 2013-03-08
2
+
3
+ * 1 bug fix
4
+
5
+ * Quote commands better when using sudo
6
+
1
7
  === 2.2.0 / 2012-11-09
2
8
 
3
9
  * 1 minor enhancement
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
@@ -2,12 +2,12 @@ require 'vlad'
2
2
 
3
3
  module Vlad
4
4
  module Unicorn
5
- VERSION = '2.2.0' #:nodoc:
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 %(sh -c '#{cmd}')
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 %(sh -c '#{cmd}')
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 %(sh -c '#{cmd}')
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: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 0
10
- version: 2.2.0
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: 2012-11-09 00:00:00 -06:00
18
+ date: 2013-03-08 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency