capistrano 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/README.md +3 -3
- data/lib/capistrano/configuration.rb +4 -0
- data/lib/capistrano/configuration/question.rb +1 -1
- data/lib/capistrano/dsl.rb +2 -1
- data/lib/capistrano/dsl/env.rb +1 -6
- data/lib/capistrano/dsl/task_enhancements.rb +2 -4
- data/lib/capistrano/git.rb +1 -1
- data/lib/capistrano/i18n.rb +2 -3
- data/lib/capistrano/version.rb +1 -1
- data/spec/integration/dsl_spec.rb +1 -1
- data/spec/lib/capistrano/configuration/question_spec.rb +2 -2
- data/spec/lib/capistrano/configuration_spec.rb +13 -0
- data/spec/lib/capistrano/dsl_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89a96214d20583f07f6f4094f94235893bec7ee1
|
4
|
+
data.tar.gz: 5744a684bea5aa5d11a400fb90159495e685c28f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e23596ce8fd844d9292f92a4fc7c6a97feceb85ecdfce82eb6462822ffe456929a693b4fdfeb2261258a7b8dffd65960c69e3688e4a433021e5db4e1062588a2
|
7
|
+
data.tar.gz: efc1d484e301975405fd1f7c3081ba0d2850e2dd8a64bcfbfc10b9f0b1dcbf1fea1e6e2e1cb07905327f984647c12ba798ad821198344fe9d30f8d1c291eeada
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,21 @@ Reverse Chronological Order:
|
|
6
6
|
|
7
7
|
https://github.com/capistrano/capistrano/compare/v3.2.0...HEAD
|
8
8
|
|
9
|
-
## `3.2.
|
9
|
+
## `3.2.1`
|
10
|
+
|
11
|
+
* Bug Fixes:
|
12
|
+
* 3.2.0 introduced some behaviour to modify the way before/after hooks were called, to allow the optional
|
13
|
+
preservation of arguments to be passed to tasks. This release reverts that commit in order to restore
|
14
|
+
original functionality, and fix (fairly serious) bugs introduced by the refactoring.
|
15
|
+
|
16
|
+
* Minor changes:
|
17
|
+
* Update dsl#local_user method and add test for it. (@bruno-)
|
18
|
+
* Revert short sha1 revision with git. (@blaugueux)
|
19
|
+
* Changed asking question to more standard format (like common unix commandline tools) (@sponomarev)
|
20
|
+
* Fixed typos in the README. (@sponomarev)
|
21
|
+
* Added `keys` method to Configuration to allow introspection of configuration options. (@juanibiapina)
|
22
|
+
|
23
|
+
## `3.2.0`
|
10
24
|
|
11
25
|
The changelog entries here are incomplete, because many authors choose not to
|
12
26
|
be credited for their work, check the tag comparison link for Github.
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Get <a href="http://codersclan.net/?repo_id=325&source=link">Capistrano support
|
|
17
17
|
Add this line to your application's Gemfile:
|
18
18
|
|
19
19
|
``` ruby
|
20
|
-
gem 'capistrano', '~> 3.
|
20
|
+
gem 'capistrano', '~> 3.2.0'
|
21
21
|
```
|
22
22
|
|
23
23
|
And then execute:
|
@@ -156,10 +156,10 @@ Perfect, who needs telephones.
|
|
156
156
|
|
157
157
|
## Using password authentication
|
158
158
|
|
159
|
-
Password authentication can be done via `set` and `ask` in your deploy environment file (e.g.: config/
|
159
|
+
Password authentication can be done via `set` and `ask` in your deploy environment file (e.g.: config/deploy/production.rb)
|
160
160
|
|
161
161
|
```ruby
|
162
|
-
set :password, ask('Server password
|
162
|
+
set :password, ask('Server password', nil)
|
163
163
|
server 'server.domain.com', user: 'ssh_user_name', port: 22, password: fetch(:password), roles: %w{web app db}
|
164
164
|
```
|
165
165
|
|
data/lib/capistrano/dsl.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'etc'
|
1
2
|
require 'capistrano/dsl/task_enhancements'
|
2
3
|
require 'capistrano/dsl/paths'
|
3
4
|
require 'capistrano/dsl/stages'
|
@@ -41,7 +42,7 @@ module Capistrano
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def local_user
|
44
|
-
|
45
|
+
Etc.getlogin
|
45
46
|
end
|
46
47
|
|
47
48
|
def lock(locked_version)
|
data/lib/capistrano/dsl/env.rb
CHANGED
@@ -44,12 +44,7 @@ module Capistrano
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def release_roles(*names)
|
47
|
-
|
48
|
-
if names.last.is_a? Hash
|
49
|
-
names.last.merge(options)
|
50
|
-
else
|
51
|
-
names << options
|
52
|
-
end
|
47
|
+
names << { exclude: :no_release } unless names.last.is_a? Hash
|
53
48
|
roles(*names)
|
54
49
|
end
|
55
50
|
|
@@ -2,16 +2,14 @@ module Capistrano
|
|
2
2
|
module TaskEnhancements
|
3
3
|
def before(task, prerequisite, *args, &block)
|
4
4
|
prerequisite = Rake::Task.define_task(prerequisite, *args, &block) if block_given?
|
5
|
-
Rake::Task[task].enhance
|
6
|
-
Rake::Task[prerequisite].invoke(*args)
|
7
|
-
end
|
5
|
+
Rake::Task[task].enhance [prerequisite]
|
8
6
|
end
|
9
7
|
|
10
8
|
def after(task, post_task, *args, &block)
|
11
9
|
Rake::Task.define_task(post_task, *args, &block) if block_given?
|
12
10
|
post_task = Rake::Task[post_task]
|
13
11
|
Rake::Task[task].enhance do
|
14
|
-
post_task.invoke
|
12
|
+
post_task.invoke
|
15
13
|
end
|
16
14
|
end
|
17
15
|
|
data/lib/capistrano/git.rb
CHANGED
data/lib/capistrano/i18n.rb
CHANGED
@@ -3,7 +3,6 @@ require 'i18n'
|
|
3
3
|
en = {
|
4
4
|
starting: 'Starting',
|
5
5
|
capified: 'Capified',
|
6
|
-
starting: 'Starting',
|
7
6
|
start: 'Start',
|
8
7
|
update: 'Update',
|
9
8
|
finalize: 'Finalise',
|
@@ -11,12 +10,12 @@ en = {
|
|
11
10
|
finished: 'Finished',
|
12
11
|
stage_not_set: 'Stage not set, please call something such as `cap production deploy`, where production is a stage you have defined.',
|
13
12
|
written_file: 'create %{file}',
|
14
|
-
question: 'Please enter %{key}
|
13
|
+
question: 'Please enter %{key} (%{default_value}): ',
|
15
14
|
keeping_releases: 'Keeping %{keep_releases} of %{releases} deployed releases on %{host}',
|
16
15
|
no_old_releases: 'No old releases (keeping newest %{keep_releases}) on %{host}',
|
17
16
|
linked_file_does_not_exist: 'linked file %{file} does not exist on %{host}',
|
18
17
|
cannot_rollback: 'There are no older releases to rollback to',
|
19
|
-
mirror_exists:
|
18
|
+
mirror_exists: 'The repository mirror is at %{at}',
|
20
19
|
revision_log_message: 'Branch %{branch} (at %{sha}) deployed as release %{release} by %{user}',
|
21
20
|
rollback_log_message: '%{user} rolled back to release %{release}',
|
22
21
|
deploy_failed: 'The deploy has failed with an error: %{ex}',
|
data/lib/capistrano/version.rb
CHANGED
@@ -23,7 +23,7 @@ module Capistrano
|
|
23
23
|
let(:branch) { 'branch' }
|
24
24
|
|
25
25
|
before do
|
26
|
-
$stdout.expects(:
|
26
|
+
$stdout.expects(:print).with('Please enter branch (default): ')
|
27
27
|
$stdin.expects(:gets).returns(branch)
|
28
28
|
end
|
29
29
|
|
@@ -37,7 +37,7 @@ module Capistrano
|
|
37
37
|
let(:branch) { default }
|
38
38
|
|
39
39
|
before do
|
40
|
-
$stdout.expects(:
|
40
|
+
$stdout.expects(:print).with('Please enter branch (default): ')
|
41
41
|
$stdin.expects(:gets).returns('')
|
42
42
|
end
|
43
43
|
|
@@ -112,6 +112,19 @@ module Capistrano
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
+
describe 'keys' do
|
116
|
+
subject { config.keys }
|
117
|
+
|
118
|
+
before do
|
119
|
+
config.set(:key1, :value1)
|
120
|
+
config.set(:key2, :value2)
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'returns all set keys' do
|
124
|
+
expect(subject).to match_array [:key1, :key2]
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
115
128
|
describe 'deleting' do
|
116
129
|
before do
|
117
130
|
config.set(:key, :value)
|
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.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Clements
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sshkit
|