From 805e3c32032c43aceb3af1a72707b90fa5ff6a78 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 10 Sep 2016 11:56:47 -0700 Subject: [PATCH] Updated style --- lib/searchkick.rb | 2 +- lib/searchkick/query.rb | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/searchkick.rb b/lib/searchkick.rb index 89ccf69..b3ef4c4 100644 --- a/lib/searchkick.rb +++ b/lib/searchkick.rb @@ -40,7 +40,7 @@ module Searchkick @client ||= Elasticsearch::Client.new( url: ENV["ELASTICSEARCH_URL"], - transport_options: {request: {timeout: timeout}, headers: { content_type: 'application/json' }} + transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}} ) do |f| f.use Searchkick::Middleware end diff --git a/lib/searchkick/query.rb b/lib/searchkick/query.rb index 7060530..0c0addb 100644 --- a/lib/searchkick/query.rb +++ b/lib/searchkick/query.rb @@ -29,7 +29,12 @@ module Searchkick @term = term @options = options @match_suffix = options[:match] || searchkick_options[:match] || "analyzed" - @type = @routing = @misspellings_below = @highlighted_fields = nil + + # prevent Ruby warnings + @type = nil + @routing = nil + @misspellings_below = nil + @highlighted_fields = nil prepare end -- libgit2 0.21.0