Skip to content

[Ruby] - Upgraded Rubocop gems. #342

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mmontalvo
Copy link

🤔 What's changed?

Upgraded Rubocop and associated libraries:

  • rubocop-performance
  • rubocop-rake
  • rubocop-rspec

Also ran rubocop within the relevant ruby folder an updated files based on the new rules.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻️ Anything particular you want feedback on?

It does not bring any breaking change due to updating these libraries.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@mmontalvo mmontalvo marked this pull request as ready for review May 27, 2025 04:34
@mpkorstanje mpkorstanje requested a review from luke-hill May 27, 2025 23:06
Copy link
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers! A few remarks, and I'll have to leave the actual review to @luke-hill.

@@ -23,14 +23,14 @@ Gem::Specification.new do |s|
'source_code_uri' => 'https://github.com/cucumber/cucumber-expressions/tree/main/ruby',
}

s.add_runtime_dependency 'bigdecimal'
s.add_dependency 'bigdecimal'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luke-hill this looks breaking. Is that correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah this is just minor naming. Although I wasn't aware this was a new recommendation 🤷‍♂️

@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- [Ruby] Updated rubocop and rubocop gems (RSpec/Rake/Performance), also updated project files affected by the updated rules ([#342](https://github.com/cucumber/cucumber-expressions/pull/342))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary. Notable in this context means "notable to the user" and "notable for the purposes of semver".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, ideally here you'd maybe write a quick changelog that you autofixed some styles or something. As some of the changes could break, but this would go into a patch release if it was released

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but not completely sure if I should keep the changelog entry or remove it 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what Rien is saying is technical things about ruby don't belong in a polyglot changelog (This is a library with 6 flavours).

So maybe just say somethinig similar to what has been written prior

Copy link
Contributor

@luke-hill luke-hill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a full review. 9/12 files are good, the three files I've raised things against feel free to dive into or I can at a later date.

Thanks for this, definitely nice to get a bump and some of the easier stuff fixed up

@@ -23,14 +23,14 @@ Gem::Specification.new do |s|
'source_code_uri' => 'https://github.com/cucumber/cucumber-expressions/tree/main/ruby',
}

s.add_runtime_dependency 'bigdecimal'
s.add_dependency 'bigdecimal'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah this is just minor naming. Although I wasn't aware this was a new recommendation 🤷‍♂️

@@ -33,7 +33,7 @@ def initialize(group, parameter_type)
def value(self_obj = :nil)
raise 'No self_obj' if self_obj == :nil

group_values = @group ? @group.values : nil
group_values = @group&.values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be moved into the line below

@@ -155,7 +155,7 @@ def ==(other)
}.to raise_error('There is already a parameter with name color')
end

it 'is not detected for type' do
it 'is not detected for type', skip: 'missing expectation' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just flagging this for me here, this should be checked across languages. It "could" be similar issue

@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- [Ruby] Updated rubocop and rubocop gems (RSpec/Rake/Performance), also updated project files affected by the updated rules ([#342](https://github.com/cucumber/cucumber-expressions/pull/342))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, ideally here you'd maybe write a quick changelog that you autofixed some styles or something. As some of the changes could break, but this would go into a patch release if it was released

@mmontalvo
Copy link
Author

Did a full review. 9/12 files are good, the three files I've raised things against feel free to dive into or I can at a later date.

Thanks for this, definitely nice to get a bump and some of the easier stuff fixed up

Thanks for the review! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants