# CommandKit

[![Gem Version](https://img.shields.io/gem/v/command_kit.svg?style=flat)][gem-version]
[![Dependency Status](https://img.shields.io/gemnasium/tabolario/command_kit.svg?style=flat)][dependency-status]
[![Build Status](https://img.shields.io/travis/tabolario/command_kit.svg?style=flat)][build-status]
[![Code Climate](https://img.shields.io/codeclimate/github/tabolario/command_kit.svg?style=flat)][code-climate]
[![Coverage Status](https://img.shields.io/coveralls/tabolario/command_kit.svg?style=flat)][coverage-status]
[![Inline docs](http://inch-ci.org/github/tabolario/command_kit.svg?branch=master&style=flat)][inline-docs]

[gem-version]: https://rubygems.org/gems/command_kit
[dependency-status]: https://gemnasium.com/tabolario/command_kit
[build-status]: https://travis-ci.org/tabolario/command_kit
[code-climate]: https://codeclimate.com/github/tabolario/command_kit
[coverage-status]: https://coveralls.io/r/tabolario/command_kit?branch=master
[inline-docs]: http://inch-ci.org/github/tabolario/command_kit

**Warning: This gem is currently in its initial iteration and may not yet function as shown here in the readme.**

An opinionated framework for command-line applications.

## Requirements

* Ruby 2.2+ (CommandKit is tested with Ruby 2.2.0)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'command_kit', github: 'tabolario/command_kit'
```

Or install the gem with:

    $ gem install command_kit

## Getting started

TODO: Write getting started instructions here.

## Configuration

TODO: Write configuration instructions here.

## Usage

TODO: Write usage instructions here.

## Documentation

See the [YARD documentation](http://rdoc.info/github/tabolario/command_kit) for the latest API documentation.

Generate local documentation with YARD (output to the `doc` directory):

    $ bundle exec rake yard

## Support

* [![Gitter chat](https://badges.gitter.im/tabolario/command_kit.png)](https://gitter.im/tabolario/command_kit)
* [GitHub Issues](https://github.com/tabolario/command_kit/issues)
* Email: [tony@tabolario.com](mailto:tony@tabolario.com)
* Twitter: [@tabolario](https://twitter.com/tabolario)

## Development and testing

CommandKit follows the [Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide) for style conventions, with a few exceptions. See
[.rubocop.yml](https://github.com/tabolario/command_kit/blob/master/.rubocop.yml) for the details.

Run linters ([RuboCop](https://github.com/bbatsov/rubocop) and [Inch](https://github.com/rrrene/inch)):

    $ bundle exec rake lint

Run tests:

    $ bundle exec rake spec

Install pre-commit hooks for [overcommit](https://github.com/causes/overcommit) (configuration is in
[.overcommit.yml](https://github.com/tabolario/command_kit/blob/master/.overcommit.yml)):

    $ gem install overcommit
    $ overcommit --install

## Security

### Installation

CommandKit is cryptographically signed. To be sure the gem you install hasn't been tampered with, add my public key (if you haven't already)
as a trusted certificate:

    $ gem cert --add <(curl -Ls https://raw.githubusercontent.com/tabolario/command_kit/master/tabolario.pem)

Installing the gem with the MediumSecurity trust profile will verify all signed gems, but allow the installation of unsigned dependencies:

    $ gem install command_kit -P MediumSecurity

You can also set the trust file for Bundler:

    $ bundle --trust-policy MediumSecurity

Using the MediumSecurity policy is often necessary because not all of your dependencies may not be signed, so HighSecurity is not an option.

### Reporting Security Issues

If you have discovered an issue with CommandKit of a sensitive nature that could compromise the security of CommandKit users, **please
report it securely by sending a GPG-encrypted message instead of filing an issue on GitHub**. Please use the following key and send your
report to [tony@tabolario.com](mailto:tony@tabolario.com).

[https://raw.githubusercontent.com/tabolario/command_kit/master/tabolario.gpg](https://raw.githubusercontent.com/tabolario/command_kit/master/tabolario.gpg)

The fingerprint of the key should be:

    6EED 2359 968F 7734 06A4 AB56 D90E 487A 60F1 0579

## Contributing

See [CONTRIBUTING.md](https://github.com/tabolario/command_kit/blob/master/CONTRIBUTING.md) for full information on how to contribute to
CommandKit.

## Release process

CommandKit follows [Semver 2.0.0](http://semver.org/spec/v2.0.0.html) for release versioning. The version number components X.Y.Z have the
following meanings:

* X for **Major** releases that may contain **backwards-incompatible** changes.
* Y for **Minor** releases that may contain features, bug fixes, and **backwards-compatible** changes.
* Z for **Patch** releases that only contain bug fixes and trivial changes.

**Pre-release** versions like `X.Y.Z.alpha.0` and `X.Y.Z.beta.1` will be made before **Major**, and **Minor** versions. Pre-release versions
are well-tested, but not as thoroughly as the versions that they precede.

Whenever a new version is made, it will be tagged as a release on [GitHub Releases](https://github.com/tabolario/command_kit/releases) and
pushed to [RubyGems](https://rubygems.org/gems/command_kit). Entries in
[CHANGELOG.md](https://github.com/tabolario/command_kit/blob/master/CHANGELOG.md) will be made incrementally up to the release. An
announcement will also be made on [Twitter](https://twitter.com/tabolario) and [RubyFlow](http://rubyflow.com/).

When a new **Major** version is made, a corresponding branch will be created named `X-0-0` for further **Minor** and **Patch** releases on that version.

## Todo

See the [issue tracker](https://github.com/tabolario/command_kit/issues?q=is%3Aopen+is%3Aissue+label%3Atodo) for the current list of todos.

## License

&copy; 2014 Tony Burns

**MIT License**

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
