Runcom

Gem Version Code Climate GPA Code Climate Coverage Gemnasium Status Travis CI Status Patreon

A run command manager for command line interfaces (CLI). It manages/resolves local or global resource (i.e. .<program>rc) settings for CLIs.

Table of Contents

Features

  • Loads local or global YAML resource configurations.
  • Automatically detects and resolves local or global resource configurations.
  • Provides support for merging of nested/complex configurations.
  • Supports hash representation of configuration.

Requirements

  1. Ruby 2.3.1

Setup

For a secure install, type the following (recommended):

gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
gem install runcom --trust-policy MediumSecurity

NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification while allowing the installation of unsigned dependencies since they are beyond the scope of this gem.

For an insecure install, type the following (not recommended):

gem install runcom

Add the following to your Gemfile:

gem "runcom"

Usage

Start by leveraging the Runcom::Configuration object as follows:

configuration = Runcom::Configuration.new file_name: ".examplerc"

There is optional support for default settings too:

configuration = Runcom::Configuration.new file_name: ".examplerc", defaults: {name: "Example"}

Default settings will be overwitten if matching local or global setting keys are detected. Order of precedence is determined as follows:

  1. Local (i.e. <current working directory>/.examplerc)
  2. Global (i.e. $HOME/.examplerc)
  3. Defaults (i.e. {} unless specified upon initialization).

If multiple settings are detected, only the first one found will be used.

For further details, study the public interface as provided by the Runcom::Configuration object.

Tests

To test, run:

bundle exec rake

Versioning

Read Semantic Versioning for details. Briefly, it means:

  • Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
  • Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
  • Major (X.y.z) - Incremented for any backwards incompatible public API changes.

Code of Conduct

Please note that this project is released with a CODE OF CONDUCT. By participating in this project you agree to abide by its terms.

Contributions

Read CONTRIBUTING for details.

License

Copyright (c) 2016 Alchemists. Read LICENSE for details.

History

Read CHANGES for details. Built with Gemsmith.

Credits

Developed by Brooke Kuhlmann at Alchemists.