Sha256: b77146554621d2bff49fe0ff24572276b08e40caf6eb68a81edc5b89c14fc131

Contents?: true

Size: 1.12 KB

Versions: 122

Compression:

Stored size: 1.12 KB

Contents

# encoding: us-ascii
module Mail
  module Patterns
    white_space = %Q|\x9\x20|
    text        = %Q|\x1-\x8\xB\xC\xE-\x7f|
    field_name  = %Q|\x21-\x39\x3b-\x7e|
    qp_safe     = %Q|\x20-\x3c\x3e-\x7e|
    
    aspecial     = %Q|()<>[]:;@\\,."| # RFC5322
    tspecial     = %Q|()<>@,;:\\"/[]?=| # RFC2045
    lwsp         = %Q| \t\r\n|
    sp           = %Q| |
    control      = %Q|\x00-\x1f\x7f-\xff|
    
    if control.respond_to?(:force_encoding)
      control = control.force_encoding(Encoding::BINARY)
    end
    
    CRLF          = /\r\n/
    WSP           = /[#{white_space}]/
    FWS           = /#{CRLF}#{WSP}*/
    TEXT          = /[#{text}]/ # + obs-text
    FIELD_NAME    = /[#{field_name}]+/
    FIELD_BODY    = /.+/
    FIELD_LINE    = /^[#{field_name}]+:\s*.+$/
    HEADER_LINE   = /^([#{field_name}]+:\s*.+)$/

    QP_UNSAFE     = /[^#{qp_safe}]/
    QP_SAFE       = /[#{qp_safe}]/
    CONTROL_CHAR  = /[#{control}]/n
    ATOM_UNSAFE   = /[#{Regexp.quote aspecial}#{control}#{sp}]/n
    PHRASE_UNSAFE = /[#{Regexp.quote aspecial}#{control}]/n
    TOKEN_UNSAFE  = /[#{Regexp.quote tspecial}#{control}#{sp}]/n
  end
end

Version data entries

122 entries across 111 versions & 11 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
classiccms-0.7.4 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
classiccms-0.7.3 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/mail-2.4.4/lib/mail/patterns.rb
classiccms-0.7.2 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
classiccms-0.7.1 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
classiccms-0.7.0 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
mail-2.2.20 lib/mail/patterns.rb
challah-1.0.0.beta vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.5 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.4 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
active_mailer-0.0.3 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/patterns.rb
challah-0.9.1.beta.3 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
devise_sociable-0.1.0 vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb
challah-0.9.1.beta vendor/bundle/gems/mail-2.4.4/lib/mail/patterns.rb