capedia 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Capedia
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.6'
3
3
 
4
4
  module Gems
5
5
 
@@ -3,17 +3,20 @@ Capistrano::Configuration.instance.load do
3
3
  namespace :deploy do
4
4
 
5
5
  namespace :pollers do
6
-
6
+
7
+ desc "Starts the poller"
7
8
  task :start, :roles => :app do
8
9
  fetch(:poller_count, 0).times do
9
10
  run "#{current_path}/script/poller start"
10
11
  end
11
12
  end
12
13
 
14
+ desc "Stops the poller"
13
15
  task :stop, :roles => :app do
14
16
  run "#{current_path}/script/poller stop"
15
17
  end
16
18
 
19
+ desc "Restarts the poller"
17
20
  task :restart, :roles => :app do
18
21
  deploy.pollers.stop
19
22
  deploy.pollers.start
@@ -5,14 +5,14 @@ Capistrano::Configuration.instance.load do
5
5
  namespace :gems do
6
6
 
7
7
  desc 'Installs all gems for the current release (uses bundler)'
8
- task :bundle_install, :except => { :no_release => true } do
9
- run "cd #{current_path}; bundle install --deployment"
8
+ task :install, :except => { :no_release => true } do
9
+ run "cd #{current_path}; bundle install"
10
10
  end
11
11
 
12
12
  end
13
13
 
14
14
  end
15
15
 
16
- after 'deploy:symlink', 'deploy:gems:bundle_install'
16
+ after 'deploy:symlink', 'deploy:gems:install'
17
17
 
18
18
  end
@@ -1,13 +1,16 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
 
3
3
  namespace :deploy do
4
-
4
+
5
+ desc "Stub for starting the application"
5
6
  task :start do
6
7
  end
7
8
 
9
+ desc "Stub for stopping the application"
8
10
  task :stop do
9
11
  end
10
12
 
13
+ desc "Restart the application"
11
14
  task :restart, :roles => :web, :except => { :no_release => true } do
12
15
  run "#{try_sudo} touch #{File.join(current_path, 'tmp', 'restart.txt')}"
13
16
  end
@@ -1,8 +1,8 @@
1
1
  require 'capedia/config'
2
2
  require 'capedia/gems'
3
- require 'capedia/rails_gems_install'
4
3
 
5
4
  Capistrano::Configuration.instance.load do
6
- after 'deploy:gems:install', 'deploy:migrate'
5
+ after 'deploy:symlink', 'deploy:db:create?'
6
+ after 'deploy:symlink', 'deploy:migrate'
7
7
  after 'deploy:restart', 'deploy:cleanup'
8
- end
8
+ end
@@ -0,0 +1,23 @@
1
+ Capistrano::Configuration.instance.load do | configuration |
2
+
3
+ namespace :deploy do
4
+
5
+ namespace :db do
6
+
7
+ desc 'Creates the database on the target server if createdb is passed to cap deploy.'
8
+ task :create, :except => { :no_release => true } do
9
+ # If cap deploy -S createdb=true is set create the database on the target server.
10
+ run "cd #{current_path}; rake db:create RAILS_ENV=#{ fetch( :stage ) }"
11
+ end
12
+
13
+ task :create?, :except => { :no_release => true } do
14
+ deploy.db.create if fetch( :createdb, false ) == true
15
+ end
16
+
17
+ end
18
+
19
+ end
20
+
21
+ after 'deploy:symlink', 'deploy:gems:install'
22
+
23
+ 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: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Wilson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-09 00:00:00 -07:00
18
+ date: 2011-02-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -29,12 +29,13 @@ extra_rdoc_files: []
29
29
 
30
30
  files:
31
31
  - lib/capedia/active_messaging.rb
32
+ - lib/capedia/bundler_install.rb
32
33
  - lib/capedia/config.rb
33
34
  - lib/capedia/crontab.rb
34
35
  - lib/capedia/gems.rb
35
36
  - lib/capedia/passenger.rb
36
37
  - lib/capedia/rails.rb
37
- - lib/capedia/rails_bundler_install.rb
38
+ - lib/capedia/rails_db.rb
38
39
  - lib/capedia/rails_gems_install.rb
39
40
  - lib/capedia.rb
40
41
  - lib/Rakefile