Top Level Namespace
- Includes:
- FileTest, FileUtils
Defined Under Namespace
Modules: FubuRake, Nuget, Platform
Classes: MSBuildRunner, NUnitRunner
Instance Method Summary
collapse
Instance Method Details
#cleanDirectory(dir) ⇒ Object
256
257
258
259
260
261
|
# File 'lib/fuburake.rb', line 256
def cleanDirectory(dir)
puts 'Cleaning directory ' + dir
FileUtils.rm_rf dir;
waitfor { !exists?(dir) }
Dir.mkdir dir
end
|
#cleanFile(file) ⇒ Object
263
264
265
|
# File 'lib/fuburake.rb', line 263
def cleanFile(file)
File.delete file unless !File.exist?(file)
end
|
#copyOutputFiles(fromDir, filePattern, outDir) ⇒ Object
241
242
243
244
245
|
# File 'lib/fuburake.rb', line 241
def copyOutputFiles(fromDir, filePattern, outDir)
Dir.glob(File.join(fromDir, filePattern)){|file|
copy(file, outDir) if File.file?(file)
}
end
|
#waitfor(&block) ⇒ Object
247
248
249
250
251
252
253
254
|
# File 'lib/fuburake.rb', line 247
def waitfor(&block)
checks = 0
until block.call || checks >10
sleep 0.5
checks += 1
end
raise 'waitfor timeout expired' if checks > 10
end
|