From 6554506620532423f6aa6825415de91631cc8e8f Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 9 Jun 2022 18:02:56 +0000 Subject: [PATCH] Update Ruby API --- README.md | 5 +++-- RELEASE_INSTRUCTIONS.md | 4 +++- lib/onesignal/api_client.rb | 2 +- lib/onesignal/version.rb | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6f138b8..c187cea 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ OneSignal is a simple ruby wrapper for the [OneSignal API][osa]. Add this line to your application's Gemfile: ```ruby -gem 'onesignal', '~> 1.0.0' +gem 'onesignal', '~> 1.0.1' ``` And then execute: @@ -42,7 +42,8 @@ Or install it yourself as: $ gem install onesignal Or install from Github: - $ gem "onesignal", '~> 1.0.0', git: 'git://github.com/OneSignal/onesignal-ruby-api.git' + + $ gem "onesignal", '~> 1.0.1', git: 'git://github.com/OneSignal/onesignal-ruby-api.git' ## Getting Started diff --git a/RELEASE_INSTRUCTIONS.md b/RELEASE_INSTRUCTIONS.md index 8d7fbc4..099a8f6 100644 --- a/RELEASE_INSTRUCTIONS.md +++ b/RELEASE_INSTRUCTIONS.md @@ -1,9 +1,11 @@ # Release Instructions 1. Generate new client version using OpenApi Generator +2. Make sure `ruby.yml` has the correct gem version 2. Create a new PR and merge * Carefully review the PR to ensure nothing is overwritten and you are including all desired changes * Ensure the correct version number is being sent in the header params `OS-Usage-Data` (`api_client.rb`) -3. Publish to RubyGems +3. Generate the gem: `gem build onesignal` +4. Publish to RubyGems * To publish version 0.1.0 of a new gem called 'squid-utils', run: `gem push squid-utils-0.1.0.gem` * To publish a beta version, simply add `.beta1`, `.beta2` etc... after the semantic version (e.g: `1.0.0.beta1`) diff --git a/lib/onesignal/api_client.rb b/lib/onesignal/api_client.rb index 958e506..1ab9e04 100644 --- a/lib/onesignal/api_client.rb +++ b/lib/onesignal/api_client.rb @@ -90,7 +90,7 @@ def build_request(http_method, path, opts = {}) url = build_request_url(path, opts) http_method = http_method.to_sym.downcase - opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, name=onesignal-ruby, version=1.0.1' + opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=1.0.1' header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} diff --git a/lib/onesignal/version.rb b/lib/onesignal/version.rb index 051cab3..c8c0c53 100644 --- a/lib/onesignal/version.rb +++ b/lib/onesignal/version.rb @@ -11,5 +11,5 @@ =end module OneSignal - VERSION = '1.0.0' + VERSION = '1.0.1' end