Sha256: 18512a2b9b5094bac56b1dda142b3374f3247df4e968ef143839c3d915824ead
Contents?: true
Size: 711 Bytes
Versions: 2
Compression:
Stored size: 711 Bytes
Contents
require 'rbconfig' module RSCM module Platform def family target_os = Config::CONFIG["target_os"] or "" return "powerpc-darwin" if target_os.downcase =~ /darwin/ return "mswin32" if target_os.downcase =~ /32/ return "cygwin" if target_os.downcase =~ /cyg/ return "freebsd" if target_os.downcase =~ /freebsd/ return "freebsd" if target_os.downcase =~ /linux/ return "unknown" end module_function :family def user family == "mswin32" ? ENV['USERNAME'] : ENV['USER'] end module_function :user def prompt(dir=Dir.pwd) prompt = "#{dir.gsub(/\//, File::SEPARATOR)} #{user}$" end module_function :prompt end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
whistle-0.1 | vendor/rscm-0.5.1-patched-stripped/lib/rscm/platform.rb |
whistle-0.1.1 | vendor/rscm-0.5.1-patched-stripped/lib/rscm/platform.rb |