diff --git a/lib/travel_time/middleware/authentication.rb b/lib/travel_time/middleware/authentication.rb index b4651b5..1c5cf15 100644 --- a/lib/travel_time/middleware/authentication.rb +++ b/lib/travel_time/middleware/authentication.rb @@ -14,7 +14,7 @@ class Authentication < Faraday::Middleware def on_request(env) env.request_headers[APP_ID_HEADER] = TravelTime.config.application_id env.request_headers[API_KEY_HEADER] = TravelTime.config.api_key - env.request_headers[USER_AGENT] = 'Travel Time Ruby SDK' + env.request_headers[USER_AGENT] = "Travel Time Ruby SDK #{TravelTime::VERSION}" end end end diff --git a/lib/travel_time/version.rb b/lib/travel_time/version.rb index 5dec5f0..9935388 100644 --- a/lib/travel_time/version.rb +++ b/lib/travel_time/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module TravelTime - VERSION = '0.5.4' + VERSION = '0.5.5' end diff --git a/spec/travel_time/middleware/authentication_spec.rb b/spec/travel_time/middleware/authentication_spec.rb index 353b541..666c783 100644 --- a/spec/travel_time/middleware/authentication_spec.rb +++ b/spec/travel_time/middleware/authentication_spec.rb @@ -25,7 +25,7 @@ it 'automatically adds User-Agent header' do middleware.on_request(faraday_env) value = faraday_env.request_headers[described_class::USER_AGENT] - expected = 'Travel Time Ruby SDK' + expected = "Travel Time Ruby SDK #{TravelTime::VERSION}" expect(value).to eq(expected) end end