class CucumberStatistics::Configuration

Public Class Methods

clean_tmp_dir() click to toggle source
# File lib/cucumber_statistics/configuration.rb, line 10
def clean_tmp_dir
  FileUtils.rm_r tmp_dir
end
resolve_path_from_root(relative_path) click to toggle source
# File lib/cucumber_statistics/configuration.rb, line 29
def resolve_path_from_root(relative_path)
  if defined?(Rails)
    Rails.root.join(relative_path)
  elsif defined?(Rake.original_dir)
    File.expand_path(relative_path, Rake.original_dir)
  else
    File.expand_path(relative_path, Dir.pwd)
  end
end
result_combined_statistics() click to toggle source
# File lib/cucumber_statistics/configuration.rb, line 25
def result_combined_statistics
  tmp_file('combined_statistics.html')
end
tmp_dir() click to toggle source
# File lib/cucumber_statistics/configuration.rb, line 14
def tmp_dir
  dir = resolve_path_from_root $tmp_path
  FileUtils.mkdir_p dir unless File.exists? dir

  dir
end
tmp_file(filename) click to toggle source
# File lib/cucumber_statistics/configuration.rb, line 21
def tmp_file(filename)
  "#{tmp_dir}/#{filename}"
end