capistrano-af83 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@
3
3
 
4
4
  namespace :deploy do
5
5
  namespace :web do
6
+ desc "Web disable"
6
7
  task :disable, :roles => :web, :except => { :no_release => true } do
7
8
  on_rollback { run "rm #{shared_path}/system/maintenance.html" }
8
9
  require 'erb'
@@ -1,8 +1,16 @@
1
+ # Use the config/database/#{rails_env}.yml file for database config
2
+
1
3
  namespace :database do
4
+ desc "Copy database config"
5
+ task :copy do
6
+ upload "config/database/#{rails_env}.yml", "#{shared_path}/database.yml", :via => :scp
7
+ end
8
+
2
9
  desc "Link the config/database.yml file in the release_path"
3
10
  task :symlink do
4
11
  run "test -f #{release_path}/config/database.yml || ln -s #{shared_path}/database.yml #{release_path}/config/database.yml"
5
12
  end
6
13
  end
7
14
 
15
+ after "deploy:update_code", "database:copy"
8
16
  after "deploy:update_code", "database:symlink"
@@ -6,6 +6,7 @@ namespace :es do
6
6
  run "cd #{release_path} && #{bundle_cmd} exec rake es:soft_start", :once => true
7
7
  end
8
8
 
9
+ desc "Restart Elastic Search if needed"
9
10
  task :restart do
10
11
  run "cd #{release_path} && #{bundle_cmd} exec rake es:running_restart", :once => true
11
12
  end
@@ -3,14 +3,17 @@
3
3
  depend :remote, :command, "bundle"
4
4
 
5
5
  namespace :deploy do
6
+ desc 'Start thin'
6
7
  task :start, :roles => :app do
7
8
  run "cd #{current_path} && #{bundle_cmd} exec thin start -C #{shared_path}/thin.yml"
8
9
  end
9
10
 
11
+ desc 'Stop thin'
10
12
  task :stop, :rules => :app do
11
13
  run "cd #{current_path} && #{bundle_cmd} exec thin stop -C #{shared_path}/thin.yml"
12
14
  end
13
15
 
16
+ desc 'Restart thin'
14
17
  task :restart, :roles => :app, :except => { :no_release => true } do
15
18
  run "cd #{current_path} && #{bundle_cmd} exec thin restart -C #{shared_path}/thin.yml"
16
19
  end
@@ -3,15 +3,18 @@
3
3
  depend :remote, :command, "bundle"
4
4
 
5
5
  namespace :deploy do
6
+ desc "Start unicorn"
6
7
  task :start, :roles => :app do
7
8
  run "cd #{current_path} && #{bundle_cmd} exec unicorn -c config/unicorn.rb -E #{rails_env} -D"
8
9
  end
9
10
 
11
+ desc "Stop unicorn"
10
12
  task :stop, :roles => :app do
11
13
  set :unicorn_pidfile, "#{shared_path}/pids/unicorn.pid"
12
14
  run "if [ -e #{unicorn_pidfile} ] ; then kill -QUIT `cat #{unicorn_pidfile}` ; fi"
13
15
  end
14
16
 
17
+ desc "Restart unicorn"
15
18
  task :restart, :roles => :app do
16
19
  set :unicorn_pid, capture("cat #{shared_path}/pids/unicorn.pid").chomp
17
20
  run "kill -USR2 #{unicorn_pid}"
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module AF83
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-af83
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-23 00:00:00.000000000 Z
12
+ date: 2012-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &82233020 !ruby/object:Gem::Requirement
16
+ requirement: &19437240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.9'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *82233020
24
+ version_requirements: *19437240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: capistrano_colors
27
- requirement: &82232650 !ruby/object:Gem::Requirement
27
+ requirement: &19436460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.5'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *82232650
35
+ version_requirements: *19436460
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: capistrano-notification
38
- requirement: &82231550 !ruby/object:Gem::Requirement
38
+ requirement: &19435620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *82231550
46
+ version_requirements: *19435620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sushi
49
- requirement: &82230840 !ruby/object:Gem::Requirement
49
+ requirement: &19433840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 0.0.2
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *82230840
57
+ version_requirements: *19433840
58
58
  description: Capistrano recipes for af83
59
59
  email: bruno.michel@af83.com
60
60
  executables: []
@@ -99,9 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project:
102
- rubygems_version: 1.8.12
102
+ rubygems_version: 1.8.11
103
103
  signing_key:
104
104
  specification_version: 3
105
105
  summary: Capistrano recipes for af83
106
106
  test_files: []
107
- has_rdoc: