ruby-changes:47688
From: nobu <ko1@a...>
Date: Sun, 10 Sep 2017 07:08:07 +0900 (JST)
Subject: [ruby-changes:47688] nobu:r59804 (trunk): runruby.rb: set envvars for bundler
nobu 2017-09-10 07:08:01 +0900 (Sun, 10 Sep 2017) New Revision: 59804 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59804 Log: runruby.rb: set envvars for bundler * tool/runruby.rb: set gem and bundler environment variables. Modified files: trunk/Makefile.in trunk/tool/runruby.rb Index: tool/runruby.rb =================================================================== --- tool/runruby.rb (revision 59803) +++ tool/runruby.rb (revision 59804) @@ -76,7 +76,11 @@ env = { https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L76 runner = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}") runner = nil unless File.exist?(runner) -env["RUBY"] = runner || File.expand_path(ruby) +abs_ruby = runner || File.expand_path(ruby) +env["RUBY"] = abs_ruby +env["GEM_PATH"] = env["GEM_HOME"] = File.expand_path("spec/rspec", srcdir) +env["BUNDLE_RUBY"] = abs_ruby +env["BUNDLE_GEM"] = "#{abs_ruby} -rrubygems #{srcdir}/bin/gem --backtrace" env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR) if e = ENV["RUBYLIB"] Index: Makefile.in =================================================================== --- Makefile.in (revision 59803) +++ Makefile.in (revision 59804) @@ -479,13 +479,14 @@ test-bundler-precheck: $(arch)-fake.rb p https://github.com/ruby/ruby/blob/trunk/Makefile.in#L479 test-bundler-prepare: test-bundler-precheck $(XRUBY) -C "$(srcdir)" bin/gem install --no-ri --no-rdoc \ --install-dir spec/rspec --conservative 'rspec:~> 3.5' + +RSPECOPTS = --format progress +BUNDLER_SPECS = $(srcdir)/spec/bundler test-bundler: $(TEST_RUNNABLE)-test-bundler -yes-test-bundler: test-bundler-precheck test-bundler-prepare +yes-test-bundler: test-bundler-prepare $(gnumake_recursive)$(Q) \ - GEM_HOME=spec/rspec GEM_PATH=spec/rspec \ - BUNDLE_RUBY="$(abspath ./ruby) -I$(abspath $(srcdir)/lib) -I$(abspath .) -I$(abspath $(EXTOUT)/common) -I$(abspath $(EXTOUT)/$(arch))" \ - BUNDLE_GEM="$(abspath ./ruby) -I$(abspath $(srcdir)/lib) -I$(abspath .) -I$(abspath $(EXTOUT)/common) -I$(abspath $(EXTOUT)/$(arch)) -rubygems $(abspath $(srcdir)/bin/gem) --backtrace" \ - $(XRUBY) -C $(srcdir) -Ispec/bundler "spec/rspec/bin/rspec" --format progress spec/bundler + $(XRUBY) -C $(srcdir) -Ispec/bundler spec/rspec/bin/rspec \ + $(RSPECOPTS) $(BUNDLER_SPECS) no-test-bundler: update-src:: -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/