capedia 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/capedia.rb +1 -1
- data/lib/capedia/rails.rb +11 -0
- metadata +5 -5
data/lib/capedia.rb
CHANGED
data/lib/capedia/rails.rb
CHANGED
@@ -31,6 +31,16 @@ Capistrano::Configuration.instance.load do
|
|
31
31
|
# If cap deploy -S createdb=true - create the database on the target server.
|
32
32
|
deploy.db.create if fetch( :createdb, false )
|
33
33
|
end
|
34
|
+
|
35
|
+
desc 'Seeds the database on the target server if seeddb is passed to cap deploy.'
|
36
|
+
task :seed, :except => { :no_release => true } do
|
37
|
+
run "cd #{current_path}; rake db:seed RAILS_ENV=#{ fetch( :stage ) }"
|
38
|
+
end
|
39
|
+
|
40
|
+
task :seed?, :except => { :no_release => true } do
|
41
|
+
# If cap deploy -S createdb=true - create the database on the target server.
|
42
|
+
deploy.db.seed if fetch( :seeddb, false )
|
43
|
+
end
|
34
44
|
|
35
45
|
end
|
36
46
|
|
@@ -39,6 +49,7 @@ Capistrano::Configuration.instance.load do
|
|
39
49
|
after 'deploy:symlink', 'deploy:gems:install'
|
40
50
|
after 'deploy:gems:install', 'deploy:db:create?'
|
41
51
|
after 'deploy:db:create?', 'deploy:migrate'
|
52
|
+
after 'deploy:migrate', 'deploy:db:seed?'
|
42
53
|
|
43
54
|
after 'deploy:restart', 'deploy:cleanup'
|
44
55
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capedia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 13
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Wilson
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
requirements: []
|
70
70
|
|
71
71
|
rubyforge_project: ""
|
72
|
-
rubygems_version: 1.
|
72
|
+
rubygems_version: 1.5.0
|
73
73
|
signing_key:
|
74
74
|
specification_version: 3
|
75
75
|
summary: Common capistrano plugins and recipes
|