ruby-changes:48495
From: usa <ko1@a...>
Date: Thu, 2 Nov 2017 13:28:33 +0900 (JST)
Subject: [ruby-changes:48495] usa:r60610 (trunk): Support Windows
usa 2017-11-02 13:28:30 +0900 (Thu, 02 Nov 2017) New Revision: 60610 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60610 Log: 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. Modified files: trunk/spec/bundler/spec_helper.rb Index: spec/bundler/spec_helper.rb =================================================================== --- spec/bundler/spec_helper.rb (revision 60609) +++ spec/bundler/spec_helper.rb (revision 60610) @@ -20,22 +20,13 @@ rescue LoadError https://github.com/ruby/ruby/blob/trunk/spec/bundler/spec_helper.rb#L20 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__)}/}, "") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/