Sha256: 563c4baacc7740ca611e0cd458db94077efaead47c1a0105c63b2bfc6fbeedb3

Contents?: true

Size: 338 Bytes

Versions: 17

Compression:

Stored size: 338 Bytes

Contents

require 'fileutils'

module RSCM
  def new_temp_dir(suffix="", basedir=File.dirname(__FILE__) + "/../../target")
    identifier = identifier.to_s
    identifier.gsub!(/\(|:|\)/, '_')
    dir = "#{basedir}/temp_#{identifier}_#{Time.new.to_i}#{suffix}"
    FileUtils.mkdir_p(dir)
    dir
  end
  module_function :new_temp_dir
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rscm-0.3.3 lib/rscm/tempdir.rb
rscm-0.3.14 lib/rscm/tempdir.rb
rscm-0.3.5 lib/rscm/tempdir.rb
rscm-0.3.12 lib/rscm/tempdir.rb
rscm-0.3.16 lib/rscm/tempdir.rb
rscm-0.3.4 lib/rscm/tempdir.rb
rscm-0.3.10 lib/rscm/tempdir.rb
rscm-0.3.11 lib/rscm/tempdir.rb
rscm-0.3.13 lib/rscm/tempdir.rb
rscm-0.3.15 lib/rscm/tempdir.rb
rscm-0.3.8 lib/rscm/tempdir.rb
rscm-0.3.9 lib/rscm/tempdir.rb
rscm-0.4.0 lib/rscm/tempdir.rb
rscm-0.4.2 lib/rscm/tempdir.rb
rscm-0.3.6 lib/rscm/tempdir.rb
rscm-0.4.3 lib/rscm/tempdir.rb
rscm-0.3.7 lib/rscm/tempdir.rb