This repository was archived by the owner on Apr 14, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +41
-14
lines changed
Expand file tree Collapse file tree 8 files changed +41
-14
lines changed Original file line number Diff line number Diff line change 4848 - rvm : 2.6.5
4949 script : bin/rake rubocop
5050 stage : linting
51+ - rvm : 2.6.5
52+ script : bin/rake check_rvm_integration
53+ stage : linting
5154 # Ruby 2.3 also tested in 2.x mode
5255 - rvm : 2.3.8
5356 env : RGV=master
Original file line number Diff line number Diff line change 1+ ## 2.1.1 (December 17, 2019)
2+
3+ Bugfixes:
4+
5+ - Fix some cases of shelling out to ` rubygems ` still being silent [ #7493 ] ( https://github.com/bundler/bundler/pull/7493 )
6+ - Restore compatibility with ` rubygems-bundler ` so that binstubs work under ` RVM ` [ #7498 ] ( https://github.com/bundler/bundler/pull/7498 )
7+
18## 2.1.0 (December 15, 2019)
29
310Features:
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- $:. unshift File . expand_path ( "../lib" , __FILE__ )
43require "benchmark"
54
65require_relative "spec/support/rubygems_ext"
@@ -123,6 +122,14 @@ task :rubocop do
123122 sh ( "bin/rubocop --parallel" )
124123end
125124
125+ desc "Check RVM integration"
126+ task :check_rvm_integration do
127+ # The rubygems-bundler gem is installed by RVM by default and it could easily
128+ # break when we change bundler. Make sure that binstubs still run with it
129+ # installed.
130+ sh ( "bin/rake install && gem install rubygems-bundler && rake -T" )
131+ end
132+
126133namespace :man do
127134 if RUBY_ENGINE == "jruby"
128135 task ( :build ) { }
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ def run
2525 SharedHelpers . set_bundle_environment
2626 if bin_path = Bundler . which ( cmd )
2727 if !Bundler . settings [ :disable_exec_load ] && ruby_shebang? ( bin_path )
28- return with_verbose_rubygems { kernel_load ( bin_path , *args ) }
28+ return kernel_load ( bin_path , *args )
2929 end
30- with_verbose_rubygems { kernel_exec ( bin_path , *args ) }
30+ kernel_exec ( bin_path , *args )
3131 else
3232 # exec using the given command
33- with_verbose_rubygems { kernel_exec ( cmd , *args ) }
33+ kernel_exec ( cmd , *args )
3434 end
3535 end
3636
@@ -89,14 +89,5 @@ def ruby_shebang?(file)
8989 first_line = File . open ( file , "rb" ) { |f | f . read ( possibilities . map ( &:size ) . max ) }
9090 possibilities . any? { |shebang | first_line . start_with? ( shebang ) }
9191 end
92-
93- def with_verbose_rubygems
94- old_ui = Gem ::DefaultUserInteraction . ui
95- Gem ::DefaultUserInteraction . ui = nil
96-
97- yield
98- ensure
99- Gem ::DefaultUserInteraction . ui = old_ui
100- end
10192 end
10293end
Original file line number Diff line number Diff line change @@ -525,6 +525,14 @@ def stub_rubygems(specs)
525525 end
526526 end
527527
528+ def plain_specs
529+ Gem ::Specification . _all
530+ end
531+
532+ def plain_specs = ( specs )
533+ Gem ::Specification . all = specs
534+ end
535+
528536 def fetch_specs ( remote , name )
529537 path = remote . uri . to_s + "#{ name } .#{ Gem . marshal_version } .gz"
530538 fetcher = gem_remote_fetcher
Original file line number Diff line number Diff line change 1919 else
2020 Bundler . ui . silence { Bundler . setup }
2121 end
22+
23+ # We might be in the middle of shelling out to rubygems
24+ # (RUBYOPT=-rbundler/setup), so we need to give rubygems the opportunity of
25+ # not being silent.
26+ Gem ::DefaultUserInteraction . ui = nil
2227end
Original file line number Diff line number Diff line change 11# frozen_string_literal: false
22
33module Bundler
4- VERSION = "2.1.0 " . freeze
4+ VERSION = "2.1.1 " . freeze
55
66 def self . bundler_major_version
77 @bundler_major_version ||= VERSION . split ( "." ) . first . to_i
Original file line number Diff line number Diff line change 6161 expect ( out ) . to eq ( Gem ::VERSION )
6262 end
6363
64+ it "works when exec'ing to rubygems through sh -c" do
65+ install_gemfile 'gem "rack"'
66+ bundle "exec sh -c '#{ gem_cmd } --version'"
67+ expect ( out ) . to eq ( Gem ::VERSION )
68+ end
69+
6470 it "respects custom process title when loading through ruby" do
6571 script_that_changes_its_own_title_and_checks_if_picked_up_by_ps_unix_utility = <<~'RUBY'
6672 Process.setproctitle("1-2-3-4-5-6-7-8-9-10-11-12-13-14-15")
You can’t perform that action at this time.
0 commit comments