zfben_rails_rake 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ if File.exists? Rails.root.join('.git')
8
8
  desc 'Git commit with your comment'
9
9
  task :commit, [:comment] do |task, args|
10
10
  args = args.to_hash
11
- zfben_rails_rake_system "git add ."
11
+ zfben_rails_rake_system 'git add .'
12
12
  comment = args.has_key?(:comment) ? args[:comment] : `git status`
13
13
  zfben_rails_rake_system "git commit -m '#{comment}' -a"
14
14
  end
@@ -1,13 +1,14 @@
1
1
  if File.exists? Rails.root.join('unicorn.rb')
2
2
  namespace :unicorn do
3
3
  desc 'Start unicorn server'
4
- task :start do
4
+ task :start => :stop do
5
5
  if File.exists? Rails.root.join('config.ru')
6
6
  cmd = 'unicorn'
7
7
  else
8
8
  cmd = 'unicorn_rails'
9
9
  end
10
- zfben_rails_rake_system cmd << ' -c unicorn.rb -E production -D'
10
+ cmd << ' -c unicorn.rb -E production -D'
11
+ zfben_rails_rake_system cmd
11
12
  end
12
13
 
13
14
  desc 'Stop unicorn server'
@@ -15,11 +16,15 @@ if File.exists? Rails.root.join('unicorn.rb')
15
16
  if File.exists? Rails.root.join('tmp/unicorn.pid')
16
17
  zfben_rails_rake_system 'kill -QUIT `cat tmp/unicorn.pid`'
17
18
  sleep 1
19
+ zfben_rails_rake_system 'rm tmp/unicorn.pid'
18
20
  end
19
- zfben_rails_rake_system 'rm -r tmp/*'
20
21
  end
21
22
 
22
- desc 'Restart unicorn server'
23
- task :restart => [:stop, :start]
23
+ desc 'Hot restart unicorn server'
24
+ task :restart do
25
+ if File.exists? Rails.root.join('tmp/unicorn.pid')
26
+ zfben_rails_rake_system 'kill -USR2 `cat tmp/unicorn.pid`'
27
+ end
28
+ end
24
29
  end
25
30
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'zfben_rails_rake'
6
- s.version = '0.0.19'
6
+ s.version = '0.0.20'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Ben']
9
9
  s.email = ['ben@zfben.com']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfben_rails_rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-28 00:00:00.000000000 Z
12
+ date: 2011-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
16
- requirement: &11135260 !ruby/object:Gem::Requirement
16
+ requirement: &19814000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11135260
24
+ version_requirements: *19814000
25
25
  description: ''
26
26
  email:
27
27
  - ben@zfben.com