Sha256: 5bafd9faa6d4dc16d72d046e19e8d43879bc4f5a6fd9dfeab7751a37131f6603

Contents?: true

Size: 558 Bytes

Versions: 63

Compression:

Stored size: 558 Bytes

Contents

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

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
dev-1.0.182 lib/dev/cmd/Clean.rb
dev-1.0.181 lib/dev/cmd/Clean.rb
dev-1.0.180 lib/dev/cmd/Clean.rb
dev-1.0.179 lib/dev/cmd/Clean.rb
dev-1.0.178 lib/dev/cmd/Clean.rb
dev-1.0.177 lib/dev/cmd/Clean.rb
dev-1.0.176 lib/dev/cmd/Clean.rb
dev-1.0.175 lib/dev/cmd/Clean.rb
dev-1.0.174 lib/dev/cmd/Clean.rb
dev-1.0.173 lib/dev/cmd/Clean.rb
dev-1.0.172 lib/dev/cmd/Clean.rb
dev-1.0.171 lib/dev/cmd/Clean.rb
dev-1.0.170 lib/dev/cmd/Clean.rb
dev-1.0.169 lib/dev/cmd/Clean.rb
dev-1.0.168 lib/dev/cmd/Clean.rb
dev-1.0.167 lib/dev/cmd/Clean.rb
dev-1.0.166 lib/dev/cmd/Clean.rb
dev-1.0.165 lib/dev/cmd/Clean.rb
dev-1.0.164 lib/dev/cmd/Clean.rb
dev-1.0.163 lib/dev/cmd/Clean.rb