49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/toe/test.rb', line 49
def process(*args)
options = [load_code]
opts.each {|opt| options << (opt[0] == ?- ? opt : "-#{opt}") }
libs.each {|path| options << "-I\"#{File.expand_path(path)}\"" }
options = options.join(" ")
files = globs.collect do |glob|
Dir.glob(glob).select do |path|
File.file?(path) && path =~ filter
end
end.flatten!
if files.empty?
log :warn, "no files found for: #{globs.inspect}", Logger::WARN
end
files.collect! {|path| "\"#{path}\""}
files = [files.join(' ')] unless iterate
files.each do |path|
cmds.each do |cmd|
sh(cmd, options, path)
end
end
end
|