Method: Bundler::Thor::Util.thor_root_glob

Defined in:
lib/bundler/vendor/thor/lib/thor/util.rb

.thor_root_globObject

Returns the files in the thor root. On Windows thor_root will be something like this:

C:\Documents and Settings\james\.thor

If we don’t #gsub the \ character, Dir.glob will fail.

[View source]

203
204
205
206
207
208
209
# File 'lib/bundler/vendor/thor/lib/thor/util.rb', line 203

def thor_root_glob
  files = Dir["#{escape_globs(thor_root)}/*"]

  files.map! do |file|
    File.directory?(file) ? File.join(file, "main.thor") : file
  end
end