Sha256: 461491de9135dd31e3cf484623445d88f82bb237743ff8fe8bf0175609b796d3

Contents?: true

Size: 530 Bytes

Versions: 1

Compression:

Stored size: 530 Bytes

Contents

require "sup/mbox/loader"
require "sup/mbox/ssh-file"
require "sup/mbox/ssh-loader"

module Redwood

module MBox
  BREAK_RE = /^From \S+ (.+)$/

  def is_break_line? l
    l =~ BREAK_RE or return false
    time = $1
    begin
      ## hack -- make Time.parse fail when trying to substitute values from Time.now
      Time.parse time, 0
      true
    rescue NoMethodError
      warn "found invalid date in potential mbox split line, not splitting: #{l.inspect}"
      false
    end
  end
  module_function :is_break_line?
end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sup-0.9 lib/sup/mbox.rb