diff --git a/CHANGELOG.md b/CHANGELOG.md index 073d6114..ca237464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Changes +* [#933](https://github.com/toptal/chewy/pull/933): Relax allowed `elasticsearch` dependency versions. ([@mjankowski][]) + ### Bugs Fixed ## 7.5.1 (2024-01-30) diff --git a/chewy.gemspec b/chewy.gemspec index 866ed3c3..675081dd 100644 --- a/chewy.gemspec +++ b/chewy.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_dependency 'activesupport', '>= 5.2' # Remove with major version bump, 8.x - spec.add_dependency 'elasticsearch', '>= 7.12.0', '< 7.14.0' + spec.add_dependency 'elasticsearch', '>= 7.14.0', '< 8' spec.add_dependency 'elasticsearch-dsl' spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/lib/chewy/config.rb b/lib/chewy/config.rb index fdae4ae4..1ec687e1 100644 --- a/lib/chewy/config.rb +++ b/lib/chewy/config.rb @@ -70,12 +70,12 @@ def initialize end def transport_logger=(logger) - Chewy.client.transport.logger = logger + Chewy.client.transport.transport.logger = logger @transport_logger = logger end def transport_tracer=(tracer) - Chewy.client.transport.tracer = tracer + Chewy.client.transport.transport.tracer = tracer @transport_tracer = tracer end diff --git a/spec/chewy/config_spec.rb b/spec/chewy/config_spec.rb index f9d31134..1d0321d8 100644 --- a/spec/chewy/config_spec.rb +++ b/spec/chewy/config_spec.rb @@ -22,7 +22,7 @@ specify do expect { subject.transport_logger = logger } - .to change { Chewy.client.transport.logger }.to(logger) + .to change { Chewy.client.transport.transport.logger }.to(logger) end specify do expect { subject.transport_logger = logger } @@ -40,7 +40,7 @@ specify do expect { subject.transport_tracer = tracer } - .to change { Chewy.client.transport.tracer }.to(tracer) + .to change { Chewy.client.transport.transport.tracer }.to(tracer) end specify do expect { subject.transport_tracer = tracer }