capistrano-offroad 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -199,10 +199,15 @@ Table of Contents
199
199
  Directory in your repository that contains Django project (one
200
200
  with the the `manage.py' file). Defaults to "project".
201
201
  + :django_use_south
202
- Assume [South] is used for database migrations. Defaults to true.
202
+ Assume [South] is used for database migrations. Defaults to false.
203
203
 
204
204
  [South]: http://south.aeracode.org/
205
205
 
206
+ + :django_databases
207
+ This setting can be set to a list of database names (for
208
+ Django-1.2 multi-database support), against which Capistrano
209
+ will run syncdb/migrations. If unset or false, syncdb/migrations
210
+ will be run with default database only (as for pre-1.2 Django).
206
211
  * Functions and utilities
207
212
  django_manage cmd, options={}
208
213
  Runs the `manage.py' command `cmd'. Optional keyword argument
@@ -269,7 +274,7 @@ Table of Contents
269
274
  running.
270
275
  + deploy:reload_supervisord
271
276
  Reloads supervisor daemon's config. Starts it if not started.
272
- + deploy:supervisorctl
277
+ + deploy:run_supervisorctl
273
278
  Runs supplied supervisorctl command. Command should be provided
274
279
  in COMMAND variable; if no variable is provided,
275
280
  capistrano-offroad will ask for the command.
@@ -8,6 +8,7 @@ Capistrano::Configuration.instance(:must_exist).load do
8
8
 
9
9
  set :django_project_subdirectory, "project"
10
10
  set :django_use_south, false
11
+ set :django_databases, nil
11
12
 
12
13
  depend :remote, :command, "#{python}"
13
14
 
@@ -34,7 +35,13 @@ EOF
34
35
  task :migrate, :roles => :db, :only => { :primary => true } do
35
36
  # FIXME: path, see default railsy deploy:migrate
36
37
  m = if fetch(:django_use_south, false) then "--migrate" else "" end
37
- django_manage "syncdb --noinput #{m}"
38
+ if fetch(:django_databases, nil)
39
+ fetch(:django_databases, nil).each { |db|
40
+ django_manage "syncdb --noinput #{m} --database=#{db}"
41
+ }
42
+ else
43
+ django_manage "syncdb --noinput #{m}"
44
+ end
38
45
  end
39
46
  end
40
47
 
@@ -86,7 +86,7 @@ Capistrano::Configuration.instance(:must_exist).load do
86
86
  supervisorctl "reload"
87
87
  end
88
88
 
89
- task :supervisorctl do
89
+ task :run_supervisorctl do
90
90
  set_from_env_or_ask :command, "supervisorctl command: "
91
91
  supervisorctl "#{command}", :try_start => false
92
92
  end
@@ -2,7 +2,7 @@ module CapistranoOffroad
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
 
8
8
  def VERSION.require_version(major, minor=0, tiny=0)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-offroad
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Maciej Pasternacki
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-28 00:00:00 +02:00
18
+ date: 2010-07-27 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency