Skip to content
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

Gemspec/RequiredRubyVersion should be aware of Gem::Requirement #7408

Closed
pocke opened this issue Oct 5, 2019 · 5 comments · Fixed by #8816
Closed

Gemspec/RequiredRubyVersion should be aware of Gem::Requirement #7408

pocke opened this issue Oct 5, 2019 · 5 comments · Fixed by #8816
Labels
enhancement good first issue Easy task, suitable for newcomers to the project help wanted

Comments

@pocke
Copy link
Collaborator

pocke commented Oct 5, 2019

Is your feature request related to a problem? Please describe.

Recent bundler uses Gem::Requirement for required_ruby_version in gemspec.
rubygems/bundler#7209

But Gemspec/RequiredRubyVersion is not aware of Gem::Requirement. So the cop ignores buggy code if it uses Gem::Requirement.

Gem::Specification.new do |spec|
  # The cop should add an offesne to this code if .rubocop.yml does not specify `TargetRubyVersion: 2.5`.
  # But it doesn't.
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
end

Describe the solution you'd like

The cop should aware of Gem::Requirement.

Describe alternatives you've considered

nothing

Additional context

nothing

@stale
Copy link

stale bot commented Apr 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale Issues that haven't been active in a while label Apr 4, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

@stale stale bot closed this as completed Jul 3, 2020
@marcandre marcandre added help wanted good first issue Easy task, suitable for newcomers to the project labels Jul 3, 2020
@mvz
Copy link
Contributor

mvz commented Aug 7, 2020

@marcandre can you please reopen this so it will get noticed by whoever wants to work on it?

@koic koic reopened this Aug 7, 2020
@stale stale bot removed the stale Issues that haven't been active in a while label Aug 7, 2020
@mvz
Copy link
Contributor

mvz commented Aug 7, 2020

Thanks, @koic!

@marcandre
Copy link
Contributor

@marcandre can you please reopen this so it will get noticed by whoever wants to work on it?

Oops, sorry, I did mean to reopen it, thanks for the ping, and thanks @koic :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Easy task, suitable for newcomers to the project help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants