No commit activity in last 3 years
No release in over 3 years
A scripting framework that replaces rake, sake and rubigen
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.0
 Project Readme

Thor with exclude_pattern

This fork is no longer needed. Was merged and is available since thor >= 0.18

This fork added a new option :exclude_pattern => /regexp/ to the directory() method.

Directory method

Copies recursively the files from source directory to root directory. If any of the files finishes with .tt, it's considered to be a template and is placed in the destination without the extension .tt. If any empty directory is found, it's copied and all .empty_directory files are ignored. If any file name is wrapped within % signs, the text within the % signs will be executed as a method and replaced with the returned value.

If :exclude_pattern => /regexp/, it prevents copying files that match that regexp.

Specs for the added option

it "ignores files within excluding/ directories when exclude_pattern is provided" do
  invoke! "doc", "docs", :exclude_pattern => /excluding\//
  file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
  expect(File.exists?(file)).to be_false
end

it "copies and evalutes files within excluding/ directory when no exclude_pattern is present" do
  invoke! "doc", "docs"
  file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
  expect(File.exists?(file)).to be_true
  expect(File.read(file)).to eq("BAR = BAR\n")
end

Gem Version Build Status Dependency Status Code Climate Coverage Status

Thor

Description

Thor is a simple and efficient tool for building self-documenting command line utilities. It removes the pain of parsing command line options, writing "USAGE:" banners, and can also be used as an alternative to the Rake build tool. The syntax is Rake-like, so it should be familiar to most Rake users.

Installation

gem install thor

Usage and documentation

Please see the wiki for basic usage and other documentation on using Thor.

License

Released under the MIT License. See the LICENSE file for further details.