Sha256: cbd811527e1fb40b07f98d2b452b91a24f84c23c8caef988fd6188a11bdde23f

Contents?: true

Size: 293 Bytes

Versions: 21

Compression:

Stored size: 293 Bytes

Contents

require 'securerandom'

#module Wixgem

def temp_directory
	tmp_file = "#{ENV['TEMP'].gsub(/\\/,'/')}/#{SecureRandom.hex}"
	FileUtils.mkpath(tmp_file)
	begin
		yield tmp_file
	rescue Exception => e
	  raise e
	ensure
	  sleep(0.1)
	  FileUtils.rm_rf(tmp_file)
	end
end

#end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
wixgem-0.113.0 lib/temp_directory.rb
wixgem-0.112.0 lib/temp_directory.rb
wixgem-0.111.0 lib/temp_directory.rb
wixgem-0.110.0 lib/temp_directory.rb
wixgem-0.108.0 lib/temp_directory.rb
wixgem-0.107.0 lib/temp_directory.rb
wixgem-0.106.0 lib/temp_directory.rb
wixgem-0.105.0 lib/temp_directory.rb
wixgem-0.104.0 lib/temp_directory.rb
wixgem-0.103.0 lib/temp_directory.rb
wixgem-0.102.0 lib/temp_directory.rb
wixgem-0.101.0 lib/temp_directory.rb
wixgem-0.100.0 lib/temp_directory.rb
wixgem-0.99.0 lib/temp_directory.rb
wixgem-0.93.0 lib/temp_directory.rb
wixgem-0.90.0 lib/temp_directory.rb
wixgem-0.89.0 lib/temp_directory.rb
wixgem-0.88.0 lib/temp_directory.rb
wixgem-0.87.0 lib/temp_directory.rb
wixgem-0.85.0 lib/temp_directory.rb