Unpin bundler to allow 2.4 (#14894)

* use Bundler::SolveFailure
This commit is contained in:
João Duarte 2023-02-22 17:05:16 +00:00 committed by GitHub
parent 5f3f18c9b0
commit 6d08a7c1cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -285,7 +285,7 @@ def assemblyDeps = [downloadAndInstallJRuby, assemble] + subprojects.collect {
it.tasks.findByName("assemble")
}
def bundlerVersion = "2.3.18"
def bundlerVersion = "~> 2"
tasks.register("installBundler") {
dependsOn assemblyDeps

View file

@ -163,7 +163,7 @@ module LogStash
begin
execute_bundler(options)
break
rescue ::Bundler::VersionConflict => e
rescue ::Bundler::SolveFailure => e
$stderr.puts("Plugin version conflict, aborting")
raise(e)
rescue ::Bundler::GemNotFound => e

View file

@ -88,8 +88,8 @@ describe LogStash::Bundler do
context 'abort with an exception' do
it 'gem conflict' do
allow(::Bundler::CLI).to receive(:start).with(bundler_args) { raise ::Bundler::VersionConflict.new('conflict') }
expect { subject }.to raise_error(::Bundler::VersionConflict)
allow(::Bundler::CLI).to receive(:start).with(bundler_args) { raise ::Bundler::SolveFailure.new('conflict') }
expect { subject }.to raise_error(::Bundler::SolveFailure)
end
it 'gem is not found' do