1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge pull request #1857 from capistrano/white-list-repo-tree-variable

Don't emit warning when repo_tree is set
This commit is contained in:
Matt Brictson 2017-03-04 11:50:47 -08:00 committed by GitHub
commit f04830b1de
3 changed files with 10 additions and 1 deletions

View file

@ -20,6 +20,7 @@ https://github.com/capistrano/capistrano/compare/v3.7.2...HEAD
* [capistrano-harrow#4](https://github.com/harrowio/capistrano-harrow/issues/4): Drop dependency on `capistrano-harrow` gem. Gem can still be installed separately [(@leehambley)](https://github.com/leehambley)
* Run `svn switch` to work with svn branches if repo_url is changed
* [#1856](https://github.com/capistrano/capistrano/pull/1856): Fix hg repo_tree implementation - [@mattbrictson](https://github.com/mattbrictson)
* [#1857](https://github.com/capistrano/capistrano/pull/1857): Don't emit doctor warning when repo_tree is set - [@mattbrictson](https://github.com/mattbrictson)
* Your contribution here!
## `3.7.2` (2017-01-27)

View file

@ -7,7 +7,7 @@ module Capistrano
class VariablesDoctor
# These are keys that have no default values in Capistrano, but are
# nonetheless expected to be set.
WHITELIST = [:application, :repo_url].freeze
WHITELIST = [:application, :repo_url, :repo_tree].freeze
private_constant :WHITELIST
include Capistrano::Doctor::OutputHelpers

View file

@ -14,6 +14,7 @@ module Capistrano
env.variables.untrusted! do
set :application, "my_app"
set :repo_tree, "public"
set :repo_url, ".git"
set :copy_strategy, :scp
set :custom_setting, "hello"
@ -35,6 +36,7 @@ module Capistrano
expect { doc.call }.to output(/:pty\s+false$/).to_stdout
expect { doc.call }.to output(/:application\s+"my_app"$/).to_stdout
expect { doc.call }.to output(/:repo_url\s+".git"$/).to_stdout
expect { doc.call }.to output(/:repo_tree\s+"public"$/).to_stdout
expect { doc.call }.to output(/:copy_strategy\s+:scp$/).to_stdout
expect { doc.call }.to output(/:custom_setting\s+"hello"$/).to_stdout
expect { doc.call }.to output(/"string_setting"\s+"hello"$/).to_stdout
@ -56,6 +58,12 @@ module Capistrano
.to_stdout
end
it "does not print warning for whitelisted variable" do
expect { doc.call }.not_to \
output(/:repo_tree is not a recognized Capistrano setting/)\
.to_stdout
end
describe "Rake" do
before do
load File.expand_path("../../../../../lib/capistrano/doctor.rb",