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.203 lib/dev/cmd/Clean.rb
dev-1.0.202 lib/dev/cmd/Clean.rb
dev-1.0.201 lib/dev/cmd/Clean.rb
dev-1.0.200 lib/dev/cmd/Clean.rb
dev-1.0.199 lib/dev/cmd/Clean.rb
dev-1.0.198 lib/dev/cmd/Clean.rb
dev-1.0.197 lib/dev/cmd/Clean.rb
dev-1.0.196 lib/dev/cmd/Clean.rb
dev-1.0.195 lib/dev/cmd/Clean.rb
dev-1.0.194 lib/dev/cmd/Clean.rb
dev-1.0.193 lib/dev/cmd/Clean.rb
dev-1.0.192 lib/dev/cmd/Clean.rb
dev-1.0.191 lib/dev/cmd/Clean.rb
dev-1.0.190 lib/dev/cmd/Clean.rb
dev-1.0.189 lib/dev/cmd/Clean.rb
dev-1.0.188 lib/dev/cmd/Clean.rb
dev-1.0.187 lib/dev/cmd/Clean.rb
dev-1.0.186 lib/dev/cmd/Clean.rb
dev-1.0.185 lib/dev/cmd/Clean.rb
dev-1.0.184 lib/dev/cmd/Clean.rb