Sha256: a7582e701f68cc478ac6bc5e2bc168c2929934f1d013259307284d88c57060f0

Contents?: true

Size: 294 Bytes

Versions: 10

Compression:

Stored size: 294 Bytes

Contents

require "pathname"
require "securerandom"
require "tmpdir"
require "fileutils"

def tmpdir
  @tmp_dir ||= begin
    system_tmp = Dir.tmpdir
    random_hash = SecureRandom.hex(10)

    Pathname.new(system_tmp).join("boxes-#{random_hash}")
  end
end

def mktmpdir
  FileUtils.mkdir_p(tmpdir)
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
boxes-3.7.0 spec/support/tmp.rb
boxes-3.6.1 spec/support/tmp.rb
boxes-3.6.0 spec/support/tmp.rb
boxes-3.5.0 spec/support/tmp.rb
boxes-3.4.0 spec/support/tmp.rb
boxes-3.3.1 spec/support/tmp.rb
boxes-3.3.0 spec/support/tmp.rb
boxes-3.2.0 spec/support/tmp.rb
boxes-3.1.0 spec/support/tmp.rb
boxes-3.0.0 spec/support/tmp.rb