class Object
Constants
- BUILD_VERSION
Public Instance Methods
add_dependency(from, to)
click to toggle source
# File lib/fuburake.rb, line 486 def add_dependency(from, to) if to.kind_of?(Array) to.each do |dep| add_dependency from, dep end end if !Rake::Task.task_defined?(from) return end if !Rake::Task.task_defined?(to) return end Rake::Task[from].enhance [to] end
cleanDirectory(dir)
click to toggle source
# File lib/fuburake.rb, line 470 def cleanDirectory(dir) if exists?(dir) puts 'Cleaning directory ' + dir FileUtils.rm_rf dir; waitfor { !exists?(dir) } end if dir == 'artifacts' Dir.mkdir 'artifacts' end end
cleanFile(file)
click to toggle source
# File lib/fuburake.rb, line 482 def cleanFile(file) File.delete file unless !File.exist?(file) end
copyOutputFiles(fromDir, filePattern, outDir)
click to toggle source
# File lib/fuburake.rb, line 455 def copyOutputFiles(fromDir, filePattern, outDir) Dir.glob(File.join(fromDir, filePattern)){|file| copy(file, outDir) if File.file?(file) } end
waitfor(&block)
click to toggle source
# File lib/fuburake.rb, line 461 def waitfor(&block) checks = 0 until block.call || checks >10 sleep 0.5 checks += 1 end raise 'waitfor timeout expired' if checks > 10 end