Skip to content

Commit

Permalink
Switch to kramdown and remove github flavored markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
theincognitocoder committed May 20, 2018
1 parent 4cb1917 commit 00d55cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .yardopts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--title 'Semver String'
--output-dir docs
--markup markdown
--markup-provider rdiscount
--markup-provider kramdown
--hide-api private
--no-progress
--plugin sitemap
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ group 'development' do
end

group 'documentation' do
gem 'rdiscount', '~> 2.2'
gem 'kramdown'
gem 'yard', '~> 0.9'
end
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ Semver String

Add semver-string to your project's Gemfile and then bundle install.

```ruby
~~~
gem 'semver-string', '~> 1'
```
~~~

## Basic Usage

Begin by requiring the gem:

```ruby
~~~
require 'semver/string'
```
~~~

You can construct a `Semver::String` from a Ruby String:

```ruby
~~~
version = Semver::String.parse('1.2.3-rc.1+build-123456789')
version.major #=> 1
version.minor #=> 2
version.patch #=> 3
version.pre_release #=> "rc.1"
version.build_metadata #=> "build-123456789"
```
~~~

You can also construct one from the semver components:

```ruby
~~~
# only major, minor, and patch are required
version = Semver::String.new(
major: 1,
Expand All @@ -50,14 +50,14 @@ version = Semver::String.new(
build_metadata: 'build-123456789')
version.to_s #=> "1.2.3-rc.1+build-123456789"
```
~~~

`Semver::String` objects can be compared and sorted. Sorting is done
according to the rules defined at [semver.org](https://semver.org/).

```
~~~
Semver::String.parse('1.10.0') < Semver::String.parse('1.2.0') #=> false
```
~~~

## License

Expand Down
5 changes: 2 additions & 3 deletions lib/semver/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
module Semver
# A helper class for working with semantic versioning strings.
#
# ```ruby
# ~~~
# version = Semver::String.new('1.2.3-alpha+build-123')
#
# version.major #=> 1
Expand All @@ -17,8 +17,7 @@ module Semver
# version.pre_release #=> alpha
# version.build_metadata #=> build-123
# version.to_s #=> "1.2.3-alpha+build-123"
# ```
#
# ~~~
class String

# @param [String] string
Expand Down

0 comments on commit 00d55cf

Please sign in to comment.