lib/wwtd.rb
def escaped_env(env, options={})
      return "" if env.empty?

      if options[:rerun] && gemfile = env["BUNDLE_GEMFILE"]
        env["BUNDLE_GEMFILE"] = gemfile.sub("#{Dir.pwd}/", "")
      end

      env = env.map { |k,v| "#{k}=#{Shellwords.escape(v)}" }
      if options[:rerun]
        env.join(" ") + " "
      else
        env.map { |e| "export #{e}" }.join(" && ") + " && "
      end
    end
# internal api
# needs the export to work on ruby 1.9 / linux
internal api
needs the export to work on ruby 1.9 / linux
internal api needs the export to work on ruby 1 . 9 / linux
def escaped_env(env, options={})
      return "" if env.empty?
      if options[:rerun] && gemfile = env["BUNDLE_GEMFILE"]
        env["BUNDLE_GEMFILE"] = gemfile.sub("#{Dir.pwd}/", "")
      end
      env = env.map { |k,v| "#{k}=#{Shellwords.escape(v)}" }
      if options[:rerun]
        env.join(" ") + " "
      else
        env.map { |e| "export #{e}" }.join(" && ") + " && "
      end
    end
def escaped_env ( env , options = { } ) return "" if env . empty? if options [ :rerun ] && gemfile = env [ "BUNDLE_GEMFILE" ] env [ "BUNDLE_GEMFILE" ] = gemfile . sub ( "#{Dir.pwd}/" , "" ) end env = env . map { | k , v | "#{k}=#{Shellwords.escape(v)}" } if options [ :rerun ] env . join ( " " ) + " " else env . map { | e | "export #{e}" } . join ( " && " ) + " && " end end
internal api
needs the export to work on ruby 1.9 / linux
internal api needs the export to work on ruby 1 . 9 / linux
env
options