This repository was archived by the owner on Apr 14, 2021. It is now read-only.
File tree 8 files changed +41
-14
lines changed
8 files changed +41
-14
lines changed Original file line number Diff line number Diff line change 48
48
- rvm : 2.6.5
49
49
script : bin/rake rubocop
50
50
stage : linting
51
+ - rvm : 2.6.5
52
+ script : bin/rake check_rvm_integration
53
+ stage : linting
51
54
# Ruby 2.3 also tested in 2.x mode
52
55
- rvm : 2.3.8
53
56
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
+
1
8
## 2.1.0 (December 15, 2019)
2
9
3
10
Features:
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
- $:. unshift File . expand_path ( "../lib" , __FILE__ )
4
3
require "benchmark"
5
4
6
5
require_relative "spec/support/rubygems_ext"
@@ -123,6 +122,14 @@ task :rubocop do
123
122
sh ( "bin/rubocop --parallel" )
124
123
end
125
124
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
+
126
133
namespace :man do
127
134
if RUBY_ENGINE == "jruby"
128
135
task ( :build ) { }
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ def run
25
25
SharedHelpers . set_bundle_environment
26
26
if bin_path = Bundler . which ( cmd )
27
27
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 )
29
29
end
30
- with_verbose_rubygems { kernel_exec ( bin_path , *args ) }
30
+ kernel_exec ( bin_path , *args )
31
31
else
32
32
# exec using the given command
33
- with_verbose_rubygems { kernel_exec ( cmd , *args ) }
33
+ kernel_exec ( cmd , *args )
34
34
end
35
35
end
36
36
@@ -89,14 +89,5 @@ def ruby_shebang?(file)
89
89
first_line = File . open ( file , "rb" ) { |f | f . read ( possibilities . map ( &:size ) . max ) }
90
90
possibilities . any? { |shebang | first_line . start_with? ( shebang ) }
91
91
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
101
92
end
102
93
end
Original file line number Diff line number Diff line change @@ -525,6 +525,14 @@ def stub_rubygems(specs)
525
525
end
526
526
end
527
527
528
+ def plain_specs
529
+ Gem ::Specification . _all
530
+ end
531
+
532
+ def plain_specs = ( specs )
533
+ Gem ::Specification . all = specs
534
+ end
535
+
528
536
def fetch_specs ( remote , name )
529
537
path = remote . uri . to_s + "#{ name } .#{ Gem . marshal_version } .gz"
530
538
fetcher = gem_remote_fetcher
Original file line number Diff line number Diff line change 19
19
else
20
20
Bundler . ui . silence { Bundler . setup }
21
21
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
22
27
end
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: false
2
2
3
3
module Bundler
4
- VERSION = "2.1.0 " . freeze
4
+ VERSION = "2.1.1 " . freeze
5
5
6
6
def self . bundler_major_version
7
7
@bundler_major_version ||= VERSION . split ( "." ) . first . to_i
Original file line number Diff line number Diff line change 61
61
expect ( out ) . to eq ( Gem ::VERSION )
62
62
end
63
63
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
+
64
70
it "respects custom process title when loading through ruby" do
65
71
script_that_changes_its_own_title_and_checks_if_picked_up_by_ps_unix_utility = <<~'RUBY'
66
72
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