Skip to content

Commit

Permalink
Relax allowed elasticsearch dependency version (#933)
Browse files Browse the repository at this point in the history
* Relax allowed `elasticsearch` dependency version

* Update tracer/logger access style

* Add changelog notes
  • Loading branch information
mjankowski authored May 1, 2024
1 parent 3d559bb commit 7e65698
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion chewy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/chewy/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions spec/chewy/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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 }
Expand Down

0 comments on commit 7e65698

Please sign in to comment.