From 51379cf3f79751bfad37b99c59b0db8d833e0947 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 2 Nov 2017 04:28:30 +0000 Subject: 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 --- spec/bundler/spec_helper.rb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'spec') diff --git a/spec/bundler/spec_helper.rb b/spec/bundler/spec_helper.rb index cd87a65d54..37061ffb87 100644 --- a/spec/bundler/spec_helper.rb +++ b/spec/bundler/spec_helper.rb @@ -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__)}/}, "") -- cgit v1.2.3