Skip to content

Gem::Requirement add SemVer operator #1919

@fulldecent

Description

@fulldecent

I'm would like to suggest a feature.

My current problem is SemVer is too hard to implement.

This issue is related to:

  • Publishing a library
  • The command line gem

I will abide by the [code of conduct] (https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). ✅


This is regarding the Gem::Requirement class, documented at https://ruby-doc.org/stdlib-2.1.0/libdoc/rubygems/rdoc/Gem/Requirement.html

This issue proposes to add a new operator to compare Semantic Versions. See http://semver.org/

Currently we can express:

rack ~> 1.2.1 (which means >= 1.2.1 and < 1.3.0)

But it will be more valuable if we can express

rack ~~> 1.2.1 (which means >= 1.2.1 and < 2.0.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions