Skip to content

Commit ab8ee5e

Browse files
committed
Auto merge of #2054 - rubygems:seg-pkg-bundler-gemspec, r=segiddins
Fix `gem update --system` with RubyGems 2.7+ # Description: Fixes #2052. By including the bundler gemspec in the manifest, it should allow the setup task to succeed when run from the published rubygems-update gem, and not just from source. When we merge this, I will release 2.7.1 ?
2 parents c9ce30a + 150e696 commit ab8ee5e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Manifest.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ bundler/CODE_OF_CONDUCT.md
2323
bundler/CONTRIBUTING.md
2424
bundler/LICENSE.md
2525
bundler/README.md
26+
bundler/bundler.gemspec
2627
bundler/exe/bundle
2728
bundler/exe/bundle_ruby
2829
bundler/exe/bundler

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Hoe::Package.instance_method(:install_gem).tap do |existing_install_gem|
9595
end
9696
end
9797

98-
Hoe::DEFAULT_CONFIG["exclude"] = %r[#{Hoe::DEFAULT_CONFIG["exclude"]}|\./bundler/(?!lib|man|exe|[^/]+\.md)|doc/]ox
98+
Hoe::DEFAULT_CONFIG["exclude"] = %r[#{Hoe::DEFAULT_CONFIG["exclude"]}|\./bundler/(?!lib|man|exe|[^/]+\.md|bundler.gemspec)|doc/]ox
9999

100100
v = hoe.version
101101

lib/rubygems/commands/setup_command.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,10 @@ def fake_spec.full_gem_path
352352
def install_default_bundler_gem
353353
return unless Gem::USE_BUNDLER_FOR_GEMDEPS
354354

355+
mkdir_p Gem::Specification.default_specifications_dir
356+
355357
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
356-
bundler_spec.files = Dir["bundler/{*.md,{lib,exe,man}/**/*}"]
358+
bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] }
357359
bundler_spec.executables -= %w[bundler bundle_ruby]
358360
Dir.entries(Gem::Specification.default_specifications_dir).
359361
select {|gs| gs.start_with?("bundler-") }.
@@ -370,6 +372,8 @@ def install_default_bundler_gem
370372

371373
mkdir_p bundler_spec.bin_dir
372374
bundler_spec.executables.each {|e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_spec.bin_dir, e) }
375+
376+
say "Bundler #{bundler_spec.version} installed"
373377
end
374378

375379
def make_destination_dirs(install_destdir)

0 commit comments

Comments
 (0)