File: load_global_config.rb

package info (click to toggle)
ruby-simplecov 0.22.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,512 kB
  • sloc: ruby: 5,550; makefile: 10
file content (8 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
# frozen_string_literal: true

require "etc"
home_dir = (ENV["HOME"] && File.expand_path("~")) || Etc.getpwuid.dir || (ENV["USER"] && File.expand_path("~#{ENV['USER']}"))
if home_dir
  global_config_path = File.join(home_dir, ".simplecov")
  load global_config_path if File.exist?(global_config_path)
end