capistrano 3.0.0.pre → 3.0.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c688937076353e672e483049ea38a97d6000864f
4
- data.tar.gz: eace1bc67b4b34e947afecd46370f25c1cfae865
3
+ metadata.gz: 38d0a3ff8b874c2e4d430c269c18f76d93964753
4
+ data.tar.gz: 52b27720df0d2b9ae3908dcdaef8e1f5eca195af
5
5
  SHA512:
6
- metadata.gz: d6b5223d084c7fae6f9b94d10adddccbdf6e84bbf3e147192242096526b8056062764b975e33e7d2907cd915ea47578a829a021eee2b19f1f8563578dd3bbb2a
7
- data.tar.gz: 9e1e8f12c083f26d10cde152f0175c9606faca0eb885dd3f432ab07a56f8a2b7eea6e51637b9ae0b60e2abc983cfc0c9ae06e0f6abb62e47eeaa8ae8d677a1bd
6
+ metadata.gz: 0dd61efc447d0b8169d354a126bbfb81845d739426e8c3d60752f3038f4e2c2b0f4fc9b94b87a7df41511ea49859193e04a525ef7fcd2ceb5b8d2bf6c7318b96
7
+ data.tar.gz: cf0d253ec7463e3e6e3f106d2f7ceaf30996b61156a59e42852de237f2556b786cc00b1781f016d734b77a995a848677a85023f04b1e687ebd5b6e3fbf8adc55
data/README.md CHANGED
@@ -1,91 +1,94 @@
1
1
  # Capistrano [![Build Status](https://travis-ci.org/capistrano/capistrano.png?branch=v3)](https://travis-ci.org/capistrano/capistrano)
2
2
 
3
- TODO
4
-
5
3
  ## Installation
6
4
 
7
5
  Add this line to your application's Gemfile:
8
6
 
9
- gem 'capistrano', github: 'capistrano/capistrano', branch: :v3
7
+ ``` ruby
8
+ gem 'capistrano', github: 'capistrano/capistrano', branch: :v3
9
+ ```
10
10
 
11
11
  And then execute:
12
12
 
13
- $ bundle --binstubs
13
+ ``` ruby
14
+ $ bundle --binstubs
15
+ ```
14
16
 
15
17
  Capify:
16
18
 
17
- $ cap install
19
+ ``` shell
20
+ $ cap install
21
+ ```
18
22
 
19
23
  This creates the following files:
20
24
 
21
- - `Capfile`
22
- - `lib/deploy/tasks`
23
- - `config/deploy/staging.rb`
24
- - `config/deploy/production.rb`
25
+ ```
26
+ ├── Capfile
27
+ ├── config
28
+ │ ├── deploy
29
+ │ │ ├── production.rb
30
+ │ │ └── staging.rb
31
+ │ └── deploy.rb
32
+ └── lib
33
+ └── capistrano
34
+ └── tasks
35
+ ```
25
36
 
26
37
  To create different stages:
27
38
 
28
- $ cap install STAGES=local,sandbox,qa,production
39
+ ``` shell
40
+ $ cap install STAGES=local,sandbox,qa,production
41
+ ```
29
42
 
30
43
  ## Usage
31
44
 
32
- $ cap -vT
33
-
34
- $ cap staging deploy
35
- $ cap production deploy
36
-
37
- $ cap production deploy --dry-run
38
- $ cap production deploy --prereqs
39
- $ cap production deploy --trace
40
-
41
- ## Configuration
42
-
43
- # config/deploy.rb
44
- set :application, 'example app'
45
+ ``` shell
46
+ $ cap -vT
45
47
 
46
- # config/deploy/production.rb
47
- set :stage, :production
48
+ $ cap staging deploy
49
+ $ cap production deploy
48
50
 
49
- ask :branch, :master
51
+ $ cap production deploy --dry-run
52
+ $ cap production deploy --prereqs
53
+ $ cap production deploy --trace
54
+ ```
50
55
 
51
- role :app, %w{example.com example2.com}
52
- role :web, %w{example.com}
53
- role :db, %w{example.com}
56
+ ## Tasks
54
57
 
55
- # the first server in the array is considered primary
56
58
 
57
- ## Tasks
58
59
 
59
60
  ## Before / After
60
61
 
61
62
  Where calling on the same task name, executed in order of inclusion
62
63
 
64
+ ``` ruby
65
+ # call an existing task
66
+ before :starting, :ensure_user
63
67
 
64
- # call an existing task
65
- before :starting, :ensure_user
66
-
67
- after :finishing, :notify
68
+ after :finishing, :notify
68
69
 
69
70
 
70
- # or define in block
71
- before :starting, :ensure_user do
72
- #
73
- end
71
+ # or define in block
72
+ before :starting, :ensure_user do
73
+ #
74
+ end
74
75
 
75
- after :finishing, :notify do
76
- #
77
- end
76
+ after :finishing, :notify do
77
+ #
78
+ end
79
+ ```
78
80
 
79
81
  ## Console
80
82
 
81
- Execute arbitrary remote commands
83
+ Execute arbitrary remote commands, to use this simply add
84
+ `require 'capistrano/console'` which will add the necessary tasks to your
85
+ environment:
82
86
 
83
- $ cap staging console
87
+ ``` shell
88
+ $ cap staging console
89
+ ```
84
90
 
85
91
  ## Configuration
86
92
 
87
93
 
88
- ## SSHKit
89
-
90
-
91
-
94
+ ## SSHKit
@@ -1,12 +1,7 @@
1
- #!/usr/bin/env cap
2
- # loads dsl, sets up stages
1
+ # Load DSL and Setup Up Stages
3
2
  require 'capistrano/setup'
4
3
 
5
- # provides remote execution of arbitrary commands
6
- require 'capistrano/console'
7
-
8
- # includes default deployment tasks
9
- # remove to start completely from scratch
4
+ # Includes default deployment tasks
10
5
  require 'capistrano/deploy'
11
6
 
12
7
  # Includes tasks from other gems included in your Gemfile
@@ -20,24 +15,29 @@ require 'capistrano/deploy'
20
15
  # require 'capistrano/bundler'
21
16
  # require 'capistrano/rails/assets'
22
17
  # require 'capistrano/rails/migrations'
23
- # require 'capistrano/heroku'
24
18
 
25
- # Loads custom tasks from lib/capistrano/tasks if you have any defined.
26
- # Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
19
+ # Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
20
+ Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
27
21
 
28
22
  namespace :deploy do
23
+
29
24
  desc 'Restart application'
30
25
  task :restart do
31
26
  on roles(:app), in: :sequence, wait: 5 do
32
- #
27
+ # Your restart mechanism here, for example:
28
+ # execute :touch, release_path.join('tmp/restart.txt')
33
29
  end
34
30
  end
35
31
 
36
32
  after :restart, :clear_cache do
37
33
  on roles(:web), in: :groups, limit: 3, wait: 10 do
38
- #
34
+ # Here we can do anything such as:
35
+ # within latest_relese_path do
36
+ # execute :rake, 'cache:clear'
37
+ # end
39
38
  end
40
39
  end
41
40
 
42
41
  after :finishing, 'deploy:cleanup'
42
+
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- VERSION = "3.0.0.pre"
2
+ VERSION = "3.0.0.pre2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre
4
+ version: 3.0.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Clements