diff options
author | 2023-04-09 21:42:39 -0700 | |
---|---|---|
committer | 2023-04-09 21:42:39 -0700 | |
commit | e773e28350957da33ae122c3cfcd0f15b868535b (patch) | |
tree | 766e51d1896550a1de3a4c8a586f9a08921509eb | |
parent | archives: try community solution (diff) | |
download | backend-e773e28350957da33ae122c3cfcd0f15b868535b.tar.gz backend-e773e28350957da33ae122c3cfcd0f15b868535b.tar.bz2 backend-e773e28350957da33ae122c3cfcd0f15b868535b.zip |
ElasticSearch: try to monkeypatch Elasticsearch::UnsupportedProductError
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | ag | 1 | ||||
-rw-r--r-- | lib/monkeypatch_es.rb | 9 | ||||
-rw-r--r-- | lib/storage.rb | 1 |
3 files changed, 11 insertions, 0 deletions
@@ -17,6 +17,7 @@ require_relative 'lib/threading' require_relative 'lib/rendering' require_relative 'lib/storage' require_relative 'lib/hotfixes' +require_relative 'lib/monkeypatch_es' $options = OpenStruct.new $options.action = nil diff --git a/lib/monkeypatch_es.rb b/lib/monkeypatch_es.rb new file mode 100644 index 0000000..32437df --- /dev/null +++ b/lib/monkeypatch_es.rb @@ -0,0 +1,9 @@ +# Monkeypatch the real-ES check +module Elasticsearch + class Client + def verify_with_version_or_header(version, headers) + @verified = true + end + end +end + diff --git a/lib/storage.rb b/lib/storage.rb index 5a5948c..879bbfe 100644 --- a/lib/storage.rb +++ b/lib/storage.rb @@ -1,6 +1,7 @@ require 'elasticsearch' require 'date' require 'pp' +require 'monkeypatch_es' module Ag::Storage module_function |