Commit 22a3c9e19244908d983ba7eb751c7b543e590bae
1 parent
7cf0fbfc
Exists in
master
and in
5 other branches
Fixed error with debug option
Showing
3 changed files
with
3 additions
and
2 deletions
Show diff stats
CHANGELOG.md
lib/searchkick/query.rb
... | ... | @@ -110,7 +110,7 @@ module Searchkick |
110 | 110 | |
111 | 111 | # no easy way to tell which host the client will use |
112 | 112 | host = |
113 | - if Elasticsearch::VERSION.to_f >= 7.14 | |
113 | + if Gem::Version.new(Elasticsearch::VERSION) >= Gem::Version.new("7.14.0") | |
114 | 114 | Searchkick.client.transport.transport.hosts.first |
115 | 115 | else |
116 | 116 | Searchkick.client.transport.hosts.first | ... | ... |
test/test_helper.rb
... | ... | @@ -12,7 +12,7 @@ ENV["ES_PATH"] ||= "#{ENV["HOME"]}/elasticsearch/#{ENV["ELASTICSEARCH_VERSION"]} |
12 | 12 | |
13 | 13 | $logger = ActiveSupport::Logger.new(ENV["VERBOSE"] ? STDOUT : nil) |
14 | 14 | |
15 | -if Elasticsearch::VERSION.to_f >= 7.14 | |
15 | +if Gem::Version.new(Elasticsearch::VERSION) >= Gem::Version.new("7.14.0") | |
16 | 16 | Searchkick.client.transport.transport.logger = $logger |
17 | 17 | else |
18 | 18 | Searchkick.client.transport.logger = $logger | ... | ... |