Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Enhances default Thor functionality.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.ruby-version
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Gemfile
Gemfile.lock
Guardfile
LICENSE.md
README.md
Rakefile
thor_plus.gemspec

README.md

Overview

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

Enhances default Thor functionality with additional convenience methods.

Features

  • Adds additional command line utilities (module) for easy inclusion into existing Thor-enhanced projects.
  • Adds the following methods:
    • editor
    • info
    • warn
    • error
    • valid_file?
    • backup_file
    • destroy_file
    • load_yaml
    • save_yaml

Requirements

  1. A UNIX-based system.
  2. Any of the following Ruby VMs:
  3. Thor.

Setup

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

gem cert --add <(curl -Ls https://www.alchemists.io/gem-public.pem)
gem install thor_plus --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 thor_plus

Usage

To enhance existing gems that already rely on Thor, add a dependency in your gemspec:

s.add_dependency "thor_plus"

Then, for any gem that already uses the Thor CLI, you can require and include Thor+ as follows:

require "thor"
require "thor/actions"
require "thor_plus/actions"

module YourGem
  class CLI < Thor
    include Thor::Actions
    include ThorPlus::Actions
  end
end

Be sure to check out the ThorPlus::Actions module for additional details and documentation.

That's it. Enjoy!

Tests

To test, run:

bundle exec rspec spec

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 and/or bug 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) 2011 Alchemists. Read the LICENSE for details.

History

Read the CHANGELOG for details. Built with Gemsmith.

Credits

Developed by Brooke Kuhlmann at Alchemists

Something went wrong with that request. Please try again.