lib/easypost.rb in easypost-3.5.0 vs lib/easypost.rb in easypost-3.5.1

- old
+ new

@@ -34,10 +34,12 @@ require "easypost/tax_identifier" require "easypost/tracker" require "easypost/user" require "easypost/webhook" +require 'easypost/util' + module EasyPost @api_key = nil @api_base = "https://api.easypost.com" def self.api_key=(api_key) @@ -123,10 +125,12 @@ if body request.body = JSON.dump(EasyPost::Util.objects_to_ids(body)) end request["Content-Type"] = "application/json" - request["User-Agent"] = "EasyPost/v2 RubyClient/#{VERSION} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" + request["User-Agent"] = "EasyPost/v2 RubyClient/#{EasyPost::VERSION} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} " \ + "OS/#{EasyPost::Util.os_name} OSVersion/#{EasyPost::Util.os_version} " \ + "OSArch/#{EasyPost::Util.os_arch}" if api_key = api_key || @api_key request["Authorization"] = "Basic #{Base64.strict_encode64("#{api_key}:")}" end response = client.request(request)