capistrano-django 2.0.0 → 2.1.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. checksums.yaml +4 -4
  2. data/lib/capistrano/django.rb +10 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a6a1fdb924e977b7cd3e1a4c88bd48e1f634234
4
- data.tar.gz: 6772d3207dedd614ac4fe7f2dd5226efe15d1d46
3
+ metadata.gz: b56446c68da2f73855e30a3f193f7439581ccf21
4
+ data.tar.gz: 50730972d7ac9a5253394e4423719fbb2ed6338d
5
5
  SHA512:
6
- metadata.gz: 06ce8f01070c2185cf302110a682349e3f19796d3bd7c6022df86a984e306b2ddf9bbe35779e4c77c6fbb3087a873cb15e454f255318af097de9dde14a5a0fbd
7
- data.tar.gz: a8ea0c0dd1a06a98d9fae6feada07caa3ad10ed59cdc43a6661b2f33b76fc78bd06c9c098ddda30a067a24bda01764fa7b9440cccf338cb9f85cdbaee9907599
6
+ metadata.gz: 249176238b47012692c47166a1fd2e62dc7a310081ca99eee6e2c45265acd7735a74b9d6955502354809de11d5ca7998f9e530250f2872f6e1bc78cd69aba884
7
+ data.tar.gz: 1427c60e3639682a0312494a6041fb9b1719b025fe500e69b8c5103f6a4cf303c0f6b967f5a84b7a8fb3b1c8f55148e9a844f2bea824bf0449d3a8f9a3f27710
@@ -16,8 +16,9 @@ namespace :python do
16
16
  desc "Create a python virtualenv"
17
17
  task :create_virtualenv do
18
18
  on roles(:all) do |h|
19
- execute "virtualenv #{release_path}/virtualenv"
20
- execute "#{release_path}/virtualenv/bin/pip install -r #{release_path}/#{fetch(:pip_requirements)}"
19
+ virtualenv_path = File.join(release_path, 'virtualenv')
20
+ execute "virtualenv #{virtualenv_path}"
21
+ execute "#{virtualenv_path}/bin/pip install -r #{release_path}/#{fetch(:pip_requirements)}"
21
22
  end
22
23
  if fetch(:flask)
23
24
  invoke 'flask:setup'
@@ -71,7 +72,7 @@ namespace :django do
71
72
 
72
73
  desc "Symlink django settings to deployed.py"
73
74
  task :symlink_settings do
74
- settings_path = "#{release_path}/#{fetch(:django_settings_dir)}"
75
+ settings_path = File.join(release_path, fetch(:django_settings_dir))
75
76
  on roles(:all) do
76
77
  execute "ln -s #{settings_path}/#{fetch(:django_settings)}.py #{settings_path}/deployed.py"
77
78
  end
@@ -80,14 +81,18 @@ namespace :django do
80
81
  desc "Symlink wsgi script to live.wsgi"
81
82
  task :symlink_wsgi do
82
83
  on roles(:web) do
83
- wsgi_path = File.join(release_path, fetch(:wsgi_path) || 'wsgi')
84
+ wsgi_path = File.join(release_path, fetch(:wsgi_path, 'wsgi'))
84
85
  execute "ln -sf #{wsgi_path}/main.wsgi #{wsgi_path}/live.wsgi"
85
86
  end
86
87
  end
87
88
 
88
89
  desc "Run django migrations"
89
90
  task :migrate do
90
- django("syncdb", "--noinput --migrate")
91
+ if fetch(:multidb)
92
+ django("sync_all", '--noinput')
93
+ else
94
+ django("syncdb", "--noinput --migrate")
95
+ end
91
96
  end
92
97
 
93
98
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-django
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew J. Morrison