Skip to content

Commit

Permalink
Merge pull request #97 from urbanairship/TOOLSLIBS-355-add-appkey-header
Browse files Browse the repository at this point in the history
[TOOLSLIBS-355] Add App Key to user agent string
  • Loading branch information
aschuman0 committed Sep 28, 2021
2 parents 8d87e9e + b86adfe commit d732e64
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruby CI
name: Ruby Build

on: [ push ]

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/spec/reports/
/tmp/
/csv_file
.vscode/

# App
urbanairship.log
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
--------------------
8.0.1
--------------------
- Adds `X-AIRSHIP-APPKEY` header tor equests
--------------------
8.0.0
--------------------
- Updates officially supported versions to 2.6.7 and 2.7.2
Expand Down
2 changes: 1 addition & 1 deletion lib/urbanairship/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def send_request(method: required('method'), path: nil, url: nil, body: nil,

raise ArgumentError.new("path and url can't be both nil") if path.nil? && url.nil?

headers = {'User-Agent' => 'UARubyLib/' + Urbanairship::VERSION}
headers = {'User-Agent' => 'UARubyLib/' + Urbanairship::VERSION + ' ' + @key}
headers['Accept'] = 'application/vnd.urbanairship+json; version=3'
headers['Content-Type'] = content_type unless content_type.nil?
headers['Content-Encoding'] = encoding unless encoding.nil?
Expand Down
2 changes: 1 addition & 1 deletion lib/urbanairship/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Urbanairship
VERSION = '8.0.0'
VERSION = '8.0.1'
end

0 comments on commit d732e64

Please sign in to comment.