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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RUN apt-add-repository ppa:brightbox/ruby-ng \
&& apt-get install -y --no-install-recommends ruby2.7 ruby2.7-dev \
&& gem update --system 3.2.20 \
&& gem install bundler -v 1.17.3 --no-document \
&& gem install bundler -v 2.3.10 --no-document \
&& gem install bundler -v 2.3.12 --no-document \
&& rm -rf /var/lib/gems/2.7.0/cache/* \
&& rm -rf /var/lib/apt/lists/*

Expand Down
6 changes: 3 additions & 3 deletions bundler/helpers/v2/build
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ cd "$install_dir"

# NOTE: Sets `BUNDLED WITH` to match the installed v2 version in Gemfile.lock
# forcing specs and native helpers to run with the same version
BUNDLER_VERSION=2.3.10 bundle config --local path ".bundle"
BUNDLER_VERSION=2.3.10 bundle config --local without "test"
BUNDLER_VERSION=2.3.10 bundle install
BUNDLER_VERSION=2.3.12 bundle config --local path ".bundle"
BUNDLER_VERSION=2.3.12 bundle config --local without "test"
BUNDLER_VERSION=2.3.12 bundle install
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,32 @@
module BundlerDefinitionRubyVersionPatch
def source_requirements
if ruby_version
requested_version = ruby_version.to_gem_version_with_patchlevel
requested_version = ruby_version.gem_version
sources.metadata_source.specs <<
Gem::Specification.new("Ruby\0", requested_version)
end

sources.metadata_source.specs <<
Gem::Specification.new("Ruby\0", "2.5.3p105")
Gem::Specification.new("Ruby\0", "2.5.3")

super
end

def metadata_dependencies
@metadata_dependencies ||=
[
Bundler::Dependency.new("Ruby\0", ruby_version_requirements),
Bundler::Dependency.new("RubyGems\0", Gem::VERSION)
]
end

def ruby_version_requirements
return [] unless ruby_version

ruby_version.versions.map do |version|
Gem::Requirement.new(version)
end
end
end

Bundler::Definition.prepend(BundlerDefinitionRubyVersionPatch)
2 changes: 1 addition & 1 deletion bundler/lib/dependabot/bundler/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Dependabot
module Bundler
module Helpers
V1 = "1.17.3"
V2 = "2.3.10"
V2 = "2.3.12"
# If we are updating a project with no Gemfile.lock, we default to the
# newest version we support
DEFAULT = V2
Expand Down
4 changes: 2 additions & 2 deletions bundler/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi

if [[ "$SUITE_NAME" == "bundler2" ]]; then
cd helpers/v2 \
&& BUNDLER_VERSION=2.3.10 bundle install \
&& BUNDLER_VERSION=2.3.10 bundle exec rspec spec \
&& BUNDLER_VERSION=2.3.12 bundle install \
&& BUNDLER_VERSION=2.3.12 bundle exec rspec spec \
&& cd -
fi
2 changes: 1 addition & 1 deletion bundler/spec/dependabot/bundler/helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
end

let(:v1) { "1.17.3" }
let(:v2) { "2.3.10" }
let(:v2) { "2.3.12" }

describe "#bundler_version" do
def described_method(lockfile)
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.use_bundler_2?
end

def self.bundler_version
use_bundler_2? ? "2.3.10" : "1.17.3"
use_bundler_2? ? "2.3.12" : "1.17.3"
end

def self.bundler_major_version
Expand Down