From 8a7023b2dc70ee28f6d67585e221323890bbd32b Mon Sep 17 00:00:00 2001 From: Julien Bourdeau Date: Mon, 9 Apr 2018 16:32:26 +0200 Subject: [PATCH] fix(ua): add Rails version Note that Ruby client version was removed because the client now concats useragent (v >= 1.23.0) see: https://github.com/algolia/algoliasearch-client-ruby/pull/282 --- Gemfile | 2 +- lib/algoliasearch/configuration.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 68b1094a..05baaa47 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "http://rubygems.org" gem 'json', '~> 1.8', '>= 1.8.6' -gem 'algoliasearch', '>= 1.17.0', '< 2.0.0' +gem 'algoliasearch', '>= 1.23.0', '< 2.0.0' if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx' gem 'rubysl', '~> 2.0', :platform => :rbx diff --git a/lib/algoliasearch/configuration.rb b/lib/algoliasearch/configuration.rb index b9d28265..47118c23 100644 --- a/lib/algoliasearch/configuration.rb +++ b/lib/algoliasearch/configuration.rb @@ -5,7 +5,9 @@ def configuration end def configuration=(configuration) - @@configuration = configuration.merge(:user_agent => "Algolia for Rails (#{AlgoliaSearch::VERSION}); Algolia for Ruby (#{Algolia::VERSION})") + @@configuration = configuration.merge( + :user_agent => "Algolia for Rails (#{AlgoliaSearch::VERSION}); Rails (#{Rails::VERSION})" + ) Algolia.init @@configuration end end