Skip to content

Commit

Permalink
Merge branch 'master' into richardm-anniel-singleton-retrieve-parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe authored Dec 11, 2023
2 parents 3ecb678 + db16cf6 commit 7e23610
Show file tree
Hide file tree
Showing 125 changed files with 636 additions and 361 deletions.
195 changes: 195 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,198 @@ Style/TrailingCommaInArrayLiteral:

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma

Gemspec/DeprecatedAttributeAssignment: # new in 1.30
Enabled: true
Gemspec/DevelopmentDependencies: # new in 1.44
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: false
Layout/LineContinuationLeadingSpace: # new in 1.31
Enabled: true
Layout/LineContinuationSpacing: # new in 1.31
Enabled: true
Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: true
Layout/SpaceBeforeBrackets: # new in 1.7
Enabled: true
Lint/AmbiguousAssignment: # new in 1.7
Enabled: true
Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: true
Lint/AmbiguousRange: # new in 1.19
Enabled: true
Lint/ConstantOverwrittenInRescue: # new in 1.31
Enabled: true
Lint/DeprecatedConstants: # new in 1.8
Enabled: true
Lint/DuplicateBranch: # new in 1.3
Enabled: true
Lint/DuplicateMagicComment: # new in 1.37
Enabled: true
Lint/DuplicateMatchPattern: # new in 1.50
Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
Enabled: true
Lint/EmptyBlock: # new in 1.1
Enabled: true
Lint/EmptyClass: # new in 1.3
Enabled: true
Lint/EmptyInPattern: # new in 1.16
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: true
Lint/LambdaWithoutLiteralBlock: # new in 1.8
Enabled: true
Lint/MixedCaseRange: # new in 1.53
Enabled: true
Lint/NoReturnInBeginEndBlocks: # new in 1.2
Enabled: true
Lint/NonAtomicFileOperation: # new in 1.31
Enabled: true
Lint/NumberedParameterAssignment: # new in 1.9
Enabled: true
Lint/OrAssignmentToConstant: # new in 1.9
Enabled: true
Lint/RedundantDirGlobSort: # new in 1.8
Enabled: true
Lint/RedundantRegexpQuantifiers: # new in 1.53
Enabled: true
Lint/RefinementImportMethods: # new in 1.27
Enabled: true
Lint/RequireRangeParentheses: # new in 1.32
Enabled: true
Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: true
Lint/SymbolConversion: # new in 1.9
Enabled: true
Lint/ToEnumArguments: # new in 1.1
Enabled: true
Lint/TripleQuotes: # new in 1.9
Enabled: true
Lint/UnexpectedBlockArity: # new in 1.5
Enabled: true
Lint/UnmodifiedReduceAccumulator: # new in 1.1
Enabled: true
Lint/UselessRescue: # new in 1.43
Enabled: true
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true
Metrics/CollectionLiteralLength: # new in 1.47
Enabled: true
Naming/BlockForwarding: # new in 1.24
Enabled: true
Security/CompoundHash: # new in 1.28
Enabled: true
Security/IoMethods: # new in 1.22
Enabled: true
Style/ArgumentsForwarding: # new in 1.1
Enabled: true
Style/ArrayIntersect: # new in 1.40
Enabled: true
Style/CollectionCompact: # new in 1.2
Enabled: true
Style/ComparableClamp: # new in 1.44
Enabled: true
Style/ConcatArrayLiterals: # new in 1.41
Enabled: true
Style/DataInheritance: # new in 1.49
Enabled: true
Style/DirEmpty: # new in 1.48
Enabled: true
Style/DocumentDynamicEvalDefinition: # new in 1.1
Enabled: true
Style/EmptyHeredoc: # new in 1.32
Enabled: true
Style/EndlessMethod: # new in 1.8
Enabled: true
Style/EnvHome: # new in 1.29
Enabled: true
Style/ExactRegexpMatch: # new in 1.51
Enabled: true
Style/FetchEnvVar: # new in 1.28
Enabled: true
Style/FileEmpty: # new in 1.48
Enabled: true
Style/FileRead: # new in 1.24
Enabled: true
Style/FileWrite: # new in 1.24
Enabled: true
Style/HashConversion: # new in 1.10
Enabled: true
Style/HashExcept: # new in 1.7
Enabled: true
Style/IfWithBooleanLiteralBranches: # new in 1.9
Enabled: true
Style/InPatternThen: # new in 1.16
Enabled: true
Style/MagicCommentFormat: # new in 1.35
Enabled: true
Style/MapCompactWithConditionalBlock: # new in 1.30
Enabled: true
Style/MapToHash: # new in 1.24
Enabled: true
Style/MapToSet: # new in 1.42
Enabled: true
Style/MinMaxComparison: # new in 1.42
Enabled: true
Style/MultilineInPatternThen: # new in 1.16
Enabled: true
Style/NegatedIfElseCondition: # new in 1.2
Enabled: true
Style/NestedFileDirname: # new in 1.26
Enabled: true
Style/NilLambda: # new in 1.3
Enabled: true
Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/ObjectThen: # new in 1.28
Enabled: true
Style/OpenStructUse: # new in 1.23
Enabled: true
Style/OperatorMethodCall: # new in 1.37
Enabled: true
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantArgument: # new in 1.4
Enabled: true
Style/RedundantArrayConstructor: # new in 1.52
Enabled: true
Style/RedundantConstantBase: # new in 1.40
Enabled: true
Style/RedundantCurrentDirectoryInPath: # new in 1.53
Enabled: true
Style/RedundantDoubleSplatHashBraces: # new in 1.41
Enabled: true
Style/RedundantEach: # new in 1.38
Enabled: true
Style/RedundantFilterChain: # new in 1.52
Enabled: true
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
Enabled: true
Style/RedundantInitialize: # new in 1.27
Enabled: true
Style/RedundantLineContinuation: # new in 1.49
Enabled: true
Style/RedundantRegexpArgument: # new in 1.53
Enabled: true
Style/RedundantRegexpConstructor: # new in 1.52
Enabled: true
Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: true
Style/RedundantStringEscape: # new in 1.37
Enabled: true
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
Enabled: true
Style/SelectByRegexp: # new in 1.22
Enabled: true
Style/SingleLineDoEndBlock: # new in 1.57
Enabled: true
Style/StringChars: # new in 1.12
Enabled: true
Style/SwapValues: # new in 1.1
Enabled: true
Style/YAMLFileRead: # new in 1.53
Enabled: true
76 changes: 65 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,87 @@
# 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 01:02:03 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: 2
Lint/HashCompareByIdentity:
Exclude:
- 'lib/stripe/stripe_client.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: 592

# Offense count: 12
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 15
Max: 12

# Offense count: 6
# Configuration parameters: CountKeywordArgs.
# Offense count: 9
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
Metrics/ParameterLists:
Max: 7

# Offense count: 8
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 17
Max: 12

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: MinBranchesCount.
Style/CaseLikeIf:
Exclude:
- 'lib/stripe/stripe_configuration.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/CombinableLoops:
Exclude:
- 'lib/stripe/stripe_client.rb'

# Offense count: 86
# Offense count: 39
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowSplatArgument.
Style/HashConversion:
Exclude:
- 'lib/stripe/stripe_client.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
# AllowedMethods: present?, blank?, presence, try, try!
Style/SafeNavigation:
Exclude:
- 'lib/stripe/instrumentation.rb'
- 'lib/stripe/stripe_response.rb'

# Offense count: 15
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'lib/stripe.rb'
- 'lib/stripe/connection_manager.rb'
- 'lib/stripe/multipart_encoder.rb'
- 'lib/stripe/oauth.rb'
- 'lib/stripe/resources/bank_account.rb'
- 'lib/stripe/resources/source.rb'
- 'lib/stripe/stripe_client.rb'
- 'test/stripe/api_resource_test.rb'
- 'test/stripe/stripe_client_test.rb'
- 'test/stripe/webhook_test.rb'
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Changelog
## 10.2.0 - 2023-11-30
* [#1292](https://github.com/stripe/stripe-ruby/pull/1292) Update generated code
* Add support for new resources `Climate.Order`, `Climate.Product`, and `Climate.Supplier`
* Add support for `cancel`, `create`, `list`, `retrieve`, and `update` methods on resource `Order`
* Add support for `list` and `retrieve` methods on resources `Product` and `Supplier`
* [#1295](https://github.com/stripe/stripe-ruby/pull/1295) Upgrade rubocop
* [#1291](https://github.com/stripe/stripe-ruby/pull/1291) Update generated code

* [#1290](https://github.com/stripe/stripe-ruby/pull/1290) Update generated code

* [#1288](https://github.com/stripe/stripe-ruby/pull/1288) Update generated code


## 10.1.0 - 2023-11-02
* [#1286](https://github.com/stripe/stripe-ruby/pull/1286) Update generated code
* Add support for new resource `Tax.Registration`
Expand Down
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ group :development do
# `Gemfile.lock` checked in, so to prevent good builds from suddenly going
# bad, pin to a specific version number here. Try to keep this relatively
# up-to-date, but it's not the end of the world if it's not.
gem "rubocop", "0.80"
#
# The latest version of rubocop is only compatible with Ruby 2.7+
gem "rubocop", "1.57.2" if RUBY_VERSION >= "2.7"

# jaro_winkler 1.5.5 installation fails for jruby
gem "jaro_winkler", "1.5.4"
# don't install on truffleruby
gem "jaro_winkler", "1.5.4" unless RUBY_ENGINE == "truffleruby"

platforms :mri do
gem "byebug"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ update-version:

codegen-format:
bundle install --quiet
bundle exec rubocop -o /dev/null --auto-correct
bundle exec rubocop -o /dev/null --autocorrect

ci-test:
bundle install && bundle exec rake test
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v670
v682
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,11 @@ Stripe.set_app_info('MyAwesomePlugin', version: '1.2.34', url: 'https://myawesom
This information is passed along when the library makes calls to the Stripe
API.

### Request latency telemetry
### Telemetry

By default, the library sends request latency telemetry to Stripe. These
numbers help Stripe improve the overall latency of its API for all users.
By default, the library sends telemetry to Stripe regarding request latency and feature usage. These
numbers help Stripe improve the overall latency of its API for all users, and
improve popular features.

You can disable this behavior if you prefer:

Expand Down
Loading

0 comments on commit 7e23610

Please sign in to comment.