mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Fix missing default for :local in cvs.rb (closes #3645). Thanks for including the unit test!
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@4568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
f303df3e4d
commit
460a15ea98
3 changed files with 17 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fix missing default for :local in cvs.rb (closes #3645) [jeremy@hinegardner.org]
|
||||
|
||||
* Fix awkward spacing in gemspec file (closes #3888) [grant@antiflux.org]
|
||||
|
||||
* Add support for :sudo variable to specify path to sudo (closes #4578) [timothee.peignier@tryphon.org]
|
||||
|
|
|
@ -33,6 +33,11 @@ module Capistrano
|
|||
class Cvs < Base
|
||||
def initialize(configuration)
|
||||
super(configuration)
|
||||
|
||||
if not @configuration.respond_to?(:local) then
|
||||
@configuration.set(:local,".")
|
||||
end
|
||||
|
||||
if not configuration.respond_to?(:branch) then
|
||||
configuration.set(:branch) { self.current_branch }
|
||||
else
|
||||
|
|
|
@ -183,4 +183,14 @@ MSG
|
|||
@scm = CvsTest.new(@config)
|
||||
assert_equal "default-branch", @scm.current_branch
|
||||
end
|
||||
|
||||
def test_default_local
|
||||
@config = MockConfiguration.new
|
||||
@config[:repository] = ":ext:joetester@rubyforge.org:/hello/world"
|
||||
@config[:cvs] = "/path/to/cvs"
|
||||
@config[:password] = "chocolatebrownies"
|
||||
@config[:now] = Time.utc(2005,8,24,12,0,0)
|
||||
@scm = CvsTest.new(@config)
|
||||
assert_equal ".", @scm.configuration.local
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue