README.md in mixlib-versioning-1.1.0 vs README.md in mixlib-versioning-1.2.1
- old
+ new
@@ -1,34 +1,30 @@
# Mixlib::Versioning
-[](https://travis-ci.org/chef/mixlib-versioning)
-[](https://codeclimate.com/github/chef/mixlib-versioning)
+[](https://travis-ci.org/chef/mixlib-versioning) [](https://codeclimate.com/github/chef/mixlib-versioning)
This project is managed by the CHEF Release Engineering team. For more information on the Release Engineering team's contribution, triage, and release process, please consult the [CHEF Release Engineering OSS Management Guide](https://docs.google.com/a/chef.io/document/d/1oJB0vZb_3bl7_ZU2YMDBkMFdL-EWplW1BJv_FXTUOzg/edit).
-Versioning is hard! `mixlib-versioning` is a general Ruby library that allows
-you to parse, compare and manipulate version numbers in multiple formats.
-Currently the following version string formats are supported:
+Versioning is hard! `mixlib-versioning` is a general Ruby library that allows you to parse, compare and manipulate version numbers in multiple formats. Currently the following version string formats are supported:
-### SemVer 2.0.0
+## SemVer 2.0.0
**Specification:**
-http://semver.org/
+<http://semver.org/>
**Supported Formats:**
```text
MAJOR.MINOR.PATCH
MAJOR.MINOR.PATCH-PRERELEASE
MAJOR.MINOR.PATCH-PRERELEASE+BUILD
```
-Not much to say here except: *YUNO USE SEMVER!* The specification is focused and
-brief, do yourself a favor and go read it.
+Not much to say here except: _YUNO USE SEMVER!_ The specification is focused and brief, do yourself a favor and go read it.
-### Opscode SemVer
+## Opscode SemVer
**Supported Formats:**
```text
MAJOR.MINOR.PATCH
@@ -41,15 +37,13 @@
MAJOR.MINOR.PATCH-alpha.INDEX+YYYYMMDDHHMMSS.git.COMMITS_SINCE.SHA1
MAJOR.MINOR.PATCH-beta.INDEX+YYYYMMDDHHMMSS.git.COMMITS_SINCE.SHA1
MAJOR.MINOR.PATCH-rc.INDEX+YYYYMMDDHHMMSS.git.COMMITS_SINCE.SHA1
```
-All the fun of regular SemVer with some extra limits around what constitutes a
-valid pre-release or build version string.
+All the fun of regular SemVer with some extra limits around what constitutes a valid pre-release or build version string.
-Valid prerelease version strings use the format: `PRERELEASE_STAGE.INDEX`.
-Valid prerelease stages include: `alpha`, `beta` and `rc`.
+Valid prerelease version strings use the format: `PRERELEASE_STAGE.INDEX`. Valid prerelease stages include: `alpha`, `beta` and `rc`.
All of the following are acceptable Opscode SemVer pre-release versions:
```text
11.0.8-alpha.0
@@ -58,13 +52,11 @@
11.0.8-beta.8
11.0.8-rc.1
11.0.8-rc.2
```
-Build version strings are limited to timestamps (`YYYYMMDDHHMMSS`), git
-describe strings (`git.COMMITS_SINCE.SHA1`) or a combination of the two
-(`YYYYMMDDHHMMSS.git.COMMITS_SINCE.SHA1`).
+Build version strings are limited to timestamps (`YYYYMMDDHHMMSS`), git describe strings (`git.COMMITS_SINCE.SHA1`) or a combination of the two (`YYYYMMDDHHMMSS.git.COMMITS_SINCE.SHA1`).
All of the following are acceptable Opscode build versions:
```text
11.0.8+20130308110833
@@ -77,28 +69,26 @@
```text
11.0.8-rc.1+20130308110833
11.0.8-alpha.2+20130308110833.git.2.94a1dde
```
-### Rubygems
+## Rubygems
**specification:**
-http://docs.rubygems.org/read/chapter/7
+<http://docs.rubygems.org/read/chapter/7>
-http://guides.rubygems.org/patterns/
+<http://guides.rubygems.org/patterns/>
**Supported Formats:**
```text
MAJOR.MINOR.PATCH
MAJOR.MINOR.PATCH.PRERELEASE
```
-Rubygems is *almost* SemVer compliant but it separates the main version from
-the pre-release version using a "dot". It also does not have the notion of a
-build version like SemVer.
+Rubygems is _almost_ SemVer compliant but it separates the main version from the pre-release version using a "dot". It also does not have the notion of a build version like SemVer.
Examples of valid Rubygems version strings:
```text
10.1.1
@@ -106,15 +96,15 @@
10.1.1.alpha.1
10.1.1.beta.1
10.1.1.rc.0
```
-### Git Describe
+## Git Describe
**Specification:**
-http://git-scm.com/docs/git-describe
+<http://git-scm.com/docs/git-describe>
**Supported Formats:**
```text
MAJOR.MINOR.PATCH-COMMITS_SINCE-gGIT_SHA1
@@ -130,23 +120,46 @@
10.16.2.rc.1-49-g21353f0-1
11.0.0-alpha-10-g642ffed
11.0.0-alpha.1-1-gcea071e
```
+
+## SemVer Partial
+
+
+```text
+MAJOR
+MAJOR.MINOR
+```
+
+Examples of valid SemVer Partial version strings:
+
+```text
+1
+0.1
+1.0
+```
+
## Installation
Add this line to your application's Gemfile:
- gem 'mixlib-versioning'
+```
+gem 'mixlib-versioning'
+```
And then execute:
- $ bundle
+```
+$ bundle
+```
Or install it yourself as:
- $ gem install mixlib-semver
+```
+$ gem install mixlib-semver
+```
## Usage
### Basic Version String Parsing
@@ -334,19 +347,24 @@
```
rake yard
```
+## Contributing
+
+For information on contributing to this project see <https://github.com/chef/chef/blob/master/CONTRIBUTING.md>
+
## License
| | |
|:---------------------|:-----------------------------------------|
| **Author:** | Seth Chisamore (schisamo@chef.io)
| **Author:** | Christopher Maier (cm@chef.io)
-| **Copyright:** | Copyright (c) 2013 Opscode, Inc.
+| **Copyright:** | Copyright (c) 2013-2017 Chef Software, Inc.
| **License:** | Apache License, Version 2.0
+```text
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -354,5 +372,6 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+```