capistrano 3.7.0 → 3.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +26 -1
- data/UPGRADING-3.7.md +1 -12
- data/features/deploy.feature +0 -1
- data/lib/capistrano/configuration/servers.rb +2 -0
- data/lib/capistrano/configuration/variables.rb +2 -2
- data/lib/capistrano/dsl.rb +2 -0
- data/lib/capistrano/scm/git.rb +4 -1
- data/lib/capistrano/scm/tasks/hg.rake +1 -1
- data/lib/capistrano/version.rb +1 -1
- data/spec/lib/capistrano/scm/git_spec.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9e2c0975c618c32c327228eb811012535f44223
|
4
|
+
data.tar.gz: 545d241645e8487733e8edb9d163ef92fa738e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d92ccd5bb651b77426b30e5acffe766178882a3dc97e0dfca0bbeed55a6e9fc9fd3d47d1e8c35fcee20fc62ec46d0815b09f5a7107fed4767859b465ce50ef83
|
7
|
+
data.tar.gz: a588aea0a342852d0f9836aeb1d10ea87485650743671343d59878b4291cd014f1bea122600583933377bdf0444be43d271fa302803109be5cc41d1a7bbbc1da
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,10 +4,35 @@ Reverse Chronological Order:
|
|
4
4
|
|
5
5
|
## master
|
6
6
|
|
7
|
-
https://github.com/capistrano/capistrano/compare/v3.7.
|
7
|
+
https://github.com/capistrano/capistrano/compare/v3.7.2...HEAD
|
8
8
|
|
9
9
|
* Your contribution here!
|
10
10
|
|
11
|
+
## `3.7.2` (2017-01-27)
|
12
|
+
|
13
|
+
https://github.com/capistrano/capistrano/compare/v3.7.1...v3.7.2
|
14
|
+
|
15
|
+
### Potentially breaking changes:
|
16
|
+
|
17
|
+
* None
|
18
|
+
|
19
|
+
### Other changes:
|
20
|
+
|
21
|
+
* Suppress log messages of `git ls-remote` by filtering remote refs (@aeroastro)
|
22
|
+
* The Git SCM now allows the repo_url to be changed without manually wiping out the mirror on each target host first (@javanthropus)
|
23
|
+
|
24
|
+
## `3.7.1` (2016-12-16)
|
25
|
+
|
26
|
+
https://github.com/capistrano/capistrano/compare/v3.7.0...v3.7.1
|
27
|
+
|
28
|
+
### Potentially breaking changes:
|
29
|
+
|
30
|
+
* None
|
31
|
+
|
32
|
+
### Fixes:
|
33
|
+
|
34
|
+
* Fixed a bug with mercurial deploys failing due to an undefined variable
|
35
|
+
|
11
36
|
## `3.7.0` (2016-12-10)
|
12
37
|
|
13
38
|
https://github.com/capistrano/capistrano/compare/v3.6.1...v3.7.0
|
data/UPGRADING-3.7.md
CHANGED
@@ -1,16 +1,5 @@
|
|
1
1
|
# Capistrano 3.7.0 upgrade guide
|
2
2
|
|
3
|
-
Capistrano 3.7.0 has not yet been released. This guide serves as a preview of
|
4
|
-
what is *planned* for 3.7.0, so that you can be prepared to update your
|
5
|
-
Capistrano deployment if necessary once it becomes available.
|
6
|
-
|
7
|
-
If you wish to try the new 3.7.0 behavior today, you can do so by using the
|
8
|
-
`master` branch in your Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem "capistrano", :github => "capistrano/capistrano"
|
12
|
-
```
|
13
|
-
|
14
3
|
## The :scm variable is deprecated
|
15
4
|
|
16
5
|
Up until now, Capistrano's SCM was configured using the `:scm` variable:
|
@@ -23,7 +12,7 @@ set :scm, :svn
|
|
23
12
|
To avoid deprecation warnings:
|
24
13
|
|
25
14
|
1. Remove `set :scm, ...` from your Capistrano configuration.
|
26
|
-
2. Add *one* of the following SCM declarations to your `Capfile`:
|
15
|
+
2. Add *one* of the following SCM declarations to your `Capfile` after `require "capistrano/deploy"`:
|
27
16
|
|
28
17
|
```ruby
|
29
18
|
# To use Git
|
data/features/deploy.feature
CHANGED
@@ -17,10 +17,12 @@ module Capistrano
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
# rubocop:disable Security/MarshalLoad
|
20
21
|
def add_role(role, hosts, options={})
|
21
22
|
options_deepcopy = Marshal.dump(options.merge(roles: role))
|
22
23
|
Array(hosts).each { |host| add_host(host, Marshal.load(options_deepcopy)) }
|
23
24
|
end
|
25
|
+
# rubocop:enable Security/MarshalLoad
|
24
26
|
|
25
27
|
def roles_for(names)
|
26
28
|
options = extract_options(names)
|
@@ -35,7 +35,7 @@ module Capistrano
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def set(key, value=nil, &block)
|
38
|
-
@trusted_keys << key if trusted?
|
38
|
+
@trusted_keys << key if trusted? && !@trusted_keys.include?(key)
|
39
39
|
remember_location(key)
|
40
40
|
values[key] = block || value
|
41
41
|
trace_set(key)
|
@@ -43,7 +43,7 @@ module Capistrano
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def fetch(key, default=nil, &block)
|
46
|
-
fetched_keys << key
|
46
|
+
fetched_keys << key unless fetched_keys.include?(key)
|
47
47
|
peek(key, default, &block)
|
48
48
|
end
|
49
49
|
|
data/lib/capistrano/dsl.rb
CHANGED
@@ -59,10 +59,12 @@ module Capistrano
|
|
59
59
|
VersionValidator.new(locked_version).verify
|
60
60
|
end
|
61
61
|
|
62
|
+
# rubocop:disable Security/MarshalLoad
|
62
63
|
def on(hosts, options={}, &block)
|
63
64
|
subset_copy = Marshal.dump(Configuration.env.filter(hosts))
|
64
65
|
SSHKit::Coordinator.new(Marshal.load(subset_copy)).each(options, &block)
|
65
66
|
end
|
67
|
+
# rubocop:enable Security/MarshalLoad
|
66
68
|
|
67
69
|
def run_locally(&block)
|
68
70
|
SSHKit::Backend::Local.new(&block).run
|
data/lib/capistrano/scm/git.rb
CHANGED
@@ -32,7 +32,7 @@ class Capistrano::SCM::Git < Capistrano::SCM::Plugin
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def check_repo_is_reachable
|
35
|
-
git :'ls-remote
|
35
|
+
git :'ls-remote', repo_url, "HEAD"
|
36
36
|
end
|
37
37
|
|
38
38
|
def clone_repo
|
@@ -44,6 +44,9 @@ class Capistrano::SCM::Git < Capistrano::SCM::Plugin
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def update_mirror
|
47
|
+
# Update the origin URL if necessary.
|
48
|
+
git :remote, "set-url", "origin", repo_url
|
49
|
+
|
47
50
|
# Note: Requires git version 1.9 or greater
|
48
51
|
if (depth = fetch(:git_shallow_clone))
|
49
52
|
git :fetch, "--depth", depth, "origin", fetch(:branch)
|
data/lib/capistrano/version.rb
CHANGED
@@ -46,7 +46,7 @@ module Capistrano
|
|
46
46
|
describe "#check_repo_is_reachable" do
|
47
47
|
it "should test the repo url" do
|
48
48
|
env.set(:repo_url, "url")
|
49
|
-
backend.expects(:execute).with(:git, :'ls-remote
|
49
|
+
backend.expects(:execute).with(:git, :'ls-remote', "url", "HEAD").returns(true)
|
50
50
|
|
51
51
|
subject.check_repo_is_reachable
|
52
52
|
end
|
@@ -74,6 +74,9 @@ module Capistrano
|
|
74
74
|
|
75
75
|
describe "#update_mirror" do
|
76
76
|
it "should run git update" do
|
77
|
+
env.set(:repo_url, "url")
|
78
|
+
|
79
|
+
backend.expects(:execute).with(:git, :remote, "set-url", "origin", "url")
|
77
80
|
backend.expects(:execute).with(:git, :remote, :update, "--prune")
|
78
81
|
|
79
82
|
subject.update_mirror
|
@@ -82,6 +85,9 @@ module Capistrano
|
|
82
85
|
it "should run git update in shallow mode" do
|
83
86
|
env.set(:git_shallow_clone, "1")
|
84
87
|
env.set(:branch, "branch")
|
88
|
+
env.set(:repo_url, "url")
|
89
|
+
|
90
|
+
backend.expects(:execute).with(:git, :remote, "set-url", "origin", "url")
|
85
91
|
backend.expects(:execute).with(:git, :fetch, "--depth", "1", "origin", "branch")
|
86
92
|
|
87
93
|
subject.update_mirror
|
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.7.
|
4
|
+
version: 3.7.2
|
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:
|
12
|
+
date: 2017-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: airbrussh
|
@@ -297,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
297
|
version: '0'
|
298
298
|
requirements: []
|
299
299
|
rubyforge_project:
|
300
|
-
rubygems_version: 2.6.
|
300
|
+
rubygems_version: 2.6.10
|
301
301
|
signing_key:
|
302
302
|
specification_version: 4
|
303
303
|
summary: Capistrano - Welcome to easy deployment with Ruby over SSH
|