class Bundler::Thor::Runner
def thorfiles(relevant_to = nil, skip_lookup = false)
5. c:\ <-- no Bundler::Thorfiles found!
4. c:\Documents and Settings
3. c:\Documents and Settings\james
2. c:\Documents and Settings\james\dev
1. c:\Documents and Settings\james\dev\thor
Suppose we start at c:\Documents and Settings\james\dev\thor ...
3. /Users/wycats <-- we find a Bundler::Thorfile here, so we stop
2. /Users/wycats/dev
1. /Users/wycats/dev/thor
If we start at /Users/wycats/dev/thor ...
==== Example
Bundler::Thorfiles can override them.
We also ensure that system-wide Bundler::Thorfiles are loaded first, so local
directory of your system. If at any time we find a Bundler::Thor file, we stop.
Finds Bundler::Thorfiles by traversing from your current directory down to the root
def thorfiles(relevant_to = nil, skip_lookup = false) thorfiles = [] unless skip_lookup Pathname.pwd.ascend do |path| thorfiles = Bundler::Thor::Util.globs_for(path).map { |g| Dir[g] }.flatten break unless thorfiles.empty? end end files = (relevant_to ? thorfiles_relevant_to(relevant_to) : Bundler::Thor::Util.thor_root_glob) files += thorfiles files -= ["#{thor_root}/thor.yml"] files.map! do |file| File.directory?(file) ? File.join(file, "main.thor") : file end end