1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Support Windows

* spec/bundler/spec_helper.rb: there are no reason to refuse ':' and '-' in the
  path of spec files.  especially, ':' is always contained on Windows.

* spec/bundler/spec/helper.rb: open3.rb is also supported on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2017-11-02 04:28:30 +00:00
parent 0b5432a7bd
commit f35fb6d36c

View file

@ -20,22 +20,13 @@ rescue LoadError
abort "Run rake spec:deps to install development dependencies"
end
if File.expand_path(__FILE__) =~ %r{([^\w/\.])}
if File.expand_path(__FILE__) =~ %r{([^\w/\.:\-])}
abort "The bundler specs cannot be run from a path that contains special characters (particularly #{$1.inspect})"
end
require "bundler"
# Require the correct version of popen for the current platform
if RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
begin
require "win32/open3"
rescue LoadError
abort "Run `gem install win32-open3` to be able to run specs"
end
else
require "open3"
end
require "open3"
Dir["#{File.expand_path("../support", __FILE__)}/*.rb"].each do |file|
file = file.gsub(%r{\A#{Regexp.escape File.expand_path("..", __FILE__)}/}, "")