capistrano 3.7.1 → 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 +14 -1
- data/UPGRADING-3.7.md +1 -1
- 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/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,23 @@ 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
|
+
|
11
24
|
## `3.7.1` (2016-12-16)
|
12
25
|
|
13
26
|
https://github.com/capistrano/capistrano/compare/v3.7.0...v3.7.1
|
data/UPGRADING-3.7.md
CHANGED
@@ -12,7 +12,7 @@ set :scm, :svn
|
|
12
12
|
To avoid deprecation warnings:
|
13
13
|
|
14
14
|
1. Remove `set :scm, ...` from your Capistrano configuration.
|
15
|
-
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"`:
|
16
16
|
|
17
17
|
```ruby
|
18
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
|