-
Notifications
You must be signed in to change notification settings - Fork 27
Add support for Ruby 3.2 #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| AllCops: | ||
| TargetRubyVersion: 2.1 | ||
| TargetRubyVersion: 2.7.5 | ||
| NewCops: enable | ||
| SuggestExtensions: false | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env ruby | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'bundler/setup' | ||
| require 'omniauth-bigcommerce' | ||
|
|
||
| # You can add fixtures and/or initialization code here to make experimenting | ||
| # with your gem easier. You can also use a different console, if you like. | ||
|
|
||
| require 'irb' | ||
| IRB.start(__FILE__) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| IFS=$'\n\t' | ||
| set -vx | ||
|
|
||
| bundle install | ||
| bundle exec rspec -p | ||
| bundle exec rubocop -P | ||
| bundle audit update | ||
| bundle audit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,6 @@ | |
| # | ||
| module OmniAuth | ||
| module BigCommerce | ||
| VERSION = '0.4.1.pre' | ||
| VERSION = '1.0.0.pre' | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,8 +30,8 @@ class BigCommerce < OmniAuth::Strategies::OAuth2 | |
| option :token_options, %i[scope context account_uuid] | ||
| option :client_options, | ||
| site: ENV.fetch('BC_AUTH_SERVICE', 'https://login.bigcommerce.com'), | ||
| authorize_url: '/oauth2/authorize', | ||
| token_url: '/oauth2/token' | ||
| authorize_url: 'oauth2/authorize', | ||
| token_url: 'oauth2/token' | ||
|
Comment on lines
+33
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wouldn't this be a breaking change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not be. This is the same change done in the upstream gem. I do think we need a PoL before merge though. |
||
|
|
||
| uid { access_token.params['user']['id'] } | ||
|
|
||
|
|
@@ -64,7 +64,7 @@ def raw_info | |
| # Exclude query string in callback url. This used to be part of omniauth-oauth2, but was | ||
| # removed in 1.4.0: https://github.com/intridea/omniauth-oauth2/pull/70 | ||
| def callback_url | ||
| full_host + script_name + callback_path | ||
| full_host + callback_path | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| end | ||
|
|
||
| # Make sure to pass scope and context through to the authorize call | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the default values in later versions of OmniAuth.