diff --git a/CHANGELOG.md b/CHANGELOG.md index 694616c..8d1a83a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Your contribution here. * [#000](https://github.com/bigcommerce/bigcommerce-api-ruby/pull/000): Brief description here. - [@username](https://github.com/username). +* [#142](https://github.com/bigcommerce/bigcommerce-api-ruby/pull/142): Update Faraday gem version. Add support for OAuth SSL options. - [@pedelman](https://github.com/pedelman) * [#136](https://github.com/bigcommerce/bigcommerce-api-ruby/pull/136): Added accept-encoding: gzip header. - [@adambilsing](https://github.com/adambilsing) * [#128](https://github.com/bigcommerce/bigcommerce-api-ruby/pull/128): Added support for token generation for storefront login. - [@mattolson](https://github.com/mattolson). diff --git a/Rakefile b/Rakefile index a44cc64..b6d374c 100644 --- a/Rakefile +++ b/Rakefile @@ -9,4 +9,4 @@ end require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) -task default: [:spec, :rubocop] +task default: %i[spec rubocop] diff --git a/bigcommerce.gemspec b/bigcommerce.gemspec index c687c4c..d7cb32b 100644 --- a/bigcommerce.gemspec +++ b/bigcommerce.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'bundler' s.add_development_dependency 'rake' - s.add_dependency 'faraday', '~> 0.9' + s.add_dependency 'faraday', '~> 0.12.0' s.add_dependency 'faraday_middleware', '~> 0.10.0' s.add_dependency 'hashie', '~> 3.4' s.add_dependency 'jwt', '~> 1.5.4' diff --git a/lib/bigcommerce/connection.rb b/lib/bigcommerce/connection.rb index 3cd7418..67ad41a 100644 --- a/lib/bigcommerce/connection.rb +++ b/lib/bigcommerce/connection.rb @@ -8,7 +8,7 @@ module Connection }.freeze def self.build(config) - ssl_options = config.ssl if config.auth == 'legacy' + ssl_options = config.ssl || {} Faraday.new(url: config.api_url, ssl: ssl_options) do |conn| conn.request :json conn.headers = HEADERS diff --git a/lib/bigcommerce/resources/geography/country.rb b/lib/bigcommerce/resources/geography/country.rb index 140f707..1d26536 100644 --- a/lib/bigcommerce/resources/geography/country.rb +++ b/lib/bigcommerce/resources/geography/country.rb @@ -6,7 +6,7 @@ module Bigcommerce class Country < Resource include Bigcommerce::ResourceActions.new( uri: 'countries/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/geography/state.rb b/lib/bigcommerce/resources/geography/state.rb index 1d97322..467d1be 100644 --- a/lib/bigcommerce/resources/geography/state.rb +++ b/lib/bigcommerce/resources/geography/state.rb @@ -6,7 +6,7 @@ module Bigcommerce class State < Resource include Bigcommerce::SubresourceActions.new( uri: 'countries/%d/states/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/orders/order_coupon.rb b/lib/bigcommerce/resources/orders/order_coupon.rb index 25e2492..193890b 100644 --- a/lib/bigcommerce/resources/orders/order_coupon.rb +++ b/lib/bigcommerce/resources/orders/order_coupon.rb @@ -6,7 +6,7 @@ module Bigcommerce class OrderCoupon < Resource include Bigcommerce::SubresourceActions.new( uri: 'orders/%d/coupons/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/orders/order_message.rb b/lib/bigcommerce/resources/orders/order_message.rb index eb450ef..5cc2c4a 100644 --- a/lib/bigcommerce/resources/orders/order_message.rb +++ b/lib/bigcommerce/resources/orders/order_message.rb @@ -6,7 +6,7 @@ module Bigcommerce class OrderMessage < Resource include Bigcommerce::SubresourceActions.new( uri: 'orders/%d/messages/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/orders/order_product.rb b/lib/bigcommerce/resources/orders/order_product.rb index 7f4852d..9dca805 100644 --- a/lib/bigcommerce/resources/orders/order_product.rb +++ b/lib/bigcommerce/resources/orders/order_product.rb @@ -6,7 +6,7 @@ module Bigcommerce class OrderProduct < Resource include Bigcommerce::SubresourceActions.new( uri: 'orders/%d/products/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/orders/order_shipping_address.rb b/lib/bigcommerce/resources/orders/order_shipping_address.rb index 941ccfe..d2acfc4 100644 --- a/lib/bigcommerce/resources/orders/order_shipping_address.rb +++ b/lib/bigcommerce/resources/orders/order_shipping_address.rb @@ -6,7 +6,7 @@ module Bigcommerce class OrderShippingAddress < Resource include Bigcommerce::SubresourceActions.new( uri: 'orders/%d/shipping_addresses/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/orders/order_status.rb b/lib/bigcommerce/resources/orders/order_status.rb index 4df5e0d..7ae477e 100644 --- a/lib/bigcommerce/resources/orders/order_status.rb +++ b/lib/bigcommerce/resources/orders/order_status.rb @@ -7,7 +7,7 @@ module Bigcommerce class OrderStatus < Resource include Bigcommerce::ResourceActions.new( uri: 'order_statuses/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/orders/order_tax.rb b/lib/bigcommerce/resources/orders/order_tax.rb index 2a65dff..aa7944b 100644 --- a/lib/bigcommerce/resources/orders/order_tax.rb +++ b/lib/bigcommerce/resources/orders/order_tax.rb @@ -6,7 +6,7 @@ module Bigcommerce class OrderTax < Resource include Bigcommerce::SubresourceActions.new( uri: 'orders/%d/taxes/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/products/configurable_field.rb b/lib/bigcommerce/resources/products/configurable_field.rb index c7d66cc..9c66525 100644 --- a/lib/bigcommerce/resources/products/configurable_field.rb +++ b/lib/bigcommerce/resources/products/configurable_field.rb @@ -6,7 +6,7 @@ module Bigcommerce class ConfigurableField < Resource include Bigcommerce::SubresourceActions.new( uri: 'products/%d/configurable_fields/%d', - disable: [:create, :update] + disable: %i[create update] ) property :id diff --git a/lib/bigcommerce/resources/products/product_option.rb b/lib/bigcommerce/resources/products/product_option.rb index 07a6903..304cce1 100644 --- a/lib/bigcommerce/resources/products/product_option.rb +++ b/lib/bigcommerce/resources/products/product_option.rb @@ -6,7 +6,7 @@ module Bigcommerce class ProductOption < Resource include Bigcommerce::SubresourceActions.new( uri: 'products/%d/options/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/shipping/shipping_method.rb b/lib/bigcommerce/resources/shipping/shipping_method.rb index cb2a8a1..8715618 100644 --- a/lib/bigcommerce/resources/shipping/shipping_method.rb +++ b/lib/bigcommerce/resources/shipping/shipping_method.rb @@ -6,7 +6,7 @@ module Bigcommerce class ShippingMethod < Resource include Bigcommerce::ResourceActions.new( uri: 'shipping/methods/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id diff --git a/lib/bigcommerce/resources/tax/tax_class.rb b/lib/bigcommerce/resources/tax/tax_class.rb index f32c76b..96d7eeb 100644 --- a/lib/bigcommerce/resources/tax/tax_class.rb +++ b/lib/bigcommerce/resources/tax/tax_class.rb @@ -7,7 +7,7 @@ module Bigcommerce class TaxClass < Resource include Bigcommerce::ResourceActions.new( uri: 'tax_classes/%d', - disable: [:create, :update, :destroy, :destroy_all] + disable: %i[create update destroy destroy_all] ) property :id