stripe-ruby
stripe-ruby copied to clipboard
Bump version of rubocop
Version 2.3 (in rubocop.yaml) is no longer supported. 2.4 seems to operate fine, so here's a PR.
Thanks! It looks like we have a couple failures as per build:
lib/stripe/stripe_client.rb:437:11: C: Style/HashTransformValues: Prefer transform_values over map {...}.to_h.
flattened_params.map { |k, v| [k, v.is_a?(String) ? v : v.to_s] }.to_h
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/stripe/stripe_object.rb:189:7: C: Style/HashTransformValues: Prefer transform_values over each_with_object.
@values.each_with_object({}) do |(key, value), acc| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/stripe/stripe_object.rb:560:7: C: Style/HashTransformValues: Prefer transform_values over each_with_object.
values.each_with_object({}) do |(k, _), update| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stripe.gemspec:10:29: C: Gemspec/RequiredRubyVersion: required_ruby_version (2.3, declared in stripe.gemspec) and TargetRubyVersion (2.4, which may be specified in .rubocop.yml) should be equal.
s.required_ruby_version = ">= 2.3.0"
^^^^^^^^^^
Are you willing to take a look at those?
Yes, can do.
@TomMD Thanks!
And regarding the build breaking: it's because RuboCop might enforce different lint rules depending on the Ruby version, so I suspect it's just that some new default lints came in with 2.4.