haf/semver — pull request #3 by jameschildress (2013-06-04 14:54:41+00:00)
Title: Introducing XSemVer::Runner

#### Refactoring
Hello again! I wanted to update the `bin/semver`console tool to use the features introduced in my previous pull request. Unfortunately, that file was basically one long, untested case statement. To simplify this and future contributions, I refactored most of the `bin/semver` code into the `XSemVer::Runner` class, which uses methods and aliases instead of a case statement to handle branching code.

#### Testing
I've added a comprehensive set of specs to `spec/runner_spec.rb` which tests every command that can be run from the console.

#### New Commands
After the existing commands were tested, I added two new commands to the console tool:
- `semver meta[data] [STRING]` updates the metadata for the `.semver` file.
- `semver pre[release] [STRING]` just aliases to `semver special`, but was added to be consistent with the SemVer 2.0.0-rc2 specification language

#### Updated README and Version Number
The `README.md` file and `semver help` command have been updated to reference the new commands. The version of this gem has been incremented to 3.3.0.

#### To-Do
I stubbed the `SemVer::FILE_NAME` constant in `spec/runner_spec.rb`. This will cause the `spec/semver_spec.rb` specs to fail if both files are run together using the `rspec spec/` command. For the tests to pass, both files must be run separately.

To fix this, I intend to move `SemVer::FILE_NAME` from a constant into a class method, so that it can be stubbed on a per-test basis without breaking other tests.