From c8a2f8ce6dc4b68918867a7fe28b4a25d1e2b760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sun, 13 Dec 2020 12:58:26 +0100 Subject: [PATCH 01/12] Merge pull request #4135 from jbampton/fix-spelling Fix spelling (cherry picked from commit 5557a9962491b805e42c024a9736504afee3eb5f) --- bundler/spec/runtime/inline_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/spec/runtime/inline_spec.rb b/bundler/spec/runtime/inline_spec.rb index fadf3eb98910..b46da20096a4 100644 --- a/bundler/spec/runtime/inline_spec.rb +++ b/bundler/spec/runtime/inline_spec.rb @@ -383,7 +383,7 @@ def confirm(msg, newline = nil) realworld_system_gems "fileutils --version 1.4.1" - realworld_system_gems "fiddle" # not sure why, but this is needed on Windows to boot rubygems succesfully + realworld_system_gems "fiddle" # not sure why, but this is needed on Windows to boot rubygems successfully realworld_system_gems "timeout uri" # this spec uses net/http which requires these default gems From 0df2be761ae61379dc625f1dd2581e3aee2dd6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 10:20:31 +0100 Subject: [PATCH 02/12] Merge pull request #4198 from rubygems/fix_release_notes Fix release notes including not only the latest release (cherry picked from commit a3c8a5f4bd9b0b1cbdf47d78178fec3ad23c60a9) --- util/changelog.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/changelog.rb b/util/changelog.rb index 938837da3fd1..fe96363d86e6 100644 --- a/util/changelog.rb +++ b/util/changelog.rb @@ -32,7 +32,6 @@ def initialize(file, version) def release_notes current_version_title = "#{release_section_token}#{version}" - current_minor_title = "#{release_section_token}#{version.segments[0, 2].join(".")}" current_version_index = lines.find_index {|line| line.strip =~ /^#{current_version_title}($|\b)/ } unless current_version_index @@ -41,7 +40,7 @@ def release_notes current_version_index += 1 previous_version_lines = lines[current_version_index.succ...-1] previous_version_index = current_version_index + ( - previous_version_lines.find_index {|line| line.start_with?(release_section_token) && !line.start_with?(current_minor_title) } || + previous_version_lines.find_index {|line| line.start_with?(release_section_token) } || lines.count ) From 0bce3f04ba18da7e5fd834d941c367047b680dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 10:21:24 +0100 Subject: [PATCH 03/12] Merge pull request #4190 from rubygems/never_spawn_new_shells_when_building_extensions Never spawn subshells when building extensions (cherry picked from commit 57fb2d11a54226e7b8d8feb6da5beed78a130709) --- lib/rubygems/ext/builder.rb | 6 +++--- lib/rubygems/ext/cmake_builder.rb | 3 +-- lib/rubygems/ext/configure_builder.rb | 3 +-- lib/rubygems/test_case.rb | 6 +++--- test/rubygems/test_gem_ext_builder.rb | 12 ++++++------ test/rubygems/test_gem_ext_cmake_builder.rb | 6 ++---- test/rubygems/test_gem_ext_configure_builder.rb | 4 ++-- 7 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index f6de6a50d71e..222fb9aa5e88 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -29,7 +29,7 @@ def self.make(dest_path, results, make_dir = Dir.pwd) make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make' end - destdir = '"DESTDIR=%s"' % ENV['DESTDIR'] + destdir = 'DESTDIR=%s' % ENV['DESTDIR'] ['clean', '', 'install'].each do |target| # Pass DESTDIR via command line to override what's in MAKEFLAGS @@ -37,7 +37,7 @@ def self.make(dest_path, results, make_dir = Dir.pwd) make_program, destdir, target, - ].join(' ').rstrip + ].reject(&:empty?) begin run(cmd, results, "make #{target}".rstrip, make_dir) rescue Gem::InstallError @@ -56,7 +56,7 @@ def self.run(command, results, command_name = nil, dir = Dir.pwd) p(command) end results << "current directory: #{dir}" - results << (command.respond_to?(:shelljoin) ? command.shelljoin : command) + results << command.shelljoin require "open3" # Set $SOURCE_DATE_EPOCH for the subprocess. diff --git a/lib/rubygems/ext/cmake_builder.rb b/lib/rubygems/ext/cmake_builder.rb index 2efec91f1534..269e876cfacf 100644 --- a/lib/rubygems/ext/cmake_builder.rb +++ b/lib/rubygems/ext/cmake_builder.rb @@ -4,8 +4,7 @@ class Gem::Ext::CmakeBuilder < Gem::Ext::Builder def self.build(extension, dest_path, results, args=[], lib_dir=nil, cmake_dir=Dir.pwd) unless File.exist?(File.join(cmake_dir, 'Makefile')) - cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}" - cmd << " #{Gem::Command.build_args.join ' '}" unless Gem::Command.build_args.empty? + cmd = ["cmake", ".", "-DCMAKE_INSTALL_PREFIX=#{dest_path}", *Gem::Command.build_args] run cmd, results, class_name, cmake_dir end diff --git a/lib/rubygems/ext/configure_builder.rb b/lib/rubygems/ext/configure_builder.rb index 36a758989b53..eb2f9fce61d4 100644 --- a/lib/rubygems/ext/configure_builder.rb +++ b/lib/rubygems/ext/configure_builder.rb @@ -8,8 +8,7 @@ class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder def self.build(extension, dest_path, results, args=[], lib_dir=nil, configure_dir=Dir.pwd) unless File.exist?(File.join(configure_dir, 'Makefile')) - cmd = "sh ./configure --prefix=#{dest_path}" - cmd << " #{args.join ' '}" unless args.empty? + cmd = ["sh", "./configure", "--prefix=#{dest_path}", *args] run cmd, results, class_name, configure_dir end diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index a8261ef5c210..6523c515be54 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -250,16 +250,16 @@ def parse_make_command_line(line) def assert_contains_make_command(target, output, msg = nil) if output.match(/\n/) msg = message(msg) do - 'Expected output containing make command "%s": %s' % [ + "Expected output containing make command \"%s\", but was \n\nBEGIN_OF_OUTPUT\n%sEND_OF_OUTPUT" % [ ('%s %s' % [make_command, target]).rstrip, - output.inspect, + output, ] end else msg = message(msg) do 'Expected make command "%s": %s' % [ ('%s %s' % [make_command, target]).rstrip, - output.inspect, + output, ] end end diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb index 6e6bf89f9c1c..0fe650b8a5dc 100644 --- a/test/rubygems/test_gem_ext_builder.rb +++ b/test/rubygems/test_gem_ext_builder.rb @@ -47,9 +47,9 @@ def test_class_make results = results.join("\n").b - assert_match %r{"DESTDIR=#{ENV['DESTDIR']}" clean$}, results - assert_match %r{"DESTDIR=#{ENV['DESTDIR']}"$}, results - assert_match %r{"DESTDIR=#{ENV['DESTDIR']}" install$}, results + assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} clean$}, results + assert_match %r{DESTDIR\\=#{ENV['DESTDIR']}$}, results + assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results if /nmake/ !~ results assert_match %r{^clean: destination$}, results @@ -76,9 +76,9 @@ def test_class_make_no_clean results = results.join("\n").b - assert_match %r{"DESTDIR=#{ENV['DESTDIR']}" clean$}, results - assert_match %r{"DESTDIR=#{ENV['DESTDIR']}"$}, results - assert_match %r{"DESTDIR=#{ENV['DESTDIR']}" install$}, results + assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} clean$}, results + assert_match %r{DESTDIR\\=#{ENV['DESTDIR']}$}, results + assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results end def test_build_extensions diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb index e34735967948..dffe4a7fb3e6 100644 --- a/test/rubygems/test_gem_ext_cmake_builder.rb +++ b/test/rubygems/test_gem_ext_cmake_builder.rb @@ -40,8 +40,7 @@ def test_self_build output = output.join "\n" - assert_match \ - %r{^cmake \. -DCMAKE_INSTALL_PREFIX=#{Regexp.escape @dest_path}}, output + assert_match %r{^cmake \. -DCMAKE_INSTALL_PREFIX\\=#{Regexp.escape @dest_path}}, output assert_match %r{#{Regexp.escape @ext}}, output assert_contains_make_command '', output assert_contains_make_command 'install', output @@ -58,11 +57,10 @@ def test_self_build_fail output = output.join "\n" shell_error_msg = %r{(CMake Error: .*)} - sh_prefix_cmake = "cmake . -DCMAKE_INSTALL_PREFIX=" assert_match 'cmake failed', error.message - assert_match %r{^#{sh_prefix_cmake}#{Regexp.escape @dest_path}}, output + assert_match %r{^cmake . -DCMAKE_INSTALL_PREFIX\\=#{Regexp.escape @dest_path}}, output assert_match %r{#{shell_error_msg}}, output end diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb index a74f5ce0559d..6b11b0c2aba3 100644 --- a/test/rubygems/test_gem_ext_configure_builder.rb +++ b/test/rubygems/test_gem_ext_configure_builder.rb @@ -28,7 +28,7 @@ def test_self_build Gem::Ext::ConfigureBuilder.build nil, @dest_path, output, [], nil, @ext assert_match(/^current directory:/, output.shift) - assert_equal "sh ./configure --prefix=#{@dest_path}", output.shift + assert_equal "sh ./configure --prefix\\=#{@dest_path}", output.shift assert_equal "", output.shift assert_match(/^current directory:/, output.shift) assert_contains_make_command 'clean', output.shift @@ -50,7 +50,7 @@ def test_self_build_fail end shell_error_msg = %r{(\./configure: .*)|((?:[Cc]an't|cannot) open '?\./configure'?(?:: No such file or directory)?)} - sh_prefix_configure = "sh ./configure --prefix=" + sh_prefix_configure = "sh ./configure --prefix\\=" assert_match 'configure failed', error.message From 9d650b88ac44896794acaa34e4eddb3ec3be14af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 12:49:58 +0100 Subject: [PATCH 04/12] Merge pull request #4201 from rubygems/fix_head_install_on_truffleruby Fix man pages install on truffleruby (cherry picked from commit 76c1e68a928cbf13970de4c97f1059383d9f1f56) --- .github/workflows/install-rubygems.yml | 6 +++++- Rakefile | 2 +- lib/rubygems/commands/setup_command.rb | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install-rubygems.yml b/.github/workflows/install-rubygems.yml index 8aa48bda4334..7becc3f4f9c5 100644 --- a/.github/workflows/install-rubygems.yml +++ b/.github/workflows/install-rubygems.yml @@ -22,6 +22,7 @@ jobs: - { name: 2.6, value: 2.6.6 } - { name: 2.7, value: 2.7.2 } - { name: jruby-9.2, value: jruby-9.2.14.0 } + - { name: truffleruby-20.2, value: truffleruby-20.2.0 } openssl: - { name: "openssl", value: true } - { name: "no-openssl", value: false } @@ -33,7 +34,7 @@ jobs: ruby-version: ${{ matrix.ruby.value }} bundler: none - name: Install rubygems - run: ruby -Ilib -S rake install 2> errors.txt + run: ruby -Ilib -S rake install 2> errors.txt || (cat errors.txt && exit 1) - name: Check rubygems install produced no warnings run: test ! -s errors.txt || (cat errors.txt && exit 1) - name: Run a local rubygems command @@ -51,8 +52,10 @@ jobs: run: bundle --version - name: Check bundler man pages were installed and are properly picked up run: bundle install --help | grep -q BUNDLE-INSTALL + if: matrix.ruby.name != 'truffleruby-20.2' - name: Check bundler fallback man pages are properly picked up run: sudo rm $(which man) && bundle install --help + if: matrix.ruby.name != 'truffleruby-20.2' - name: Build bundler run: gem build bundler.gemspec working-directory: ./bundler @@ -64,6 +67,7 @@ jobs: working-directory: ./bundler - name: Check rails can be installed run: gem install rails + if: matrix.ruby.name != 'truffleruby-20.2' timeout-minutes: 10 install_rubygems_windows: diff --git a/Rakefile b/Rakefile index 3aed6c75c63b..6a2653e64fa3 100644 --- a/Rakefile +++ b/Rakefile @@ -108,7 +108,7 @@ end desc "Install rubygems to local system" task :install => [:clear_package, :package] do - sh "ruby -Ilib bin/gem install --no-document pkg/rubygems-update-#{v}.gem && update_rubygems --no-document" + sh "ruby -Ilib bin/gem install --no-document pkg/rubygems-update-#{v}.gem --backtrace && update_rubygems --no-document --backtrace" end desc "Clears previously built package" diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 22b1371a1f1e..4e058a9a03f1 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -171,7 +171,7 @@ def execute install_lib lib_dir - install_man man_dir + install_man man_dir if man_dir install_executables bin_dir @@ -179,7 +179,7 @@ def execute remove_old_lib_files lib_dir - remove_old_man_files man_dir + remove_old_man_files man_dir if man_dir install_default_bundler_gem bin_dir @@ -457,6 +457,7 @@ def make_destination_dirs(install_destdir) def make_man_dir(install_destdir) man_dir = generate_default_man_dir(install_destdir) + return unless man_dir mkdir_p man_dir, :mode => 0755 @@ -468,6 +469,7 @@ def generate_default_man_dir(install_destdir) if prefix.empty? man_dir = RbConfig::CONFIG['mandir'] + return unless man_dir else man_dir = File.join prefix, 'man' end From e0e49dfdc2a3cbd3a59dfad00e08a48ebb0ac892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 28 Dec 2020 15:52:02 +0100 Subject: [PATCH 05/12] Merge pull request #4196 from rubygems/no_subshells_for_git_commands Fix Windows + JRuby no longer being able to install git sources (cherry picked from commit 93e97c963f76072631c6eeceb61eaf5f563be404) --- .github/workflows/install-rubygems.yml | 18 +++-- bundler/lib/bundler/source/git/git_proxy.rb | 67 ++++++++----------- .../spec/bundler/source/git/git_proxy_spec.rb | 16 ++--- 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/.github/workflows/install-rubygems.yml b/.github/workflows/install-rubygems.yml index 7becc3f4f9c5..70bfb8878c92 100644 --- a/.github/workflows/install-rubygems.yml +++ b/.github/workflows/install-rubygems.yml @@ -71,19 +71,29 @@ jobs: timeout-minutes: 10 install_rubygems_windows: - name: Install Rubygems on Windows + name: Install Rubygems on Windows (${{ matrix.ruby.name }}) runs-on: windows-2019 + strategy: + fail-fast: false + matrix: + ruby: + - { name: 2.7, value: 2.7.2 } + - { name: jruby-9.2, value: jruby-9.2.14.0 } steps: - uses: actions/checkout@v2 - name: Setup ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.2 + ruby-version: ${{ matrix.ruby.value }} 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")' + - name: Check installation didn't modify any source controlled files + run: git diff --exit-code shell: bash + - name: Check we can install a Gemfile with git sources + run: bundle init && bundle add fileutils --git https://github.com/ruby/fileutils + shell: bash + timeout-minutes: 10 diff --git a/bundler/lib/bundler/source/git/git_proxy.rb b/bundler/lib/bundler/source/git/git_proxy.rb index 7ac47044b30c..dd65c674d8f3 100644 --- a/bundler/lib/bundler/source/git/git_proxy.rb +++ b/bundler/lib/bundler/source/git/git_proxy.rb @@ -67,13 +67,13 @@ def revision def branch @branch ||= allowed_with_path do - git("rev-parse --abbrev-ref HEAD", :dir => path).strip + git("rev-parse", "--abbrev-ref", "HEAD", :dir => path).strip end end def contains?(commit) allowed_with_path do - result, status = git_null("branch --contains #{commit}", :dir => path) + result, status = git_null("branch", "--contains", commit, :dir => path) status.success? && result =~ /^\* (.*)$/ end end @@ -88,20 +88,22 @@ def full_version def checkout return if path.exist? && has_revision_cached? - extra_ref = "#{Shellwords.shellescape(ref)}:#{Shellwords.shellescape(ref)}" if ref && ref.start_with?("refs/") + extra_ref = "#{ref}:#{ref}" if ref && ref.start_with?("refs/") Bundler.ui.info "Fetching #{URICredentialsFilter.credential_filtered_uri(uri)}" + configured_uri = configured_uri_for(uri).to_s + unless path.exist? SharedHelpers.filesystem_access(path.dirname) do |p| FileUtils.mkdir_p(p) end - git_retry %(clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet) + git_retry "clone", configured_uri, path.to_s, "--bare", "--no-hardlinks", "--quiet" return unless extra_ref end with_path do - git_retry %(fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*" #{extra_ref}), :dir => path + git_retry(*["fetch", "--force", "--quiet", "--tags", configured_uri, "refs/heads/*:refs/heads/*", extra_ref].compact, :dir => path) end end @@ -115,7 +117,7 @@ def copy_to(destination, submodules = false) SharedHelpers.filesystem_access(destination) do |p| FileUtils.rm_rf(p) end - git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}") + git_retry "clone", "--no-checkout", "--quiet", path.to_s, destination.to_s File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination) rescue Errno::EEXIST => e file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1] @@ -125,46 +127,45 @@ def copy_to(destination, submodules = false) end end # method 2 - git_retry %(fetch --force --quiet --tags "#{path}"), :dir => destination + git_retry "fetch", "--force", "--quiet", "--tags", path.to_s, :dir => destination begin - git "reset --hard #{@revision}", :dir => destination + git "reset", "--hard", @revision, :dir => destination rescue GitCommandError => e raise MissingGitRevisionError.new(e.command, path, destination, @revision, URICredentialsFilter.credential_filtered_uri(uri)) end if submodules - git_retry "submodule update --init --recursive", :dir => destination + git_retry "submodule", "update", "--init", "--recursive", :dir => destination elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0") inner_command = "git -C $toplevel submodule deinit --force $sm_path" - inner_command = inner_command.gsub("$") { '\$' } unless Bundler::WINDOWS - git_retry "submodule foreach --quiet \"#{inner_command}\"", :dir => destination + git_retry "submodule", "foreach", "--quiet", inner_command, :dir => destination end end private - def git_null(command, dir: SharedHelpers.pwd) + def git_null(*command, dir: SharedHelpers.pwd) check_allowed(command) out, status = SharedHelpers.with_clean_git_env do - capture_and_ignore_stderr("git #{command}", :chdir => dir.to_s) + capture_and_ignore_stderr("git", "-C", dir.to_s, *command) end [URICredentialsFilter.credential_filtered_string(out, uri), status] end - def git_retry(command, dir: SharedHelpers.pwd) - Bundler::Retry.new("`git #{URICredentialsFilter.credential_filtered_string(command, uri)}`", GitNotAllowedError).attempts do - git(command, :dir => dir) + def git_retry(*command, dir: SharedHelpers.pwd) + Bundler::Retry.new("`git -C #{dir} #{URICredentialsFilter.credential_filtered_string(command.shelljoin, uri)}`", GitNotAllowedError).attempts do + git(*command, :dir => dir) end end - def git(command, dir: SharedHelpers.pwd) + def git(*command, dir: SharedHelpers.pwd) command_with_no_credentials = check_allowed(command) out, status = SharedHelpers.with_clean_git_env do - capture_and_filter_stderr(uri, "git #{command}", :chdir => dir.to_s) + capture_and_filter_stderr("git", "-C", dir.to_s, *command) end raise GitCommandError.new(command_with_no_credentials, path, dir) unless status.success? @@ -174,7 +175,7 @@ def git(command, dir: SharedHelpers.pwd) def has_revision_cached? return unless @revision - with_path { git("cat-file -e #{@revision}", :dir => path) } + with_path { git("cat-file", "-e", @revision, :dir => path) } true rescue GitError false @@ -186,26 +187,12 @@ def remove_cache def find_local_revision allowed_with_path do - git("rev-parse --verify #{Shellwords.shellescape(ref)}", :dir => path).strip + git("rev-parse", "--verify", ref, :dir => path).strip end rescue GitCommandError => e raise MissingGitRevisionError.new(e.command, path, path, ref, URICredentialsFilter.credential_filtered_uri(uri)) end - # Escape the URI for git commands - def uri_escaped_with_configured_credentials - remote = configured_uri_for(uri) - if Bundler::WINDOWS - # Windows quoting requires double quotes only, with double quotes - # inside the string escaped by being doubled. - '"' + remote.gsub('"') { '""' } + '"' - else - # Bash requires single quoted strings, with the single quotes escaped - # by ending the string, escaping the quote, and restarting the string. - "'" + remote.gsub("'") { "'\\''" } + "'" - end - end - # Adds credentials to the URI as Fetcher#configured_uri_for does def configured_uri_for(uri) if /https?:/ =~ uri @@ -233,21 +220,21 @@ def allowed_with_path end def check_allowed(command) - command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command, uri) + command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command.shelljoin, uri) raise GitNotAllowedError.new(command_with_no_credentials) unless allow? command_with_no_credentials end - def capture_and_filter_stderr(uri, cmd, chdir: SharedHelpers.pwd) + def capture_and_filter_stderr(*cmd) require "open3" - return_value, captured_err, status = Open3.capture3(cmd, :chdir => chdir) - Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) if uri && !captured_err.empty? + return_value, captured_err, status = Open3.capture3(*cmd) + Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) unless captured_err.empty? [return_value, status] end - def capture_and_ignore_stderr(cmd, chdir: SharedHelpers.pwd) + def capture_and_ignore_stderr(*cmd) require "open3" - return_value, _, status = Open3.capture3(cmd, :chdir => chdir) + return_value, _, status = Open3.capture3(*cmd) [return_value, status] end end diff --git a/bundler/spec/bundler/source/git/git_proxy_spec.rb b/bundler/spec/bundler/source/git/git_proxy_spec.rb index 4744e0cd4c65..35702d77633a 100644 --- a/bundler/spec/bundler/source/git/git_proxy_spec.rb +++ b/bundler/spec/bundler/source/git/git_proxy_spec.rb @@ -11,21 +11,21 @@ context "with configured credentials" do it "adds username and password to URI" do Bundler.settings.temporary(uri => "u:p") do - expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/rubygems/rubygems.git")) + expect(subject).to receive(:git_retry).with("clone", "https://u:p@github.com/rubygems/rubygems.git", any_args) subject.checkout end end it "adds username and password to URI for host" do Bundler.settings.temporary("github.com" => "u:p") do - expect(subject).to receive(:git_retry).with(match("https://u:p@github.com/rubygems/rubygems.git")) + expect(subject).to receive(:git_retry).with("clone", "https://u:p@github.com/rubygems/rubygems.git", any_args) subject.checkout end end it "does not add username and password to mismatched URI" do Bundler.settings.temporary("https://u:p@github.com/rubygems/rubygems-mismatch.git" => "u:p") do - expect(subject).to receive(:git_retry).with(match(uri)) + expect(subject).to receive(:git_retry).with("clone", uri, any_args) subject.checkout end end @@ -34,7 +34,7 @@ Bundler.settings.temporary("github.com" => "u:p") do original = "https://orig:info@github.com/rubygems/rubygems.git" subject = described_class.new(Pathname("path"), original, "HEAD") - expect(subject).to receive(:git_retry).with(match(original)) + expect(subject).to receive(:git_retry).with("clone", original, any_args) subject.checkout end end @@ -129,12 +129,12 @@ context "when given a SHA as a revision" do let(:revision) { "abcd" * 10 } - let(:command) { "reset --hard #{revision}" } + let(:command) { ["reset", "--hard", revision] } it "fails gracefully when resetting to the revision fails" do - expect(subject).to receive(:git_retry).with(start_with("clone ")) { destination.mkpath } - expect(subject).to receive(:git_retry).with(start_with("fetch "), :dir => destination) - expect(subject).to receive(:git).with(command, :dir => destination).and_raise(Bundler::Source::Git::GitCommandError.new(command, cache, destination)) + expect(subject).to receive(:git_retry).with("clone", any_args) { destination.mkpath } + expect(subject).to receive(:git_retry).with("fetch", any_args, :dir => destination) + expect(subject).to receive(:git).with(*command, :dir => destination).and_raise(Bundler::Source::Git::GitCommandError.new(command, cache, destination)) expect(subject).not_to receive(:git) expect { subject.copy_to(destination, submodules) }. From 56efcd29dd0dc68b02e31b41b80d4c57e7d66e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Dec 2020 13:55:05 +0100 Subject: [PATCH 06/12] Merge pull request #4168 from rubygems/markdown_changelog Use a CHANGELOG in markdown for rubygems (cherry picked from commit 73303ba5a2e9a364161e2b952e8e476e157f306b) --- .changelog.yml | 18 +- History.txt => CHANGELOG.md | 854 +++++++++--------- Manifest.txt | 2 +- Rakefile | 2 +- lib/rubygems/commands/setup_command.rb | 6 +- rubygems-update.gemspec | 2 +- .../test_gem_commands_setup_command.rb | 18 +- util/changelog.rb | 2 +- 8 files changed, 452 insertions(+), 452 deletions(-) rename History.txt => CHANGELOG.md (96%) diff --git a/.changelog.yml b/.changelog.yml index b025bd718121..1d7ea9222e50 100644 --- a/.changelog.yml +++ b/.changelog.yml @@ -1,6 +1,6 @@ --- -header_template: "=== %new_version / %release_date" +header_template: "# %new_version / %release_date" entry_template: "* %pull_request_title. Pull request #%pull_request_number by %pull_request_author" @@ -9,14 +9,14 @@ release_date_format: "%Y-%m-%d" entry_wrapping: 74 changelog_label_mapping: - "rubygems: security fix": "Security fixes:" - "rubygems: breaking change": "Breaking changes:" - "rubygems: deprecation": "Deprecations:" - "rubygems: feature": "Features:" - "rubygems: performance": "Performance:" - "rubygems: enhancement": "Enhancements:" - "rubygems: bug fix": "Bug fixes:" - "rubygems: documentation": "Documentation:" + "rubygems: security fix": "## Security fixes:" + "rubygems: breaking change": "## Breaking changes:" + "rubygems: deprecation": "## Deprecations:" + "rubygems: feature": "## Features:" + "rubygems: performance": "## Performance:" + "rubygems: enhancement": "## Enhancements:" + "rubygems: bug fix": "## Bug fixes:" + "rubygems: documentation": "## Documentation:" "rubygems: backport": null patch_level_labels: diff --git a/History.txt b/CHANGELOG.md similarity index 96% rename from History.txt rename to CHANGELOG.md index ddebc55124c0..68211df667b7 100644 --- a/History.txt +++ b/CHANGELOG.md @@ -1,18 +1,18 @@ -=== 3.2.3 / 2020-12-22 +# 3.2.3 / 2020-12-22 -Enhancements: +## Enhancements: * Fix misspellings in default API key name. Pull request #4177 by hsbt -Bug fixes: +## Bug fixes: * Respect `required_ruby_version` and `required_rubygems_version` constraints when looking for `gem install` candidates. Pull request #4110 by deivid-rodriguez -=== 3.2.2 / 2020-12-17 +# 3.2.2 / 2020-12-17 -Bug fixes: +## Bug fixes: * Fix issue where CLI commands making more than one request to rubygems.org needing an OTP code would crash or ask for the code twice. @@ -22,23 +22,23 @@ Bug fixes: * Fix `gem update --system` displaying too many changelog entries. Pull request #4145 by deivid-rodriguez -=== 3.2.1 / 2020-12-14 +# 3.2.1 / 2020-12-14 -Enhancements: +## Enhancements: * Added help message for gem i webrick in gem server command. Pull request #4117 by hsbt -Bug fixes: +## Bug fixes: * Added the missing loading of fileutils same as load_specs. Pull request #4124 by hsbt * Fix Resolver::APISet to always include prereleases when necessary. Pull request #4113 by deivid-rodriguez -=== 3.2.0 / 2020-12-07 +# 3.2.0 / 2020-12-07 -Enhancements: +## Enhancements: * Do not override Kernel#warn when there is no need. Pull request #4075 by eregon @@ -57,7 +57,7 @@ Enhancements: * Pass more information when comparing platforms. Pull request #3817 by eregon -Bug fixes: +## Bug fixes: * Use better owner & group for files in rubygems package. Pull request #4065 by deivid-rodriguez @@ -83,18 +83,18 @@ Bug fixes: * Make `--default` and `--install-dir` options to `gem install` play nice together. Pull request #3906 by deivid-rodriguez -Deprecations: +## Deprecations: * Deprecate server command. Pull request #3868 by bronzdoc -Performance: +## Performance: * Don't change ruby process CWD when building extensions. Pull request #3498 by deivid-rodriguez -=== 3.2.0.rc.2 / 2020-10-08 +# 3.2.0.rc.2 / 2020-10-08 -Enhancements: +## Enhancements: * Make --dry-run flag consistent across rubygems commands. Pull request #3867 by bronzdoc @@ -111,7 +111,7 @@ Enhancements: * Ignore internal frames in RubyGems' Kernel#warn. Pull request #3810 by eregon -Bug fixes: +## Bug fixes: * Add missing fileutils require. Pull request #3911 by deivid-rodriguez * Fix false positive warning on Windows when PATH has @@ -123,7 +123,7 @@ Bug fixes: * `gem install --user` fails with `Gem::FilePermissionError` on the system plugins directory. Pull request #3804 by nobu -Performance: +## Performance: * Avoid duplicated generation of APISpecification objects. Pull request #3940 by mame @@ -133,9 +133,9 @@ Performance: casperisfine * Optimize Gem.already_loaded?. Pull request #3793 by casperisfine -=== 3.2.0.rc.1 / 2020-07-04 +# 3.2.0.rc.1 / 2020-07-04 -Enhancements: +## Enhancements: * Test TruffleRuby in CI. Pull request #2797 by Benoit Daloze. * Rework plugins system and speed up rubygems. Pull request #3108 by David @@ -182,7 +182,7 @@ Enhancements: * Only rescue the errors we actually want to rescue. Pull request #3156 by David Rodríguez. -Bug fixes: +## Bug fixes: * Accept not only /usr/bin/env but also /bin/env in some tests. Pull request #3422 by Yusuke Endoh. @@ -204,12 +204,12 @@ Bug fixes: * Fix `ruby setup.rb` for new plugins layout. Pull request #3144 by David Rodríguez. -Deprecations: +## Deprecations: * Set deprecation warning on query command. Pull request #2967 by Luis Sagastume. -Breaking changes: +## Breaking changes: * Remove ruby 1.8 leftovers. Pull request #3442 by David Rodríguez. * Minitest cleanup. Pull request #3445 by David Rodríguez. @@ -236,9 +236,9 @@ Breaking changes: * Requiring rubygems/source_specific_file is deprecated, remove it. Pull request #3114 by Luis Sagastume. -=== 3.1.4 / 2020-06-03 +# 3.1.4 / 2020-06-03 -Enhancements: +## Enhancements: * Deprecate rubyforge_project attribute only during build time. Pull request #3609 by Josef Šimánek. @@ -247,9 +247,9 @@ Enhancements: * Remove failing ubuntu-rvm CI flow. Pull request #3611 by Josef Šimánek. -=== 3.1.3 / 2020-05-05 +# 3.1.3 / 2020-05-05 -Enhancements: +## Enhancements: * Resolver: require NameTuple before use. Pull request #3171 by Olle Jonsson. @@ -260,7 +260,7 @@ Enhancements: * Add tests to check if Gem.ruby_version works with ruby git master. Pull request #3049 by Yusuke Endoh. -Bug fixes: +## Bug fixes: * Fix platform comparison check in #contains_requirable_file?. Pull request #3495 by Benoit Daloze. @@ -272,9 +272,9 @@ Bug fixes: * Fix gem install from a gemdeps file with complex dependencies. Pull request #3054 by Luis Sagastume. -=== 3.1.2 / 2019-12-20 +# 3.1.2 / 2019-12-20 -Enhancements: +## Enhancements: * Restore non prompting `gem update --system` behavior. Pull request #3040 by David Rodríguez. @@ -284,24 +284,24 @@ Enhancements: Pull request #3042 by David Rodríguez. * Use Bundler 2.1.2. Pull request #3043 by SHIBATA Hiroshi. -Bug fixes: +## Bug fixes: * Require `uri` in source.rb. Pull request #3034 by mihaibuzgau. * Fix `gem update --system --force`. Pull request #3035 by David Rodríguez. * Move `require uri` to source_list. Pull request #3038 by mihaibuzgau. -=== 3.1.1 / 2019-12-16 +# 3.1.1 / 2019-12-16 -Bug fixes: +## Bug fixes: * Vendor Bundler 2.1.0 again. The version of Bundler with RubyGems 3.1.0 was Bundler 2.1.0.pre.3. Pull request #3029 by SHIBATA Hiroshi. -=== 3.1.0 / 2019-12-16 +# 3.1.0 / 2019-12-16 -Enhancements: +## Enhancements: * Vendor bundler 2.1. Pull request #3028 by David Rodríguez. * Check for rubygems.org typo squatting sources. Pull request #2999 by @@ -315,25 +315,25 @@ Enhancements: * Use bundler to manage development dependencies. Pull request #3012 by David Rodríguez. -Bug fixes: +## Bug fixes: * Remove unnecessary executable flags. Pull request #2982 by David Rodríguez. * Remove configuration that contained a typo. Pull request #2989 by David Rodríguez. -Deprecations: +## Deprecations: * Deprecate `gem generate_index --modern` and `gem generate_index --no-modern`. Pull request #2992 by David Rodríguez. -Breaking changes: +## Breaking changes: * Remove 1.8.7 leftovers. Pull request #2972 by David Rodríguez. -=== 3.1.0.pre3 / 2019-11-11 +# 3.1.0.pre3 / 2019-11-11 -Enhancements: +## Enhancements: * Fix gem pristine not accounting for user installed gems. Pull request #2914 by Luis Sagastume. @@ -352,18 +352,18 @@ Enhancements: * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request #2985 by MSP-Greg. -=== 3.1.0.pre2 / 2019-10-15 +# 3.1.0.pre2 / 2019-10-15 -Enhancements: +## Enhancements: * Optimize Gem::Package::TarReader#each. Pull request #2941 by Jean byroot Boussier. * Time comparison around date boundary. Pull request #2944 by Nobuyoshi Nakada. -=== 3.1.0.pre1 / 2019-10-08 +# 3.1.0.pre1 / 2019-10-08 -Enhancements: +## Enhancements: * Try to use bundler-2.1.0.pre.2. Pull request #2923 by SHIBATA Hiroshi. * [Require] Ensure -I beats a default gem. Pull request #1868 by Samuel @@ -493,7 +493,7 @@ Enhancements: Berger. * Remove useless TODO comment. Pull request #2818 by Luis Sagastume. -Bug fixes: +## Bug fixes: * Fix typos in History.txt. Pull request #2565 by Igor Zubkov. * Remove unused empty sources array. Pull request #2598 by Aaron @@ -526,7 +526,7 @@ Bug fixes: * Fix cryptic error on local and ignore-dependencies combination. Pull request #2650 by David Rodríguez. -Deprecations: +## Deprecations: * Make deprecate Gem::RubyGemsVersion and Gem::ConfigMap. Pull request #2857 by SHIBATA Hiroshi. @@ -540,7 +540,7 @@ Deprecations: * Add deprecation warnings for cli options. Pull request #2607 by Luis Sagastume. -Breaking changes: +## Breaking changes: * Suppress keywords warning. Pull request #2934 by Nobuyoshi Nakada. * Suppress Ruby 2.7's real kwargs warning. Pull request #2912 by Koichi @@ -563,16 +563,16 @@ Breaking changes: #2685 by SHIBATA Hiroshi. * Removing yaml require. Pull request #2538 by Luciano Sousa. -=== 3.0.8 / 2020-02-19 +# 3.0.8 / 2020-02-19 -Bug fixes: +## Bug fixes: * Gem::Specification#to_ruby needs OpenSSL. Pull request #2937 by Nobuyoshi Nakada. -=== 3.0.7 / 2020-02-18 +# 3.0.7 / 2020-02-18 -Bug fixes: +## Bug fixes: * Fix underscore version selection for bundler #2908 by David Rodríguez. * Add missing wrapper. Pull request #2690 by David Rodríguez. @@ -582,15 +582,15 @@ Bug fixes: * Use IAM role to extract security-credentials for EC2 instance. Pull request #2894 by Alexander Pakulov. -=== 3.0.6 / 2019-08-17 +# 3.0.6 / 2019-08-17 -Bug fixes: +## Bug fixes: * Revert #2813. It broke the compatibility with 3.0.x versions. -=== 3.0.5 / 2019-08-16 +# 3.0.5 / 2019-08-16 -Enhancements: +## Enhancements: * Use env var to configure api key on push. Pull request #2559 by Luis Sagastume. @@ -625,7 +625,7 @@ Enhancements: by Alexander Pakulov. * Fixup #2844. Pull request #2878 by SHIBATA Hiroshi. -Bug fixes: +## Bug fixes: * Fix intermittent test error on Appveyor & Travis. Pull request #2568 by MSP-Greg. @@ -641,9 +641,9 @@ Bug fixes: * Ignore GEMRC variable for test suite. Pull request #2837 by SHIBATA Hiroshi. -=== 3.0.4 / 2019-06-14 +# 3.0.4 / 2019-06-14 -Enhancements: +## Enhancements: * Add support for TruffleRuby #2612 by Benoit Daloze * Serve a more descriptive error when --no-ri or --no-rdoc are used #2572 @@ -680,7 +680,7 @@ Enhancements: request #2777 by Yusuke Endoh. * Backport ruby core changes. Pull request #2778 by SHIBATA Hiroshi. -Bug fixes: +## Bug fixes: * Test_gem.rb - intermittent failure fix. Pull request #2613 by MSP-Greg. * Fix sporadic CI failures. Pull request #2617 by David Rodríguez. @@ -696,7 +696,7 @@ Bug fixes: #2732 by Alex Junger. * Fix TODOs. Pull request #2748 by David Rodríguez. -=== 3.0.3 / 2019-03-05 +# 3.0.3 / 2019-03-05 Security fixes: @@ -707,14 +707,14 @@ Security fixes: * CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution * CVE-2019-8325: Escape sequence injection vulnerability in errors -=== 3.0.2 / 2019-01-01 +# 3.0.2 / 2019-01-01 -Enhancements: +## Enhancements: * Use Bundler-1.17.3. Pull request #2556 by SHIBATA Hiroshi. * Fix document flag description. Pull request #2555 by Luis Sagastume. -Bug fixes: +## Bug fixes: * Fix tests when ruby --program-suffix is used without rubygems --format-executable. Pull request #2549 by Jeremy Evans. @@ -724,9 +724,9 @@ Bug fixes: Fukumori. * Restore SOURCE_DATE_EPOCH. Pull request #2560 by SHIBATA Hiroshi. -=== 3.0.1 / 2018-12-23 +# 3.0.1 / 2018-12-23 -Bug fixes: +## Bug fixes: * Ensure globbed files paths are expanded. Pull request #2536 by Tony Ta. * Dup the Dir.home string before passing it on. Pull request #2545 by @@ -735,9 +735,9 @@ Bug fixes: by SHIBATA Hiroshi. * Restore release task without hoe. Pull request #2547 by SHIBATA Hiroshi. -=== 3.0.0 / 2018-12-19 +# 3.0.0 / 2018-12-19 -Enhancements: +## Enhancements: * S3 source. Pull request #1690 by Aditya Prakash. * Download gems with threads. Pull request #1898 by André Arko. @@ -902,7 +902,7 @@ Enhancements: * Support the environment without OpenSSL. Pull request #2528 by SHIBATA Hiroshi. -Bug fixes: +## Bug fixes: * Fix undefined method error when printing alert. Pull request #1884 by Robert Ross. @@ -955,7 +955,7 @@ Bug fixes: * Fix tests when --program-suffix and similar ruby configure options are used. Pull request #2529 by Jeremy Evans. -Breaking changes: +## Breaking changes: * IO.binread is not provided at Ruby 1.8. Pull request #2093 by SHIBATA Hiroshi. @@ -1008,9 +1008,9 @@ Breaking changes: * [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions. Pull request #2515 by Colby Swandale. -=== 2.7.10 / 2019-06-14 +# 2.7.10 / 2019-06-14 -Enhancements: +## Enhancements: * Fix bundler rubygems binstub not properly looking for bundler. Pull request #2426 by David Rodríguez. @@ -1018,7 +1018,7 @@ Enhancements: Pull request #2515 by Colby Swandale. + Update for compatibility with new minitest. Pull request #2118 by MSP-Greg. -=== 2.7.9 / 2019-03-05 +# 2.7.9 / 2019-03-05 Security fixes: @@ -1029,9 +1029,9 @@ Security fixes: * CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution * CVE-2019-8325: Escape sequence injection vulnerability in errors -=== 2.7.8 / 2018-11-02 +# 2.7.8 / 2018-11-02 -Enhancements: +## Enhancements: * [Requirement] Treat requirements with == versions as equal. Pull request #2230 by Samuel Giddins. @@ -1050,7 +1050,7 @@ Enhancements: * Improve bindir flag description. Pull request #2383 by Luis Sagastume. * Update bundler-1.16.6. Pull request #2423 by SHIBATA Hiroshi. -Bug fixes: +## Bug fixes: * Fix #1470: generate documentation when --install-dir is present. Pull request #2229 by Elias Hernandis. @@ -1063,9 +1063,9 @@ Bug fixes: * Gem::Version should handle nil like it used to before. Pull request #2363 by Luis Sagastume. -=== 2.7.7 / 2018-05-08 +# 2.7.7 / 2018-05-08 -Enhancements: +## Enhancements: * [RequestSet] Only suggest a gem version with an installable platform. Pull request #2175 by Samuel Giddins. @@ -1080,7 +1080,7 @@ Enhancements: Sagastume. * Backport ruby core commits. Pull request #2264 by SHIBATA Hiroshi. -Bug fixes: +## Bug fixes: * Frozen string fix - lib/rubygems/bundler_version_finder.rb. Pull request #2115 by MSP-Greg. @@ -1093,7 +1093,7 @@ Bug fixes: * Fix path checks for case insensitive filesystem. Pull request #2211 by Lars Kanis. -Deprecations: +## Deprecations: * Deprecate unused code before removing them at #1524. Pull request #2197 by SHIBATA Hiroshi. @@ -1101,11 +1101,11 @@ Deprecations: * Mark deprecation to `ubygems.rb` for RubyGems 4. Pull request #2269 by SHIBATA Hiroshi. -Breaking changes: +## Breaking changes: * Update bundler-1.16.2. Pull request #2291 by SHIBATA Hiroshi. -=== 2.7.6 / 2018-02-16 +# 2.7.6 / 2018-02-16 Security fixes: @@ -1124,9 +1124,9 @@ Security fixes: * Prevent Path Traversal issue during gem installation. Discovered by nmalkin. -=== 2.7.5 +# 2.7.5 -Bug fixes: +## Bug fixes: * To use bundler-1.16.1 #2121 by SHIBATA Hiroshi. * Fixed leaked FDs. Pull request #2127 by Nobuyoshi Nakada. @@ -1138,9 +1138,9 @@ Bug fixes: * Set whether bundler is used for gemdeps with an environmental variable #2126 by SHIBATA Hiroshi. * Fix undefined method error when printing alert #1884 by Robert Ross. -=== 2.7.4 +# 2.7.4 -Bug fixes: +## Bug fixes: * Fixed leaked FDs. Pull request #2127 by Nobuyoshi Nakada. * Avoid to warnings about gemspec loadings in rubygems tests. Pull request @@ -1149,9 +1149,9 @@ Bug fixes: * Handle environment that does not have `flock` system call. Pull request #2107 by SHIBATA Hiroshi. -=== 2.7.3 +# 2.7.3 -Enhancements: +## Enhancements: * Removed needless version lock. Pull request #2074 by SHIBATA Hiroshi. * Add --[no-]check-development option to cleanup command. Pull request @@ -1164,7 +1164,7 @@ Enhancements: * Remove multi load warning from plugins documentation. Pull request #2103 by Thibault Jouan. -Bug fixes: +## Bug fixes: * Fix test failure on Alpine Linux. Pull request #2079 by Ellen Marie Dash. @@ -1183,25 +1183,25 @@ Bug fixes: * Use setup command --regenerate-binstubs option flag. Pull request #2099 by Thibault Jouan. -=== 2.7.2 +# 2.7.2 -Bug fixes: +## Bug fixes: * Added template files to vendoerd bundler. Pull request #2065 by SHIBATA Hiroshi. * Added workaround for non-git environment. Pull request #2066 by SHIBATA Hiroshi. -=== 2.7.1 (2017-11-03) +# 2.7.1 (2017-11-03) -Bug fixes: +## Bug fixes: * Fix `gem update --system` with RubyGems 2.7+. Pull request #2054 by Samuel Giddins. -=== 2.7.0 (2017-11-02) +# 2.7.0 (2017-11-02) -Enhancements: +## Enhancements: * Update vendored bundler-1.16.0. Pull request #2051 by Samuel Giddins. * Use Bundler for Gem.use_gemdeps. Pull request #1674 by Samuel Giddins. @@ -1292,7 +1292,7 @@ Enhancements: * Warn when requiring deprecated files. Pull request #1939 by Ellen Marie Dash. -Deprecations: +## Deprecations: * Deprecate Gem::InstallerTestCase#util_gem_bindir and Gem::InstallerTestCase#util_gem_dir. Pull request #1729 by Jon Moss. @@ -1302,7 +1302,7 @@ Deprecations: * Add deprecation warning for Gem::DependencyInstaller#gems_to_install. Pull request #1731 by Jon Moss. -Breaking changes: +## Breaking changes: * Use `-rrubygems` instead of `-rubygems.rb`. Because ubygems.rb is unavailable on Ruby 2.5. Pull request #2028 #2027 #2029 @@ -1310,7 +1310,7 @@ Breaking changes: * Update Code of Conduct to Contributor Covenant v1.4.0. Pull request #1796 by Matej. -Bug fixes: +## Bug fixes: * Fix issue for MinGW / MSYS2 builds and testing. Pull request #1876 by MSP-Greg. @@ -1363,7 +1363,7 @@ Bug fixes: * [StubSpecification] Don’t iterate through all loaded specs in #to_spec. Pull request #1738 by Samuel Giddins. -=== 2.6.14 / 2017-10-09 +# 2.6.14 / 2017-10-09 Security fixes: @@ -1371,7 +1371,7 @@ Security fixes: See CVE-2017-0903 for full details. Fix by Aaron Patterson. -=== 2.6.13 / 2017-08-27 +# 2.6.13 / 2017-08-27 Security fixes: @@ -1385,9 +1385,9 @@ Security fixes: to overwrite arbitrary files. (CVE-2017-0901) Discovered by Yusuke Endoh, fix by Samuel Giddins. -=== 2.6.12 / 2017-04-30 +# 2.6.12 / 2017-04-30 -Bug fixes: +## Bug fixes: * Fix test_self_find_files_with_gemfile to sort expected files. Pull request #1880 by Kazuaki Matsuo. @@ -1408,9 +1408,9 @@ Bug fixes: * Allow Gem.finish_resolve to respect already-activated specs. Pull request #1910 by Samuel Giddins. -=== 2.6.11 / 2017-03-16 +# 2.6.11 / 2017-03-16 -Bug fixes: +## Bug fixes: * Fixed broken tests on ruby-head. Pull request #1841 by SHIBATA Hiroshi. @@ -1421,16 +1421,16 @@ Bug fixes: * Use improved resolver sorting algorithm. Pull request #1856 by Samuel Giddins. -=== 2.6.10 / 2017-01-23 +# 2.6.10 / 2017-01-23 -Bug fixes: +## Bug fixes: * Fix `require` calling the wrong `gem` method when it is overridden. Pull request #1822 by Samuel Giddins. -=== 2.6.9 / 2017-01-20 +# 2.6.9 / 2017-01-20 -Bug fixes: +## Bug fixes: * Allow initializing versions with empty strings. Pull request #1767 by Luis Sagastume. @@ -1444,9 +1444,9 @@ Bug fixes: * RakeBuilder: avoid frozen string issue. Pull request #1819 by Olle Jonsson. -=== 2.6.8 / 2016-10-29 +# 2.6.8 / 2016-10-29 -Bug fixes: +## Bug fixes: * Improve SSL verification failure message. Pull request #1751 by Eric Hodel. @@ -1455,9 +1455,9 @@ Bug fixes: * Update vendored Molinillo to 0.5.3. Pull request #1763 by Samuel Giddins. -=== 2.6.7 / 2016-09-26 +# 2.6.7 / 2016-09-26 -Bug fixes: +## Bug fixes: * Install native extensions in the correct location when using the `--user-install` flag. Pull request #1683 by Noah Kantrowitz. @@ -1469,24 +1469,24 @@ Bug fixes: * Update vendored Molinillo to 0.5.1. Pull request #1714 by Samuel Giddins. -=== 2.6.6 / 2016-06-22 +# 2.6.6 / 2016-06-22 -Bug fixes: +## Bug fixes: * Sort installed versions to make sure we install the latest version when running `gem update --system`. As a one-time fix, run `gem update --system=2.6.6`. Pull request #1601 by David Radcliffe. -=== 2.6.5 / 2016-06-21 +# 2.6.5 / 2016-06-21 -Enhancements: +## Enhancements: * Support for unified Integer in Ruby 2.4. Pull request #1618 by SHIBATA Hiroshi. * Update vendored Molinillo to 0.5.0 for performance improvements. Pull request #1638 by Samuel Giddins. -Bug fixes: +## Bug fixes: * Raise an explicit error if Signer#sign is called with no certs. Pull request #1605 by Daniel Berger. @@ -1506,16 +1506,16 @@ Bug fixes: Pull request #1644 by Charles Oliver Nutter. * Run Bundler tests on TravisCI. Pull request #1650 by Samuel Giddins. -=== 2.6.4 / 2016-04-26 +# 2.6.4 / 2016-04-26 -Enhancements: +## Enhancements: * Use Gem::Util::NULL_DEVICE instead of hard coded strings. Pull request #1588 by Chris Charabaruk. * Use File.symlink on MS Windows if supported. Pull request #1418 by Nobuyoshi Nakada. -Bug fixes: +## Bug fixes: * Redact uri password from error output when gem fetch fails. Pull request #1565 by Brian Fletcher. @@ -1523,9 +1523,9 @@ Bug fixes: * Escape user-supplied content served on web pages by `gem server` to avoid potential XSS vulnerabilities. Samuel Giddins. -=== 2.6.3 / 2016-04-05 +# 2.6.3 / 2016-04-05 -Enhancements: +## Enhancements: * Lazily calculate Gem::LoadError exception messages. Pull request #1550 by Aaron Patterson. @@ -1536,7 +1536,7 @@ Enhancements: * Show default gems when using "gem list". Pull request #1570 by Luis Sagastume. -Bug fixes: +## Bug fixes: * Stub ordering should be consistent regardless of how cache is populated. Pull request #1552 by Aaron Patterson. @@ -1552,9 +1552,9 @@ Bug fixes: Giddins. * Allow two digit version numbers in the tests. Pull request #1575 by unak. -=== 2.6.2 / 2016-03-12 +# 2.6.2 / 2016-03-12 -Bug fixes: +## Bug fixes: * Fix wrong version of gem activation for bin stub. Pull request #1527 by Aaron Patterson. @@ -1565,9 +1565,9 @@ Bug fixes: #1538 by Charles Oliver Nutter. -=== 2.6.1 / 2016-02-28 +# 2.6.1 / 2016-02-28 -Bug fixes: +## Bug fixes: * Ensure `default_path` and `home` are set for paths. Pull request #1513 by Aaron Patterson. @@ -1576,9 +1576,9 @@ Bug fixes: * Fix invalid gem file preventing gem install from working. Pull request #1499 by Luis Sagastume. -=== 2.6.0 / 2016-02-26 +# 2.6.0 / 2016-02-26 -Enhancements: +## Enhancements: * RubyGems now defaults the `gem push` to the gem's "allowed_push_host" metadata setting. Pull request #1486 by Josh Lane. @@ -1589,7 +1589,7 @@ Enhancements: * Allow specifying gem requirements via env variables. Pull request #1472 by Samuel E. Giddins. -Bug fixes: +## Bug fixes: * RubyGems now stores `gem push` credentials under the host you signed-in for. Pull request #1485 by Josh Lane. @@ -1615,9 +1615,9 @@ Bug fixes: * Find_files only from loaded_gems when using gemdeps. Pull request #1277 by Michal Papis. -=== 2.5.2 / 2016-01-31 +# 2.5.2 / 2016-01-31 -Bug fixes: +## Bug fixes: * Fix memoization of Gem::Version#prerelease? Pull request #1125 by Matijs van Zuijlen. @@ -1633,7 +1633,7 @@ Bug fixes: * Handle symlinks containing ".." correctly. Pull request #1457 by Samuel E. Giddins. -Enhancements: +## Enhancements: * Add `--no-rc` flag, which skips loading `.gemrc`. Pull request #1329 by Luis Sagastume. @@ -1658,9 +1658,9 @@ Enhancements: * Function correctly when string literals are frozen on Ruby 2.3. Pull request #1408 by Samuel E. Giddins. -=== 2.5.1 / 2015-12-10 +# 2.5.1 / 2015-12-10 -Bug fixes: +## Bug fixes: * Ensure platform sorting only uses strings. Affected binary installs on Windows. Issue #1369 reported by Ryan Atball (among others). @@ -1689,9 +1689,9 @@ Bug fixes: Kudo. * Fixed double word typo. Pull request #1411 by Jake Worth. -=== 2.5.0 / 2015-11-03 +# 2.5.0 / 2015-11-03 -Enhancements: +## Enhancements: * Added the Gem::Licenses class which provides a set of standard license identifiers as set by spdx.org. This is now used by the @@ -1761,7 +1761,7 @@ Enhancements: * Gem::RemoteFetcher allows users to set HTTP headers. Pull request #1363 by Agis Anastasopoulos. -Bug fixes: +## Bug fixes: * Fixed Rake homepage url in example for Gem::Specification#homepage. Pull request #1171 by Arthur Nogueira Neves @@ -1818,22 +1818,22 @@ Bug fixes: * RubyGems handles invalid config files better. Pull request #1367 by Agis Anastasopoulos. -=== 2.4.8 / 2015-06-08 +# 2.4.8 / 2015-06-08 -Bug fixes: +## Bug fixes: * Tightened API endpoint checks for CVE-2015-3900 -=== 2.4.7 / 2015-05-14 +# 2.4.7 / 2015-05-14 -Bug fixes: +## Bug fixes: * Limit API endpoint to original security domain for CVE-2015-3900. Fix by claudijd -=== 2.4.6 / 2015-02-05 +# 2.4.6 / 2015-02-05 -Bug fixes: +## Bug fixes: * Fixed resolving gems with both upper and lower requirement boundaries. Issue #1141 by Jakub Jirutka. @@ -1858,9 +1858,9 @@ Bug fixes: Ondruch. * Relaxed Psych dependency. Pull request #1128 by Vít Ondruch. -=== 2.4.5 / 2014-12-03 +# 2.4.5 / 2014-12-03 -Bug fixes: +## Bug fixes: * Improved speed of requiring gems. (Around 25% for a 60 gem test). Pull request #1060 by unak. @@ -1900,27 +1900,27 @@ Bug fixes: * Fixed grouped expression warning. Pull request #1081 by André Arko. * Fixed handling of platforms when writing lockfiles. -=== 2.4.4 / 2014-11-12 +# 2.4.4 / 2014-11-12 -Bug fixes: +## Bug fixes: * Add alternate Root CA for upcoming certificate change. Fixes #1050 by Protosac -=== 2.4.3 / 2014-11-10 +# 2.4.3 / 2014-11-10 -Bug fixes: +## Bug fixes: * Fix redefine MirrorCommand issue. Pull request #1044 by @akr. * Fix typo in platform= docs. Pull request #1048 by @jasonrclark * Add root SSL certificates for upcoming certificate change. Fixes #1050 by Protosac -=== 2.4.2 / 2014-10-01 +# 2.4.2 / 2014-10-01 This release was sponsored by Ruby Central. -Bug fixes: +## Bug fixes: * RubyGems now correctly matches wildcard no_proxy hosts. Issue #997 by voelzemo. @@ -1954,16 +1954,16 @@ Bug fixes: * RubyGems now fails immediately when a git reference cannot be found instead of spewing git errors. Issue #1031 by Michal Papis -=== 2.4.1 / 2014-07-17 +# 2.4.1 / 2014-07-17 -Bug fixes: +## Bug fixes: * RubyGems can now be updated on Ruby implementations that do not support vendordir in RbConfig::CONFIG. Issue #974 by net1957. -=== 2.4.0 / 2014-07-16 +# 2.4.0 / 2014-07-16 -Enhancements: +## Enhancements: * The contents command now supports a --show-install-dir option that shows only the directory the gem is installed in. Feature request #966 by Akinori @@ -1974,7 +1974,7 @@ Enhancements: in Gem.vendor_dir with the --vendor option to gem install. Issue #943 by Marcus Rückert. -Bug fixes: +## Bug fixes: * Kernel#gem now respects the prerelease flag when activating gems. Previously this behavior was undefined which could lead to bugs when a @@ -2024,9 +2024,9 @@ Bug fixes: during gem resolution. -=== 2.3.0 / 2014-06-10 +# 2.3.0 / 2014-06-10 -Enhancements: +## Enhancements: * Added the `open` command which allows you to inspect the source of a gem using your editor. @@ -2067,7 +2067,7 @@ Enhancements: * RubyGems recommends SPDX IDs for licenses now. Pull request #917 by Benjamin Fleischer. -Bug fixes: +## Bug fixes: * RubyGems now only fetches the latest specs to find misspellings which speeds up gem suggestions. Pull request #808 by Aaron Patterson. @@ -2147,29 +2147,29 @@ Bug fixes: * Gem::BasicSpecification#require_paths respects default_ext_dir_for now. Bug #852 by Vít Ondruch. -=== 2.2.5 / 2015-06-08 +# 2.2.5 / 2015-06-08 -Bug fixes: +## Bug fixes: * Tightened API endpoint checks for CVE-2015-3900 -=== 2.2.4 / 2015-05-14 +# 2.2.4 / 2015-05-14 -Bug fixes: +## Bug fixes: * Backport: Limit API endpoint to original security domain for CVE-2015-3900. Fix by claudijd -=== 2.2.3 / 2014-12-21 +# 2.2.3 / 2014-12-21 -Bug fixes: +## Bug fixes: * Backport: Add alternate Root CA for upcoming certificate change. Fixes #1050 by Protosac -=== 2.2.2 / 2014-02-05 +# 2.2.2 / 2014-02-05 -Bug fixes: +## Bug fixes: * Fixed ruby tests when BASERUBY is not set. Patch for #778 by Nobuyoshi Nakada. @@ -2194,9 +2194,9 @@ Bug fixes: * Restored behavior of Gem::Version::new when subclassed. Issue #805 by Sergio Rubio. -=== 2.2.1 / 2014-01-06 +# 2.2.1 / 2014-01-06 -Bug fixes: +## Bug fixes: * Platforms in the Gemfile.lock GEM section are now handled correctly. Bug #767 by Diego Viola. @@ -2222,12 +2222,12 @@ Bug fixes: * Fixed specification file sorting for Ruby 1.8.7 compatibility. Pull request #763 by James Mead -=== 2.2.0 / 2013-12-26 +# 2.2.0 / 2013-12-26 Special thanks to Vít Ondruch and Michal Papis for testing and finding bugs in RubyGems as it was prepared for the 2.2.0 release. -Enhancements: +## Enhancements: * RubyGems can check for gem dependencies files (gem.deps.rb or Gemfile) when rubygems executables are started and uses the found dependencies. This @@ -2295,7 +2295,7 @@ Enhancements: * Relaxed Gem.ruby tests for platforms that override where ruby lives. Pull Request #755 by strzibny. -Bug fixes: +## Bug fixes: * RubyGems now returns an error status when any file given to `gem which` cannot be found. Ruby bug #9004 by Eugene Vilensky. @@ -2312,9 +2312,9 @@ Bug fixes: * Improved speed of `gem install --ignore-dependencies`. Patch by Terence Lee. -=== 2.1.11 / 2013-11-12 +# 2.1.11 / 2013-11-12 -Bug fixes: +## Bug fixes: * Gem::Specification::remove_spec no longer checks for existence of the spec to be removed. Issue #698 by Tiago Macedo. @@ -2324,9 +2324,9 @@ Bug fixes: * The Gem::RemoteFetcher tests now choose the test server port more reliably. Pull Request #706 by akr. -=== 2.1.10 / 2013-10-24 +# 2.1.10 / 2013-10-24 -Bug fixes: +## Bug fixes: * Use class check instead of :version method check when creating Gem::Version objects. Fixes #674 by jkanywhere. @@ -2345,18 +2345,18 @@ Bug fixes: * The --ignore-dependencies option for gem installation works again. Issue #695 -=== 2.1.9 / 2013-10-14 +# 2.1.9 / 2013-10-14 -Bug fixes: +## Bug fixes: * Reduce sorting when fetching specifications. This speeds up the update and outdated commands, and others. Issue #657 by windwiny. * Proxy usernames and passwords are now escaped properly. Ruby Bug #8979 by Masahiro Tomita, Issue #668 by Kouhei Sutou. -=== 2.1.8 / 2013-10-10 +# 2.1.8 / 2013-10-10 -Bug fixes: +## Bug fixes: * Fixed local installation of platform gem files. Issue #664 by Ryan Melton. * Files starting with "." in the root directory are installed again. Issue @@ -2364,9 +2364,9 @@ Bug fixes: * The index generator no longer indexes default gems. Issue #661 by Jeremy Hinegardner. -=== 2.1.7 / 2013-10-09 +# 2.1.7 / 2013-10-09 -Bug fixes: +## Bug fixes: * `gem sources --list` now displays a list of sources. Pull request #672 by Nathan Marley. @@ -2379,9 +2379,9 @@ Bug fixes: * Expand unpack destination directory. This fixes problems when File.realpath is missing and $GEM_HOME contains "..". Issue #679 by Charles Nutter. -=== 2.1.6 / 2013-10-08 +# 2.1.6 / 2013-10-08 -Bug fixes: +## Bug fixes: * Added certificates to follow the s3.amazonaws.com certificate change. Fixes #665 by emeyekayee. Fixes #671 by jonforums. @@ -2396,7 +2396,7 @@ Bug fixes: version.) Issue #676 by Michal Papis. Issue wayneeseguin/rvm#2262 by Thomas Sänger. -=== 2.1.5 / 2013-09-24 +# 2.1.5 / 2013-09-24 Security fixes: @@ -2405,25 +2405,25 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.1.5, 2.0.10, 1.8.27 and 1.8.23.2 (for Ruby 1.9.3). -=== 2.1.4 / 2013-09-17 +# 2.1.4 / 2013-09-17 -Bug fixes: +## Bug fixes: * `gem uninstall foo --all` now force-uninstalls all versions of foo. Issue #650 by Kyle (remkade). * Fixed uninstalling gems installed in the home directory (as in `--user-install`). Issue #653 by Lin Jen-Shin. -=== 2.1.3 / 2013-09-12 +# 2.1.3 / 2013-09-12 -Bug fixes: +## Bug fixes: * Gems with files entries starting with "./" no longer install 0 files. Issue #644 by Darragh Curran, #645 by Brandon Turner, #646 by Alex Tambellini -=== 2.1.2 / 2013-09-11 +# 2.1.2 / 2013-09-11 -Bug fixes: +## Bug fixes: * Restore concurrent requires following the fix for ruby bug #8374. Pull request #637 and issue #640 by Charles Nutter. @@ -2432,14 +2432,14 @@ Bug fixes: * Gem fetch now fetches the newest (not oldest) gem when --version is given. Issue #643 by Brian Shirai. -=== 2.1.1 / 2013-09-10 +# 2.1.1 / 2013-09-10 -Bug fixes: +## Bug fixes: * Only matching gems matching your local platform are considered for installation. Issue #638 by José M. Prieto, issue #639 by sawanoboly. -=== 2.1.0 / 2013-09-09 +# 2.1.0 / 2013-09-09 Security fixes: @@ -2448,7 +2448,7 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.0.8, 1.8.26 and 1.8.23.1 (for Ruby 1.9.3). Issue #626 by Damir Sharipov. -Enhancements: +## Enhancements: * RubyGems uses a new dependency resolver for gem installation which works similar to the bundler resolver. The new resolver can resolve conflicts the @@ -2524,7 +2524,7 @@ Enhancements: still slow, but I see a near 50% improvement for 250 gems on a fast connection). See also Gem::Specification::outdated_and_latest_version -Bug fixes: +## Bug fixes: * rubygems_plugin.rb files are now only loaded from the latest installed gem. * Fixed Gem.clear_paths when Security is defined at top-level. Pull request @@ -2532,29 +2532,29 @@ Bug fixes: * Fixed credential creation for `gem push` when `--host` is not given. Pull request #622 by Arthur Nogueira Neves -=== 2.0.17 / 2015-06-08 +# 2.0.17 / 2015-06-08 -Bug fixes: +## Bug fixes: * Tightened API endpoint checks for CVE-2015-3900 -=== 2.0.16 / 2015-05-14 +# 2.0.16 / 2015-05-14 -Bug fixes: +## Bug fixes: * Backport: Limit API endpoint to original security domain for CVE-2015-3900. Fix by claudijd -=== 2.0.15 / 2014-12-21 +# 2.0.15 / 2014-12-21 -Bug fixes: +## Bug fixes: * Backport: Add alternate Root CA for upcoming certificate change. Fixes #1050 by Protosac -=== 2.0.14 / 2013-11-12 +# 2.0.14 / 2013-11-12 -Bug fixes: +## Bug fixes: * Gem::Specification::remove_spec no longer checks for existence of the spec to be removed. Issue #698 by Tiago Macedo. @@ -2564,9 +2564,9 @@ Bug fixes: * The Gem::RemoteFetcher tests now choose the test server port more reliably. Pull Request #706 by akr. -=== 2.0.13 / 2013-10-24 +# 2.0.13 / 2013-10-24 -Bug fixes: +## Bug fixes: * Use class check instead of :version method check when creating Gem::Version objects. Fixes #674 by jkanywhere. @@ -2575,16 +2575,16 @@ Bug fixes: * Fix updating gems which have multiple platforms. Issue #693 by Ookami Kenrou. -=== 2.0.12 / 2013-10-14 +# 2.0.12 / 2013-10-14 -Bug fixes: +## Bug fixes: * Proxy usernames and passwords are now escaped properly. Ruby Bug #8979 by Masahiro Tomita, Issue #668 by Kouhei Sutou. -=== 2.0.11 / 2013-10-08 +# 2.0.11 / 2013-10-08 -Bug fixes: +## Bug fixes: * Added certificates to follow the s3.amazonaws.com certificate change. Fixes #665 by emeyekayee. Fixes #671 by jonforums. @@ -2599,7 +2599,7 @@ Bug fixes: version.) Issue #676 by Michal Papis. Issue wayneeseguin/rvm#2262 by Thomas Sänger. -=== 2.0.10 / 2013-09-24 +# 2.0.10 / 2013-09-24 Security fixes: @@ -2608,16 +2608,16 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.1.5, 2.0.10, 1.8.27 and 1.8.23.2 (for Ruby 1.9.3). -=== 2.0.9 / 2013-09-13 +# 2.0.9 / 2013-09-13 -Bug fixes: +## Bug fixes: * Gem fetch now fetches the newest (not oldest) gem when --version is given. Issue #643 by Brian Shirai. * Fixed credential creation for `gem push` when `--host` is not given. Pull request #622 by Arthur Nogueira Neves -=== 2.0.8 / 2013-09-09 +# 2.0.8 / 2013-09-09 Security fixes: @@ -2626,14 +2626,14 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.0.8, 1.8.26 and 1.8.23.1 (for Ruby 1.9.3). Issue #626 by Damir Sharipov. -Bug fixes: +## Bug fixes: * Fixed Gem.clear_paths when Security is defined at top-level. Pull request #625 by elarkin -=== 2.0.7 / 2013-08-15 +# 2.0.7 / 2013-08-15 -Bug fixes: +## Bug fixes: * Extensions may now be built in parallel (therefore gems may be installed in parallel). Bug #607 by Hemant Kumar. @@ -2643,9 +2643,9 @@ Bug fixes: Patches by Yui Naruse and Koichi Sasada. * Fixed documentation for Kernel#require. -=== 2.0.6 / 2013-07-24 +# 2.0.6 / 2013-07-24 -Bug fixes: +## Bug fixes: * Fixed the `--no-install` and `-I` options to `gem list` and friends. Bug #593 by Blargel. @@ -2657,14 +2657,14 @@ Bug fixes: Bug #599 by Chris Riesbeck * Restored default of remote search to `gem search`. -=== 2.0.5 / 2013-07-11 +# 2.0.5 / 2013-07-11 * Fixed building of extensions that run ruby in their makefiles. Bug #589 by Zachary Salzbank. -=== 2.0.4 / 2013-07-09 +# 2.0.4 / 2013-07-09 -Bug fixes: +## Bug fixes: * Fixed error caused by gem install not finding the right platform for your platform. Bug #576 by John Anderson @@ -2703,9 +2703,9 @@ Bug fixes: * Fix deprecation warnings when converting gemspecs to yaml. Ruby commit r41148 by Yui Naruse -=== 2.0.3 / 2013-03-11 +# 2.0.3 / 2013-03-11 -Bug fixes: +## Bug fixes: * Reverted automatic upgrade to HTTPS as it breaks RubyGems APIs. Fixes #506 by André Arko * Use File.realpath to remove extra / while checking if files are @@ -2720,17 +2720,17 @@ Bug fixes: * Fixed default gem key and cert locations. Pull request #511 by Samuel Cochran. -=== 2.0.2 / 2013-03-06 +# 2.0.2 / 2013-03-06 -Bug fixes: +## Bug fixes: * HTTPS URLs are preferred over HTTP URLs. RubyGems will now attempt to upgrade any HTTP source to HTTPS. Credit to Alex Gaynor. * SSL Certificates are now installed properly. Fixes #491 by hemanth.hm * Fixed HTTP to HTTPS upgrade for rubygems.org. -=== 2.0.1 / 2013-03-05 +# 2.0.1 / 2013-03-05 -Bug fixes: +## Bug fixes: * Lazily load RubyGems.org API credentials to avoid failure during RubyGems installation. Bug #465 by Isaac Sanders. * RubyGems now picks the latest prerelease to install. Fixes bug #468 by @@ -2752,7 +2752,7 @@ Bug fixes: Ruby bug #7713 by nobu * Fix tests when an 'a.rb' exists. Ruby bug #7749 by nobu. -=== 2.0.0 / 2013-02-24 +# 2.0.0 / 2013-02-24 RubyGems 2.0 includes several new features and many breaking changes. Some of these changes will cause existing software to break. These changes are a @@ -2764,7 +2764,7 @@ newer. Older versions of bundler will not work with RubyGems 2.0. Changes since RubyGems 1.8.25 (including past pre-releases): -Breaking changes: +## Breaking changes: * Deprecated Gem.unresolved_deps in favor of Gem::Specification.unresolved_deps @@ -2786,7 +2786,7 @@ Breaking changes: * Removed support for Ruby 1.9.1 * Removed many deprecated methods -Enhancements: +## Enhancements: * Improved support for default gems shipping with ruby 2.0.0+ * A gem can have arbitrary metadata through Gem::Specification#metadata @@ -2846,7 +2846,7 @@ Enhancements: GEM_HOME * When building gems with non-world-readable files a warning is shown. -Bug fixes: +## Bug fixes: * Gem.refresh now maintains the active gem list. Clearing the list would cause double-loads which would cause other bugs. Pull Request #427 by Jeremy Evans @@ -2903,7 +2903,7 @@ Bug fixes: Changes since RubyGems 2.0.0.rc.2: -Bug fixes: +## Bug fixes: * Gem.gzip and Gem.gunzip now return strings with BINARY encoding. Issue #450 by Jeremy Kemper * Fixed placement of executables with --user-install. Ruby bug #7779 by Jon @@ -2916,48 +2916,48 @@ Bug fixes: * Fixed verification of gems at LowSecurity due to missing signature. Thanks to André Arko. -=== 2.0.0.rc.2 / 2013-02-08 +# 2.0.0.rc.2 / 2013-02-08 -Bug fixes: +## Bug fixes: * Fixed signature verification of gems which was broken only on master. Thanks to Brian Buchanan. * Proper exceptions are raised when verifying an unsigned gem. Thanks to André Arko. -=== 2.0.0.rc.1 / 2013-01-08 +# 2.0.0.rc.1 / 2013-01-08 -Enhancements: +## Enhancements: * This release of RubyGems can push gems to rubygems.org. Ordinarily prerelease versions of RubyGems cannot push gems. * Added `gem check --doctor` to clean up after failed uninstallation. Bug #419 by Erik Hollensbe -Bug fixes: +## Bug fixes: * Fixed exception raised when attempting to push gems to rubygems.org. Bug #418 by André Arko * Gem installation will fail if RubyGems cannot load the specification from the gem. Bug #419 by Erik Hollensbe -=== 2.0.0.preview2.2 / 2012-12-14 +# 2.0.0.preview2.2 / 2012-12-14 -Enhancements: +## Enhancements: * Added a cmake builder. Pull request #265 by Allan Espinosa. * Removed rubyforge page from gem list output -Bug fixes: +## Bug fixes: * Restored RubyGems 1.8 packaging behavior of omitting directories. Bug #413 by Jeremy Kemper. -=== 2.0.0.preview2.1 / 2012-12-08 +# 2.0.0.preview2.1 / 2012-12-08 -Enhancements: +## Enhancements: * Gem::DependencyInstaller now passes build_args down to the installer. Pull Request #412 by Sam Rawlins. * RubyGems no longer defaults to uninstalling gems if a dependency would be broken. Now you must manually say "yes". Pull Request #406 by Shannon Skipper. -Bug fixes: +## Bug fixes: * RubyGems tests now run in FIPS mode. Issue #365 by Vít Ondruch * Fixed Gem::Specification#base_dir for default gems. Ruby Bug #7469 * Only update the spec cache when we have permission. Ruby Bug #7509 @@ -2969,13 +2969,13 @@ Bug fixes: * gem install now ignores directories that match the gem to install. Bug #407 by Santiago Pastorino. -=== 2.0.0.preview2 / 2012-12-01 +# 2.0.0.preview2 / 2012-12-01 This release contains two commits not present in Ruby 2.0.0.preview2. One commit is for ruby 1.8.7 support, the second allows RubyGems to work under $SAFE=1. There is no functional difference compared to Ruby 2.0.0.preview2 -Breaking changes: +## Breaking changes: * Deprecated Gem.unresolved_deps in favor of Gem::Specification.unresolved_deps @@ -2997,7 +2997,7 @@ Breaking changes: * Removed support for Ruby 1.9.1 * Removed many deprecated methods -Enhancements: +## Enhancements: * Improved support for default gems shipping with ruby 2.0.0+ * A gem can have arbitrary metadata through Gem::Specification#metadata @@ -3048,7 +3048,7 @@ Enhancements: GEM_HOME * When building gems with non-world-readable files a warning is shown. -Bug fixes: +## Bug fixes: * Added PID to setup bin_file while installing RubyGems to protect against errors. Fixes #328 by ConradIrwin @@ -3089,17 +3089,17 @@ Bug fixes: * URI scheme matching is no longer case-sensitive. Fixes #322 * ext/builder now checks $MAKE as well as $make (okkez) -=== 1.8.29 / 2013-11-23 +# 1.8.29 / 2013-11-23 -Bug fixes: +## Bug fixes: * Fixed installation when the LANG environment variable is empty. * Added DigiCert High Assurance EV Root CA to the default SSL certificates for cloudfront. -=== 1.8.28 / 2013-10-08 +# 1.8.28 / 2013-10-08 -Bug fixes: +## Bug fixes: * Added the Verisign Class 3 Public Primary Certification Authority G5 certificate and its intermediary to follow the s3.amazonaws.com certificate @@ -3109,7 +3109,7 @@ Bug fixes: * Added test for missing certificates for https://s3.amazonaws.com or https://rubygems.org. Pull request #673 by Hannes Georg. -=== 1.8.27 / 2013-09-24 +# 1.8.27 / 2013-09-24 Security fixes: @@ -3118,7 +3118,7 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.1.5, 2.0.10, 1.8.27 and 1.8.23.2 (for Ruby 1.9.3). -=== 1.8.26 / 2013-09-09 +# 1.8.26 / 2013-09-09 Security fixes: @@ -3127,13 +3127,13 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.0.8, 1.8.26 and 1.8.23.1 (for Ruby 1.9.3). Issue #626 by Damir Sharipov. -Bug fixes: +## Bug fixes: * Fixed editing of a Makefile with 8-bit characters. Fixes #181 -=== 1.8.25 / 2013-01-24 +# 1.8.25 / 2013-01-24 -Bug fixes: +## Bug fixes: * Added 11627 to setup bin_file location to protect against errors. Fixes #328 by ConradIrwin * Specification#ruby_code didn't handle Requirement with multiple @@ -3142,14 +3142,14 @@ Bug fixes: * Fix missing load_yaml in YAML-related requirement.rb code. * Manually backport encoding-aware YAML gemspec -=== 1.8.24 / 2012-04-27 +# 1.8.24 / 2012-04-27 -Bug fixes: +## Bug fixes: * Install the .pem files properly. Fixes #320 * Remove OpenSSL dependency from the http code path -=== 1.8.23.2 / 2013-09-24 +# 1.8.23.2 / 2013-09-24 Security fixes: @@ -3158,7 +3158,7 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.1.5, 2.0.10, 1.8.27 and 1.8.23.2 (for Ruby 1.9.3). -=== 1.8.23.1 / 2013-09-09 +# 1.8.23.1 / 2013-09-09 Security fixes: @@ -3167,7 +3167,7 @@ Security fixes: including vulnerable APIs. Fixed versions include 2.0.8, 1.8.26 and 1.8.23.1 (for Ruby 1.9.3). Issue #626 by Damir Sharipov. -=== 1.8.23 / 2012-04-19 +# 1.8.23 / 2012-04-19 This release increases the security used when RubyGems is talking to an https server. If you use a custom RubyGems server over SSL, this @@ -3187,49 +3187,49 @@ Security fixes: * Disallow redirects from https to http * Turn on verification of server SSL certs -Enhancements: +## Enhancements: * Add --clear-sources to fetch -Bug fixes: +## Bug fixes: * Use File.identical? to check if two files are the same. * Fixed init_with warning when using psych -=== 1.8.22 / 2012-04-13 +# 1.8.22 / 2012-04-13 -Bug fixes: +## Bug fixes: * Workaround for psych/syck YAML date parsing issue * Don't trust the encoding of ARGV. Fixes #307 * Quiet default warnings about missing spec variables * Read a binary file properly (windows fix) -=== 1.8.21 / 2012-03-22 +# 1.8.21 / 2012-03-22 -Bug fixes: +## Bug fixes: * Add workaround for buggy yaml output from 1.9.2 * Force 1.9.1 to remove it's prelude code. Fixes #305 -=== 1.8.20 / 2012-03-21 +# 1.8.20 / 2012-03-21 -Bug fixes: +## Bug fixes: * Add --force to `gem build` to skip validation. Fixes #297 * Gracefully deal with YAML::PrivateType objects in Marshal'd gemspecs * Treat the source as a proper url base. Fixes #304 * Warn when updating the specs cache fails. Fixes #300 -=== 1.8.19 / 2012-03-14 +# 1.8.19 / 2012-03-14 -Bug fixes: +## Bug fixes: * Handle loading psych vs syck properly. Fixes #298 * Make sure Date objects don't leak in via Marshal * Perform Date => Time coercion on yaml loading. Fixes #266 -=== 1.8.18 / 2012-03-11 +# 1.8.18 / 2012-03-11 -Bug fixes: +## Bug fixes: * Use Psych API to emit more compatible YAML * Download and write inside `gem fetch` directly. Fixes #289 @@ -3237,14 +3237,14 @@ Bug fixes: * Search everywhere for a spec for `gem spec`. Fixes #288 * Fix Gem.all_load_path. Fixes #171 -=== 1.8.17 / 2012-02-17 +# 1.8.17 / 2012-02-17 -Enhancements: +## Enhancements: * Add MacRuby to the list of special cases for platforms (ferrous26) * Add a default for where to install rubygems itself -Bug fixes: +## Bug fixes: * Fixed gem loading issue caused by dependencies not resolving. * Fixed umask error when stdlib is required and unresolved dependencies exist. @@ -3252,59 +3252,59 @@ Bug fixes: * Define SUCKAGE better, ie only MRI 1.9.2 * Propagate env-shebang to the pristine command if set for install. -=== 1.8.16 / 2012-02-12 +# 1.8.16 / 2012-02-12 -Bug fixes: +## Bug fixes: * Fix gem specification loading when encoding is not UTF-8. #146 * Allow group writable if umask allows it already. * Uniquify the spec list based on directory order priority -=== 1.8.15 / 2012-01-06 +# 1.8.15 / 2012-01-06 -Bug fixes: +## Bug fixes: * Don't eager load yaml, it creates a bad loop. Fixes #256 -=== 1.8.14 / 2012-01-05 +# 1.8.14 / 2012-01-05 -Bug fixes: +## Bug fixes: * Ignore old/bad cache data in Version * Make sure our YAML workarounds are loaded properly. Fixes #250. -=== 1.8.13 / 2011-12-21 +# 1.8.13 / 2011-12-21 -Bug fixes: +## Bug fixes: * Check loaded_specs properly when trying to satisfy a dep -Enhancements: +## Enhancements: * Remove using #loaded_path? for performance * Remove Zlib workaround for Windows build. -=== 1.8.12 / 2011-12-02 +# 1.8.12 / 2011-12-02 -Bug fixes: +## Bug fixes: * Handle more cases where Syck's DefaultKey showed up in requirements and wasn't cleaned out. -=== 1.8.11 / 2011-10-03 +# 1.8.11 / 2011-10-03 -Bug fixes: +## Bug fixes: * Deprecate was moved to Gem::Deprecate to stop polluting the top-level namespace. -=== 1.8.10 / 2011-08-25 +# 1.8.10 / 2011-08-25 RubyGems 1.8.10 contains a security fix that prevents malicious gems from executing code when their specification is loaded. See https://github.com/rubygems/rubygems/pull/165 for details. -Bug fixes: +## Bug fixes: * RubyGems escapes strings in ruby-format specs using #dump instead of #to_s and %q to prevent code injection. Issue #165 by Postmodern @@ -3315,21 +3315,21 @@ Bug fixes: * Fixed Syck DefaultKey infecting ruby-format specifications. * `gem uninstall a b` no longer stops if gem "a" is not installed. -=== 1.8.9 / 2011-08-23 +# 1.8.9 / 2011-08-23 -Bug fixes: +## Bug fixes: * Fixed uninstalling multiple gems using `gem uninstall` * Gem.use_paths splatted to take multiple paths! Issue #148 -=== 1.8.8 / 2011-08-11 +# 1.8.8 / 2011-08-11 -Bug fixes: +## Bug fixes: * The encoding of a gem's YAML spec is now UTF-8. Issue #149 -=== 1.8.7 / 2011-08-04 +# 1.8.7 / 2011-08-04 -Bug fixes: +## Bug fixes: * Added missing require for `gem uninstall --format-executable` * The correct name of the executable being uninstalled is now displayed with --format-executable @@ -3341,14 +3341,14 @@ Bug fixes: * Gem repository directories are no longer created world-writable. Patch by Sakuro OZAWA. Ruby Bug #4930 -=== 1.8.6 / 2011-07-25 +# 1.8.6 / 2011-07-25 -Enhancements: +## Enhancements: * Add autorequires and delay startup of RubyGems until require is called. See Ruby bug #4962 -Bug fixes: +## Bug fixes: * Restore behavior of Gem::Specification#loaded? Ruby Bug #5032 * Clean up SourceIndex.add_specs to not be so damn noisy. (tadman) @@ -3360,27 +3360,27 @@ Bug fixes: * Handle the Syck DefaultKey problem once and for all. * Fix SystemStackError occurring with "gem list -r -a" on 1.9. -=== 1.8.5 / 2011-05-31 +# 1.8.5 / 2011-05-31 -Enhancements: +## Enhancements: * The -u option to 'update local source cache' is official deprecated. * Remove has_rdoc deprecations from Specification. -Bug fixes: +## Bug fixes: * Handle bad specs more gracefully. * Reset any Gem paths changed in the installer. -=== 1.8.4 / 2011-05-25 +# 1.8.4 / 2011-05-25 -Enhancements: +## Enhancements: * Removed default_executable deprecations from Specification. -=== 1.8.3 / 2011-05-19 +# 1.8.3 / 2011-05-19 -Bug fixes: +## Bug fixes: * Fix independent testing of test_gem_package_tar_output. Ruby Bug #4686 by Shota Fukumori @@ -3389,33 +3389,33 @@ Bug fixes: * Fixed some bad calls left behind after rolling out some refactorings. * Syck has a parse error on (good) times output from Psych. (dazuma, et al) -=== 1.8.2 / 2011-05-11 +# 1.8.2 / 2011-05-11 -Enhancements: +## Enhancements: * Moved #outdated from OutdatedCommand to Specification (for Isolate). * Print out a warning about missing executables. -Bug fixes: +## Bug fixes: * Added missing requires to fix various upgrade issues. * `gem pristine` respects multiple gem repositories. * setup.rb now execs with --disable-gems when possible -=== 1.8.1 / 2011-05-05 +# 1.8.1 / 2011-05-05 -Enhancements: +## Enhancements: * Added Gem::Requirement#specific? and Gem::Dependency#specific? -Bug fixes: +## Bug fixes: * Typo on Indexer rendered it useless on Windows * gem dep can fetch remote dependencies for non-latest gems again. * gem uninstall with multiple versions no longer crashes with ArgumentError * Always use binary mode for File.open to keep Windows happy -=== 1.8.0 / 2011-04-34 +# 1.8.0 / 2011-04-34 This release focused on properly encapsulating functionality. Most of this work focused on moving functionality out of Gem::SourceIndex and @@ -3430,7 +3430,7 @@ extensions. You will need to run `gem pristine gem_with_extension -- --build-arg` to regenerate a gem with an extension where it requires special build arguments. -Deprecations: +## Deprecations: * DependencyList.from_source_index deprecated the source_index argument. * Deprecated Dependency.new(/regex/). @@ -3451,7 +3451,7 @@ Deprecations: * Deprecated all of Gem::GemPathSearcher. * Deprecated Gem::Specification#default_executable. -Enhancements: +## Enhancements: * Gem::SourceIndex functionality has been moved to Gem::Specification. Gem::SourceIndex is completely disconnected from Gem::Specification @@ -3503,7 +3503,7 @@ Enhancements: extensions. * `gem pristine` can now restore multiple gems. -Bug fixes: +## Bug fixes: * DependencyInstaller passed around a source_index instance but used Gem.source_index. @@ -3515,15 +3515,15 @@ Bug fixes: * `gem pristine` can now restore non-latest gems where the cached gem was removed. -=== 1.7.1 / 2011-03-32 +# 1.7.1 / 2011-03-32 -Bug fixes: +## Bug fixes: * Fixed missing file in Manifest.txt. (Also a bug in hoe was fixed where `rake check_manifest` showing a diff would not exit with an error.) -=== 1.7.0 / 2011-03-32 +# 1.7.0 / 2011-03-32 -Deprecations: +## Deprecations: * Deprecated Gem.all_load_paths, latest_load_paths, promote_load_path, and cache. * Deprecated RemoteFetcher#open_uri_or_path. @@ -3535,7 +3535,7 @@ Deprecations: test_suite_file(=). * Deprecated Specification#has_rdoc= and default_executable= -Enhancements: +## Enhancements: * Added stupid simple deprecation module. * Added --spec option to `gem unpack` to output a gem's original metadata * Added packaging option to Specification#validate @@ -3567,7 +3567,7 @@ Enhancements: * UpdateCommand#gems_to_update now returns (name, version) pairs. * UpdateCommand#which_to_update now takes an optional system argument. -Bug fixes: +## Bug fixes: * Added missing remote fetcher require to pristine command (aarnell) * Building gems now checks to ensure all required fields are non-nil * Fix option parser when summary is nil. @@ -3583,17 +3583,17 @@ Bug fixes: Elias Baixas * `gem update` now uniq's command line arguments. -=== 1.6.2 / 2011-03-08 +# 1.6.2 / 2011-03-08 -Bug fixes: +## Bug fixes: * require of an activated gem could cause activation conflicts. Fixes Bug #29056 by Dave Verwer. * `gem outdated` now works with up-to-date prerelease gems. -=== 1.6.1 / 2011-03-03 +# 1.6.1 / 2011-03-03 -Bug fixes: +## Bug fixes: * Installation no longer fails when a dependency from a version that won't be installed is unsatisfied. @@ -3602,9 +3602,9 @@ Bug fixes: * Gem files are cached correctly again. Patch #29051 by Mamoru Tasaka. * Tests now pass with non-022 umask. Patch #29050 by Mamoru Tasaka. -=== 1.6.0 / 2011-02-29 +# 1.6.0 / 2011-02-29 -Deprecations: +## Deprecations: * RubyGems no longer requires 'thread'. Rails < 3 will need to add require 'thread' to their applications. @@ -3613,7 +3613,7 @@ Deprecations: * Gem::LoadError#version_requirements has been removed. Use Gem::LoadError#requirement. -Enhancements: +## Enhancements: * Rewrote how Gem::activate (gem and require) resolves dependencies. * Gem::LoadError#version_requirement has been removed. Use @@ -3641,7 +3641,7 @@ Enhancements: locally cached gem specifications. * SpecFetcher.fetch_spec can now take a string source_uri. -Bug fixes: +## Bug fixes: * Added missing require of Gem::RemoteFetcher to the unpack command. * RubyGems now completely removes a previous install when reinstalling. @@ -3654,28 +3654,28 @@ Bug fixes: * Gem::Security used FileUtils but didn't require it. Reported by Elia Schito. * Gem::Uninstaller now respects --format-executable. -=== 1.5.3 / 2011-02-26 +# 1.5.3 / 2011-02-26 -Bug fixes: +## Bug fixes: * Fix for a bug in Syck which causes install failures for gems packaged with Psych. Bug #28965 by Aaron Patterson. -=== 1.5.2 / 2011-02-10 +# 1.5.2 / 2011-02-10 -Bug fixes: +## Bug fixes: * Fixed gem update --system. RubyGems can now update itself again. -=== 1.5.1 / 2011-02-09 +# 1.5.1 / 2011-02-09 -==== NOTE: `gem update --system` is broken. See UPGRADING.rdoc. +#= NOTE: `gem update --system` is broken. See UPGRADING.rdoc. -Enhancements: +## Enhancements: * Added ability to do gem update --system X.Y.Z. -Bug fixes: +## Bug fixes: * Scrub !!null YAML from 1.9.2 (install and build). * Added missing requires for user_interaction. @@ -3684,11 +3684,11 @@ Bug fixes: * Fixed SilentUI for cygwin; try /dev/null first then fall back to NUL. * RubyGems now enforces ruby 1.8.7 or newer. -=== 1.5.0 / 2011-01-31 +# 1.5.0 / 2011-01-31 -==== NOTE: `gem update --system` is broken. See UPGRADING.rdoc. +#= NOTE: `gem update --system` is broken. See UPGRADING.rdoc. -Enhancements: +## Enhancements: * Finally fixed all known 1.9.x issues. Upgrading is now possible! * Merged huge 1.3.7/ruby-core changes to master. @@ -3703,7 +3703,7 @@ Enhancements: * Gem::SilentUI now behaves like Gem::StreamUI for asking questions. Patch by Erik Hollensbe. -Bug fixes: +## Bug fixes: * `gem update` was implicitly doing --system. * 1.9.3: Fixed encoding errors causing gem installs to die during rdoc phase. @@ -3715,25 +3715,25 @@ Bug fixes: Erik Hollensbe. * rubygems-update lists its development dependencies again -=== 1.4.2 / 2011-01-06 +# 1.4.2 / 2011-01-06 -Bug fixes: +## Bug fixes: * Gem::Versions: "1.b1" != "1.b.1", but "1.b1" eql? "1.b.1". Fixes gem indexing. * Fixed Gem.find_files. * Removed otherwise unused #find_all_dot_rb. Only 6 days old and hella buggy. -=== 1.4.1 / 2010-12-31 +# 1.4.1 / 2010-12-31 Since apparently nobody reads my emails, blog posts or the README: DO NOT UPDATE RUBYGEMS ON RUBY 1.9! See UPGRADING.rdoc for details. -Bug fixes: +## Bug fixes: * Specification#load was untainting a frozen string (via `gem build *.spec`) -=== 1.4.0 / 2010-12-30 +# 1.4.0 / 2010-12-30 NOTE: In order to better maintain rubygems and to get it in sync with the world (eg, 1.9's 1.3.7 is different from our 1.3.7), rubygems is @@ -3743,7 +3743,7 @@ You have been warned! NOTE: We've switched to git/github. See README.rdoc for details. -Features: +## Features: * Added --launch option to `gem server`. (gthiesfeld) * Added fuzzy name matching on install failures. (gstark/presidentbeef) @@ -3753,7 +3753,7 @@ Features: * --source is now additive with your current sources. Use --clear-sources first to maintain previous behavior. -Bug fixes: +## Bug fixes: * Dependency "~>"s now respect lower-bound prerelease versions. * Ensure the gem directories exist on download. @@ -3764,7 +3764,7 @@ Bug fixes: Do not depend on rubygems to require stdlib stuff for you. (raggi/tmm1) * Treat 1.0.a10 like 1.0.a.10 for sorting, etc. Fixes #27903. (dchelimsky) -=== 1.3.7 / 2010-05-13 +# 1.3.7 / 2010-05-13 NOTE: @@ -3775,7 +3775,7 @@ http://gems.rubyforge.org with https://rubygems.org/ http://gems.rubyforge.org will continue to work for the foreseeable future. -Features: +## Features: * `gem` commands * `gem install` and `gem fetch` now report alternate platforms when a @@ -3794,7 +3794,7 @@ Features: in 1.3.6) * RubyGems now has platform support for IronRuby. Patch #27951 by Will Green. -Bug fixes: +## Bug fixes: * Require rubygems/custom_require if --disable-gem was set. Bug #27700 by Roger Pack. @@ -3806,9 +3806,9 @@ Bug fixes: * Gem::PackageTask depends on the package dir like the other rake package tasks so dependencies can be hooked up correctly. -=== 1.3.6 / 2010-02-17 +# 1.3.6 / 2010-02-17 -Features: +## Features: * `gem` commands * Added `gem push` and `gem owner` for interacting with modern/Gemcutter @@ -3820,7 +3820,7 @@ Features: force rebuilding. Patch #25982 by Akinori MUSHA. * Capital letters are now allowed in prerelease versions. -Bug fixes: +## Bug fixes: * Development deps are no longer added to rubygems-update gem so older versions can update successfully. @@ -3839,7 +3839,7 @@ Bug fixes: * Gem::RemoteFetcher no longer copies the file if it is where we want it. Patch #27409 by Jakub Šťastný. -Deprecations: +## Deprecations: * lib/rubygems/timer.rb has been removed. * Gem::Dependency#version_requirements is deprecated and will be removed on or @@ -3848,23 +3848,23 @@ Deprecations: * Gem::manage_gems was removed in 1.3.3. * Time::today was removed in 1.3.3. -=== 1.3.5 / 2009-07-21 +# 1.3.5 / 2009-07-21 -Bug fixes: +## Bug fixes: * Fix use of prerelease gems. * Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458. -Deprecations: +## Deprecations: * Bulk index update is no longer supported (the code currently remains, but not the tests) * Gem::manage_gems was removed in 1.3.3. * Time::today was removed in 1.3.3. -=== 1.3.4 / 2009-05-03 +# 1.3.4 / 2009-05-03 -Bug fixes: +## Bug fixes: * Fixed various warnings * Gem::ruby_version works correctly for 1.8 branch and trunk @@ -3875,16 +3875,16 @@ Bug fixes: drives. Bug #25882 by Lars Christensen * Fix typo in Gem::Requirement#parse. Bug #26000 by Mike Gunderloy. -Deprecations: +## Deprecations: * Bulk index update is no longer supported (the code currently remains, but not the tests) * Gem::manage_gems was removed in 1.3.3. * Time::today was removed in 1.3.3. -=== 1.3.3 / 2009-05-04 +# 1.3.3 / 2009-05-04 -Features: +## Features: * `gem server` allows port names (from /etc/services) with --port. * `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir @@ -3894,7 +3894,7 @@ Features: * Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true) * RDoc is now generated regardless of Gem::Specification#has_rdoc? -Bug fixes: +## Bug fixes: * `gem clean` now cleans up --user-install gems. Bug #25516 by Brett Eisenberg. @@ -3916,15 +3916,15 @@ Bug fixes: * Raise Gem::LoadError if Kernel#gem fails due to previously-loaded gem. Bug reported by Alf Mikula. -Deprecations: +## Deprecations: * Gem::manage_gems has been removed. * Time::today has been removed early. There was no way to make it warn and be easy to override with user code. -=== 1.3.2 / 2009-04-15 +# 1.3.2 / 2009-04-15 -Features: +## Features: * RubyGems now loads plugins from rubygems_plugin.rb in installed gems. This can be used to add commands (See Gem::CommandManager) or add @@ -3952,7 +3952,7 @@ Features: * Modern indicies can now be updated incrementally. * Legacy indicies can be updated separately from modern. -Bug fixes: +## Bug fixes: * Better gem activation error message. Patch #23082. * Kernel methods are now private. Patch #20801 by James M. Lawrence. @@ -3978,7 +3978,7 @@ Bug fixes: * Deal with extraneous quotation mark when autogenerating .bat file on MS Windows. Bug #22712. -Deprecations: +## Deprecations: * Gem::manage_gems has been removed. * Time::today will be removed in RubyGems 1.4. @@ -3986,9 +3986,9 @@ Deprecations: Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena and Daniel Berger for continuing windows support. -=== 1.3.1 / 2008-10-28 +# 1.3.1 / 2008-10-28 -Bug fixes: +## Bug fixes: * Disregard ownership of ~ under Windows while creating ~/.gem. Fixes issues related to no uid support under Windows. @@ -3999,13 +3999,13 @@ Bug fixes: * Gem::location_of_caller now behaves on Windows. Patch by Daniel Berger. * Silence PATH warning. -Deprecations: +## Deprecations: * Gem::manage_gems will be removed on or after March 2009. -=== 1.3.0 / 2008-09-25 +# 1.3.0 / 2008-09-25 -Features: +## Features: * RubyGems doesn't print LOCAL/REMOTE titles for `gem query` and friends if stdout is not a TTY, except with --both. @@ -4019,12 +4019,12 @@ Features: * RubyGems now updates the ri cache when the rdoc gem is installed and documentation is generated. -Deprecations: +## Deprecations: * Gem::manage_gems now warns when called. It will be removed on or after March 2009. -Bug fixes: +## Bug fixes: * RubyGems 1.3.0+ now updates when no previous rubygems-update is installed. Bug #20775 by Hemant Kumar. @@ -4048,7 +4048,7 @@ Bug fixes: * `gem lock --strict` works again. Patch #21814 by Sven Engelhardt. * Platform detection for Solaris was improved. Patch #21911 by Bob Remeika. -Enhancements: +## Enhancements: * `gem help install` now describes _version_ argument to executable stubs * `gem help environment` describes environment variables and ~/.gemrc and @@ -4074,9 +4074,9 @@ Enhancements: * test/test_ext_configure_builder.rb * Locale-free patch by Yusuke Endoh [ruby-core:17444]. -=== 1.2.0 / 2008-06-21 +# 1.2.0 / 2008-06-21 -Features: +## Features: * RubyGems no longer performs bulk updates and instead only fetches the gemspec files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to @@ -4095,7 +4095,7 @@ Features: * setup.rb now handles --vendor and --destdir for packagers * `gem stale` command that lists gems by last access time -Bug fixes: +## Bug fixes: * File modes from gems are now honored, patch #19737 * Marshal Gem::Specification objects from the future can now be loaded. @@ -4110,7 +4110,7 @@ Bug fixes: * Gem::DependencyInstaller resets installed gems every install, bug #19444 * Gem.default_path is now honored if GEM_PATH is not set, patch #19502 -Enhancements: +## Enhancements: * setup.rb * stub files created by RubyGems 0.7.x and older are no longer removed. When @@ -4129,9 +4129,9 @@ Enhancements: * Gem::RemoteFetcher now performs persistent connections for HEAD requests, bug #7973 -=== 1.1.1 / 2008-04-11 +# 1.1.1 / 2008-04-11 -Bug fixes: +## Bug fixes: * Gem.prefix now returns non-nil only when RubyGems was installed outside sitelibdir or libdir. @@ -4146,9 +4146,9 @@ Bug fixes: * Gem::RemoteFetcher handles Errno::ECONNABORTED. * Printing of release notes fixed. -=== 1.1.0 / 2008-03-29 +# 1.1.0 / 2008-03-29 -Features: +## Features: * RubyGems now uses persistent connections on index updates. Index updates are much faster now. @@ -4160,7 +4160,7 @@ Features: * `gem spec` now extracts specifications from .gem files. * `gem query --installed` to aid automation of checking for gems. -Bug fixes: +## Bug fixes: * RubyGems works with both Config and RbConfig now. * Executables are now cleaned upon uninstall. @@ -4176,7 +4176,7 @@ Bug fixes: * Gem stub scripts on windows now work outside Gem.bindir. * `gem sources -r` now works without network access. -Enhancements: +## Enhancements: * RubyGems now requires Ruby > 1.8.3. * Release notes are now printed upon installation. @@ -4187,26 +4187,26 @@ Enhancements: For a full list of changes to RubyGems, see the ChangeLog file. -=== 1.0.1 / 2007-12-20 +# 1.0.1 / 2007-12-20 -Bug fixes: +## Bug fixes: * Installation on Ruby 1.8.3 through 1.8.5 fixed * `gem build` on 1.8.3 fixed -Enhancements: +## Enhancements: * Since RubyGems 0.9.5, RubyGems is no longer supported on Ruby 1.8.2 or older, this is official in RubyGems 1.0.1. -=== 1.0.0 / 2007-12-20 +# 1.0.0 / 2007-12-20 -Features: +## Features: * RubyGems warns about various problems with gemspecs during gem building * More-consistent versioning for the RubyGems software -Enhancements: +## Enhancements: * Fixed various bugs and problems with installing gems on Windows * Fixed using `gem server` for installing gems @@ -4220,7 +4220,7 @@ Enhancements: * `gem unpack` can now unpack into a specific directory with --target * OpenSSL is no longer required by default -Breaking changes: +## Breaking changes: * Kernel#require_gem has been removed * Executables without a shebang will not be wrapped in a future version, this @@ -4232,9 +4232,9 @@ Breaking changes: * Gem::Specification#autorequire= has been deprecated * Time::today will be removed in a future version -=== 0.9.5 / 2007-11-19 +# 0.9.5 / 2007-11-19 -Features: +## Features: * Platform support * Automatic installation of platform gems @@ -4246,7 +4246,7 @@ Features: * Improved stubs and `gem.bat` on mswin, including better compatibility with the One-Click Installer. -Enhancements: +## Enhancements: * Time::today is deprecated and will be removed at a future date * Gem::manage_gems is deprecated and will be removed at a future date @@ -4291,13 +4291,13 @@ Special thanks to: * Tom Copeland * Wilson Bilkovich -=== 0.9.4 / 2007-05-23 +# 0.9.4 / 2007-05-23 If you are experiencing problems with the source index (e.g. strange "No Method" errors), or problems with zlib (e.g. "Buffer Error" messsage), we recommend upgrading to RubyGems 0.9.4. -Bug fixes: +## Bug fixes: * Several people have been experiencing problems with no method errors on the source index cache. The source index cache is now a bit more @@ -4309,9 +4309,9 @@ Bug fixes: * Several sub-commands were accidentally dropped from the "gem" command. These commands have been restored. -=== 0.9.3 / 2007-05-10 +# 0.9.3 / 2007-05-10 -Bug fixes: +## Bug fixes: The ZLib library on Windows will occasionally complains about a buffer error when unpacking gems. The Gems software has a workaround for that problem, but @@ -4319,19 +4319,19 @@ the workaround was only enabled for versions of ZLib 1.2.1 or earlier. We have received several reports of the error occurring with ZLib 1.2.3, so we have permanently enabled the work around on all versions. -=== 0.9.2 / 2007-02-05 +# 0.9.2 / 2007-02-05 -Bug fixes: +## Bug fixes: * The "unpack" command now works properly. * User name and password are now passed properly to the authenticating proxy when downloading gems. -=== 0.9.1 / 2007-01-16 +# 0.9.1 / 2007-01-16 See ChangeLog -=== 0.9.0 / 2006-06-28 +# 0.9.0 / 2006-06-28 Finally, the much anticipated RubyGems version 0.9.0 is now available. This release includes a number of new features and bug fixes. The @@ -4339,7 +4339,7 @@ number one change is that we can now download the gem index incrementally. This will greatly speed up the gem command when only a few gems are out of date. -Enhancements: +## Enhancements: * The gem index is now downloaded incrementally, only updating entries that are out of date. If more than 50 entries are out of date, we @@ -4366,7 +4366,7 @@ Enhancements: * .rbw is now a supported suffix for RubyGem's custom require. * Several Ruby 1.9 compatibility fixes (Eric Hodel). -Bug fixes: +## Bug fixes: * Added dashes to gemspecs generated in Ruby 1.8.3. This solves some cross-Ruby version compatibility issues. @@ -4378,7 +4378,7 @@ Bug fixes: * Fixed prefix handling for native expressions (patch by Aaron Patterson). * Fixed several Upgrade => Update typos. -=== 0.8.11 / 2005-07-13 +# 0.8.11 / 2005-07-13 * -y is a synonym for --include-dependencies. * Better handling of errors in the top level rescue clause. @@ -4397,7 +4397,7 @@ Bug fixes: * Added David Glasser's install-from-mirror patch. * Additional internal structural cleanup and test reorganization. -=== 0.8.10 / 2005-03-27 +# 0.8.10 / 2005-03-27 * In multi-user environments, it is common to supply multiple versions of gems (for example Rails), allowing individual users to select the version of the @@ -4408,16 +4408,16 @@ Bug fixes: installed, then the "gem update --system" command will download a new update, but install the latest update prior to the download. -=== 0.8.9 +# 0.8.9 Never released -=== 0.8.8 / 2005-03-14 +# 0.8.8 / 2005-03-14 * Moved the master definition of class Requirement back under version. Kept the body of Requirement under Gem. -=== 0.8.7 / 2005-03-14 +# 0.8.7 / 2005-03-14 Even though it has only been a few weeks since that last release, there are quite a number of new features in 0.8.7. A complete list of @@ -4470,11 +4470,11 @@ file system. You can read more about them here: * gemconfigure: http://docs.rubygems.org/read/chapter/4#page73 * gemwhich: http://docs.rubygems.org/read/chapter/17 -=== 0.8.6 / 2005-02-27 +# 0.8.6 / 2005-02-27 * Fixed a small bug with shebang construction -=== 0.8.5 / 2005-02-26 +# 0.8.5 / 2005-02-26 Do you know how you used to dread getting the following message while installing gems? @@ -4496,7 +4496,7 @@ us. No RDoc generation was included in the following times. The new caching code is at least 3x faster than previous versions. Woo Hoo! -=== 0.8.4 / 2005-01-01 +# 0.8.4 / 2005-01-01 * Rubygems 0.8.3's installer was broken unless you already had an older version of RubyGems installed. That's fixed. @@ -4506,7 +4506,7 @@ Hoo! * Support for lower-cased Gem file names (for you, Paul Duncan :) * Erik Veenstra's patch for making Gem versions sortable. -=== 0.8.3 / 2004-12-07 +# 0.8.3 / 2004-12-07 No real earth shattering news here, but there were a number of really annoying issues involving other libraries that RubyGems depends upon. @@ -4548,11 +4548,11 @@ There has been some minor usability enhancements and changes ... names. This was useful for him while testing libs that he had in development. -=== 0.8.1 / 2004-09-17 +# 0.8.1 / 2004-09-17 * Quick release to capture some bug fixes. -=== 0.8.0 / 2004-09-15 +# 0.8.0 / 2004-09-15 * Remove need for library stubs. Set the RUBYOPT environment variable to include "rrubygems", and a normal require will find gem files. Continue to @@ -4575,15 +4575,15 @@ There has been some minor usability enhancements and changes ... to pick. * Added "gem unpack" for "unpacking" a gem to the current directory -=== 0.7.0 / 2004-07-09 +# 0.7.0 / 2004-07-09 See ChangeLog -=== 0.6.1 / 2004-06-08 +# 0.6.1 / 2004-06-08 See ChangeLog -=== 0.6.0 / 2004-06-08 +# 0.6.0 / 2004-06-08 * Collapse output of --search and --list (and gem_server) operations so that each gem is listed only once, with each of its versions listed on the same @@ -4596,7 +4596,7 @@ See ChangeLog spec.required_ruby_version = "> 1.8.0" * --install-stub defaults to true, so library stubs are created -=== 0.5.0 / 2004-06-06 +# 0.5.0 / 2004-06-06 * Jim added the ability to specify version constraints to avoid API incompatibilities. This has been the subject of much debate for the past @@ -4619,11 +4619,11 @@ See ChangeLog automatically included. * Some small bug fixes -=== 0.4.0 / 2004-05-30 +# 0.4.0 / 2004-05-30 * Minor bug fixes including Windows compatibility issues -=== 0.3.0 / 2004-04-30 +# 0.3.0 / 2004-04-30 * Cleanup of command-line arguments and handling. Most commands accept a --local or --remote modifier. @@ -4644,6 +4644,6 @@ See ChangeLog * Generally improved error messages (still more work to do) * Rearranged gem directory structure for cleanliness. -=== 0.2.0 / 2004-03-14 +# 0.2.0 / 2004-03-14 * Initial public release diff --git a/Manifest.txt b/Manifest.txt index dee75919067b..9b1b3550b985 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,6 +1,6 @@ +CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md -History.txt LICENSE.txt MAINTAINERS.txt MIT.txt diff --git a/Rakefile b/Rakefile index 6a2653e64fa3..a30390fe9821 100644 --- a/Rakefile +++ b/Rakefile @@ -39,7 +39,7 @@ RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| doc.title = "RubyGems #{v} API Documentation" rdoc_files = Rake::FileList.new %w[lib bundler/lib] - rdoc_files.add %w[History.txt LICENSE.txt MIT.txt CODE_OF_CONDUCT.md CONTRIBUTING.md + rdoc_files.add %w[CHANGELOG.md LICENSE.txt MIT.txt CODE_OF_CONDUCT.md CONTRIBUTING.md MAINTAINERS.txt Manifest.txt POLICIES.md README.md UPGRADING.md bundler/CHANGELOG.md bundler/doc/contributing/README.md bundler/LICENSE.md bundler/README.md hide_lib_for_update/note.txt].map(&:freeze) diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 4e058a9a03f1..69b3d35b0194 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -6,8 +6,8 @@ # RubyGems checkout or tarball. class Gem::Commands::SetupCommand < Gem::Command - HISTORY_HEADER = /^===\s*[\d.a-zA-Z]+\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze - VERSION_MATCHER = /^===\s*([\d.a-zA-Z]+)\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze + HISTORY_HEADER = /^#\s*[\d.a-zA-Z]+\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze + VERSION_MATCHER = /^#\s*([\d.a-zA-Z]+)\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze ENV_PATHS = %w[/usr/bin/env /bin/env].freeze @@ -613,7 +613,7 @@ def remove_old_man_files(man_dir) end def show_release_notes - release_notes = File.join Dir.pwd, 'History.txt' + release_notes = File.join Dir.pwd, 'CHANGELOG.md' release_notes = if File.exist? release_notes diff --git a/rubygems-update.gemspec b/rubygems-update.gemspec index c690d1f9b2c7..7c6ff61660eb 100644 --- a/rubygems-update.gemspec +++ b/rubygems-update.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.require_paths = ["hide_lib_for_update"] s.rdoc_options = ["--main", "README.md", "--title=RubyGems Update Documentation"] s.extra_rdoc_files = [ - "History.txt", "LICENSE.txt", "MAINTAINERS.txt", + "CHANGELOG.md", "LICENSE.txt", "MAINTAINERS.txt", "MIT.txt", "Manifest.txt", "README.md", "UPGRADING.md", "POLICIES.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "bundler/CHANGELOG.md", diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index afdc5d09798c..0ee289e3c86f 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -326,22 +326,22 @@ def test_show_release_notes @cmd.options[:previous_version] = Gem::Version.new '2.0.2' - File.open 'History.txt', 'w' do |io| + File.open 'CHANGELOG.md', 'w' do |io| io.puts <<-HISTORY_TXT -=== #{Gem::VERSION} / 2013-03-26 +# #{Gem::VERSION} / 2013-03-26 -* Bug fixes: +## Bug fixes: * Fixed release note display for LANG=C when installing rubygems * π is tasty -=== 2.0.2 / 2013-03-06 +# 2.0.2 / 2013-03-06 -* Bug fixes: +## Bug fixes: * Other bugs fixed -=== 2.0.1 / 2013-03-05 +# 2.0.1 / 2013-03-05 -* Bug fixes: +## Bug fixes: * Yet more bugs fixed HISTORY_TXT end @@ -351,9 +351,9 @@ def test_show_release_notes end expected = <<-EXPECTED -=== #{Gem::VERSION} / 2013-03-26 +# #{Gem::VERSION} / 2013-03-26 -* Bug fixes: +## Bug fixes: * Fixed release note display for LANG=C when installing rubygems * π is tasty diff --git a/util/changelog.rb b/util/changelog.rb index fe96363d86e6..7804aa4fc9d0 100644 --- a/util/changelog.rb +++ b/util/changelog.rb @@ -5,7 +5,7 @@ class Changelog def self.for_rubygems(version) @rubygems ||= new( - File.expand_path("../History.txt", __dir__), + File.expand_path("../CHANGELOG.md", __dir__), version, ) end From 095358cba6f84b88cfbb1a7abece6ecb746ede7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Dec 2020 15:19:40 +0100 Subject: [PATCH 07/12] Merge pull request #4209 from rubygems/fix_bundle_man_pages_display_on_truffleruby Fix bundle man pages display on truffleruby (cherry picked from commit b13cb5e379d913806e722de37c472536dfcc40fe) --- Manifest.txt | 52 +++++++------- Rakefile | 2 +- bundler/Rakefile | 15 ++-- bundler/bundler.gemspec | 2 +- bundler/lib/bundler/cli.rb | 7 +- bundler/{ => lib/bundler}/man/bundle-add.1 | 0 .../{ => lib/bundler}/man/bundle-binstubs.1 | 0 bundler/{ => lib/bundler}/man/bundle-cache.1 | 0 bundler/{ => lib/bundler}/man/bundle-check.1 | 0 bundler/{ => lib/bundler}/man/bundle-clean.1 | 0 bundler/{ => lib/bundler}/man/bundle-config.1 | 0 bundler/{ => lib/bundler}/man/bundle-doctor.1 | 0 bundler/{ => lib/bundler}/man/bundle-exec.1 | 0 bundler/{ => lib/bundler}/man/bundle-gem.1 | 0 bundler/{ => lib/bundler}/man/bundle-info.1 | 0 bundler/{ => lib/bundler}/man/bundle-init.1 | 0 bundler/{ => lib/bundler}/man/bundle-inject.1 | 0 .../{ => lib/bundler}/man/bundle-install.1 | 0 bundler/{ => lib/bundler}/man/bundle-list.1 | 0 bundler/{ => lib/bundler}/man/bundle-lock.1 | 0 bundler/{ => lib/bundler}/man/bundle-open.1 | 0 .../{ => lib/bundler}/man/bundle-outdated.1 | 0 .../{ => lib/bundler}/man/bundle-platform.1 | 0 .../{ => lib/bundler}/man/bundle-pristine.1 | 0 bundler/{ => lib/bundler}/man/bundle-remove.1 | 0 bundler/{ => lib/bundler}/man/bundle-show.1 | 0 bundler/{ => lib/bundler}/man/bundle-update.1 | 0 bundler/{ => lib/bundler}/man/bundle-viz.1 | 0 bundler/{ => lib/bundler}/man/bundle.1 | 0 bundler/{ => lib/bundler}/man/gemfile.5 | 0 bundler/{ => lib/bundler}/man/index.txt | 0 bundler/spec/commands/exec_spec.rb | 10 +-- bundler/spec/commands/help_spec.rb | 16 ++--- bundler/spec/quality_spec.rb | 2 +- bundler/spec/support/path.rb | 6 +- lib/rubygems/commands/setup_command.rb | 70 ++++--------------- .../test_gem_commands_setup_command.rb | 31 ++------ 37 files changed, 71 insertions(+), 142 deletions(-) rename bundler/{ => lib/bundler}/man/bundle-add.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-binstubs.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-cache.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-check.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-clean.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-config.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-doctor.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-exec.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-gem.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-info.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-init.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-inject.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-install.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-list.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-lock.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-open.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-outdated.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-platform.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-pristine.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-remove.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-show.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-update.1 (100%) rename bundler/{ => lib/bundler}/man/bundle-viz.1 (100%) rename bundler/{ => lib/bundler}/man/bundle.1 (100%) rename bundler/{ => lib/bundler}/man/gemfile.5 (100%) rename bundler/{ => lib/bundler}/man/index.txt (100%) diff --git a/Manifest.txt b/Manifest.txt index 9b1b3550b985..b624096affdc 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -91,31 +91,57 @@ bundler/lib/bundler/lazy_specification.rb bundler/lib/bundler/lockfile_generator.rb bundler/lib/bundler/lockfile_parser.rb bundler/lib/bundler/man/.document +bundler/lib/bundler/man/bundle-add.1 bundler/lib/bundler/man/bundle-add.1.ronn +bundler/lib/bundler/man/bundle-binstubs.1 bundler/lib/bundler/man/bundle-binstubs.1.ronn +bundler/lib/bundler/man/bundle-cache.1 bundler/lib/bundler/man/bundle-cache.1.ronn +bundler/lib/bundler/man/bundle-check.1 bundler/lib/bundler/man/bundle-check.1.ronn +bundler/lib/bundler/man/bundle-clean.1 bundler/lib/bundler/man/bundle-clean.1.ronn +bundler/lib/bundler/man/bundle-config.1 bundler/lib/bundler/man/bundle-config.1.ronn +bundler/lib/bundler/man/bundle-doctor.1 bundler/lib/bundler/man/bundle-doctor.1.ronn +bundler/lib/bundler/man/bundle-exec.1 bundler/lib/bundler/man/bundle-exec.1.ronn +bundler/lib/bundler/man/bundle-gem.1 bundler/lib/bundler/man/bundle-gem.1.ronn +bundler/lib/bundler/man/bundle-info.1 bundler/lib/bundler/man/bundle-info.1.ronn +bundler/lib/bundler/man/bundle-init.1 bundler/lib/bundler/man/bundle-init.1.ronn +bundler/lib/bundler/man/bundle-inject.1 bundler/lib/bundler/man/bundle-inject.1.ronn +bundler/lib/bundler/man/bundle-install.1 bundler/lib/bundler/man/bundle-install.1.ronn +bundler/lib/bundler/man/bundle-list.1 bundler/lib/bundler/man/bundle-list.1.ronn +bundler/lib/bundler/man/bundle-lock.1 bundler/lib/bundler/man/bundle-lock.1.ronn +bundler/lib/bundler/man/bundle-open.1 bundler/lib/bundler/man/bundle-open.1.ronn +bundler/lib/bundler/man/bundle-outdated.1 bundler/lib/bundler/man/bundle-outdated.1.ronn +bundler/lib/bundler/man/bundle-platform.1 bundler/lib/bundler/man/bundle-platform.1.ronn +bundler/lib/bundler/man/bundle-pristine.1 bundler/lib/bundler/man/bundle-pristine.1.ronn +bundler/lib/bundler/man/bundle-remove.1 bundler/lib/bundler/man/bundle-remove.1.ronn +bundler/lib/bundler/man/bundle-show.1 bundler/lib/bundler/man/bundle-show.1.ronn +bundler/lib/bundler/man/bundle-update.1 bundler/lib/bundler/man/bundle-update.1.ronn +bundler/lib/bundler/man/bundle-viz.1 bundler/lib/bundler/man/bundle-viz.1.ronn +bundler/lib/bundler/man/bundle.1 bundler/lib/bundler/man/bundle.1.ronn +bundler/lib/bundler/man/gemfile.5 bundler/lib/bundler/man/gemfile.5.ronn +bundler/lib/bundler/man/index.txt bundler/lib/bundler/match_platform.rb bundler/lib/bundler/mirror.rb bundler/lib/bundler/plugin.rb @@ -280,32 +306,6 @@ bundler/lib/bundler/version_ranges.rb bundler/lib/bundler/vlad.rb bundler/lib/bundler/worker.rb bundler/lib/bundler/yaml_serializer.rb -bundler/man/bundle-add.1 -bundler/man/bundle-binstubs.1 -bundler/man/bundle-cache.1 -bundler/man/bundle-check.1 -bundler/man/bundle-clean.1 -bundler/man/bundle-config.1 -bundler/man/bundle-doctor.1 -bundler/man/bundle-exec.1 -bundler/man/bundle-gem.1 -bundler/man/bundle-info.1 -bundler/man/bundle-init.1 -bundler/man/bundle-inject.1 -bundler/man/bundle-install.1 -bundler/man/bundle-list.1 -bundler/man/bundle-lock.1 -bundler/man/bundle-open.1 -bundler/man/bundle-outdated.1 -bundler/man/bundle-platform.1 -bundler/man/bundle-pristine.1 -bundler/man/bundle-remove.1 -bundler/man/bundle-show.1 -bundler/man/bundle-update.1 -bundler/man/bundle-viz.1 -bundler/man/bundle.1 -bundler/man/gemfile.5 -bundler/man/index.txt hide_lib_for_update/note.txt lib/rubygems.rb lib/rubygems/available_set.rb diff --git a/Rakefile b/Rakefile index a30390fe9821..dab49701a6c5 100644 --- a/Rakefile +++ b/Rakefile @@ -365,7 +365,7 @@ module Rubygems class ProjectFiles def self.all files = [] - exclude = %r{\A(?:\.|dev_gems|bundler/(?!lib|man|exe|[^/]+\.md|bundler.gemspec)|util/)} + exclude = %r{\A(?:\.|dev_gems|bundler/(?!lib|exe|[^/]+\.md|bundler.gemspec)|util/)} tracked_files = `git ls-files`.split("\n") tracked_files.each do |path| diff --git a/bundler/Rakefile b/bundler/Rakefile index 1c3ac542ec87..6e7ef17b4df8 100644 --- a/bundler/Rakefile +++ b/bundler/Rakefile @@ -77,13 +77,10 @@ namespace :man do if RUBY_ENGINE == "jruby" task(:build) {} else - directory "man" + index = Dir["lib/bundler/man/*.ronn"].map do |ronn| + roff = "#{File.dirname(ronn)}/#{File.basename(ronn, ".ronn")}" - index = Dir["lib/bundler/man/*.ronn"].map do |source| - ronn = "lib/bundler/man/#{File.basename(source)}" - roff = "man/#{File.basename(source, ".ronn")}" - - file roff => ["man", ronn] do + file roff => ronn do date = ENV["MAN_PAGES_DATE"] || Time.now.strftime("%Y-%m-%d") sh "bin/ronn --warnings --roff --pipe --date #{date} #{ronn} > #{roff}" end @@ -99,7 +96,7 @@ namespace :man do end index = index.sort_by(&:first) justification = index.map {|(n, _f)| n.length }.max + 4 - File.open("man/index.txt", "w") do |f| + File.open("lib/bundler/man/index.txt", "w") do |f| index.each do |name, filename| f << name.ljust(justification) << filename << "\n" end @@ -118,7 +115,7 @@ namespace :man do desc "Remove all built man pages" task :clean do - leftovers = Dir["man/*"].reject do |f| + leftovers = Dir["lib/bundler/man/*"].reject do |f| File.extname(f) == ".ronn" end rm leftovers if leftovers.any? @@ -130,7 +127,7 @@ namespace :man do desc "Sets target date for building man pages to the one currently present" task :set_current_date do require "date" - ENV["MAN_PAGES_DATE"] = Date.parse(File.readlines("man/bundle-add.1")[3].split('"')[5]).strftime("%Y-%m-%d") + ENV["MAN_PAGES_DATE"] = Date.parse(File.readlines("lib/bundler/man/bundle-add.1")[3].split('"')[5]).strftime("%Y-%m-%d") end desc "Verify man pages are in sync" diff --git a/bundler/bundler.gemspec b/bundler/bundler.gemspec index c9a7564f6b62..f6cb02cea204 100644 --- a/bundler/bundler.gemspec +++ b/bundler/bundler.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.3.0" s.required_rubygems_version = ">= 2.5.2" - s.files = Dir.glob("{lib,man,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) } + s.files = Dir.glob("{lib,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) } # Include the CHANGELOG.md, LICENSE.md, README.md manually s.files += %w[CHANGELOG.md LICENSE.md README.md] diff --git a/bundler/lib/bundler/cli.rb b/bundler/lib/bundler/cli.rb index 2f495d427de0..249f5b202751 100644 --- a/bundler/lib/bundler/cli.rb +++ b/bundler/lib/bundler/cli.rb @@ -122,9 +122,7 @@ def help(cli = nil) else command = "bundle-#{cli}" end - man_path = File.expand_path("../../../man", __FILE__) - # man files are located under ruby's mandir with the default gems of bundler - man_path = RbConfig::CONFIG["mandir"] unless File.directory?(man_path) + man_path = File.expand_path("man", __dir__) man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\Z/).collect do |f| [File.basename(f, ".*"), f] end] @@ -134,8 +132,7 @@ def help(cli = nil) if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+} Kernel.exec "man #{man_page}" else - fallback_man_path = File.expand_path("../man", __FILE__) - puts File.read("#{fallback_man_path}/#{File.basename(man_page)}.ronn") + puts File.read("#{man_path}/#{File.basename(man_page)}.ronn") end elsif command_path = Bundler.which("bundler-#{cli}") Kernel.exec(command_path, "--help") diff --git a/bundler/man/bundle-add.1 b/bundler/lib/bundler/man/bundle-add.1 similarity index 100% rename from bundler/man/bundle-add.1 rename to bundler/lib/bundler/man/bundle-add.1 diff --git a/bundler/man/bundle-binstubs.1 b/bundler/lib/bundler/man/bundle-binstubs.1 similarity index 100% rename from bundler/man/bundle-binstubs.1 rename to bundler/lib/bundler/man/bundle-binstubs.1 diff --git a/bundler/man/bundle-cache.1 b/bundler/lib/bundler/man/bundle-cache.1 similarity index 100% rename from bundler/man/bundle-cache.1 rename to bundler/lib/bundler/man/bundle-cache.1 diff --git a/bundler/man/bundle-check.1 b/bundler/lib/bundler/man/bundle-check.1 similarity index 100% rename from bundler/man/bundle-check.1 rename to bundler/lib/bundler/man/bundle-check.1 diff --git a/bundler/man/bundle-clean.1 b/bundler/lib/bundler/man/bundle-clean.1 similarity index 100% rename from bundler/man/bundle-clean.1 rename to bundler/lib/bundler/man/bundle-clean.1 diff --git a/bundler/man/bundle-config.1 b/bundler/lib/bundler/man/bundle-config.1 similarity index 100% rename from bundler/man/bundle-config.1 rename to bundler/lib/bundler/man/bundle-config.1 diff --git a/bundler/man/bundle-doctor.1 b/bundler/lib/bundler/man/bundle-doctor.1 similarity index 100% rename from bundler/man/bundle-doctor.1 rename to bundler/lib/bundler/man/bundle-doctor.1 diff --git a/bundler/man/bundle-exec.1 b/bundler/lib/bundler/man/bundle-exec.1 similarity index 100% rename from bundler/man/bundle-exec.1 rename to bundler/lib/bundler/man/bundle-exec.1 diff --git a/bundler/man/bundle-gem.1 b/bundler/lib/bundler/man/bundle-gem.1 similarity index 100% rename from bundler/man/bundle-gem.1 rename to bundler/lib/bundler/man/bundle-gem.1 diff --git a/bundler/man/bundle-info.1 b/bundler/lib/bundler/man/bundle-info.1 similarity index 100% rename from bundler/man/bundle-info.1 rename to bundler/lib/bundler/man/bundle-info.1 diff --git a/bundler/man/bundle-init.1 b/bundler/lib/bundler/man/bundle-init.1 similarity index 100% rename from bundler/man/bundle-init.1 rename to bundler/lib/bundler/man/bundle-init.1 diff --git a/bundler/man/bundle-inject.1 b/bundler/lib/bundler/man/bundle-inject.1 similarity index 100% rename from bundler/man/bundle-inject.1 rename to bundler/lib/bundler/man/bundle-inject.1 diff --git a/bundler/man/bundle-install.1 b/bundler/lib/bundler/man/bundle-install.1 similarity index 100% rename from bundler/man/bundle-install.1 rename to bundler/lib/bundler/man/bundle-install.1 diff --git a/bundler/man/bundle-list.1 b/bundler/lib/bundler/man/bundle-list.1 similarity index 100% rename from bundler/man/bundle-list.1 rename to bundler/lib/bundler/man/bundle-list.1 diff --git a/bundler/man/bundle-lock.1 b/bundler/lib/bundler/man/bundle-lock.1 similarity index 100% rename from bundler/man/bundle-lock.1 rename to bundler/lib/bundler/man/bundle-lock.1 diff --git a/bundler/man/bundle-open.1 b/bundler/lib/bundler/man/bundle-open.1 similarity index 100% rename from bundler/man/bundle-open.1 rename to bundler/lib/bundler/man/bundle-open.1 diff --git a/bundler/man/bundle-outdated.1 b/bundler/lib/bundler/man/bundle-outdated.1 similarity index 100% rename from bundler/man/bundle-outdated.1 rename to bundler/lib/bundler/man/bundle-outdated.1 diff --git a/bundler/man/bundle-platform.1 b/bundler/lib/bundler/man/bundle-platform.1 similarity index 100% rename from bundler/man/bundle-platform.1 rename to bundler/lib/bundler/man/bundle-platform.1 diff --git a/bundler/man/bundle-pristine.1 b/bundler/lib/bundler/man/bundle-pristine.1 similarity index 100% rename from bundler/man/bundle-pristine.1 rename to bundler/lib/bundler/man/bundle-pristine.1 diff --git a/bundler/man/bundle-remove.1 b/bundler/lib/bundler/man/bundle-remove.1 similarity index 100% rename from bundler/man/bundle-remove.1 rename to bundler/lib/bundler/man/bundle-remove.1 diff --git a/bundler/man/bundle-show.1 b/bundler/lib/bundler/man/bundle-show.1 similarity index 100% rename from bundler/man/bundle-show.1 rename to bundler/lib/bundler/man/bundle-show.1 diff --git a/bundler/man/bundle-update.1 b/bundler/lib/bundler/man/bundle-update.1 similarity index 100% rename from bundler/man/bundle-update.1 rename to bundler/lib/bundler/man/bundle-update.1 diff --git a/bundler/man/bundle-viz.1 b/bundler/lib/bundler/man/bundle-viz.1 similarity index 100% rename from bundler/man/bundle-viz.1 rename to bundler/lib/bundler/man/bundle-viz.1 diff --git a/bundler/man/bundle.1 b/bundler/lib/bundler/man/bundle.1 similarity index 100% rename from bundler/man/bundle.1 rename to bundler/lib/bundler/man/bundle.1 diff --git a/bundler/man/gemfile.5 b/bundler/lib/bundler/man/gemfile.5 similarity index 100% rename from bundler/man/gemfile.5 rename to bundler/lib/bundler/man/gemfile.5 diff --git a/bundler/man/index.txt b/bundler/lib/bundler/man/index.txt similarity index 100% rename from bundler/man/index.txt rename to bundler/lib/bundler/man/index.txt diff --git a/bundler/spec/commands/exec_spec.rb b/bundler/spec/commands/exec_spec.rb index 1449bb642e3b..5d4358611662 100644 --- a/bundler/spec/commands/exec_spec.rb +++ b/bundler/spec/commands/exec_spec.rb @@ -448,35 +448,35 @@ with_fake_man do bundle "#{exec} --help cat" end - expect(out).to include(%(["#{root}/man/bundle-exec.1"])) + expect(out).to include(%(["#{man_dir}/bundle-exec.1"])) end it "shows bundle-exec's man page when --help is before exec" do with_fake_man do bundle "--help #{exec}" end - expect(out).to include(%(["#{root}/man/bundle-exec.1"])) + expect(out).to include(%(["#{man_dir}/bundle-exec.1"])) end it "shows bundle-exec's man page when -h is before exec" do with_fake_man do bundle "-h #{exec}" end - expect(out).to include(%(["#{root}/man/bundle-exec.1"])) + expect(out).to include(%(["#{man_dir}/bundle-exec.1"])) end it "shows bundle-exec's man page when --help is after exec" do with_fake_man do bundle "#{exec} --help" end - expect(out).to include(%(["#{root}/man/bundle-exec.1"])) + expect(out).to include(%(["#{man_dir}/bundle-exec.1"])) end it "shows bundle-exec's man page when -h is after exec" do with_fake_man do bundle "#{exec} -h" end - expect(out).to include(%(["#{root}/man/bundle-exec.1"])) + expect(out).to include(%(["#{man_dir}/bundle-exec.1"])) end end end diff --git a/bundler/spec/commands/help_spec.rb b/bundler/spec/commands/help_spec.rb index 03d34ef69219..f72763900efc 100644 --- a/bundler/spec/commands/help_spec.rb +++ b/bundler/spec/commands/help_spec.rb @@ -5,14 +5,14 @@ with_fake_man do bundle "help gemfile" end - expect(out).to eq(%(["#{root}/man/gemfile.5"])) + expect(out).to eq(%(["#{man_dir}/gemfile.5"])) end it "prefixes bundle commands with bundle- when finding the man files" do with_fake_man do bundle "help install" end - expect(out).to eq(%(["#{root}/man/bundle-install.1"])) + expect(out).to eq(%(["#{man_dir}/bundle-install.1"])) end it "simply outputs the human readable file when there is no man on the path" do @@ -45,28 +45,28 @@ with_fake_man do bundle "install --help" end - expect(out).to eq(%(["#{root}/man/bundle-install.1"])) + expect(out).to eq(%(["#{man_dir}/bundle-install.1"])) end it "is called when the --help flag is used before the command" do with_fake_man do bundle "--help install" end - expect(out).to eq(%(["#{root}/man/bundle-install.1"])) + expect(out).to eq(%(["#{man_dir}/bundle-install.1"])) end it "is called when the -h flag is used before the command" do with_fake_man do bundle "-h install" end - expect(out).to eq(%(["#{root}/man/bundle-install.1"])) + expect(out).to eq(%(["#{man_dir}/bundle-install.1"])) end it "is called when the -h flag is used after the command" do with_fake_man do bundle "install -h" end - expect(out).to eq(%(["#{root}/man/bundle-install.1"])) + expect(out).to eq(%(["#{man_dir}/bundle-install.1"])) end it "has helpful output when using --help flag for a non-existent command" do @@ -80,11 +80,11 @@ with_fake_man do bundle "--help" end - expect(out).to eq(%(["#{root}/man/bundle.1"])) + expect(out).to eq(%(["#{man_dir}/bundle.1"])) with_fake_man do bundle "-h" end - expect(out).to eq(%(["#{root}/man/bundle.1"])) + expect(out).to eq(%(["#{man_dir}/bundle.1"])) end end diff --git a/bundler/spec/quality_spec.rb b/bundler/spec/quality_spec.rb index 808f0502a4c1..405c786842ab 100644 --- a/bundler/spec/quality_spec.rb +++ b/bundler/spec/quality_spec.rb @@ -249,7 +249,7 @@ def check_for_specific_pronouns(filename) end it "does not use require internally, but require_relative" do - exempt = %r{templates/|man/|vendor/} + exempt = %r{templates/|\.5|\.1|vendor/} all_bad_requires = [] lib_tracked_files.each do |filename| next if filename =~ exempt diff --git a/bundler/spec/support/path.rb b/bundler/spec/support/path.rb index 305ea0a876bb..56d3c71f3c5d 100644 --- a/bundler/spec/support/path.rb +++ b/bundler/spec/support/path.rb @@ -63,6 +63,10 @@ def spec_dir @spec_dir ||= source_root.join(ruby_core? ? "spec/bundler" : "spec") end + def man_dir + @man_dir ||= lib_dir.join("bundler/man") + end + def tracked_files @tracked_files ||= git_ls_files(tracked_files_glob) end @@ -236,7 +240,7 @@ def lib_tracked_files_glob end def man_tracked_files_glob - ruby_core? ? "man/bundle* man/gemfile*" : "man" + ruby_core? ? "man/bundle* man/gemfile*" : "lib/bundler/man/bundle*.1 lib/bundler/man/gemfile*.5" end def git_root diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 69b3d35b0194..b5af43d7b7fd 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -167,19 +167,18 @@ def execute extend MakeDirs lib_dir, bin_dir = make_destination_dirs install_destdir - man_dir = make_man_dir install_destdir + man_dir = generate_default_man_dir install_destdir install_lib lib_dir - install_man man_dir if man_dir - install_executables bin_dir remove_old_bin_files bin_dir remove_old_lib_files lib_dir - remove_old_man_files man_dir if man_dir + # Can be removed one we drop support for bundler 2.2.3 (the last version installing man files to man_dir) + remove_old_man_files man_dir if man_dir && File.exist?(man_dir) install_default_bundler_gem bin_dir @@ -330,21 +329,6 @@ def install_lib(lib_dir) end end - def install_man(man_dir) - mans = { 'Bundler' => 'bundler/man' } - mans.each do |tool, path| - say "Installing #{tool} manpages" if @verbose - - bundler_man1_files = bundler_man1_files_in(path) - bundler_man5_files = bundler_man5_files_in(path) - - Dir.chdir path do - install_file_list(bundler_man1_files, "#{man_dir}/man1") - install_file_list(bundler_man5_files, "#{man_dir}/man5") - end - end - end - def install_rdoc gem_doc_dir = File.join Gem.dir, 'doc' rubygems_name = "rubygems-#{Gem::VERSION}" @@ -392,7 +376,7 @@ def install_default_bundler_gem(bin_dir) mkdir_p specs_dir, :mode => 0755 bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") - bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] } + bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe}/**/*}"] } bundler_spec.executables -= %w[bundler bundle_ruby] # Remove bundler-*.gemspec in default specification directory. @@ -455,15 +439,6 @@ def make_destination_dirs(install_destdir) return lib_dir, bin_dir end - def make_man_dir(install_destdir) - man_dir = generate_default_man_dir(install_destdir) - return unless man_dir - - mkdir_p man_dir, :mode => 0755 - - return man_dir - end - def generate_default_man_dir(install_destdir) prefix = options[:prefix] @@ -520,20 +495,6 @@ def files_in(dir) end end - # for installation of bundler as default gems - def bundler_man1_files_in(dir) - Dir.chdir dir do - Dir['bundle*.1'] - end - end - - # for installation of bundler as default gems - def bundler_man5_files_in(dir) - Dir.chdir dir do - Dir['gemfile.5'] - end - end - def remove_old_bin_files(bin_dir) old_bin_files = { 'gem_mirror' => 'gem mirror', @@ -587,26 +548,19 @@ def remove_old_lib_files(lib_dir) end end - def remove_old_man_files(man_dir) - man_dirs = { man_dir => "bundler/man" } - man_dirs.each do |old_man_dir, new_man_dir| - man1_files = bundler_man1_files_in(new_man_dir) - - old_man1_dir = "#{old_man_dir}/man1" - old_man1_files = bundler_man1_files_in(old_man1_dir) - old_man1_files += Dir.chdir(old_man1_dir) { Dir["bundle*.1.{txt,ronn}"] } + def remove_old_man_files(old_man_dir) + old_man1_dir = "#{old_man_dir}/man1" - man1_to_remove = old_man1_files - man1_files + if File.exist?(old_man1_dir) + man1_to_remove = Dir.chdir(old_man1_dir) { Dir["bundle*.1{,.txt,.ronn}"] } remove_file_list(man1_to_remove, old_man1_dir) + end - man5_files = bundler_man5_files_in(new_man_dir) - - old_man5_dir = "#{old_man_dir}/man5" - old_man5_files = bundler_man5_files_in(old_man5_dir) - old_man5_files += Dir.chdir(old_man5_dir) { Dir["gemfile.5.{txt,ronn}"] } + old_man5_dir = "#{old_man_dir}/man5" - man5_to_remove = old_man5_files - man5_files + if File.exist?(old_man5_dir) + man5_to_remove = Dir.chdir(old_man5_dir) { Dir["gemfile.5{,.txt,.ronn}"] } remove_file_list(man5_to_remove, old_man5_dir) end diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 0ee289e3c86f..66a6707eb89b 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -26,12 +26,12 @@ def setup bundler/exe/bundle bundler/lib/bundler.rb bundler/lib/bundler/b.rb + bundler/bin/bundler/man/bundle-b.1 bundler/lib/bundler/man/bundle-b.1.ronn + bundler/lib/bundler/man/gemfile.5 bundler/lib/bundler/man/gemfile.5.ronn bundler/lib/bundler/templates/.circleci/config.yml bundler/lib/bundler/templates/.travis.yml - bundler/man/bundle-b.1 - bundler/man/gemfile.5 ] create_dummy_files(filelist) @@ -160,16 +160,6 @@ def test_files_in @cmd.files_in('lib').sort end - def test_bundler_man1_files_in - assert_equal %w[bundle-b.1], - @cmd.bundler_man1_files_in('bundler/man').sort - end - - def test_bundler_man5_files_in - assert_equal %w[gemfile.5], - @cmd.bundler_man5_files_in('bundler/man').sort - end - def test_install_lib @cmd.extend FileUtils @@ -187,19 +177,6 @@ def test_install_lib end end - def test_install_man - @cmd.extend FileUtils - - Dir.mktmpdir 'man' do |dir| - @cmd.install_man dir - - assert_path_exists File.join("#{dir}/man1", 'bundle-b.1') - refute_path_exists File.join("#{dir}/man1", 'bundle-b.1.ronn') - assert_path_exists File.join("#{dir}/man5", 'gemfile.5') - refute_path_exists File.join("#{dir}/man5", 'gemfile.5.ronn') - end - end - def test_install_default_bundler_gem @cmd.extend FileUtils @@ -308,8 +285,8 @@ def test_remove_old_man_files gemfile_5_ronn = File.join man, 'man5', 'gemfile.5.ronn' gemfile_5_txt = File.join man, 'man5', 'gemfile.5.txt' - files_that_go = [bundle_b_1_txt, bundle_b_1_ronn, gemfile_5_txt, gemfile_5_ronn] - files_that_stay = [ruby_1, bundle_b_1, gemfile_5] + files_that_go = [bundle_b_1, bundle_b_1_txt, bundle_b_1_ronn, gemfile_5, gemfile_5_txt, gemfile_5_ronn] + files_that_stay = [ruby_1] create_dummy_files(files_that_go + files_that_stay) From 68f6a4f1eeabbafc3b4701e9b85a4aa675cde7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 31 Dec 2020 12:51:08 +0100 Subject: [PATCH 08/12] Merge pull request #4213 from rubygems/fix_index_fallback Fix fallback to the old index and installation from it not working (cherry picked from commit cbc80b743f1ea1dfb0589db039345e7b6f02d18c) --- Manifest.txt | 1 + lib/rubygems/remote_fetcher.rb | 4 +- lib/rubygems/resolver/best_set.rb | 2 +- lib/rubygems/resolver/index_specification.rb | 5 +- .../null-required-rubygems-version.gemspec.rz | Bin 0 -> 421 bytes .../rubygems/test_gem_dependency_installer.rb | 74 +++++++----------- test/rubygems/test_gem_remote_fetcher.rb | 2 +- test/rubygems/test_gem_resolver_best_set.rb | 23 ++++++ test/rubygems/test_gem_specification.rb | 4 +- 9 files changed, 61 insertions(+), 54 deletions(-) create mode 100644 test/rubygems/data/null-required-rubygems-version.gemspec.rz diff --git a/Manifest.txt b/Manifest.txt index b624096affdc..6a7e6c45352f 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -511,6 +511,7 @@ test/rubygems/child_key.pem test/rubygems/client.pem test/rubygems/data/gem-private_key.pem test/rubygems/data/gem-public_cert.pem +test/rubygems/data/null-required-rubygems-version.gemspec.rz test/rubygems/data/null-type.gemspec.rz test/rubygems/encrypted_private_key.pem test/rubygems/expired_cert.pem diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb index 285c80a95f3a..53e840978c82 100644 --- a/lib/rubygems/remote_fetcher.rb +++ b/lib/rubygems/remote_fetcher.rb @@ -26,13 +26,15 @@ class FetchError < Gem::Exception ## # The URI which was being accessed when the exception happened. - attr_accessor :uri + attr_accessor :uri, :original_uri def initialize(message, uri) super message uri = parse_uri(uri) + @original_uri = uri.dup + uri.password = 'REDACTED' if uri.respond_to?(:password) && uri.password @uri = uri.to_s diff --git a/lib/rubygems/resolver/best_set.rb b/lib/rubygems/resolver/best_set.rb index b6a46a940346..300ea8015cea 100644 --- a/lib/rubygems/resolver/best_set.rb +++ b/lib/rubygems/resolver/best_set.rb @@ -58,7 +58,7 @@ def pretty_print(q) # :nodoc: # The calling method must retry the exception to repeat the lookup. def replace_failed_api_set(error) # :nodoc: - uri = error.uri + uri = error.original_uri uri = URI uri unless URI === uri uri = uri + "." diff --git a/lib/rubygems/resolver/index_specification.rb b/lib/rubygems/resolver/index_specification.rb index 45ff130a14b2..2aa6b419bafc 100644 --- a/lib/rubygems/resolver/index_specification.rb +++ b/lib/rubygems/resolver/index_specification.rb @@ -43,9 +43,12 @@ def required_ruby_version ## # The required_rubygems_version constraint for this specification # + # A fallback is included because the original version of the specification + # API didn't include that field, so some marshalled specs in the index have it + # set to +nil+. def required_rubygems_version - spec.required_rubygems_version + spec.required_rubygems_version || Gem::Requirement.default end def ==(other) diff --git a/test/rubygems/data/null-required-rubygems-version.gemspec.rz b/test/rubygems/data/null-required-rubygems-version.gemspec.rz new file mode 100644 index 0000000000000000000000000000000000000000..db3d0af0849fa0ee21de6d06144fe8b2e8f73a62 GIT binary patch literal 421 zcmZvX!Ab)$5QeMNwJms1D1ssld4O~U53-{4AhurHu9rnhnoYYyH%Xl&UH0bPmp0q# zMVvX#{}12S?)c<#ELD=swoqY%wD$+9M{kYviCv}A=`$;#k{rAdDeFqI!3P%5ci7KJ^f(Np@+YJdU` zi(}eFzpS&?9|3xu^Bv@)()ipJpf{k`Oc)i4H_y$5OeE;=7bKDi*VY>Ci#p+%_2wtEyrRuhG~DGlT2-s2_g= D`4x=t literal 0 HcmV?d00001 diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb index fe8a74c75079..85dba5467530 100644 --- a/test/rubygems/test_gem_dependency_installer.rb +++ b/test/rubygems/test_gem_dependency_installer.rb @@ -946,6 +946,31 @@ def test_install_version_default assert_equal %w[d-2], inst.installed_gems.map {|s| s.full_name } end + def test_install_legacy_spec_with_nil_required_rubygems_version + path = File.expand_path "../data/null-required-rubygems-version.gemspec.rz", __FILE__ + spec = Marshal.load Gem.read_binary(path) + def spec.validate(*args); end + + util_build_gem spec + + cache_file = File.join @tempdir, 'gems', "#{spec.original_name}.gem" + FileUtils.mkdir_p File.dirname cache_file + FileUtils.mv spec.cache_file, cache_file + + util_setup_spec_fetcher spec + + data = Gem.read_binary(cache_file) + + @fetcher.data['http://gems.example.com/gems/activesupport-1.0.0.gem'] = data + + dep = Gem::Dependency.new 'activesupport' + + inst = Gem::DependencyInstaller.new + inst.install dep + + assert_equal %w[activesupport-1.0.0], Gem::Specification.map(&:full_name) + end + def test_find_gems_gems_with_sources util_setup_gems @@ -1102,21 +1127,6 @@ def test_resolve_dependencies_local assert_equal %w[a-1], requests end - def util_write_a1_bin - write_file File.join('gems', 'a-1', 'bin', 'a_bin') do |fp| - fp.puts "#!/usr/bin/ruby" - end - end - - def util_setup_c1_pre - @c1_pre, @c1_pre_gem = util_spec 'c', '1.a' do |s| - s.add_dependency 'a', '1.a' - s.add_dependency 'b', '1' - end - - util_reset_gems - end - def util_setup_d @d1, @d1_gem = util_gem 'd', '1' @d2, @d2_gem = util_gem 'd', '2' @@ -1124,43 +1134,13 @@ def util_setup_d util_reset_gems end - def util_setup_wxyz - @x1_m, @x1_m_gem = util_spec 'x', '1' do |s| - s.platform = Gem::Platform.new %w[cpu my_platform 1] - end - - @x1_o, @x1_o_gem = util_spec 'x', '1' do |s| - s.platform = Gem::Platform.new %w[cpu other_platform 1] - end - - @w1, @w1_gem = util_spec 'w', '1', 'x' => nil - - @y1, @y1_gem = util_spec 'y', '1' - @y1_1_p, @y1_1_p_gem = util_spec 'y', '1.1' do |s| - s.platform = Gem::Platform.new %w[cpu my_platform 1] - end - - @z1, @z1_gem = util_spec 'z', '1', 'y' => nil - - util_reset_gems - end - def util_reset_gems @a1 ||= nil @b1 ||= nil @a1_pre ||= nil - @c1_pre ||= nil @d1 ||= nil @d2 ||= nil - @w1 ||= nil - @x1_m ||= nil - @x1_o ||= nil - @y1 ||= nil - @y1_1_p ||= nil - @z1 ||= nil - - util_setup_spec_fetcher(*[@a1, @a1_pre, @b1, @c1_pre, - @d1, @d2, @x1_m, @x1_o, @w1, @y1, - @y1_1_p, @z1].compact) + + util_setup_spec_fetcher(*[@a1, @a1_pre, @b1, @d1, @d2].compact) end end diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb index 371998497b09..1c88e8d3e835 100644 --- a/test/rubygems/test_gem_remote_fetcher.rb +++ b/test/rubygems/test_gem_remote_fetcher.rb @@ -205,7 +205,7 @@ def self.fetch_path(arg, *rest) @test_data end - raise Gem::RemoteFetcher::FetchError.new("haha!", nil) + raise Gem::RemoteFetcher::FetchError.new("haha!", '') end end diff --git a/test/rubygems/test_gem_resolver_best_set.rb b/test/rubygems/test_gem_resolver_best_set.rb index 657ad3338735..019ca7049953 100644 --- a/test/rubygems/test_gem_resolver_best_set.rb +++ b/test/rubygems/test_gem_resolver_best_set.rb @@ -132,4 +132,27 @@ def test_replace_failed_api_set_no_api_set assert_equal error, e end + + def test_replace_failed_api_set_uri_with_credentials + set = @DR::BestSet.new + + api_uri = URI(@gem_repo) + './info/' + api_uri.user = 'user' + api_uri.password = 'pass' + api_set = Gem::Resolver::APISet.new api_uri + + set.sets << api_set + + error_uri = api_uri + 'a' + + error = Gem::RemoteFetcher::FetchError.new 'bogus', error_uri + + set.replace_failed_api_set error + + assert_equal 1, set.sets.size + + refute_includes set.sets, api_set + + assert_kind_of Gem::Resolver::IndexSet, set.sets.first + end end diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 76072184bd9f..374d58d38fb5 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1200,10 +1200,8 @@ def test_self_stubs_for_mult_platforms Gem.platforms = orig_platform end - DATA_PATH = File.expand_path "../data", __FILE__ - def test_handles_private_null_type - path = File.join DATA_PATH, "null-type.gemspec.rz" + path = File.expand_path "../data/null-type.gemspec.rz", __FILE__ data = Marshal.load Gem::Util.inflate(Gem.read_binary(path)) From 0d2b988f0d9bdc427e78bb204e08f6a32648183c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Dec 2020 15:26:29 +0100 Subject: [PATCH 09/12] Changelog for Bundler version 2.2.4 --- bundler/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundler/CHANGELOG.md b/bundler/CHANGELOG.md index 29244972d9b6..f19588676012 100644 --- a/bundler/CHANGELOG.md +++ b/bundler/CHANGELOG.md @@ -1,3 +1,10 @@ +# 2.2.4 (December 31, 2020) + +## Bug fixes: + + - Fix bundle man pages display on truffleruby [#4209](https://github.com/rubygems/rubygems/pull/4209) + - Fix Windows + JRuby no longer being able to install git sources [#4196](https://github.com/rubygems/rubygems/pull/4196) + # 2.2.3 (December 22, 2020) ## Bug fixes: From b38ca1c2e3c468ffad2ba741a852c80d371ec105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Dec 2020 15:26:29 +0100 Subject: [PATCH 10/12] Bump Bundler version to 2.2.4 --- bundler/lib/bundler/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/lib/bundler/version.rb b/bundler/lib/bundler/version.rb index 8db404377cad..531a21988aca 100644 --- a/bundler/lib/bundler/version.rb +++ b/bundler/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "2.2.3".freeze + VERSION = "2.2.4".freeze def self.bundler_major_version @bundler_major_version ||= VERSION.split(".").first.to_i From 9fbacf6a4d2d0710afc235f2a02e410be846eb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Dec 2020 15:26:30 +0100 Subject: [PATCH 11/12] Changelog for Rubygems version 3.2.4 --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68211df667b7..7228ae8d03cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 3.2.4 / 2020-12-31 + +## Enhancements: + +* Use a CHANGELOG in markdown for rubygems. Pull request #4168 by + deivid-rodriguez +* Never spawn subshells when building extensions. Pull request #4190 by + deivid-rodriguez + +## Bug fixes: + +* Fix fallback to the old index and installation from it not working. Pull + request #4213 by deivid-rodriguez +* Fix installing from source on truffleruby. Pull request #4201 by + deivid-rodriguez + # 3.2.3 / 2020-12-22 ## Enhancements: From 05bffe7e6c27867fd87021724cbf66c0b6864fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 29 Dec 2020 15:26:30 +0100 Subject: [PATCH 12/12] Bump Rubygems version to 3.2.4 --- lib/rubygems.rb | 2 +- rubygems-update.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rubygems.rb b/lib/rubygems.rb index fe52d72cc3f4..0c3e5858d47d 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -8,7 +8,7 @@ require 'rbconfig' module Gem - VERSION = "3.2.3".freeze + VERSION = "3.2.4".freeze end # Must be first since it unloads the prelude from 1.9.2 diff --git a/rubygems-update.gemspec b/rubygems-update.gemspec index 7c6ff61660eb..f307013e8212 100644 --- a/rubygems-update.gemspec +++ b/rubygems-update.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "rubygems-update" - s.version = "3.2.3" + s.version = "3.2.4" s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"] s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]