-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc0345f
commit ebbef6b
Showing
113 changed files
with
307 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,90 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2019-07-30 09:56:31 +0800 using RuboCop version 0.73.0. | ||
# on 2023-11-28 00:44:55 UTC using RuboCop version 1.57.2. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 23 | ||
# Offense count: 6 | ||
# Configuration parameters: AllowedMethods. | ||
# AllowedMethods: enums | ||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- 'test/stripe/api_operations_test.rb' | ||
- 'test/stripe/api_resource_test.rb' | ||
- 'test/stripe/stripe_object_test.rb' | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. | ||
Lint/DuplicateBranch: | ||
Exclude: | ||
- 'lib/stripe/stripe_client.rb' | ||
|
||
# Offense count: 5 | ||
# Configuration parameters: AllowComments, AllowEmptyLambdas. | ||
Lint/EmptyBlock: | ||
Exclude: | ||
- 'test/stripe/apple_pay_domain_test.rb' | ||
- 'test/stripe/quote_test.rb' | ||
- 'test/stripe/stripe_client_test.rb' | ||
|
||
# Offense count: 3 | ||
Lint/FloatComparison: | ||
Exclude: | ||
- 'test/stripe/stripe_client_test.rb' | ||
|
||
# Offense count: 2 | ||
Lint/HashCompareByIdentity: | ||
Exclude: | ||
- 'lib/stripe/stripe_client.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowedParentClasses. | ||
Lint/MissingSuper: | ||
Exclude: | ||
- 'lib/stripe/errors.rb' | ||
|
||
# Offense count: 26 | ||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. | ||
Metrics/AbcSize: | ||
Max: 51 | ||
Max: 50 | ||
|
||
# Offense count: 12 | ||
# Configuration parameters: CountComments. | ||
# Offense count: 9 | ||
# Configuration parameters: CountComments, CountAsOne. | ||
Metrics/ClassLength: | ||
Max: 694 | ||
Max: 587 | ||
|
||
# Offense count: 12 | ||
# Offense count: 13 | ||
# Configuration parameters: AllowedMethods, AllowedPatterns. | ||
Metrics/CyclomaticComplexity: | ||
Max: 15 | ||
Max: 16 | ||
|
||
# Offense count: 6 | ||
# Configuration parameters: CountKeywordArgs. | ||
# Offense count: 10 | ||
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters. | ||
Metrics/ParameterLists: | ||
Max: 7 | ||
|
||
# Offense count: 8 | ||
# Offense count: 9 | ||
# Configuration parameters: AllowedMethods, AllowedPatterns. | ||
Metrics/PerceivedComplexity: | ||
Max: 17 | ||
Max: 18 | ||
|
||
# Offense count: 86 | ||
# Offense count: 39 | ||
# Configuration parameters: AllowedConstants. | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/IfUnlessModifier: | ||
Exclude: | ||
- 'lib/stripe/stripe_client.rb' | ||
- 'lib/stripe/stripe_object.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. | ||
# URISchemes: http, https | ||
Layout/LineLength: | ||
Max: 135 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,12 @@ def self.get_client_id(params = {}) | |
client_id = params[:client_id] || Stripe.client_id | ||
unless client_id | ||
raise AuthenticationError, "No client_id provided. " \ | ||
'Set your client_id using "Stripe.client_id = <CLIENT-ID>". ' \ | ||
"You can find your client_ids in your Stripe dashboard at " \ | ||
"https://dashboard.stripe.com/account/applications/settings, " \ | ||
"after registering your account as a platform. See " \ | ||
"https://stripe.com/docs/connect/standalone-accounts for details, " \ | ||
"or email [email protected] if you have any questions." | ||
'Set your client_id using "Stripe.client_id = <CLIENT-ID>". ' \ | ||
"You can find your client_ids in your Stripe dashboard at " \ | ||
"https://dashboard.stripe.com/account/applications/settings, " \ | ||
"after registering your account as a platform. See " \ | ||
"https://stripe.com/docs/connect/standalone-accounts for details, " \ | ||
"or email [email protected] if you have any questions." | ||
end | ||
client_id | ||
end | ||
|
@@ -33,7 +33,7 @@ def self.authorize_url(params = {}, opts = {}) | |
base = opts[:connect_base] || client.config.connect_base | ||
|
||
path = "/oauth/authorize" | ||
path = "/express" + path if opts[:express] | ||
path = "/express#{path}" if opts[:express] | ||
|
||
params[:client_id] = get_client_id(params) | ||
params[:response_type] ||= "code" | ||
|
Oops, something went wrong.