From 812814c7eba541d7e72569b1570c1266dffb9a6e Mon Sep 17 00:00:00 2001 From: Josh Kleinpeter Date: Thu, 14 May 2026 13:49:17 -0500 Subject: [PATCH 1/2] Add Ruby 3.3 and 4.0 builds; remove Ruby 3.0 and 3.1 --- .circleci/config.yml | 67 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f0c10ef..bb5a7a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,57 +7,32 @@ orbs: defaults: &defaults notify_failure: false -ruby_3_0_defaults: &ruby_3_0_defaults +ruby_3_2_defaults: &ruby_3_2_defaults <<: *defaults e: name: ruby/ruby - ruby-version: '3.0' + ruby-version: "3.2" -ruby_3_1_defaults: &ruby_3_1_defaults +ruby_3_3_defaults: &ruby_3_3_defaults <<: *defaults e: name: ruby/ruby - ruby-version: '3.1' + ruby-version: "3.3" -ruby_3_2_defaults: &ruby_3_2_defaults +ruby_3_4_defaults: &ruby_3_4_defaults <<: *defaults e: name: ruby/ruby - ruby-version: '3.2' + ruby-version: "3.4" -ruby_3_4_defaults: &ruby_3_4_defaults +ruby_4_0_defaults: &ruby_4_0_defaults <<: *defaults e: name: ruby/ruby - ruby-version: '3.4' + ruby-version: "4.0" workflows: version: 2 - ruby_3_0: - jobs: - - ruby/bundle-audit: - <<: *ruby_3_0_defaults - name: ruby-3_0-bundle_audit - - ruby/rubocop: - <<: *ruby_3_0_defaults - name: ruby-3_0-rubocop - - ruby/rspec-unit: - <<: *ruby_3_0_defaults - name: ruby-3_0-rspec_unit - db: false - ruby_3_1: - jobs: - - ruby/bundle-audit: - <<: *ruby_3_1_defaults - name: ruby-3_1-bundle_audit - - ruby/rubocop: - <<: *ruby_3_1_defaults - name: ruby-3_1-rubocop - - ruby/rspec-unit: - <<: *ruby_3_1_defaults - name: ruby-3_1-rspec_unit - db: false - code-climate: false ruby_3_2: jobs: - ruby/bundle-audit: @@ -71,6 +46,19 @@ workflows: name: ruby-3_2-rspec_unit db: false code-climate: false + ruby_3_3: + jobs: + - ruby/bundle-audit: + <<: *ruby_3_3_defaults + name: ruby-3_3-bundle_audit + - ruby/rubocop: + <<: *ruby_3_3_defaults + name: ruby-3_3-rubocop + - ruby/rspec-unit: + <<: *ruby_3_3_defaults + name: ruby-3_3-rspec_unit + db: false + code-climate: false ruby_3_4: jobs: - ruby/bundle-audit: @@ -84,3 +72,16 @@ workflows: name: ruby-3_4-rspec_unit db: false code-climate: false + ruby_4_0: + jobs: + - ruby/bundle-audit: + <<: *ruby_4_0_defaults + name: ruby-4_0-bundle_audit + - ruby/rubocop: + <<: *ruby_4_0_defaults + name: ruby-4_0-rubocop + - ruby/rspec-unit: + <<: *ruby_4_0_defaults + name: ruby-4_0-rspec_unit + db: false + code-climate: false From fd3e7f0c638f7908f88cd17f0b2dbb63ca537b55 Mon Sep 17 00:00:00 2001 From: Josh Kleinpeter Date: Thu, 14 May 2026 13:49:44 -0500 Subject: [PATCH 2/2] Fix README links --- README.md | 58 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 2b0b92e..de004a6 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ [![Test Coverage](https://api.codeclimate.com/v1/badges/d1ba1b74a2a74a26e8b4/test_coverage)](https://codeclimate.com/github/bigcommerce/bigcommerce-api-ruby/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/d1ba1b74a2a74a26e8b4/maintainability)](https://codeclimate.com/github/bigcommerce/bigcommerce-api-ruby/maintainability) -This is the official BigCommerce API client to support our Stores API. You can find more information about becoming a -BigCommerce developer here: [developer.bigcommerce.com](http://developer.bigcommerce.com). - +This is the official BigCommerce API client to support our Stores API. You can find more information about becoming a +BigCommerce developer on the [docs site](https://docs.bigcommerce.com). ## Installation + BigCommerce is available on [RubyGems](https://rubygems.org/gems/bigcommerce). ```sh @@ -27,34 +27,33 @@ gem 'bigcommerce', '~> 1.0' - Ruby 2.7.5 or newer (Ruby 3.0+ is preferred) ## Getting Started + To make requests to our API, you must register as a developer and have your credentials ready. Also very important: For the OAuth authentication mechanism, the resources to which you have acccess depend on the -scopes that the merchant has granted to your application. For more information about Store API scopes, -see: [OAuth Scopes](https://developer.bigcommerce.com/api/scopes). +scopes that the merchant has granted to your application. For more information about Store API scopes, +see: [OAuth Scopes](https://docs.bigcommerce.com/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). ## Authentication + We currently have two different authentication schemes that you can select, depending on your use case. ### OAuth -OAuth apps can be submitted to [BigCommerce App Store](https://www.bigcommerce.com/apps), allowing other merchants to install these apps in their -BigCommerce stores. - -__[More Information](https://developer.bigcommerce.com/api/using-oauth-intro)__ -### Basic Authentication (Legacy) -To develop a custom integration for one store, your app needs to use Basic Authentication. +OAuth apps can be submitted to [BigCommerce App Store](https://www.bigcommerce.com/apps), allowing other merchants to install these apps in their +BigCommerce stores. -__[More Information](https://developer.bigcommerce.com/api/legacy/basic-auth)__ +**[More Information](https://docs.bigcommerce.com/developer/docs/overview/api-fundamentals/api-accounts#authentication)** ## Configuration + To authenticate your API client, you will need to configure the client like the following examples. ### OAuth App -- ```client_id```: Obtained from the on the BigCommerce [Developer Portal's](http://developer.bigcommerce.com) "My Apps" section. -- ```access_token```: Obtained after a token exchange in the auth callback. -- ```store_hash```: Also obtained after the token exchange. +- `client_id`: Obtained from the on the BigCommerce [Developer Portal's](https://build.bigcommerce.com) Apps section. +- `access_token`: Obtained after a token exchange in the auth callback. +- `store_hash`: Also obtained after the token exchange. ```rb Bigcommerce.configure do |config| @@ -66,10 +65,9 @@ end ### Basic Authentication (Legacy) -To get all the basic auth credentials, simply visit your store admin page, and navigate to the +To get all the basic auth credentials, simply visit your store admin page, and navigate to the `Advanced Settings` > `Legacy API Settings`. Once there, you can create a new legacy API account on which to authenticate. - ```rb Bigcommerce.configure do |config| config.auth = 'legacy' @@ -79,9 +77,9 @@ Bigcommerce.configure do |config| end ``` -__SSL Configuration__ +**SSL Configuration** -If you are using your own, self-signed, certificate, you can pass SSL options to Faraday. This is not required, but +If you are using your own, self-signed, certificate, you can pass SSL options to Faraday. This is not required, but might be useful in special edge cases. ```rb @@ -102,12 +100,13 @@ For more information about configuring SSL with Faraday, please see the followin - [Faraday: Setting up SSL certificates](https://github.com/lostisland/faraday/wiki/Setting-up-SSL-certificates) ### Customer Login API -If you want to generate tokens for storefront login using the Customer Login API, you need to configure your app's + +If you want to generate tokens for storefront login using the Customer Login API, you need to configure your app's client secret. -- ```store_hash```: The store hash of the store you are operating against. -- ```client_id```: Obtained from the on the BigCommerce [Developer Portal's](http://developer.bigcommerce.com) "My Apps" section. -- ```client_secret```: Obtained from the on the BigCommerce [Developer Portal's](http://developer.bigcommerce.com) "My Apps" section. +- `store_hash`: The store hash of the store you are operating against. +- `client_id`: Obtained from the on the BigCommerce [Developer Portal's](https://build.bigcommerce.com) Apps section. +- `client_secret`: Obtained from the on the BigCommerce [Developer Portal's](https://build.bigcommerce.com) Apps section. ```rb Bigcommerce.configure do |config| @@ -118,8 +117,9 @@ end ``` ## Usage -For full examples of using the API client, please see the [examples folder](examples) and refer to -BigCommerce's [developer documentation](https://developer.bigcommerce.com/api). + +For full examples of using the API client, please see the [examples folder](examples) and refer to +BigCommerce's [developer documentation](https://docs.bigcommerce.com/). Example: @@ -138,15 +138,15 @@ Bigcommerce::System.time ### Thread Safety -The `Bigcommerce.configure` method is NOT thread-safe. This mechanism is designed for applications or +The `Bigcommerce.configure` method is NOT thread-safe. This mechanism is designed for applications or CLIs (command-line interfaces) where thread safety is not a concern. If you need to guarantee thread safety, we support this alternative mechanism to make thread-safe API requests: Rather then setting up a single `connection` for all API requests, construct a new connection for each thread. -If you can ensure that each of these connections is stored in a thread-safe manner, you can pass the `connection` as +If you can ensure that each of these connections is stored in a thread-safe manner, you can pass the `connection` as you query the resource. -This connection is nothing more than a `Faraday::Connection` – so if you want to write your own, or to use your own +This connection is nothing more than a `Faraday::Connection` – so if you want to write your own, or to use your own adapters, you can feel free. Please refer to this gem's [connection class](https://github.com/bigcommerce/bigcommerce-api-ruby/blob/master/lib/bigcommerce/connection.rb) for more details. ##### OAuth @@ -189,7 +189,9 @@ Bigcommerce::System.raw_request(:get, 'time', connection: connection_legacy) ``` ## Contributing + See [CONTRIBUTING.md](CONTRIBUTING.md) ## License + See [LICENSE.md](LICENSE.md)