You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought it would be a good idea to handle it the same way as Gemspec/DateAssignment, which was added in #9496.
Describe the solution you'd like
I suggest adding cops like Gemspec/RubyGemsVersionAssignment and Gemspec/SpecificationVersionAssignment that warn the use of rubygems_version= or specification_version= in a gemspec file.
Describe alternatives you've considered
Or merge them with Gemspec/DateAssignment and rename it?
Additional context
For example, Jeweler and the gems created by it (e.g. OS) use these fields.
Is your feature request related to a problem? Please describe.
I've found some (older) gems using
rubygems_version=
orspecification_version=
in a gemspec file.However, RubyGems source says not to use them.
https://github.com/rubygems/rubygems/blob/cc6f96aa0c1c99d94363d12884001a2de28da033/lib/rubygems/specification.rb#L530-L534
https://github.com/rubygems/rubygems/blob/cc6f96aa0c1c99d94363d12884001a2de28da033/lib/rubygems/specification.rb#L744-L748
I thought it would be a good idea to handle it the same way as
Gemspec/DateAssignment
, which was added in #9496.Describe the solution you'd like
I suggest adding cops like
Gemspec/RubyGemsVersionAssignment
andGemspec/SpecificationVersionAssignment
that warn the use ofrubygems_version=
orspecification_version=
in a gemspec file.Describe alternatives you've considered
Or merge them with
Gemspec/DateAssignment
and rename it?Additional context
For example, Jeweler and the gems created by it (e.g. OS) use these fields.
https://github.com/technicalpickles/jeweler/blob/2ab86309fc2494ba2a4e9c86c514742cd4f681c2/jeweler.gemspec#L193
https://github.com/rdp/os/blob/1245b3a1821c5cf0ff5167069f70b70658752491/os.gemspec#L42
The text was updated successfully, but these errors were encountered: