[rubygems/rubygems] Disallow RubyGems warnings during Bundler test suite
https://github.com/rubygems/rubygems/commit/472371ee1e
This commit is contained in:
parent
8dd87a66f5
commit
54a21851fe
@ -186,7 +186,10 @@ module Spec
|
||||
env = options[:env] || {}
|
||||
env["RUBYOPT"] = opt_add(opt_add("-r#{spec_dir}/support/hax.rb", env["RUBYOPT"]), ENV["RUBYOPT"])
|
||||
options[:env] = env
|
||||
sys_exec("#{Path.gem_bin} #{command}", options)
|
||||
output = sys_exec("#{Path.gem_bin} #{command}", options)
|
||||
stderr = last_command.stderr
|
||||
raise stderr if stderr.include?("WARNING") && !allowed_rubygems_warning?(stderr)
|
||||
output
|
||||
end
|
||||
|
||||
def rake
|
||||
@ -542,6 +545,10 @@ module Spec
|
||||
|
||||
private
|
||||
|
||||
def allowed_rubygems_warning?(text)
|
||||
text.include?("open-ended") || text.include?("is a symlink") || text.include?("rake based") || text.include?("expected RubyGems version")
|
||||
end
|
||||
|
||||
def match_source(contents)
|
||||
match = /source ["']?(?<source>http[^"']+)["']?/.match(contents)
|
||||
return unless match
|
||||
|
Loading…
x
Reference in New Issue
Block a user