Sha256: cc0a93788138c903e4fcd18b9e5780e8662d90196490eab6ec8a1f99af11ed31
Contents?: true
Size: 837 Bytes
Versions: 80
Compression:
Stored size: 837 Bytes
Contents
require 'fileutils' module AppMap module Depends module Util extend self def normalize_path(path, pwd: Dir.pwd) normalize_path_fn(pwd).(path) end def normalize_paths(paths, pwd: Dir.pwd) paths.map(&normalize_path_fn(pwd)) end def delete_appmap(appmap_path) FileUtils.rm_rf(appmap_path) appmap_file_path = [ appmap_path, 'appmap.json' ].join('.') File.unlink(appmap_file_path) if File.exist?(appmap_file_path) rescue warn "Unable to delete AppMap: #{$!}" end private def normalize_path_fn(pwd) lambda do |path| next path if AppMap::Util.blank?(path) path = path[pwd.length + 1..-1] if path.index(pwd) == 0 path.split(':')[0] end end end end end
Version data entries
80 entries across 80 versions & 1 rubygems