{"id":19339016,"url":"https://github.com/librariesio/semantic_range","last_synced_at":"2025-04-04T02:09:21.947Z","repository":{"id":49509807,"uuid":"46054608","full_name":"librariesio/semantic_range","owner":"librariesio","description":":card_index: Parse and compare semantic version numbers and ranges","archived":false,"fork":false,"pushed_at":"2024-11-04T15:03:56.000Z","size":151,"stargazers_count":23,"open_issues_count":3,"forks_count":15,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T15:06:12.149Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://libraries.io/github/librariesio/semantic_range","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/librariesio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-12T13:29:08.000Z","updated_at":"2025-01-30T22:54:35.000Z","dependencies_parsed_at":"2024-06-18T16:55:13.216Z","dependency_job_id":"246c0bba-5e45-4ecb-b94f-939842c70ad8","html_url":"https://github.com/librariesio/semantic_range","commit_stats":{"total_commits":127,"total_committers":15,"mean_commits":8.466666666666667,"dds":"0.36220472440944884","last_synced_commit":"79e575a489f4f087b0567dfcbf3b07b3f831e124"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Fsemantic_range","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Fsemantic_range/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Fsemantic_range/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Fsemantic_range/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librariesio","download_url":"https://codeload.github.com/librariesio/semantic_range/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247056798,"owners_count":20876463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:19:30.426Z","updated_at":"2025-04-04T02:09:21.919Z","avatar_url":"https://github.com/librariesio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SemanticRange\n\n[node-semver](https://github.com/npm/node-semver) written in Ruby for comparison and inclusion of semantic versions and ranges.\n\n**NOTE: current `master` and releases `\u003e= 3` use keyword arguments instead of positional arguments to pass options.\nIf you used `SemanticRange.compare(a, b, true)` in SemanticRange 2, in SemanticRange 3 use `SemanticRange.compare(a, b, loose: true)`**\n\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'semantic_range'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install semantic_range\n\n## Usage\n\n```ruby\nSemanticRange.valid?('1.2.3') # true\nSemanticRange.valid?('a.b.c') # false\nSemanticRange.valid('1.2.3') # '1.2.3'\nSemanticRange.valid('a.b.c') # nil\nSemanticRange.clean('  =v1.2.3   ') # '1.2.3'\nSemanticRange.filter(['0.9.0', '1.3.0', '1.5.0', '2.0.5'], '1.3.0 || \u003c1.0.0 || \u003e2.0.0') # ['0.9.0', '1.3.0', '2.0.5']\nSemanticRange.satisfies?('1.2.3', '1.x || \u003e=2.5.0 || 5.0.0 - 7.2.3') # true\nSemanticRange.gt?('1.2.3', '9.8.7') # false\nSemanticRange.lt?('1.2.3', '9.8.7') # true\n```\n\n### Options\nAll functions support optional keyword arguments that modify default behavior. The options supported are:\n* `loose` Be more forgiving about not-quite-valid semver strings. Any resulting output will always be 100% strict compliant. `false` by default.\n\nSome functions support `platform` option:\n* `platform` Changes behavior for `'Rubygems'` and `'Packagist'`. `nil` by default. See https://github.com/librariesio/semantic_range/issues/59\n\n\n## Development\n\nAfter 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.\n\nTo 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](https://rubygems.org).\n\n## Contributing\n\nBug 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](https://www.contributor-covenant.org/) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrariesio%2Fsemantic_range","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrariesio%2Fsemantic_range","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrariesio%2Fsemantic_range/lists"}