Closed ybiquitous closed 2 years ago
The new RuboCop version complains about the following offenses:
https://github.com/ybiquitous/recaptcha/runs/6088232395?check_suite_focus=true#step:4:78
lib/recaptcha.rb:88:7: C: [Correctable] Style/RedundantReturn: Redundant return detected. To return multiple values, use an array.
return success, reply
^^^^^^
lib/recaptcha.rb:90:7: C: [Correctable] Style/RedundantReturn: Redundant return detected.
return success
^^^^^^
lib/recaptcha.rb:106:7: C: [Correctable] Style/RedundantReturn: Redundant return detected. To return multiple values, use an array.
return success, reply
^^^^^^
lib/recaptcha.rb:108:7: C: [Correctable] Style/RedundantReturn: Redundant return detected.
return success
^^^^^^
lib/recaptcha.rb:157:21: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
uri = URI.parse(configuration.verify_url + '?' + query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/recaptcha.rb:165:21: C: Style/StringConcatenation: Prefer string interpolation to string concatenation.
uri = URI.parse(configuration.verify_url + "/#{project_id}/assessments" + '?' + query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/recaptcha/configuration.rb:40:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_accessor attributes.
attr_accessor :default_env, :skip_verify_env, :proxy, :secret_key, :site_key, :handle_timeouts_gracefully, :hostname
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/recaptcha/configuration.rb:41:5: C: [Correctable] Style/AccessorGrouping: Group together all attr_accessor attributes.
attr_accessor :enterprise, :enterprise_api_key, :enterprise_project_id, :response_limit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/recaptcha/helpers.rb:13:35: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation.
id = options.delete(:id) || "g-recaptcha-response-data-" + dasherize_action(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Should we also fix the offenses in this pull request? I can do it if you hope.
... maybe best to do a separate PR that just bumps rubocop
@grosser Thanks for the feedback! I'll address the reviews.
I'm doing a rubocop bump, 1 sec :)
please rebase :)
@grosser Thanks. Rebasing is done!
✨
Why and what is being done.
I want to ensure this gem works on new Rubies (e.g. 3.0).
This change also includes:removingGemfile.lock
for a more flexible dependency installationrenaming the old RuboCop cop namesMy fork is working: https://github.com/ybiquitous/recaptcha/pull/1
Pre-Merge Checklist