Skip to content

Commit

Permalink
Send qualified name from this gem to Ruby's gem
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoocasali committed Jul 29, 2022
1 parent c4a159e commit 9a0b644
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/meilisearch/rails/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def client
configuration[:meilisearch_host] || 'http://localhost:7700',
configuration[:meilisearch_api_key],
configuration.slice(:timeout, :max_retries)
.merge(client_agents: MeiliSearch::Rails.qualified_version)
)
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

expect(MeiliSearch::Client)
.to have_received(:new)
.with('http://localhost:7700', 's3cr3tap1k3y', {})
.with('http://localhost:7700', 's3cr3tap1k3y', client_agents: 'Meilisearch Rails (v0.7.0)')
end

context 'without meilisearch_host' do
Expand All @@ -37,7 +37,7 @@

expect(MeiliSearch::Client)
.to have_received(:new)
.with('http://localhost:7700', 's3cr3tap1k3y', {})
.with('http://localhost:7700', 's3cr3tap1k3y', { client_agents: 'Meilisearch Rails (v0.7.0)' })
end
end

Expand All @@ -56,7 +56,7 @@

expect(MeiliSearch::Client)
.to have_received(:new)
.with('http://localhost:7700', 's3cr3tap1k3y', timeout: 2, max_retries: 1)
.with('http://localhost:7700', 's3cr3tap1k3y', client_agents: 'Meilisearch Rails (v0.7.0)', timeout: 2, max_retries: 1)
end
end
end
Expand Down

0 comments on commit 9a0b644

Please sign in to comment.