Skip to content

Commit

Permalink
Update the opensearch-rails gem (RM-2427).
Browse files Browse the repository at this point in the history
- Make logger formatter for opensearch-rails nil safe. It seems that sometimes
  a message (`m`) is `nil`.
  • Loading branch information
martijnbolhuis committed Feb 1, 2024
1 parent 04b56ca commit eb2ce84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opensearch-rails/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
config.before(:suite) do
require 'ansi'
tracer = ::Logger.new(STDERR)
tracer.formatter = lambda { |s, d, p, m| "#{m.gsub(/^.*$/) { |n| ' ' + n }.ansi(:faint)}\n" }
tracer.formatter = lambda { |s, d, p, m| "#{m&.gsub(/^.*$/) { |n| ' ' + n }&.ansi(:faint)}\n" }
OpenSearch::Model.client = OpenSearch::Client.new host: OPENSEARCH_URL,
tracer: (ENV['QUIET'] ? nil : tracer)
puts "OpenSearch Version: #{OpenSearch::Model.client.info['version']}"
Expand Down

0 comments on commit eb2ce84

Please sign in to comment.