capistrano-deploy-management 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'capistrano-deploy-management'
4
- s.version = '0.1.2'
4
+ s.version = '0.1.3'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Dominik Rodler']
7
7
  s.email = ['dominik.rodler@gmail.com']
data/changelog.md CHANGED
@@ -1,4 +1,7 @@
1
- - 0.1.1
1
+ - 0.1.3
2
+ unicorn recipe: only stop unicorn, if pid file exists
3
+
4
+ - 0.1.2
2
5
  fixed bug in unicorn recipe
3
6
 
4
7
  - 0.1.1
@@ -20,6 +20,13 @@ module CapistranoDeployManagement
20
20
  desc 'Clear application cache (e.g. Memcached).'
21
21
  task :refresh_cache, roles: :app do
22
22
  run "cd #{current_path} && rake cache:clear RAILS_ENV=#{rails_env}"
23
+ # Requires this rake task: (include here!?)
24
+ # namespace :cache do
25
+ # desc 'Clear memcache'
26
+ # task clear: :environment do
27
+ # Rails.cache.clear
28
+ # end
29
+ # end
23
30
  end
24
31
  end
25
32
  end
@@ -3,13 +3,14 @@ module CapistranoDeployManagement
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
5
 
6
- set(:unicorn_config) { "#{current_path}/config/unicorn.rb" }
7
- set(:unicorn_pidfile) { "cat #{deploy_to}/shared/pids/unicorn.pid" }
6
+ set(:unicorn_config) { "#{current_path}/config/unicorn.rb" }
7
+ set(:unicorn_pidfile) { "#{deploy_to}/shared/pids/unicorn.pid" }
8
+ set(:unicorn_pid) { "cat #{unicorn_pidfile}" }
8
9
 
9
10
  namespace :unicorn do
10
11
  desc 'Restart unicorn.'
11
12
  task :restart, :roles => :app, :except => {:no_release => true} do
12
- unicorn.stop
13
+ # unicorn.stop
13
14
  unicorn.start
14
15
  end
15
16
 
@@ -20,7 +21,7 @@ module CapistranoDeployManagement
20
21
 
21
22
  desc 'Stop unicorn.'
22
23
  task :stop, :roles => :app, :except => {:no_release => true} do
23
- run "cd #{current_path} && kill $(#{unicorn_pidfile})"
24
+ run "if test -s #{unicorn_pidfile}; then cd #{current_path} && kill $(#{unicorn_pid}) fi"
24
25
  end
25
26
  end
26
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-deploy-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: