Sha256: c2a754d2f7cdd94a059c79e01c07c4ebab5f39720595841dd2e0d6a6dc116dfe
Contents?: true
Size: 450 Bytes
Versions: 8
Compression:
Stored size: 450 Bytes
Contents
module VagrantWindows module Helper extend self def win_friendly_path(path) if path new_path = path.gsub('/', '\\') new_path = "c:#{new_path}" if new_path =~ /^\\/ end new_path end # turns '/vagrant' into 'vagrant' or turns ''/a/b/c/d/e' into 'a_b_c_d_e' def win_friendly_share_id(shared_folder_name) return shared_folder_name.gsub(/[\/\/]/,'_').sub(/^_/, '') end end end
Version data entries
8 entries across 8 versions & 2 rubygems