From 63f3470acda8bb3308595fedff32fa5ccf990dce Mon Sep 17 00:00:00 2001 From: Philip Harrison Date: Wed, 16 Jun 2021 10:08:01 +0100 Subject: [PATCH 1/3] Ruby: Fix 2.7 deprecation warnings in rubygems Disable the outdated system rubygems installation and use the updated 3.2.20 version. The default brightbox ppa for ruby 2.7 installs rubygems 3.1.2 which can't be updated with `gem update --system` and prints the following deprecation warnings when loaded from bundler: ``` /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated ``` --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index f973385a56..4a295e68fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,6 +66,8 @@ RUN if ! getent group $USER_GID; then groupadd --gid $USER_GID dependabot ; \ # Install Ruby 2.7, update RubyGems, and install Bundler ENV BUNDLE_SILENCE_ROOT_WARNING=1 +# Disable the outdated rubygems installation from being loaded +ENV DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=true # Allow gem installs as the dependabot user ENV BUNDLE_PATH=".bundle" \ BUNDLE_BIN=".bundle/bin" From ce838b3f5d793b0dcbdc3c4d5d8a45a0d19d90cd Mon Sep 17 00:00:00 2001 From: Philip Harrison Date: Wed, 16 Jun 2021 10:43:21 +0100 Subject: [PATCH 2/3] Require fileutils --- common/lib/dependabot/shared_helpers.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/lib/dependabot/shared_helpers.rb b/common/lib/dependabot/shared_helpers.rb index d955b5a6b5..ad5e1b4485 100644 --- a/common/lib/dependabot/shared_helpers.rb +++ b/common/lib/dependabot/shared_helpers.rb @@ -1,12 +1,13 @@ # frozen_string_literal: true -require "json" -require "tmpdir" -require "excon" -require "English" require "digest" +require "English" +require "excon" +require "fileutils" +require "json" require "open3" require "shellwords" +require "tmpdir" require "dependabot/utils" require "dependabot/errors" From 06049a1f63763636a5123b477a53563a8dee5658 Mon Sep 17 00:00:00 2001 From: Philip Harrison Date: Wed, 16 Jun 2021 10:44:57 +0100 Subject: [PATCH 3/3] Fix go modules flaky test --- .../go_modules/update_checker/latest_version_finder_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go_modules/spec/dependabot/go_modules/update_checker/latest_version_finder_spec.rb b/go_modules/spec/dependabot/go_modules/update_checker/latest_version_finder_spec.rb index 1e705c32b5..94a26389d2 100644 --- a/go_modules/spec/dependabot/go_modules/update_checker/latest_version_finder_spec.rb +++ b/go_modules/spec/dependabot/go_modules/update_checker/latest_version_finder_spec.rb @@ -86,7 +86,7 @@ module foobar end it "doesn't return to the excluded version" do - expect(finder.latest_version).to eq(Dependabot::GoModules::Version.new("1.0.1")) + expect(finder.latest_version).to eq(Dependabot::GoModules::Version.new("1.0.6")) end end