lib/algolia/client.rb in algoliasearch-1.1.4 vs lib/algolia/client.rb in algoliasearch-1.1.5
- old
+ new
@@ -1,7 +1,8 @@
require 'algolia/protocol'
require 'algolia/error'
+require 'algolia/version'
require 'json'
module Algolia
# A class which encapsulates the HTTPS communication with the Algolia
@@ -82,10 +83,10 @@
hinfo["session"] = Curl::Easy.new do |s|
s.headers[Protocol::HEADER_API_KEY] = api_key
s.headers[Protocol::HEADER_APP_ID] = application_id
s.headers["Content-Type"] = "application/json; charset=utf-8"
s.headers["Accept"] = "Accept-Encoding: gzip,deflate" if @gzip
- s.headers["User-Agent"] = "Algolia for Ruby"
+ s.headers["User-Agent"] = "Algolia for Ruby #{::Algolia::VERSION}"
s.verbose = true if @debug
end
hinfo
end
end