[rubygems/rubygems] Let git source use default cloned repo branch
https://github.com/rubygems/rubygems/commit/d8af770379
This commit is contained in:
parent
589c2b1fb2
commit
bd0f2c7958
@ -435,7 +435,6 @@ Gem dependencies file #{@path} requires #{name} more than once.
|
||||
reference ||= ref
|
||||
reference ||= branch
|
||||
reference ||= tag
|
||||
reference ||= "master"
|
||||
|
||||
if ref && branch
|
||||
warn <<-WARNING
|
||||
|
@ -53,7 +53,7 @@ class Gem::Source::Git < Gem::Source
|
||||
@uri = Gem::Uri.parse(repository)
|
||||
@name = name
|
||||
@repository = repository
|
||||
@reference = reference
|
||||
@reference = reference || "HEAD"
|
||||
@need_submodules = submodules
|
||||
|
||||
@remote = true
|
||||
|
@ -95,7 +95,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[git/a master], @git_set.repositories["a"]
|
||||
assert_equal ["git/a", nil], @git_set.repositories["a"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
|
||||
@ -107,7 +107,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[https://example@bitbucket.org/example/repository.git master],
|
||||
assert_equal ["https://example@bitbucket.org/example/repository.git", nil],
|
||||
@git_set.repositories["a"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
@ -120,7 +120,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[https://example@bitbucket.org/example/example.git master],
|
||||
assert_equal ["https://example@bitbucket.org/example/example.git", nil],
|
||||
@git_set.repositories["a"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
@ -145,7 +145,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[https://gist.github.com/a.git master],
|
||||
assert_equal ["https://gist.github.com/a.git", nil],
|
||||
@git_set.repositories["a"]
|
||||
end
|
||||
|
||||
@ -166,7 +166,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[git/a master], @git_set.repositories["a"]
|
||||
assert_equal ["git/a", nil], @git_set.repositories["a"]
|
||||
assert_equal %w[git/a], @git_set.need_submodules.keys
|
||||
end
|
||||
|
||||
@ -183,7 +183,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[https://github.com/example/repository.git master],
|
||||
assert_equal ["https://github.com/example/repository.git", nil],
|
||||
@git_set.repositories["a"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
@ -196,7 +196,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a")], @set.dependencies
|
||||
|
||||
assert_equal %w[https://github.com/example/example.git master],
|
||||
assert_equal ["https://github.com/example/example.git", nil],
|
||||
@git_set.repositories["a"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
@ -609,8 +609,8 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
assert_equal [dep("a"), dep("b")], @set.dependencies
|
||||
|
||||
assert_equal %w[git://example/repo.git master], @git_set.repositories["a"]
|
||||
assert_equal %w[git://example/repo.git master], @git_set.repositories["b"]
|
||||
assert_equal ["git://example/repo.git", nil], @git_set.repositories["a"]
|
||||
assert_equal ["git://example/repo.git", nil], @git_set.repositories["b"]
|
||||
end
|
||||
|
||||
def test_git_source
|
||||
@ -620,7 +620,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||
|
||||
@gda.gem "a", :example => "repo"
|
||||
|
||||
assert_equal %w[git://example/repo.git master], @git_set.repositories["a"]
|
||||
assert_equal ["git://example/repo.git", nil], @git_set.repositories["a"]
|
||||
end
|
||||
|
||||
def test_group
|
||||
|
Loading…
x
Reference in New Issue
Block a user