Skip to content

Commit 30e740c

Browse files
authored
Merge pull request #4364 from rubygems/release/bundler_2.2.9_rubygems_3.2.9
Prepare rubygems 3.2.9 and bundler 2.2.9
2 parents 4015e55 + 5f0bc8d commit 30e740c

26 files changed

+277
-70
lines changed

.github/workflows/ruby-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Test RubyGems
5050
run: |
5151
ruby tool/sync_default_gems.rb rubygems
52-
make test-all TESTS="rubygems -j2"
52+
make -j2 -s test-all TESTS="rubygems --no-retry"
5353
working-directory: ruby/ruby
5454
if: matrix.target == 'Rubygems'
5555
- name: Test Bundler
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: truffleruby-bundler
2+
3+
on:
4+
pull_request:
5+
6+
push:
7+
branches:
8+
- master
9+
- 3.2
10+
11+
jobs:
12+
jruby_bundler:
13+
name: Bundler (Truffleruby)
14+
runs-on: ubuntu-20.04
15+
16+
env:
17+
RGV: ..
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Setup ruby
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: truffleruby-20.3.0
25+
bundler: none
26+
- name: Prepare dependencies
27+
run: |
28+
bin/rake spec:parallel_deps
29+
working-directory: ./bundler
30+
- name: Run Test
31+
run: |
32+
bin/parallel_rspec --tag truffleruby
33+
working-directory: ./bundler

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 3.2.9 / 2021-02-08
2+
3+
## Bug fixes:
4+
5+
* Fix error message when underscore selection can't find bundler. Pull
6+
request #4363 by deivid-rodriguez
7+
* Fix `Gem::Specification.stubs_for` returning wrong named specs. Pull
8+
request #4356 by tompng
9+
* Don't error out when activating a binstub unless necessary. Pull request
10+
#4351 by deivid-rodriguez
11+
* Fix `gem outdated` incorrectly handling platform specific gems. Pull
12+
request #4248 by deivid-rodriguez
13+
114
# 3.2.8 / 2021-02-02
215

316
## Bug fixes:

bundler/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 2.2.9 (February 8, 2021)
2+
3+
## Enhancements:
4+
5+
- Stop removing existing platforms when force_ruby_platform is true [#4336](https://github.com/rubygems/rubygems/pull/4336)
6+
7+
## Bug fixes:
8+
9+
- Don't install platform specific gems on truffleruby [#4333](https://github.com/rubygems/rubygems/pull/4333)
10+
111
# 2.2.8 (February 2, 2021)
212

313
## Enhancements:

bundler/lib/bundler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def unbundled_exec(*args)
440440
end
441441

442442
def local_platform
443-
return Gem::Platform::RUBY if settings[:force_ruby_platform]
443+
return Gem::Platform::RUBY if settings[:force_ruby_platform] || Gem.platforms == [Gem::Platform::RUBY]
444444
Gem::Platform.local
445445
end
446446

bundler/lib/bundler/definition.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ def initialize(lockfile, dependencies, sources, unlock, ruby_version = nil, opti
8282
@lockfile_contents = Bundler.read_file(lockfile)
8383
@locked_gems = LockfileParser.new(@lockfile_contents)
8484
@locked_platforms = @locked_gems.platforms
85-
if Bundler.settings[:force_ruby_platform]
86-
@platforms = [Gem::Platform::RUBY]
87-
else
88-
@platforms = @locked_platforms.dup
89-
end
85+
@platforms = @locked_platforms.dup
9086
@locked_bundler_version = @locked_gems.bundler_version
9187
@locked_ruby_version = @locked_gems.ruby_version
9288

bundler/lib/bundler/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: false
22

33
module Bundler
4-
VERSION = "2.2.8".freeze
4+
VERSION = "2.2.9".freeze
55

66
def self.bundler_major_version
77
@bundler_major_version ||= VERSION.split(".").first.to_i

bundler/spec/bundler/gem_helper_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def mock_build_message(name, version)
9898
context "before installation" do
9999
it "raises an error with appropriate message" do
100100
task_names.each do |name|
101+
skip "Rake::FileTask '#{name}' exists" if File.exist?(name)
101102
expect { Rake.application[name] }.
102103
to raise_error(/^Don't know how to build task '#{name}'/)
103104
end

bundler/spec/commands/info_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
G
166166

167167
bundle "info rac"
168-
expect(out).to eq "1 : rack\n2 : rack-obama\n0 : - exit -\n>"
168+
expect(out).to match(/\A1 : rack\n2 : rack-obama\n0 : - exit -(\n>)?\z/)
169169
end
170170
end
171171

bundler/spec/commands/lock_spec.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,30 @@ def read_lockfile(file = "Gemfile.lock")
220220
expect(lockfile.platforms).to match_array(local_platforms.unshift(java, mingw).uniq)
221221
end
222222

223+
it "supports adding new platforms with force_ruby_platform = true" do
224+
lockfile <<-L
225+
GEM
226+
remote: #{file_uri_for(gem_repo1)}/
227+
specs:
228+
platform_specific (1.0)
229+
platform_specific (1.0-x86-linux)
230+
231+
PLATFORMS
232+
ruby
233+
x86-linux
234+
235+
DEPENDENCIES
236+
platform_specific
237+
L
238+
239+
bundle "config set force_ruby_platform true"
240+
bundle "lock --add-platform java x86-mingw32"
241+
242+
allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
243+
lockfile = Bundler::LockfileParser.new(read_lockfile)
244+
expect(lockfile.platforms).to contain_exactly(rb, linux, java, mingw)
245+
end
246+
223247
it "supports adding the `ruby` platform" do
224248
bundle "lock --add-platform ruby"
225249

0 commit comments

Comments
 (0)