Skip to content

Commit

Permalink
Merge pull request #304 from algolia/fix/ua
Browse files Browse the repository at this point in the history
Pass Rails framework version for UserAgent
  • Loading branch information
julienbourdeau authored Jun 25, 2019
2 parents 010b65b + 8a7023b commit b153aee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/algoliasearch/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b153aee

Please sign in to comment.