Skip to content

Commit ef2bebd

Browse files
committed
Exclude Faraday 2.0.0, which has no default adapter
faraday-net_http 3.5.0, released today, is outside the range every Faraday from 2.0.1 to 2.14.4 accepts. Faraday 2.0.0 declares no faraday-net_http dependency at all, so Bundler resolved it to keep the newest adapter gem, and every request failed with ":net_http is not registered on Faraday::Adapter". Fresh installs and CI both broke.
1 parent e9dcd62 commit ef2bebd

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎ruby_llm.gemspec‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Gem::Specification.new do |spec|
5151

5252
# Runtime dependencies
5353
spec.add_dependency 'base64'
54-
spec.add_dependency 'faraday', ENV['FARADAY_VERSION'] || '>= 1.10.0'
54+
spec.add_dependency 'faraday', ENV['FARADAY_VERSION'] || ['>= 1.10.0', '!= 2.0.0']
5555
spec.add_dependency 'faraday-multipart', '>= 1'
5656
spec.add_dependency 'faraday-net_http', '>= 1'
5757
spec.add_dependency 'faraday-retry', '>= 1'

‎spec/ruby_llm_gemspec_spec.rb‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ def runtime_dependency(name)
1414
expect(runtime_dependency('faraday').requirement).to be_satisfied_by(Gem::Version.new('1.10.3'))
1515
end
1616

17+
it 'excludes Faraday 2.0.0, which ships without its default adapter' do
18+
requirement = runtime_dependency('faraday').requirement
19+
20+
expect(requirement).not_to be_satisfied_by(Gem::Version.new('2.0.0'))
21+
expect(requirement).to be_satisfied_by(Gem::Version.new('2.14.4'))
22+
end
23+
1724
it 'keeps faraday-retry compatible with Faraday v1 and v2' do
1825
expect(runtime_dependency('faraday-retry').requirement.to_s).to eq('>= 1')
1926
end

0 commit comments

Comments
 (0)