capistrano-django 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/capistrano/django.rb +22 -4
  2. metadata +11 -7
  3. checksums.yaml +0 -7
@@ -4,8 +4,22 @@ namespace :deploy do
4
4
 
5
5
  desc 'Restart application'
6
6
  task :restart do
7
+ if fetch(:nginx)
8
+ invoke 'deploy:nginx_restart'
9
+ else
10
+ execute "sudo apache2ctl graceful"
11
+ end
12
+ end
13
+
14
+ task :nginx_restart do
7
15
  on roles(:web) do |h|
8
- execute "sudo service #{fetch :service, 'apache2'} restart"
16
+ within release_path do
17
+ pid_file = "#{releases_path}/gunicorn.pid"
18
+ if test "[ -e #{pid_file} ]"
19
+ execute "kill `cat #{pid_file}`"
20
+ end
21
+ execute "virtualenv/bin/gunicorn", "#{fetch(:wsgi_file)}:application", '-c=gunicorn_config.py', "--pid=#{pid_file}"
22
+ end
9
23
  end
10
24
  end
11
25
 
@@ -63,7 +77,9 @@ namespace :django do
63
77
  invoke 'django:compilemessages'
64
78
  invoke 'django:collectstatic'
65
79
  invoke 'django:symlink_settings'
66
- invoke 'django:symlink_wsgi'
80
+ if !fetch(:nginx)
81
+ invoke 'django:symlink_wsgi'
82
+ end
67
83
  invoke 'django:migrate'
68
84
  end
69
85
 
@@ -137,8 +153,10 @@ namespace :nodejs do
137
153
  desc "Run a grunt task"
138
154
  task :grunt do
139
155
  on roles(:web) do
140
- execute "cd #{release_path}; npm install --production"
141
- execute "cd #{release_path}; ./node_modules/.bin/grunt #{fetch(:grunt_task)}"
156
+ within release_path do
157
+ execute 'npm', 'install', '--production'
158
+ execute './node_modules/.bin/grunt', "#{fetch(:grunt_task)}"
159
+ end
142
160
  end
143
161
  end
144
162
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-django
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Matthew J. Morrison
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-02-13 00:00:00.000000000 Z
12
+ date: 2014-09-04 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: capistrano
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -34,25 +37,26 @@ files:
34
37
  - lib/django_capistrano.rb
35
38
  homepage: http://github.com/mattjmorrison/capistrano-django
36
39
  licenses: []
37
- metadata: {}
38
40
  post_install_message:
39
41
  rdoc_options: []
40
42
  require_paths:
41
43
  - lib
42
44
  required_ruby_version: !ruby/object:Gem::Requirement
45
+ none: false
43
46
  requirements:
44
- - - '>='
47
+ - - ! '>='
45
48
  - !ruby/object:Gem::Version
46
49
  version: '0'
47
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
48
52
  requirements:
49
- - - '>='
53
+ - - ! '>='
50
54
  - !ruby/object:Gem::Version
51
55
  version: '0'
52
56
  requirements: []
53
57
  rubyforge_project:
54
- rubygems_version: 2.1.11
58
+ rubygems_version: 1.8.23
55
59
  signing_key:
56
- specification_version: 4
60
+ specification_version: 3
57
61
  summary: capistrano-django - Welcome to easy deployment with Ruby over SSH for Django
58
62
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: f03d8fb9527f30e21c84988e030b41d63b3df7bd
4
- data.tar.gz: b436c7a67007bd6ca58ce7dd76559aaade935871
5
- SHA512:
6
- metadata.gz: 78e7986c1118e1e0c7c49d8a0a9d068d891ddd3da9f4d282592f8eca2fa77b7ec9052e6a01440f8b9c7cade19957374d667e524c2127c4f5a86edd198d75f49b
7
- data.tar.gz: 87bf5c57792556f57b55ed301f68bf81cfe14477d1e4c2ad39f0897fda6e291159f362c1f8ba18f7dcfa732a4f1d546f1403ad40d851390bfd3836c1e1eb13f8