mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
* lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05 https://bugs.ruby-lang.org/issues/9489 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39cb784095
commit
9b9d3bac4d
64 changed files with 934 additions and 299 deletions
|
@ -17,6 +17,14 @@ class TestGemResolverAPISet < Gem::TestCase
|
|||
assert_equal Gem::Source.new(URI('https://rubygems.org')), set.source
|
||||
end
|
||||
|
||||
def test_initialize_deeper_uri
|
||||
set = @DR::APISet.new 'https://rubygemsserver.com/mygems/api/v1/dependencies'
|
||||
|
||||
assert_equal URI('https://rubygemsserver.com/mygems/api/v1/dependencies'), set.dep_uri
|
||||
assert_equal URI('https://rubygemsserver.com/mygems/'), set.uri
|
||||
assert_equal Gem::Source.new(URI('https://rubygemsserver.com/mygems/')), set.source
|
||||
end
|
||||
|
||||
def test_initialize_uri
|
||||
set = @DR::APISet.new @dep_uri
|
||||
|
||||
|
@ -74,6 +82,15 @@ class TestGemResolverAPISet < Gem::TestCase
|
|||
assert_equal expected, set.find_all(a_dep)
|
||||
end
|
||||
|
||||
def test_find_all_local
|
||||
set = @DR::APISet.new @dep_uri
|
||||
set.remote = false
|
||||
|
||||
a_dep = @DR::DependencyRequest.new dep('a'), nil
|
||||
|
||||
assert_empty set.find_all(a_dep)
|
||||
end
|
||||
|
||||
def test_find_all_missing
|
||||
spec_fetcher
|
||||
|
||||
|
@ -163,5 +180,29 @@ class TestGemResolverAPISet < Gem::TestCase
|
|||
set.prefetch [a_dep, b_dep]
|
||||
end
|
||||
|
||||
def test_prefetch_local
|
||||
spec_fetcher
|
||||
|
||||
data = [
|
||||
{ :name => 'a',
|
||||
:number => '1',
|
||||
:platform => 'ruby',
|
||||
:dependencies => [], },
|
||||
]
|
||||
|
||||
@fetcher.data["#{@dep_uri}?gems=a,b"] = Marshal.dump data
|
||||
@fetcher.data["#{@dep_uri}?gems=b"] = Marshal.dump []
|
||||
|
||||
set = @DR::APISet.new @dep_uri
|
||||
set.remote = false
|
||||
|
||||
a_dep = @DR::DependencyRequest.new dep('a'), nil
|
||||
b_dep = @DR::DependencyRequest.new dep('b'), nil
|
||||
|
||||
set.prefetch [a_dep, b_dep]
|
||||
|
||||
assert_empty set.instance_variable_get :@data
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue