Skip to content

Commit f1bfd37

Browse files
authored
Merge branch 'main' into rspec-3-upgrade
2 parents f2325c5 + bdabe3b commit f1bfd37

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ group :test do
2929
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
3030
gem 'jdbc-sqlite3', platform: :jruby
3131
gem 'rspec', '~> 3.0'
32+
gem 'simplecov', require: 'false'
3233

3334
gem 'byebug'
3435
gem 'dotenv', '~> 2.7', '>= 2.7.6'

lib/meilisearch-rails.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_attribute_names(document)
129129

130130
def attributes_to_hash(attributes, document)
131131
if attributes
132-
attributes.map { |name, value| [name.to_s, value.call(document)] }.to_h
132+
attributes.to_h { |name, value| [name.to_s, value.call(document)] }
133133
else
134134
{}
135135
end
@@ -566,7 +566,7 @@ def ms_raw_search(q, params = {})
566566
end
567567

568568
index = ms_index(index_uid)
569-
index.search(q, params.map { |k, v| [k, v] }.to_h)
569+
index.search(q, params.to_h { |k, v| [k, v] })
570570
end
571571

572572
module AdditionalMethods

spec/spec_helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
require 'simplecov'
2+
SimpleCov.start do
3+
add_filter %r{^/spec/}
4+
minimum_coverage 86.80
5+
end
6+
17
require 'rubygems'
28
require 'bundler'
39
require 'timeout'

0 commit comments

Comments
 (0)