require 'timeout' require 'tmpdir' module Dev module Cmd class Clean def self.clean_tmp puts_debug "Dev::Cmd::Clean.clean_temp" begin status=Timeout::timeout(30){ puts_debug "tmp dir=#{Dir.tmpdir}" if File.exists?(Dir.tmpdir) if RUBY_PLATFORM.include?("w32") cmd="del /Q #{Dir.tmpdir.gsub('/','\\')}" puts_debug cmd `#{cmd}` if RUBY_PLATFORM.include?("w32") end end } rescue puts_debug "timeout met." end end end # class Compile end # module Cmd end # module Dev