Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/install-rubygems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 3.2

jobs:
install_rubygems:
install_rubygems_ubuntu:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -52,3 +52,20 @@ jobs:
run: if grep -q 'GET http' output.txt; then false; else true; fi
working-directory: ./bundler
timeout-minutes: 10

install_rubygems_windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
bundler: none
- name: Install rubygems
run: ruby setup.rb
shell: bash
- name: Check installation didn't modify gemspec line feeds
run: ruby -Ilib -e'exit 1 if File.readlines("bundler/bundler.gemspec").first.end_with?("\r\n")'
shell: bash
timeout-minutes: 10
4 changes: 0 additions & 4 deletions lib/rubygems/commands/setup_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,6 @@ def install_default_bundler_gem(bin_dir)
specs_dir = File.join(options[:destdir], specs_dir) unless Gem.win_platform?
mkdir_p specs_dir, :mode => 0755

# Workaround for non-git environment.
gemspec = File.open('bundler/bundler.gemspec', 'rb'){|f| f.read.gsub(/`git ls-files -z`/, "''") }
File.open('bundler/bundler.gemspec', 'w'){|f| f.write gemspec }

bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] }
bundler_spec.executables -= %w[bundler bundle_ruby]
Expand Down