From c4c8efc26a0a49438f09925bcb07c4b675cc5519 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sun, 8 Dec 2024 22:12:10 +0100 Subject: [PATCH] Bump jaro_winkler dependency to remove deprecation Require 'jaro_winkler', '~> 1.6', in order to use `JaroWinkler.similarity` instead of `JaroWinkler.distance` to fix a deprecation message while running specs. --- lib/solargraph/pin/search.rb | 2 +- solargraph.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/solargraph/pin/search.rb b/lib/solargraph/pin/search.rb index 5564fac7c..da1de116d 100644 --- a/lib/solargraph/pin/search.rb +++ b/lib/solargraph/pin/search.rb @@ -49,7 +49,7 @@ def do_query # @return [Float] def fuzzy_string_match str1, str2 return (1.0 + (str2.length.to_f / str1.length.to_f)) if str1.downcase.include?(str2.downcase) - JaroWinkler.distance(str1, str2, ignore_case: true) + JaroWinkler.similarity(str1, str2, ignore_case: true) end end end diff --git a/solargraph.gemspec b/solargraph.gemspec index 7be8dcb73..6cadbe245 100755 --- a/solargraph.gemspec +++ b/solargraph.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'bundler', '~> 2.0' s.add_runtime_dependency 'diff-lcs', '~> 1.4' s.add_runtime_dependency 'e2mmap' - s.add_runtime_dependency 'jaro_winkler', '~> 1.5' + s.add_runtime_dependency 'jaro_winkler', '~> 1.6' s.add_runtime_dependency 'kramdown', '~> 2.3' s.add_runtime_dependency 'kramdown-parser-gfm', '~> 1.1' s.add_runtime_dependency 'parser', '~> 3.0'