From d042b516e979170789bfcc67e16b1b262c6afa08 Mon Sep 17 00:00:00 2001 From: Aaron Schuman Date: Mon, 27 Sep 2021 14:58:34 -0700 Subject: [PATCH 1/5] adds appkey header to all requests --- lib/urbanairship/client.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/urbanairship/client.rb b/lib/urbanairship/client.rb index e41f0ed..c65da6e 100644 --- a/lib/urbanairship/client.rb +++ b/lib/urbanairship/client.rb @@ -53,6 +53,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['X-AIRSHIP-APPKEY'] = @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? From 5bf4f7823948ef9035c2904d5d8172daf946f319 Mon Sep 17 00:00:00 2001 From: Aaron Schuman Date: Tue, 28 Sep 2021 10:28:24 -0700 Subject: [PATCH 2/5] renames workflow --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a64ee4c..1c21d80 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Ruby CI +name: Ruby Build on: [ push ] From 8f22437b98d31042448ce4de15fe0cb065a578d6 Mon Sep 17 00:00:00 2001 From: Aaron Schuman Date: Tue, 28 Sep 2021 10:30:29 -0700 Subject: [PATCH 3/5] updates version to 8.0.1 --- CHANGELOG | 4 ++++ lib/urbanairship/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6e518fc..8190364 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/lib/urbanairship/version.rb b/lib/urbanairship/version.rb index ca1cd9d..8bfc2b7 100644 --- a/lib/urbanairship/version.rb +++ b/lib/urbanairship/version.rb @@ -1,3 +1,3 @@ module Urbanairship - VERSION = '8.0.0' + VERSION = '8.0.1' end From 932a7fc7858674bfbaa5aef5b75265ba39530cff Mon Sep 17 00:00:00 2001 From: Aaron Schuman Date: Tue, 28 Sep 2021 10:30:38 -0700 Subject: [PATCH 4/5] adds vscode dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c0b2849..8fcbbe5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ /spec/reports/ /tmp/ /csv_file +.vscode/ # App urbanairship.log From b86adfe2a26c60ed92773a177a36dbe11e336970 Mon Sep 17 00:00:00 2001 From: Aaron Schuman Date: Tue, 28 Sep 2021 10:56:02 -0700 Subject: [PATCH 5/5] rm custom header, add key to useragent string --- lib/urbanairship/client.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/urbanairship/client.rb b/lib/urbanairship/client.rb index c65da6e..8fc28b0 100644 --- a/lib/urbanairship/client.rb +++ b/lib/urbanairship/client.rb @@ -52,8 +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['X-AIRSHIP-APPKEY'] = @key + 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?