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
178
179
180
181
182
183
|
# File 'lib/fuburake.rb', line 178
def cleanDirectory(dir)
puts 'Cleaning directory ' + dir
FileUtils.rm_rf dir;
waitfor { !exists?(dir) }
Dir.mkdir dir
end
|
#cleanFile(file) ⇒ Object
185
186
187
|
# File 'lib/fuburake.rb', line 185
def cleanFile(file)
File.delete file unless !File.exist?(file)
end
|
#copyOutputFiles(fromDir, filePattern, outDir) ⇒ Object
163
164
165
166
167
|
# File 'lib/fuburake.rb', line 163
def copyOutputFiles(fromDir, filePattern, outDir)
Dir.glob(File.join(fromDir, filePattern)){|file|
copy(file, outDir) if File.file?(file)
}
end
|
#waitfor(&block) ⇒ Object
169
170
171
172
173
174
175
176
|
# File 'lib/fuburake.rb', line 169
def waitfor(&block)
checks = 0
until block.call || checks >10
sleep 0.5
checks += 1
end
raise 'waitfor timeout expired' if checks > 10
end
|