A summary of data about the Ruby ecosystem.

https://github.com/librariesio/semantic_range

:card_index: Parse and compare semantic version numbers and ranges
https://github.com/librariesio/semantic_range

Keywords from Contributors

activerecord activejob mvc rubygems background-jobs jobs sidekiq rack feature-flag

Last synced: about 21 hours ago
JSON representation

Repository metadata

:card_index: Parse and compare semantic version numbers and ranges

README.md

SemanticRange

node-semver written in Ruby for comparison and inclusion of semantic versions and ranges.

NOTE: current master and releases >= 3 use keyword arguments instead of positional arguments to pass options.
If you used SemanticRange.compare(a, b, true) in SemanticRange 2, in SemanticRange 3 use SemanticRange.compare(a, b, loose: true)

Installation

Add this line to your application's Gemfile:

gem 'semantic_range'

And then execute:

$ bundle

Or install it yourself as:

$ gem install semantic_range

Usage

SemanticRange.valid?('1.2.3') # true
SemanticRange.valid?('a.b.c') # false
SemanticRange.valid('1.2.3') # '1.2.3'
SemanticRange.valid('a.b.c') # nil
SemanticRange.clean('  =v1.2.3   ') # '1.2.3'
SemanticRange.filter(['0.9.0', '1.3.0', '1.5.0', '2.0.5'], '1.3.0 || <1.0.0 || >2.0.0') # ['0.9.0', '1.3.0', '2.0.5']
SemanticRange.satisfies?('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') # true
SemanticRange.gt?('1.2.3', '9.8.7') # false
SemanticRange.lt?('1.2.3', '9.8.7') # true

Options

All functions support optional keyword arguments that modify default behavior. The options supported are:

  • loose Be more forgiving about not-quite-valid semver strings. Any resulting output will always be 100% strict compliant. false by default.

Some functions support platform option:

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/librariesio/semantic_range. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 128
Total Committers: 13
Avg Commits per committer: 9.846
Development Distribution Score (DDS): 0.367

Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Andrew Nesbitt a****z@g****m 81
Kris Handley h****s@g****m 21
Jeremy Katz j****y@t****m 5
Tyrel Souza t****a@g****m 4
Travis Collins t****x@g****m 3
Roman Sokhan p****k@g****m 3
Keith Barrette e****b@g****m 3
Tieg Zaharia t****a@g****m 2
Olle Jonsson o****n@a****m 2
jsonperl j****l@g****m 1
Zeke Sikelianos z****e@s****m 1
Rodrigo Fernandes r****o@g****m 1
Geremia Taglialatela t****v@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 7 days ago

Total issues: 42
Total pull requests: 42
Average time to close issues: 9 days
Average time to close pull requests: about 13 hours
Total issue authors: 3
Total pull request authors: 15
Average comments per issue: 0.67
Average comments per pull request: 1.14
Merged pull request: 37
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/librariesio/semantic_range

Top Issue Authors

  • andrew (38)
  • rtfpessoa (3)
  • rochefort (1)

Top Pull Request Authors

  • krishandley (20)
  • tyrelsouza (2)
  • kbarrette (2)
  • lhtest429 (2)
  • tradiff (2)
  • pustomytnyk (2)
  • andrew (2)
  • olleolleolle (2)
  • tagliala (2)
  • katzj (1)
  • rtfpessoa (1)
  • zeke (1)
  • jsonperl (1)
  • casperisfine (1)
  • tiegz (1)

Top Issue Labels

  • help wanted (37)
  • enhancement (34)
  • dependency (1)
  • bug (1)

Top Pull Request Labels


Package metadata

gem.coop: semantic_range

node-semver rewritten in ruby, for comparison and inclusion of semantic versions and ranges

  • Homepage: https://libraries.io/github/librariesio/semantic_range
  • Documentation: http://www.rubydoc.info/gems/semantic_range/
  • Licenses: MIT
  • Latest release: 3.1.1 (published 7 days ago)
  • Last Synced: 2026-03-01T11:02:34.314Z (2 days ago)
  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 59,141,189 Total
  • Docker Downloads: 17,562,781
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.155%
    • Downloads: 0.464%
  • Maintainers (3)
rubygems.org: semantic_range

node-semver rewritten in ruby, for comparison and inclusion of semantic versions and ranges

  • Homepage: https://libraries.io/github/librariesio/semantic_range
  • Documentation: http://www.rubydoc.info/gems/semantic_range/
  • Licenses: MIT
  • Latest release: 3.1.1 (published 7 days ago)
  • Last Synced: 2026-02-27T20:00:52.630Z (4 days ago)
  • Versions: 13
  • Dependent Packages: 7
  • Dependent Repositories: 33,210
  • Downloads: 59,123,827 Total
  • Docker Downloads: 17,562,781
  • Rankings:
    • Dependent repos count: 0.185%
    • Downloads: 0.487%
    • Docker downloads count: 1.112%
    • Dependent packages count: 2.484%
    • Average: 3.757%
    • Forks count: 7.159%
    • Stargazers count: 11.117%
  • Maintainers (1)

Dependencies

Gemfile rubygems
  • guard-rspec >= 0
semantic_range.gemspec rubygems
  • rspec ~> 3.4 development

Score: 24.745870134049603