Sha256: f873c35832b38728169c450afa3a5e957d6661bd1b1f2f3da348d41e93898171
Contents?: true
Size: 522 Bytes
Versions: 7
Compression:
Stored size: 522 Bytes
Contents
require 'rbconfig' class PDFKit module OS def self.host_is_windows? !(RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince/).nil? end def self.shell_escape_for_os(args) if (host_is_windows?) # Windows reserved shell characters are: & | ( ) < > ^ # See http://technet.microsoft.com/en-us/library/cc723564.aspx#XSLTsection123121120120 args.map { |arg| arg.gsub(/([&|()<>^])/,'^\1') }.join(" ") else args.shelljoin end end end end
Version data entries
7 entries across 7 versions & 1 rubygems