Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4).
It fixed: https://github.com/rubygems/rubygems/issues/2041 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0242f7ccae
commit
43e320ba1b
@ -275,11 +275,15 @@ class Gem::BasicSpecification
|
|||||||
# for this spec.
|
# for this spec.
|
||||||
|
|
||||||
def lib_dirs_glob
|
def lib_dirs_glob
|
||||||
dirs = if self.raw_require_paths.size > 1 then
|
dirs = if self.raw_require_paths
|
||||||
|
if self.raw_require_paths.size > 1 then
|
||||||
"{#{self.raw_require_paths.join(',')}}"
|
"{#{self.raw_require_paths.join(',')}}"
|
||||||
else
|
else
|
||||||
self.raw_require_paths.first
|
self.raw_require_paths.first
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
"lib" # default value for require_paths for bundler/inline
|
||||||
|
end
|
||||||
|
|
||||||
"#{self.full_gem_path}/#{dirs}".dup.untaint
|
"#{self.full_gem_path}/#{dirs}".dup.untaint
|
||||||
end
|
end
|
||||||
|
@ -37,7 +37,7 @@ class TestGemStreamUI < Gem::TestCase
|
|||||||
|
|
||||||
def test_ask
|
def test_ask
|
||||||
skip 'TTY detection broken on windows' if
|
skip 'TTY detection broken on windows' if
|
||||||
Gem.win_platform? unless RUBY_VERSION > '1.9.2'
|
Gem.win_platform? && RUBY_VERSION <= '1.9.2'
|
||||||
|
|
||||||
Timeout.timeout(1) do
|
Timeout.timeout(1) do
|
||||||
expected_answer = "Arthur, King of the Britons"
|
expected_answer = "Arthur, King of the Britons"
|
||||||
@ -49,7 +49,7 @@ class TestGemStreamUI < Gem::TestCase
|
|||||||
|
|
||||||
def test_ask_no_tty
|
def test_ask_no_tty
|
||||||
skip 'TTY detection broken on windows' if
|
skip 'TTY detection broken on windows' if
|
||||||
Gem.win_platform? unless RUBY_VERSION > '1.9.2'
|
Gem.win_platform? && RUBY_VERSION <= '1.9.2'
|
||||||
|
|
||||||
@in.tty = false
|
@in.tty = false
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ class TestGemStreamUI < Gem::TestCase
|
|||||||
|
|
||||||
def test_ask_for_password
|
def test_ask_for_password
|
||||||
skip 'Always uses $stdin on windows' if
|
skip 'Always uses $stdin on windows' if
|
||||||
Gem.win_platform? unless RUBY_VERSION > '1.9.2'
|
Gem.win_platform? && RUBY_VERSION <= '1.9.2'
|
||||||
|
|
||||||
Timeout.timeout(1) do
|
Timeout.timeout(1) do
|
||||||
expected_answer = "Arthur, King of the Britons"
|
expected_answer = "Arthur, King of the Britons"
|
||||||
@ -73,7 +73,7 @@ class TestGemStreamUI < Gem::TestCase
|
|||||||
|
|
||||||
def test_ask_for_password_no_tty
|
def test_ask_for_password_no_tty
|
||||||
skip 'TTY handling is broken on windows' if
|
skip 'TTY handling is broken on windows' if
|
||||||
Gem.win_platform? unless RUBY_VERSION > '1.9.2'
|
Gem.win_platform? && RUBY_VERSION <= '1.9.2'
|
||||||
|
|
||||||
@in.tty = false
|
@in.tty = false
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class TestGemStreamUI < Gem::TestCase
|
|||||||
|
|
||||||
def test_ask_yes_no_no_tty_with_default
|
def test_ask_yes_no_no_tty_with_default
|
||||||
skip 'TTY handling is broken on windows' if
|
skip 'TTY handling is broken on windows' if
|
||||||
Gem.win_platform? unless RUBY_VERSION > '1.9.2'
|
Gem.win_platform? && RUBY_VERSION <= '1.9.2'
|
||||||
|
|
||||||
@in.tty = false
|
@in.tty = false
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class TestGemStreamUI < Gem::TestCase
|
|||||||
|
|
||||||
def test_ask_yes_no_no_tty_without_default
|
def test_ask_yes_no_no_tty_without_default
|
||||||
skip 'TTY handling is broken on windows' if
|
skip 'TTY handling is broken on windows' if
|
||||||
Gem.win_platform? unless RUBY_VERSION > '1.9.2'
|
Gem.win_platform? && RUBY_VERSION <= '1.9.2'
|
||||||
|
|
||||||
@in.tty = false
|
@in.tty = false
|
||||||
|
|
||||||
|
@ -110,6 +110,18 @@ class TestStubSpecification < Gem::TestCase
|
|||||||
assert_equal code_rb, stub.matches_for_glob('code*').first
|
assert_equal code_rb, stub.matches_for_glob('code*').first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_matches_for_glob_with_bundler_inline
|
||||||
|
stub = stub_with_extension
|
||||||
|
code_rb = File.join stub.gem_dir, 'lib', 'code.rb'
|
||||||
|
FileUtils.mkdir_p File.dirname code_rb
|
||||||
|
FileUtils.touch code_rb
|
||||||
|
|
||||||
|
stub.stub(:raw_require_paths, nil) do
|
||||||
|
assert_equal code_rb, stub.matches_for_glob('code*').first
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def test_missing_extensions_eh
|
def test_missing_extensions_eh
|
||||||
stub = stub_with_extension do |s|
|
stub = stub_with_extension do |s|
|
||||||
extconf_rb = File.join s.gem_dir, s.extensions.first
|
extconf_rb = File.join s.gem_dir, s.extensions.first
|
||||||
|
Loading…
x
Reference in New Issue
Block a user