actionmailer 2.3.5 → 2.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. data/CHANGELOG +8 -0
  2. data/MIT-LICENSE +1 -1
  3. data/Rakefile +1 -1
  4. data/lib/action_mailer.rb +1 -1
  5. data/lib/action_mailer/base.rb +2 -2
  6. data/lib/action_mailer/quoting.rb +1 -0
  7. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail.rb +1 -0
  8. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +18 -0
  9. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/address.rb +4 -38
  10. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +65 -0
  11. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/base64.rb +0 -0
  12. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/compat.rb +0 -0
  13. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/config.rb +0 -0
  14. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/core_extensions.rb +0 -0
  15. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/encode.rb +9 -0
  16. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/header.rb +4 -2
  17. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/index.rb +0 -0
  18. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/interface.rb +33 -1
  19. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/loader.rb +0 -0
  20. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/mail.rb +1 -1
  21. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/mailbox.rb +3 -2
  22. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/main.rb +0 -0
  23. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/mbox.rb +0 -0
  24. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/net.rb +3 -1
  25. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/obsolete.rb +0 -0
  26. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +1060 -0
  27. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +416 -0
  28. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/port.rb +0 -0
  29. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/quoting.rb +47 -1
  30. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/require_arch.rb +0 -0
  31. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/scanner.rb +0 -0
  32. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/scanner_r.rb +2 -1
  33. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/stringio.rb +0 -0
  34. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/utils.rb +50 -25
  35. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +504 -0
  36. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +12 -0
  37. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
  38. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
  39. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
  40. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
  41. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
  42. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
  43. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
  44. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
  45. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
  46. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
  47. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
  48. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
  49. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
  50. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
  51. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
  52. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
  53. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
  54. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
  55. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
  56. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
  57. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
  58. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
  59. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
  60. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
  61. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
  62. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
  63. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
  64. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
  65. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
  66. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
  67. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
  68. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
  69. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
  70. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +168 -0
  71. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
  72. data/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/version.rb +1 -1
  73. data/lib/action_mailer/vendor/tmail.rb +2 -2
  74. data/lib/action_mailer/version.rb +1 -1
  75. data/test/abstract_unit.rb +1 -1
  76. data/test/fixtures/helpers/example_helper.rb +1 -1
  77. data/test/mail_service_test.rb +66 -2
  78. data/test/quoting_test.rb +10 -4
  79. metadata +87 -37
  80. data/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +0 -46
  81. data/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +0 -1478
@@ -32,7 +32,7 @@ module TMail
32
32
  module VERSION
33
33
  MAJOR = 1
34
34
  MINOR = 2
35
- TINY = 3
35
+ TINY = 6
36
36
 
37
37
  STRING = [MAJOR, MINOR, TINY].join('.')
38
38
  end
@@ -2,9 +2,9 @@
2
2
  require 'rubygems'
3
3
 
4
4
  begin
5
- gem 'tmail', '~> 1.2.3'
5
+ gem 'tmail', '~> 1.2.7'
6
6
  rescue Gem::LoadError
7
- $:.unshift "#{File.dirname(__FILE__)}/tmail-1.2.3"
7
+ $:.unshift "#{File.dirname(__FILE__)}/tmail-1.2.7"
8
8
  end
9
9
 
10
10
  module TMail
@@ -2,7 +2,7 @@ module ActionMailer
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 3
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -17,7 +17,7 @@ ActionView::Template.register_template_handler :bak, lambda { |template| "Lame b
17
17
  $:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers"
18
18
 
19
19
  ActionView::Base.cache_template_loading = true
20
- FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
20
+ FIXTURE_LOAD_PATH = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
21
21
  ActionMailer::Base.template_root = FIXTURE_LOAD_PATH
22
22
 
23
23
  class MockSMTP
@@ -1,5 +1,5 @@
1
1
  module ExampleHelper
2
2
  def example_format(text)
3
- "<em><strong><small>#{h(text)}</small></strong></em>".html_safe!
3
+ "<em><strong><small>#{h(text)}</small></strong></em>".html_safe
4
4
  end
5
5
  end
@@ -29,6 +29,18 @@ class TestMailer < ActionMailer::Base
29
29
  self.body = "Goodbye, Mr. #{recipient}"
30
30
  end
31
31
 
32
+ def from_with_name
33
+ from "System <system@loudthinking.com>"
34
+ recipients "root@loudthinking.com"
35
+ body "Nothing to see here."
36
+ end
37
+
38
+ def from_without_name
39
+ from "system@loudthinking.com"
40
+ recipients "root@loudthinking.com"
41
+ body "Nothing to see here."
42
+ end
43
+
32
44
  def cc_bcc(recipient)
33
45
  recipients recipient
34
46
  subject "testing bcc/cc"
@@ -454,6 +466,28 @@ class ActionMailerTest < Test::Unit::TestCase
454
466
  assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
455
467
  end
456
468
 
469
+ def test_from_without_name_for_smtp
470
+ ActionMailer::Base.delivery_method = :smtp
471
+ TestMailer.deliver_from_without_name
472
+
473
+ mail = MockSMTP.deliveries.first
474
+ assert_not_nil mail
475
+ mail, from, to = mail
476
+
477
+ assert_equal 'system@loudthinking.com', from.to_s
478
+ end
479
+
480
+ def test_from_with_name_for_smtp
481
+ ActionMailer::Base.delivery_method = :smtp
482
+ TestMailer.deliver_from_with_name
483
+
484
+ mail = MockSMTP.deliveries.first
485
+ assert_not_nil mail
486
+ mail, from, to = mail
487
+
488
+ assert_equal 'system@loudthinking.com', from.to_s
489
+ end
490
+
457
491
  def test_reply_to
458
492
  expected = new_mail
459
493
 
@@ -700,8 +734,8 @@ EOF
700
734
  expected.date = Time.local 2004, 12, 12
701
735
 
702
736
  created = TestMailer.create_utf8_body @recipient
703
- assert_match(/\nFrom: =\?utf-8\?Q\?Foo_.*?\?= <extended@example.net>\r/, created.encoded)
704
- assert_match(/\nTo: =\?utf-8\?Q\?Foo_.*?\?= <extended@example.net>, Example Recipient <me/, created.encoded)
737
+ assert_match(/From:\ =\?utf\-8\?Q\?Foo_=C3=A1=C3=AB=C3=B4_=C3=AE=C3=BC\?=\ <extended@example\.net>/, created.encoded)
738
+ assert_match(/To:\ =\?utf\-8\?Q\?Foo_=C3=A1=C3=AB=C3=B4_=C3=AE=C3=BC\?=\ <extended@example\.net>/, created.encoded)
705
739
  end
706
740
 
707
741
  def test_receive_decodes_base64_encoded_mail
@@ -827,6 +861,26 @@ EOF
827
861
  assert_equal "text/yaml", mail.parts[2].content_type
828
862
  end
829
863
 
864
+ def test_implicitly_path_when_running_from_none_rails_root
865
+ exected_path = File.expand_path(File.join(File.dirname(__FILE__), "fixtures", "test_mailer"))
866
+ with_a_rails_root do
867
+ Dir.chdir "/" do
868
+ template_path = TestMailer.allocate.send(:template_path)
869
+ assert_equal exected_path, File.expand_path(template_path)
870
+ end
871
+ end
872
+ end
873
+
874
+
875
+ def test_implicitly_multipart_messages_run_from_another_location_with_a_rails_root
876
+ with_a_rails_root do
877
+ Dir.chdir "/" do
878
+ mail = TestMailer.create_implicitly_multipart_example(@recipient)
879
+ assert_equal 3, mail.parts.length
880
+ end
881
+ end
882
+ end
883
+
830
884
  def test_implicitly_multipart_messages_with_charset
831
885
  mail = TestMailer.create_implicitly_multipart_example(@recipient, 'iso-8859-1')
832
886
 
@@ -975,6 +1029,16 @@ EOF
975
1029
  ensure
976
1030
  ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true
977
1031
  end
1032
+
1033
+ private
1034
+ def with_a_rails_root
1035
+ old_root = ::RAILS_ROOT if defined? ::RAILS_ROOT
1036
+ Object.const_set(:RAILS_ROOT, File.join(File.dirname(__FILE__)))
1037
+ yield
1038
+ ensure
1039
+ Object.send(:remove_const, :RAILS_ROOT) if defined? ::RAILS_ROOT
1040
+ Object.const_set(:RAILS_ROOT, old_root) if old_root
1041
+ end
978
1042
  end
979
1043
 
980
1044
  class InheritableTemplateRootTest < Test::Unit::TestCase
@@ -23,9 +23,13 @@ class QuotingTest < Test::Unit::TestCase
23
23
  end
24
24
 
25
25
  def test_unqoute_multiple
26
- a ="=?utf-8?q?Re=3A_=5B12=5D_=23137=3A_Inkonsistente_verwendung_von_=22Hin?==?utf-8?b?enVmw7xnZW4i?="
27
- b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
28
- assert_equal "Re: [12] #137: Inkonsistente verwendung von \"Hinzuf\303\274gen\"", b
26
+ quoted ="=?utf-8?q?Re=3A_=5B12=5D_=23137=3A_Inkonsistente_verwendung_von_=22Hin?==?utf-8?b?enVmw7xnZW4i?="
27
+ actual = TMail::Unquoter.unquote_and_convert_to(quoted, 'utf-8')
28
+
29
+ expected = "Re: [12] #137: Inkonsistente verwendung von \"Hinzuf\303\274gen\""
30
+ expected.force_encoding 'ASCII-8BIT' if expected.respond_to?(:force_encoding)
31
+
32
+ assert_equal expected, actual
29
33
  end
30
34
 
31
35
  def test_unqoute_in_the_middle
@@ -71,7 +75,9 @@ class QuotingTest < Test::Unit::TestCase
71
75
 
72
76
  def test_email_with_partially_quoted_subject
73
77
  mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_partially_quoted_subject"))
74
- assert_equal "Re: Test: \"\346\274\242\345\255\227\" mid \"\346\274\242\345\255\227\" tail", mail.subject
78
+ expected = "Re: Test: \"\346\274\242\345\255\227\" mid \"\346\274\242\345\255\227\" tail"
79
+ expected.force_encoding('ASCII-8BIT') if expected.respond_to?(:force_encoding)
80
+ assert_equal expected, mail.subject
75
81
  end
76
82
 
77
83
  private
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionmailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.5
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 3
8
+ - 6
9
+ version: 2.3.6
5
10
  platform: ruby
6
11
  authors:
7
12
  - David Heinemeier Hansson
@@ -9,19 +14,23 @@ autorequire: action_mailer
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-11-27 00:00:00 +13:00
17
+ date: 2010-05-23 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: actionpack
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - "="
22
26
  - !ruby/object:Gem::Version
23
- version: 2.3.5
24
- version:
27
+ segments:
28
+ - 2
29
+ - 3
30
+ - 6
31
+ version: 2.3.6
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  description: Makes it trivial to test and deliver emails sent from a single service layer.
26
35
  email: david@loudthinking.com
27
36
  executables: []
@@ -48,33 +57,72 @@ files:
48
57
  - lib/action_mailer/utils.rb
49
58
  - lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
50
59
  - lib/action_mailer/vendor/text_format.rb
51
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb
52
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb
53
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb
54
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb
55
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb
56
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb
57
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb
58
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb
59
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb
60
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb
61
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb
62
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb
63
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb
64
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb
65
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb
66
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb
67
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb
68
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb
69
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb
70
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb
71
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb
72
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb
73
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb
74
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb
75
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb
76
- - lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb
77
- - lib/action_mailer/vendor/tmail-1.2.3/tmail.rb
60
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/address.rb
61
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb
62
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/base64.rb
63
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb
64
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/config.rb
65
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/core_extensions.rb
66
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/encode.rb
67
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/header.rb
68
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/index.rb
69
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb
70
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/loader.rb
71
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb
72
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb
73
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/main.rb
74
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile
75
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/mbox.rb
76
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/net.rb
77
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/obsolete.rb
78
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb
79
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y
80
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb
81
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb
82
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/require_arch.rb
83
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner.rb
84
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner_r.rb
85
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/stringio.rb
86
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb
87
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING
88
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb
89
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb
90
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb
91
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb
92
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb
93
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb
94
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb
95
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb
96
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb
97
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb
98
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb
99
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb
100
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb
101
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb
102
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb
103
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb
104
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb
105
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb
106
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb
107
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb
108
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb
109
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb
110
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb
111
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb
112
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb
113
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb
114
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb
115
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb
116
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb
117
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb
118
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb
119
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb
120
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb
121
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb
122
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb
123
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README
124
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail/version.rb
125
+ - lib/action_mailer/vendor/tmail-1.2.7/tmail.rb
78
126
  - lib/action_mailer/vendor/tmail.rb
79
127
  - lib/action_mailer/version.rb
80
128
  - lib/action_mailer.rb
@@ -152,18 +200,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
200
  requirements:
153
201
  - - ">="
154
202
  - !ruby/object:Gem::Version
203
+ segments:
204
+ - 0
155
205
  version: "0"
156
- version:
157
206
  required_rubygems_version: !ruby/object:Gem::Requirement
158
207
  requirements:
159
208
  - - ">="
160
209
  - !ruby/object:Gem::Version
210
+ segments:
211
+ - 0
161
212
  version: "0"
162
- version:
163
213
  requirements:
164
214
  - none
165
215
  rubyforge_project: actionmailer
166
- rubygems_version: 1.3.5
216
+ rubygems_version: 1.3.6
167
217
  signing_key:
168
218
  specification_version: 3
169
219
  summary: Service layer for easy email delivery and testing.
@@ -1,46 +0,0 @@
1
- =begin rdoc
2
-
3
- = Attachment handling file
4
-
5
- =end
6
-
7
- require 'stringio'
8
-
9
- module TMail
10
- class Attachment < StringIO
11
- attr_accessor :original_filename, :content_type
12
- end
13
-
14
- class Mail
15
- def has_attachments?
16
- multipart? && parts.any? { |part| attachment?(part) }
17
- end
18
-
19
- def attachment?(part)
20
- part.disposition_is_attachment? || part.content_type_is_text?
21
- end
22
-
23
- def attachments
24
- if multipart?
25
- parts.collect { |part|
26
- if part.multipart?
27
- part.attachments
28
- elsif attachment?(part)
29
- content = part.body # unquoted automatically by TMail#body
30
- file_name = (part['content-location'] &&
31
- part['content-location'].body) ||
32
- part.sub_header("content-type", "name") ||
33
- part.sub_header("content-disposition", "filename")
34
-
35
- next if file_name.blank? || content.blank?
36
-
37
- attachment = Attachment.new(content)
38
- attachment.original_filename = file_name.strip
39
- attachment.content_type = part.content_type
40
- attachment
41
- end
42
- }.flatten.compact
43
- end
44
- end
45
- end
46
- end
@@ -1,1478 +0,0 @@
1
- #:stopdoc:
2
- # DO NOT MODIFY!!!!
3
- # This file is automatically generated by racc 1.4.5
4
- # from racc grammer file "parser.y".
5
- #
6
- #
7
- # parser.rb: generated by racc (runtime embedded)
8
- #
9
- ###### racc/parser.rb begin
10
- unless $".index 'racc/parser.rb'
11
- $".push 'racc/parser.rb'
12
-
13
- self.class.module_eval <<'..end racc/parser.rb modeval..id8076474214', 'racc/parser.rb', 1
14
- #
15
- # $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $
16
- #
17
- # Copyright (c) 1999-2005 Minero Aoki
18
- #
19
- # This program is free software.
20
- # You can distribute/modify this program under the same terms of ruby.
21
- #
22
- # As a special exception, when this code is copied by Racc
23
- # into a Racc output file, you may use that output file
24
- # without restriction.
25
- #
26
-
27
- unless defined?(NotImplementedError)
28
- NotImplementedError = NotImplementError
29
- end
30
-
31
- module Racc
32
- class ParseError < StandardError; end
33
- end
34
- unless defined?(::ParseError)
35
- ParseError = Racc::ParseError
36
- end
37
-
38
- module Racc
39
-
40
- unless defined?(Racc_No_Extentions)
41
- Racc_No_Extentions = false
42
- end
43
-
44
- class Parser
45
-
46
- old_verbose, $VERBOSE = $VERBOSE, nil
47
- Racc_Runtime_Version = '1.4.5'
48
- Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1]
49
-
50
- Racc_Runtime_Core_Version_R = '1.4.5'
51
- Racc_Runtime_Core_Revision_R = '$Revision: 1.7 $'.split[1]
52
- begin
53
- require 'racc/cparse'
54
- # Racc_Runtime_Core_Version_C = (defined in extention)
55
- Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
56
- unless new.respond_to?(:_racc_do_parse_c, true)
57
- raise LoadError, 'old cparse.so'
58
- end
59
- if Racc_No_Extentions
60
- raise LoadError, 'selecting ruby version of racc runtime core'
61
- end
62
-
63
- Racc_Main_Parsing_Routine = :_racc_do_parse_c
64
- Racc_YY_Parse_Method = :_racc_yyparse_c
65
- Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C
66
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C
67
- Racc_Runtime_Type = 'c'
68
- rescue LoadError
69
- Racc_Main_Parsing_Routine = :_racc_do_parse_rb
70
- Racc_YY_Parse_Method = :_racc_yyparse_rb
71
- Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
72
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
73
- Racc_Runtime_Type = 'ruby'
74
- end
75
- $VERBOSE = old_verbose
76
-
77
- def Parser.racc_runtime_type
78
- Racc_Runtime_Type
79
- end
80
-
81
- private
82
-
83
- def _racc_setup
84
- @yydebug = false unless self.class::Racc_debug_parser
85
- @yydebug = false unless defined?(@yydebug)
86
- if @yydebug
87
- @racc_debug_out = $stderr unless defined?(@racc_debug_out)
88
- @racc_debug_out ||= $stderr
89
- end
90
- arg = self.class::Racc_arg
91
- arg[13] = true if arg.size < 14
92
- arg
93
- end
94
-
95
- def _racc_init_sysvars
96
- @racc_state = [0]
97
- @racc_tstack = []
98
- @racc_vstack = []
99
-
100
- @racc_t = nil
101
- @racc_val = nil
102
-
103
- @racc_read_next = true
104
-
105
- @racc_user_yyerror = false
106
- @racc_error_status = 0
107
- end
108
-
109
- ###
110
- ### do_parse
111
- ###
112
-
113
- def do_parse
114
- __send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
115
- end
116
-
117
- def next_token
118
- raise NotImplementedError, "#{self.class}\#next_token is not defined"
119
- end
120
-
121
- def _racc_do_parse_rb(arg, in_debug)
122
- action_table, action_check, action_default, action_pointer,
123
- goto_table, goto_check, goto_default, goto_pointer,
124
- nt_base, reduce_table, token_table, shift_n,
125
- reduce_n, use_result, * = arg
126
-
127
- _racc_init_sysvars
128
- tok = act = i = nil
129
- nerr = 0
130
-
131
- catch(:racc_end_parse) {
132
- while true
133
- if i = action_pointer[@racc_state[-1]]
134
- if @racc_read_next
135
- if @racc_t != 0 # not EOF
136
- tok, @racc_val = next_token()
137
- unless tok # EOF
138
- @racc_t = 0
139
- else
140
- @racc_t = (token_table[tok] or 1) # error token
141
- end
142
- racc_read_token(@racc_t, tok, @racc_val) if @yydebug
143
- @racc_read_next = false
144
- end
145
- end
146
- i += @racc_t
147
- unless i >= 0 and
148
- act = action_table[i] and
149
- action_check[i] == @racc_state[-1]
150
- act = action_default[@racc_state[-1]]
151
- end
152
- else
153
- act = action_default[@racc_state[-1]]
154
- end
155
- while act = _racc_evalact(act, arg)
156
- ;
157
- end
158
- end
159
- }
160
- end
161
-
162
- ###
163
- ### yyparse
164
- ###
165
-
166
- def yyparse(recv, mid)
167
- __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
168
- end
169
-
170
- def _racc_yyparse_rb(recv, mid, arg, c_debug)
171
- action_table, action_check, action_default, action_pointer,
172
- goto_table, goto_check, goto_default, goto_pointer,
173
- nt_base, reduce_table, token_table, shift_n,
174
- reduce_n, use_result, * = arg
175
-
176
- _racc_init_sysvars
177
- tok = nil
178
- act = nil
179
- i = nil
180
- nerr = 0
181
-
182
- catch(:racc_end_parse) {
183
- until i = action_pointer[@racc_state[-1]]
184
- while act = _racc_evalact(action_default[@racc_state[-1]], arg)
185
- ;
186
- end
187
- end
188
- recv.__send__(mid) do |tok, val|
189
- unless tok
190
- @racc_t = 0
191
- else
192
- @racc_t = (token_table[tok] or 1) # error token
193
- end
194
- @racc_val = val
195
- @racc_read_next = false
196
-
197
- i += @racc_t
198
- unless i >= 0 and
199
- act = action_table[i] and
200
- action_check[i] == @racc_state[-1]
201
- act = action_default[@racc_state[-1]]
202
- end
203
- while act = _racc_evalact(act, arg)
204
- ;
205
- end
206
-
207
- while not (i = action_pointer[@racc_state[-1]]) or
208
- not @racc_read_next or
209
- @racc_t == 0 # $
210
- unless i and i += @racc_t and
211
- i >= 0 and
212
- act = action_table[i] and
213
- action_check[i] == @racc_state[-1]
214
- act = action_default[@racc_state[-1]]
215
- end
216
- while act = _racc_evalact(act, arg)
217
- ;
218
- end
219
- end
220
- end
221
- }
222
- end
223
-
224
- ###
225
- ### common
226
- ###
227
-
228
- def _racc_evalact(act, arg)
229
- action_table, action_check, action_default, action_pointer,
230
- goto_table, goto_check, goto_default, goto_pointer,
231
- nt_base, reduce_table, token_table, shift_n,
232
- reduce_n, use_result, * = arg
233
- nerr = 0 # tmp
234
-
235
- if act > 0 and act < shift_n
236
- #
237
- # shift
238
- #
239
- if @racc_error_status > 0
240
- @racc_error_status -= 1 unless @racc_t == 1 # error token
241
- end
242
- @racc_vstack.push @racc_val
243
- @racc_state.push act
244
- @racc_read_next = true
245
- if @yydebug
246
- @racc_tstack.push @racc_t
247
- racc_shift @racc_t, @racc_tstack, @racc_vstack
248
- end
249
-
250
- elsif act < 0 and act > -reduce_n
251
- #
252
- # reduce
253
- #
254
- code = catch(:racc_jump) {
255
- @racc_state.push _racc_do_reduce(arg, act)
256
- false
257
- }
258
- if code
259
- case code
260
- when 1 # yyerror
261
- @racc_user_yyerror = true # user_yyerror
262
- return -reduce_n
263
- when 2 # yyaccept
264
- return shift_n
265
- else
266
- raise '[Racc Bug] unknown jump code'
267
- end
268
- end
269
-
270
- elsif act == shift_n
271
- #
272
- # accept
273
- #
274
- racc_accept if @yydebug
275
- throw :racc_end_parse, @racc_vstack[0]
276
-
277
- elsif act == -reduce_n
278
- #
279
- # error
280
- #
281
- case @racc_error_status
282
- when 0
283
- unless arg[21] # user_yyerror
284
- nerr += 1
285
- on_error @racc_t, @racc_val, @racc_vstack
286
- end
287
- when 3
288
- if @racc_t == 0 # is $
289
- throw :racc_end_parse, nil
290
- end
291
- @racc_read_next = true
292
- end
293
- @racc_user_yyerror = false
294
- @racc_error_status = 3
295
- while true
296
- if i = action_pointer[@racc_state[-1]]
297
- i += 1 # error token
298
- if i >= 0 and
299
- (act = action_table[i]) and
300
- action_check[i] == @racc_state[-1]
301
- break
302
- end
303
- end
304
- throw :racc_end_parse, nil if @racc_state.size <= 1
305
- @racc_state.pop
306
- @racc_vstack.pop
307
- if @yydebug
308
- @racc_tstack.pop
309
- racc_e_pop @racc_state, @racc_tstack, @racc_vstack
310
- end
311
- end
312
- return act
313
-
314
- else
315
- raise "[Racc Bug] unknown action #{act.inspect}"
316
- end
317
-
318
- racc_next_state(@racc_state[-1], @racc_state) if @yydebug
319
-
320
- nil
321
- end
322
-
323
- def _racc_do_reduce(arg, act)
324
- action_table, action_check, action_default, action_pointer,
325
- goto_table, goto_check, goto_default, goto_pointer,
326
- nt_base, reduce_table, token_table, shift_n,
327
- reduce_n, use_result, * = arg
328
- state = @racc_state
329
- vstack = @racc_vstack
330
- tstack = @racc_tstack
331
-
332
- i = act * -3
333
- len = reduce_table[i]
334
- reduce_to = reduce_table[i+1]
335
- method_id = reduce_table[i+2]
336
- void_array = []
337
-
338
- tmp_t = tstack[-len, len] if @yydebug
339
- tmp_v = vstack[-len, len]
340
- tstack[-len, len] = void_array if @yydebug
341
- vstack[-len, len] = void_array
342
- state[-len, len] = void_array
343
-
344
- # tstack must be updated AFTER method call
345
- if use_result
346
- vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
347
- else
348
- vstack.push __send__(method_id, tmp_v, vstack)
349
- end
350
- tstack.push reduce_to
351
-
352
- racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
353
-
354
- k1 = reduce_to - nt_base
355
- if i = goto_pointer[k1]
356
- i += state[-1]
357
- if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
358
- return curstate
359
- end
360
- end
361
- goto_default[k1]
362
- end
363
-
364
- def on_error(t, val, vstack)
365
- raise ParseError, sprintf("\nparse error on value %s (%s)",
366
- val.inspect, token_to_str(t) || '?')
367
- end
368
-
369
- def yyerror
370
- throw :racc_jump, 1
371
- end
372
-
373
- def yyaccept
374
- throw :racc_jump, 2
375
- end
376
-
377
- def yyerrok
378
- @racc_error_status = 0
379
- end
380
-
381
- #
382
- # for debugging output
383
- #
384
-
385
- def racc_read_token(t, tok, val)
386
- @racc_debug_out.print 'read '
387
- @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
388
- @racc_debug_out.puts val.inspect
389
- @racc_debug_out.puts
390
- end
391
-
392
- def racc_shift(tok, tstack, vstack)
393
- @racc_debug_out.puts "shift #{racc_token2str tok}"
394
- racc_print_stacks tstack, vstack
395
- @racc_debug_out.puts
396
- end
397
-
398
- def racc_reduce(toks, sim, tstack, vstack)
399
- out = @racc_debug_out
400
- out.print 'reduce '
401
- if toks.empty?
402
- out.print ' <none>'
403
- else
404
- toks.each {|t| out.print ' ', racc_token2str(t) }
405
- end
406
- out.puts " --> #{racc_token2str(sim)}"
407
-
408
- racc_print_stacks tstack, vstack
409
- @racc_debug_out.puts
410
- end
411
-
412
- def racc_accept
413
- @racc_debug_out.puts 'accept'
414
- @racc_debug_out.puts
415
- end
416
-
417
- def racc_e_pop(state, tstack, vstack)
418
- @racc_debug_out.puts 'error recovering mode: pop token'
419
- racc_print_states state
420
- racc_print_stacks tstack, vstack
421
- @racc_debug_out.puts
422
- end
423
-
424
- def racc_next_state(curstate, state)
425
- @racc_debug_out.puts "goto #{curstate}"
426
- racc_print_states state
427
- @racc_debug_out.puts
428
- end
429
-
430
- def racc_print_stacks(t, v)
431
- out = @racc_debug_out
432
- out.print ' ['
433
- t.each_index do |i|
434
- out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
435
- end
436
- out.puts ' ]'
437
- end
438
-
439
- def racc_print_states(s)
440
- out = @racc_debug_out
441
- out.print ' ['
442
- s.each {|st| out.print ' ', st }
443
- out.puts ' ]'
444
- end
445
-
446
- def racc_token2str(tok)
447
- self.class::Racc_token_to_s_table[tok] or
448
- raise "[Racc Bug] can't convert token #{tok} to string"
449
- end
450
-
451
- def token_to_str(t)
452
- self.class::Racc_token_to_s_table[t]
453
- end
454
-
455
- end
456
-
457
- end
458
- ..end racc/parser.rb modeval..id8076474214
459
- end
460
- ###### racc/parser.rb end
461
-
462
-
463
- #
464
- # parser.rb
465
- #
466
- # Copyright (c) 1998-2007 Minero Aoki
467
- #
468
- # This program is free software.
469
- # You can distribute/modify this program under the terms of
470
- # the GNU Lesser General Public License version 2.1.
471
- #
472
-
473
- require 'tmail/scanner'
474
- require 'tmail/utils'
475
-
476
-
477
- module TMail
478
-
479
- class Parser < Racc::Parser
480
-
481
- module_eval <<'..end parser.y modeval..id7b0b3dccb7', 'parser.y', 340
482
-
483
- include TextUtils
484
-
485
- def self.parse( ident, str, cmt = nil )
486
- new.parse(ident, str, cmt)
487
- end
488
-
489
- MAILP_DEBUG = false
490
-
491
- def initialize
492
- self.debug = MAILP_DEBUG
493
- end
494
-
495
- def debug=( flag )
496
- @yydebug = flag && Racc_debug_parser
497
- @scanner_debug = flag
498
- end
499
-
500
- def debug
501
- @yydebug
502
- end
503
-
504
- def parse( ident, str, comments = nil )
505
- @scanner = Scanner.new(str, ident, comments)
506
- @scanner.debug = @scanner_debug
507
- @first = [ident, ident]
508
- result = yyparse(self, :parse_in)
509
- comments.map! {|c| to_kcode(c) } if comments
510
- result
511
- end
512
-
513
- private
514
-
515
- def parse_in( &block )
516
- yield @first
517
- @scanner.scan(&block)
518
- end
519
-
520
- def on_error( t, val, vstack )
521
- raise SyntaxError, "parse error on token #{racc_token2str t}"
522
- end
523
-
524
- ..end parser.y modeval..id7b0b3dccb7
525
-
526
- ##### racc 1.4.5 generates ###
527
-
528
- racc_reduce_table = [
529
- 0, 0, :racc_error,
530
- 2, 35, :_reduce_1,
531
- 2, 35, :_reduce_2,
532
- 2, 35, :_reduce_3,
533
- 2, 35, :_reduce_4,
534
- 2, 35, :_reduce_5,
535
- 2, 35, :_reduce_6,
536
- 2, 35, :_reduce_7,
537
- 2, 35, :_reduce_8,
538
- 2, 35, :_reduce_9,
539
- 2, 35, :_reduce_10,
540
- 2, 35, :_reduce_11,
541
- 2, 35, :_reduce_12,
542
- 6, 36, :_reduce_13,
543
- 0, 48, :_reduce_none,
544
- 2, 48, :_reduce_none,
545
- 3, 49, :_reduce_16,
546
- 5, 49, :_reduce_17,
547
- 1, 50, :_reduce_18,
548
- 7, 37, :_reduce_19,
549
- 0, 51, :_reduce_none,
550
- 2, 51, :_reduce_21,
551
- 0, 52, :_reduce_none,
552
- 2, 52, :_reduce_23,
553
- 1, 58, :_reduce_24,
554
- 3, 58, :_reduce_25,
555
- 2, 58, :_reduce_26,
556
- 0, 53, :_reduce_none,
557
- 2, 53, :_reduce_28,
558
- 0, 54, :_reduce_29,
559
- 3, 54, :_reduce_30,
560
- 0, 55, :_reduce_none,
561
- 2, 55, :_reduce_32,
562
- 2, 55, :_reduce_33,
563
- 0, 56, :_reduce_none,
564
- 2, 56, :_reduce_35,
565
- 1, 61, :_reduce_36,
566
- 1, 61, :_reduce_37,
567
- 0, 57, :_reduce_none,
568
- 2, 57, :_reduce_39,
569
- 1, 38, :_reduce_none,
570
- 1, 38, :_reduce_none,
571
- 3, 38, :_reduce_none,
572
- 1, 46, :_reduce_none,
573
- 1, 46, :_reduce_none,
574
- 1, 46, :_reduce_none,
575
- 1, 39, :_reduce_none,
576
- 2, 39, :_reduce_47,
577
- 1, 64, :_reduce_48,
578
- 3, 64, :_reduce_49,
579
- 1, 68, :_reduce_none,
580
- 1, 68, :_reduce_none,
581
- 1, 69, :_reduce_52,
582
- 3, 69, :_reduce_53,
583
- 1, 47, :_reduce_none,
584
- 1, 47, :_reduce_none,
585
- 2, 47, :_reduce_56,
586
- 2, 67, :_reduce_none,
587
- 3, 65, :_reduce_58,
588
- 2, 65, :_reduce_59,
589
- 1, 70, :_reduce_60,
590
- 2, 70, :_reduce_61,
591
- 4, 62, :_reduce_62,
592
- 3, 62, :_reduce_63,
593
- 2, 72, :_reduce_none,
594
- 2, 73, :_reduce_65,
595
- 4, 73, :_reduce_66,
596
- 3, 63, :_reduce_67,
597
- 1, 63, :_reduce_68,
598
- 1, 74, :_reduce_none,
599
- 2, 74, :_reduce_70,
600
- 1, 71, :_reduce_71,
601
- 3, 71, :_reduce_72,
602
- 1, 59, :_reduce_73,
603
- 3, 59, :_reduce_74,
604
- 1, 76, :_reduce_75,
605
- 2, 76, :_reduce_76,
606
- 1, 75, :_reduce_none,
607
- 1, 75, :_reduce_none,
608
- 1, 75, :_reduce_none,
609
- 1, 77, :_reduce_none,
610
- 1, 77, :_reduce_none,
611
- 1, 77, :_reduce_none,
612
- 1, 66, :_reduce_none,
613
- 2, 66, :_reduce_none,
614
- 3, 60, :_reduce_85,
615
- 1, 40, :_reduce_86,
616
- 3, 40, :_reduce_87,
617
- 1, 79, :_reduce_none,
618
- 2, 79, :_reduce_89,
619
- 1, 41, :_reduce_90,
620
- 2, 41, :_reduce_91,
621
- 3, 42, :_reduce_92,
622
- 5, 43, :_reduce_93,
623
- 3, 43, :_reduce_94,
624
- 0, 80, :_reduce_95,
625
- 5, 80, :_reduce_96,
626
- 5, 80, :_reduce_97,
627
- 1, 44, :_reduce_98,
628
- 3, 45, :_reduce_99,
629
- 0, 81, :_reduce_none,
630
- 1, 81, :_reduce_none,
631
- 1, 78, :_reduce_none,
632
- 1, 78, :_reduce_none,
633
- 1, 78, :_reduce_none,
634
- 1, 78, :_reduce_none,
635
- 1, 78, :_reduce_none,
636
- 1, 78, :_reduce_none,
637
- 1, 78, :_reduce_none ]
638
-
639
- racc_reduce_n = 109
640
-
641
- racc_shift_n = 167
642
-
643
- racc_action_table = [
644
- -70, -69, 23, 25, 145, 146, 29, 31, 105, 106,
645
- 16, 17, 20, 22, 136, 27, -70, -69, 32, 101,
646
- -70, -69, 153, 100, 113, 115, -70, -69, -70, 109,
647
- 75, 23, 25, 101, 154, 29, 31, 142, 143, 16,
648
- 17, 20, 22, 107, 27, 23, 25, 32, 98, 29,
649
- 31, 96, 94, 16, 17, 20, 22, 78, 27, 23,
650
- 25, 32, 112, 29, 31, 74, 91, 16, 17, 20,
651
- 22, 88, 117, 92, 81, 32, 23, 25, 80, 123,
652
- 29, 31, 100, 125, 16, 17, 20, 22, 126, 23,
653
- 25, 109, 32, 29, 31, 91, 128, 16, 17, 20,
654
- 22, 129, 27, 23, 25, 32, 101, 29, 31, 101,
655
- 130, 16, 17, 20, 22, 79, 52, 23, 25, 32,
656
- 78, 29, 31, 133, 78, 16, 17, 20, 22, 77,
657
- 23, 25, 75, 32, 29, 31, 65, 62, 16, 17,
658
- 20, 22, 139, 23, 25, 101, 32, 29, 31, 60,
659
- 100, 16, 17, 20, 22, 44, 27, 101, 147, 32,
660
- 23, 25, 120, 148, 29, 31, 151, 152, 16, 17,
661
- 20, 22, 42, 27, 156, 158, 32, 23, 25, 120,
662
- 40, 29, 31, 15, 163, 16, 17, 20, 22, 40,
663
- 27, 23, 25, 32, 68, 29, 31, 165, 166, 16,
664
- 17, 20, 22, nil, 27, 23, 25, 32, nil, 29,
665
- 31, 74, nil, 16, 17, 20, 22, nil, 23, 25,
666
- nil, 32, 29, 31, nil, nil, 16, 17, 20, 22,
667
- nil, 23, 25, nil, 32, 29, 31, nil, nil, 16,
668
- 17, 20, 22, nil, 23, 25, nil, 32, 29, 31,
669
- nil, nil, 16, 17, 20, 22, nil, 23, 25, nil,
670
- 32, 29, 31, nil, nil, 16, 17, 20, 22, nil,
671
- 27, 23, 25, 32, nil, 29, 31, nil, nil, 16,
672
- 17, 20, 22, nil, 23, 25, nil, 32, 29, 31,
673
- nil, nil, 16, 17, 20, 22, nil, 23, 25, nil,
674
- 32, 29, 31, nil, nil, 16, 17, 20, 22, nil,
675
- 84, 25, nil, 32, 29, 31, nil, 87, 16, 17,
676
- 20, 22, 4, 6, 7, 8, 9, 10, 11, 12,
677
- 13, 1, 2, 3, 84, 25, nil, nil, 29, 31,
678
- nil, 87, 16, 17, 20, 22, 84, 25, nil, nil,
679
- 29, 31, nil, 87, 16, 17, 20, 22, 84, 25,
680
- nil, nil, 29, 31, nil, 87, 16, 17, 20, 22,
681
- 84, 25, nil, nil, 29, 31, nil, 87, 16, 17,
682
- 20, 22, 84, 25, nil, nil, 29, 31, nil, 87,
683
- 16, 17, 20, 22, 84, 25, nil, nil, 29, 31,
684
- nil, 87, 16, 17, 20, 22 ]
685
-
686
- racc_action_check = [
687
- 75, 28, 68, 68, 136, 136, 68, 68, 72, 72,
688
- 68, 68, 68, 68, 126, 68, 75, 28, 68, 67,
689
- 75, 28, 143, 66, 86, 86, 75, 28, 75, 75,
690
- 28, 3, 3, 86, 143, 3, 3, 134, 134, 3,
691
- 3, 3, 3, 73, 3, 151, 151, 3, 62, 151,
692
- 151, 60, 56, 151, 151, 151, 151, 51, 151, 52,
693
- 52, 151, 80, 52, 52, 52, 50, 52, 52, 52,
694
- 52, 45, 89, 52, 42, 52, 71, 71, 41, 96,
695
- 71, 71, 97, 98, 71, 71, 71, 71, 100, 7,
696
- 7, 101, 71, 7, 7, 102, 104, 7, 7, 7,
697
- 7, 105, 7, 8, 8, 7, 108, 8, 8, 111,
698
- 112, 8, 8, 8, 8, 40, 8, 9, 9, 8,
699
- 36, 9, 9, 117, 121, 9, 9, 9, 9, 33,
700
- 10, 10, 70, 9, 10, 10, 13, 12, 10, 10,
701
- 10, 10, 130, 2, 2, 131, 10, 2, 2, 11,
702
- 135, 2, 2, 2, 2, 6, 2, 138, 139, 2,
703
- 90, 90, 90, 140, 90, 90, 141, 142, 90, 90,
704
- 90, 90, 5, 90, 147, 150, 90, 127, 127, 127,
705
- 4, 127, 127, 1, 156, 127, 127, 127, 127, 158,
706
- 127, 26, 26, 127, 26, 26, 26, 162, 163, 26,
707
- 26, 26, 26, nil, 26, 27, 27, 26, nil, 27,
708
- 27, 27, nil, 27, 27, 27, 27, nil, 154, 154,
709
- nil, 27, 154, 154, nil, nil, 154, 154, 154, 154,
710
- nil, 122, 122, nil, 154, 122, 122, nil, nil, 122,
711
- 122, 122, 122, nil, 76, 76, nil, 122, 76, 76,
712
- nil, nil, 76, 76, 76, 76, nil, 38, 38, nil,
713
- 76, 38, 38, nil, nil, 38, 38, 38, 38, nil,
714
- 38, 55, 55, 38, nil, 55, 55, nil, nil, 55,
715
- 55, 55, 55, nil, 94, 94, nil, 55, 94, 94,
716
- nil, nil, 94, 94, 94, 94, nil, 59, 59, nil,
717
- 94, 59, 59, nil, nil, 59, 59, 59, 59, nil,
718
- 114, 114, nil, 59, 114, 114, nil, 114, 114, 114,
719
- 114, 114, 0, 0, 0, 0, 0, 0, 0, 0,
720
- 0, 0, 0, 0, 77, 77, nil, nil, 77, 77,
721
- nil, 77, 77, 77, 77, 77, 44, 44, nil, nil,
722
- 44, 44, nil, 44, 44, 44, 44, 44, 113, 113,
723
- nil, nil, 113, 113, nil, 113, 113, 113, 113, 113,
724
- 88, 88, nil, nil, 88, 88, nil, 88, 88, 88,
725
- 88, 88, 74, 74, nil, nil, 74, 74, nil, 74,
726
- 74, 74, 74, 74, 129, 129, nil, nil, 129, 129,
727
- nil, 129, 129, 129, 129, 129 ]
728
-
729
- racc_action_pointer = [
730
- 320, 152, 129, 17, 165, 172, 137, 75, 89, 103,
731
- 116, 135, 106, 105, nil, nil, nil, nil, nil, nil,
732
- nil, nil, nil, nil, nil, nil, 177, 191, 1, nil,
733
- nil, nil, nil, 109, nil, nil, 94, nil, 243, nil,
734
- 99, 64, 74, nil, 332, 52, nil, nil, nil, nil,
735
- 50, 31, 45, nil, nil, 257, 36, nil, nil, 283,
736
- 22, nil, 16, nil, nil, nil, -3, -10, -12, nil,
737
- 103, 62, -8, 15, 368, 0, 230, 320, nil, nil,
738
- 47, nil, nil, nil, nil, nil, 4, nil, 356, 50,
739
- 146, nil, nil, nil, 270, nil, 65, 56, 52, nil,
740
- 57, 62, 79, nil, 68, 81, nil, nil, 77, nil,
741
- nil, 80, 96, 344, 296, nil, nil, 108, nil, nil,
742
- nil, 98, 217, nil, nil, nil, -19, 163, nil, 380,
743
- 128, 116, nil, nil, 14, 124, -26, nil, 128, 141,
744
- 148, 141, 152, 7, nil, nil, nil, 160, nil, nil,
745
- 149, 31, nil, nil, 204, nil, 167, nil, 174, nil,
746
- nil, nil, 169, 184, nil, nil, nil ]
747
-
748
- racc_action_default = [
749
- -109, -109, -109, -109, -14, -109, -20, -109, -109, -109,
750
- -109, -109, -109, -109, -10, -95, -105, -106, -77, -44,
751
- -107, -11, -108, -79, -43, -102, -109, -109, -60, -103,
752
- -55, -104, -78, -68, -54, -71, -45, -12, -109, -1,
753
- -109, -109, -109, -2, -109, -22, -51, -48, -50, -3,
754
- -40, -41, -109, -46, -4, -86, -5, -88, -6, -90,
755
- -109, -7, -95, -8, -9, -98, -100, -61, -59, -56,
756
- -69, -109, -109, -109, -109, -75, -109, -109, -57, -15,
757
- -109, 167, -73, -80, -82, -21, -24, -81, -109, -27,
758
- -109, -83, -47, -89, -109, -91, -109, -100, -109, -99,
759
- -101, -75, -58, -52, -109, -109, -64, -63, -65, -76,
760
- -72, -67, -109, -109, -109, -26, -23, -109, -29, -49,
761
- -84, -42, -87, -92, -94, -95, -109, -109, -62, -109,
762
- -109, -25, -74, -28, -31, -100, -109, -53, -66, -109,
763
- -109, -34, -109, -109, -93, -96, -97, -109, -18, -13,
764
- -38, -109, -30, -33, -109, -32, -16, -19, -14, -35,
765
- -36, -37, -109, -109, -39, -85, -17 ]
766
-
767
- racc_goto_table = [
768
- 39, 67, 70, 73, 38, 66, 69, 24, 37, 57,
769
- 59, 36, 55, 67, 99, 90, 85, 157, 69, 108,
770
- 83, 134, 111, 76, 49, 53, 141, 70, 73, 150,
771
- 118, 89, 45, 155, 159, 149, 140, 21, 14, 19,
772
- 119, 102, 64, 63, 61, 124, 70, 104, 58, 132,
773
- 83, 56, 97, 83, 54, 93, 43, 5, 131, 95,
774
- 116, nil, 76, nil, 83, 76, nil, 127, nil, 38,
775
- nil, nil, nil, 103, 138, nil, 110, nil, nil, nil,
776
- nil, nil, nil, 144, nil, nil, nil, nil, nil, 83,
777
- 83, nil, nil, nil, 57, nil, nil, 122, nil, 121,
778
- nil, nil, nil, nil, nil, 83, nil, nil, nil, nil,
779
- nil, nil, nil, nil, nil, 135, nil, nil, nil, nil,
780
- nil, nil, 93, nil, nil, nil, 70, 161, 38, 70,
781
- 162, 160, 137, nil, nil, nil, nil, nil, nil, nil,
782
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
783
- nil, nil, nil, nil, 164 ]
784
-
785
- racc_goto_check = [
786
- 2, 37, 37, 29, 36, 46, 28, 13, 13, 41,
787
- 41, 31, 45, 37, 47, 32, 24, 23, 28, 25,
788
- 44, 20, 25, 42, 4, 4, 21, 37, 29, 22,
789
- 19, 18, 17, 26, 27, 16, 15, 12, 11, 33,
790
- 34, 35, 10, 9, 8, 47, 37, 29, 7, 43,
791
- 44, 6, 46, 44, 5, 41, 3, 1, 25, 41,
792
- 24, nil, 42, nil, 44, 42, nil, 32, nil, 36,
793
- nil, nil, nil, 13, 25, nil, 41, nil, nil, nil,
794
- nil, nil, nil, 47, nil, nil, nil, nil, nil, 44,
795
- 44, nil, nil, nil, 41, nil, nil, 45, nil, 31,
796
- nil, nil, nil, nil, nil, 44, nil, nil, nil, nil,
797
- nil, nil, nil, nil, nil, 46, nil, nil, nil, nil,
798
- nil, nil, 41, nil, nil, nil, 37, 29, 36, 37,
799
- 29, 28, 13, nil, nil, nil, nil, nil, nil, nil,
800
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
801
- nil, nil, nil, nil, 2 ]
802
-
803
- racc_goto_pointer = [
804
- nil, 57, -4, 50, 17, 46, 42, 38, 33, 31,
805
- 29, 37, 35, 5, nil, -94, -105, 26, -14, -59,
806
- -97, -108, -112, -133, -28, -55, -110, -117, -20, -24,
807
- nil, 9, -35, 37, -50, -27, 1, -25, nil, nil,
808
- nil, 0, -5, -65, -24, 3, -10, -52 ]
809
-
810
- racc_goto_default = [
811
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
812
- nil, nil, nil, 48, 41, nil, nil, nil, nil, nil,
813
- nil, nil, nil, nil, nil, 86, nil, nil, 30, 34,
814
- 50, 51, nil, 46, 47, nil, 26, 28, 71, 72,
815
- 33, 35, 114, 82, 18, nil, nil, nil ]
816
-
817
- racc_token_table = {
818
- false => 0,
819
- Object.new => 1,
820
- :DATETIME => 2,
821
- :RECEIVED => 3,
822
- :MADDRESS => 4,
823
- :RETPATH => 5,
824
- :KEYWORDS => 6,
825
- :ENCRYPTED => 7,
826
- :MIMEVERSION => 8,
827
- :CTYPE => 9,
828
- :CENCODING => 10,
829
- :CDISPOSITION => 11,
830
- :ADDRESS => 12,
831
- :MAILBOX => 13,
832
- :DIGIT => 14,
833
- :ATOM => 15,
834
- "," => 16,
835
- ":" => 17,
836
- :FROM => 18,
837
- :BY => 19,
838
- "@" => 20,
839
- :DOMLIT => 21,
840
- :VIA => 22,
841
- :WITH => 23,
842
- :ID => 24,
843
- :FOR => 25,
844
- ";" => 26,
845
- "<" => 27,
846
- ">" => 28,
847
- "." => 29,
848
- :QUOTED => 30,
849
- :TOKEN => 31,
850
- "/" => 32,
851
- "=" => 33 }
852
-
853
- racc_use_result_var = false
854
-
855
- racc_nt_base = 34
856
-
857
- Racc_arg = [
858
- racc_action_table,
859
- racc_action_check,
860
- racc_action_default,
861
- racc_action_pointer,
862
- racc_goto_table,
863
- racc_goto_check,
864
- racc_goto_default,
865
- racc_goto_pointer,
866
- racc_nt_base,
867
- racc_reduce_table,
868
- racc_token_table,
869
- racc_shift_n,
870
- racc_reduce_n,
871
- racc_use_result_var ]
872
-
873
- Racc_token_to_s_table = [
874
- '$end',
875
- 'error',
876
- 'DATETIME',
877
- 'RECEIVED',
878
- 'MADDRESS',
879
- 'RETPATH',
880
- 'KEYWORDS',
881
- 'ENCRYPTED',
882
- 'MIMEVERSION',
883
- 'CTYPE',
884
- 'CENCODING',
885
- 'CDISPOSITION',
886
- 'ADDRESS',
887
- 'MAILBOX',
888
- 'DIGIT',
889
- 'ATOM',
890
- '","',
891
- '":"',
892
- 'FROM',
893
- 'BY',
894
- '"@"',
895
- 'DOMLIT',
896
- 'VIA',
897
- 'WITH',
898
- 'ID',
899
- 'FOR',
900
- '";"',
901
- '"<"',
902
- '">"',
903
- '"."',
904
- 'QUOTED',
905
- 'TOKEN',
906
- '"/"',
907
- '"="',
908
- '$start',
909
- 'content',
910
- 'datetime',
911
- 'received',
912
- 'addrs_TOP',
913
- 'retpath',
914
- 'keys',
915
- 'enc',
916
- 'version',
917
- 'ctype',
918
- 'cencode',
919
- 'cdisp',
920
- 'addr_TOP',
921
- 'mbox',
922
- 'day',
923
- 'hour',
924
- 'zone',
925
- 'from',
926
- 'by',
927
- 'via',
928
- 'with',
929
- 'id',
930
- 'for',
931
- 'received_datetime',
932
- 'received_domain',
933
- 'domain',
934
- 'msgid',
935
- 'received_addrspec',
936
- 'routeaddr',
937
- 'spec',
938
- 'addrs',
939
- 'group_bare',
940
- 'commas',
941
- 'group',
942
- 'addr',
943
- 'mboxes',
944
- 'addr_phrase',
945
- 'local_head',
946
- 'routes',
947
- 'at_domains',
948
- 'local',
949
- 'word',
950
- 'dots',
951
- 'domword',
952
- 'atom',
953
- 'phrase',
954
- 'params',
955
- 'opt_semicolon']
956
-
957
- Racc_debug_parser = false
958
-
959
- ##### racc system variables end #####
960
-
961
- # reduce 0 omitted
962
-
963
- module_eval <<'.,.,', 'parser.y', 16
964
- def _reduce_1( val, _values)
965
- val[1]
966
- end
967
- .,.,
968
-
969
- module_eval <<'.,.,', 'parser.y', 17
970
- def _reduce_2( val, _values)
971
- val[1]
972
- end
973
- .,.,
974
-
975
- module_eval <<'.,.,', 'parser.y', 18
976
- def _reduce_3( val, _values)
977
- val[1]
978
- end
979
- .,.,
980
-
981
- module_eval <<'.,.,', 'parser.y', 19
982
- def _reduce_4( val, _values)
983
- val[1]
984
- end
985
- .,.,
986
-
987
- module_eval <<'.,.,', 'parser.y', 20
988
- def _reduce_5( val, _values)
989
- val[1]
990
- end
991
- .,.,
992
-
993
- module_eval <<'.,.,', 'parser.y', 21
994
- def _reduce_6( val, _values)
995
- val[1]
996
- end
997
- .,.,
998
-
999
- module_eval <<'.,.,', 'parser.y', 22
1000
- def _reduce_7( val, _values)
1001
- val[1]
1002
- end
1003
- .,.,
1004
-
1005
- module_eval <<'.,.,', 'parser.y', 23
1006
- def _reduce_8( val, _values)
1007
- val[1]
1008
- end
1009
- .,.,
1010
-
1011
- module_eval <<'.,.,', 'parser.y', 24
1012
- def _reduce_9( val, _values)
1013
- val[1]
1014
- end
1015
- .,.,
1016
-
1017
- module_eval <<'.,.,', 'parser.y', 25
1018
- def _reduce_10( val, _values)
1019
- val[1]
1020
- end
1021
- .,.,
1022
-
1023
- module_eval <<'.,.,', 'parser.y', 26
1024
- def _reduce_11( val, _values)
1025
- val[1]
1026
- end
1027
- .,.,
1028
-
1029
- module_eval <<'.,.,', 'parser.y', 27
1030
- def _reduce_12( val, _values)
1031
- val[1]
1032
- end
1033
- .,.,
1034
-
1035
- module_eval <<'.,.,', 'parser.y', 36
1036
- def _reduce_13( val, _values)
1037
- t = Time.gm(val[3].to_i, val[2], val[1].to_i, 0, 0, 0)
1038
- (t + val[4] - val[5]).localtime
1039
- end
1040
- .,.,
1041
-
1042
- # reduce 14 omitted
1043
-
1044
- # reduce 15 omitted
1045
-
1046
- module_eval <<'.,.,', 'parser.y', 45
1047
- def _reduce_16( val, _values)
1048
- (val[0].to_i * 60 * 60) +
1049
- (val[2].to_i * 60)
1050
- end
1051
- .,.,
1052
-
1053
- module_eval <<'.,.,', 'parser.y', 51
1054
- def _reduce_17( val, _values)
1055
- (val[0].to_i * 60 * 60) +
1056
- (val[2].to_i * 60) +
1057
- (val[4].to_i)
1058
- end
1059
- .,.,
1060
-
1061
- module_eval <<'.,.,', 'parser.y', 56
1062
- def _reduce_18( val, _values)
1063
- timezone_string_to_unixtime(val[0])
1064
- end
1065
- .,.,
1066
-
1067
- module_eval <<'.,.,', 'parser.y', 61
1068
- def _reduce_19( val, _values)
1069
- val
1070
- end
1071
- .,.,
1072
-
1073
- # reduce 20 omitted
1074
-
1075
- module_eval <<'.,.,', 'parser.y', 67
1076
- def _reduce_21( val, _values)
1077
- val[1]
1078
- end
1079
- .,.,
1080
-
1081
- # reduce 22 omitted
1082
-
1083
- module_eval <<'.,.,', 'parser.y', 73
1084
- def _reduce_23( val, _values)
1085
- val[1]
1086
- end
1087
- .,.,
1088
-
1089
- module_eval <<'.,.,', 'parser.y', 79
1090
- def _reduce_24( val, _values)
1091
- join_domain(val[0])
1092
- end
1093
- .,.,
1094
-
1095
- module_eval <<'.,.,', 'parser.y', 83
1096
- def _reduce_25( val, _values)
1097
- join_domain(val[2])
1098
- end
1099
- .,.,
1100
-
1101
- module_eval <<'.,.,', 'parser.y', 87
1102
- def _reduce_26( val, _values)
1103
- join_domain(val[0])
1104
- end
1105
- .,.,
1106
-
1107
- # reduce 27 omitted
1108
-
1109
- module_eval <<'.,.,', 'parser.y', 93
1110
- def _reduce_28( val, _values)
1111
- val[1]
1112
- end
1113
- .,.,
1114
-
1115
- module_eval <<'.,.,', 'parser.y', 98
1116
- def _reduce_29( val, _values)
1117
- []
1118
- end
1119
- .,.,
1120
-
1121
- module_eval <<'.,.,', 'parser.y', 103
1122
- def _reduce_30( val, _values)
1123
- val[0].push val[2]
1124
- val[0]
1125
- end
1126
- .,.,
1127
-
1128
- # reduce 31 omitted
1129
-
1130
- module_eval <<'.,.,', 'parser.y', 109
1131
- def _reduce_32( val, _values)
1132
- val[1]
1133
- end
1134
- .,.,
1135
-
1136
- module_eval <<'.,.,', 'parser.y', 113
1137
- def _reduce_33( val, _values)
1138
- val[1]
1139
- end
1140
- .,.,
1141
-
1142
- # reduce 34 omitted
1143
-
1144
- module_eval <<'.,.,', 'parser.y', 119
1145
- def _reduce_35( val, _values)
1146
- val[1]
1147
- end
1148
- .,.,
1149
-
1150
- module_eval <<'.,.,', 'parser.y', 125
1151
- def _reduce_36( val, _values)
1152
- val[0].spec
1153
- end
1154
- .,.,
1155
-
1156
- module_eval <<'.,.,', 'parser.y', 129
1157
- def _reduce_37( val, _values)
1158
- val[0].spec
1159
- end
1160
- .,.,
1161
-
1162
- # reduce 38 omitted
1163
-
1164
- module_eval <<'.,.,', 'parser.y', 136
1165
- def _reduce_39( val, _values)
1166
- val[1]
1167
- end
1168
- .,.,
1169
-
1170
- # reduce 40 omitted
1171
-
1172
- # reduce 41 omitted
1173
-
1174
- # reduce 42 omitted
1175
-
1176
- # reduce 43 omitted
1177
-
1178
- # reduce 44 omitted
1179
-
1180
- # reduce 45 omitted
1181
-
1182
- # reduce 46 omitted
1183
-
1184
- module_eval <<'.,.,', 'parser.y', 146
1185
- def _reduce_47( val, _values)
1186
- [ Address.new(nil, nil) ]
1187
- end
1188
- .,.,
1189
-
1190
- module_eval <<'.,.,', 'parser.y', 152
1191
- def _reduce_48( val, _values)
1192
- val
1193
- end
1194
- .,.,
1195
-
1196
- module_eval <<'.,.,', 'parser.y', 157
1197
- def _reduce_49( val, _values)
1198
- val[0].push val[2]
1199
- val[0]
1200
- end
1201
- .,.,
1202
-
1203
- # reduce 50 omitted
1204
-
1205
- # reduce 51 omitted
1206
-
1207
- module_eval <<'.,.,', 'parser.y', 165
1208
- def _reduce_52( val, _values)
1209
- val
1210
- end
1211
- .,.,
1212
-
1213
- module_eval <<'.,.,', 'parser.y', 170
1214
- def _reduce_53( val, _values)
1215
- val[0].push val[2]
1216
- val[0]
1217
- end
1218
- .,.,
1219
-
1220
- # reduce 54 omitted
1221
-
1222
- # reduce 55 omitted
1223
-
1224
- module_eval <<'.,.,', 'parser.y', 178
1225
- def _reduce_56( val, _values)
1226
- val[1].phrase = Decoder.decode(val[0])
1227
- val[1]
1228
- end
1229
- .,.,
1230
-
1231
- # reduce 57 omitted
1232
-
1233
- module_eval <<'.,.,', 'parser.y', 185
1234
- def _reduce_58( val, _values)
1235
- AddressGroup.new(val[0], val[2])
1236
- end
1237
- .,.,
1238
-
1239
- module_eval <<'.,.,', 'parser.y', 185
1240
- def _reduce_59( val, _values)
1241
- AddressGroup.new(val[0], [])
1242
- end
1243
- .,.,
1244
-
1245
- module_eval <<'.,.,', 'parser.y', 188
1246
- def _reduce_60( val, _values)
1247
- val[0].join('.')
1248
- end
1249
- .,.,
1250
-
1251
- module_eval <<'.,.,', 'parser.y', 189
1252
- def _reduce_61( val, _values)
1253
- val[0] << ' ' << val[1].join('.')
1254
- end
1255
- .,.,
1256
-
1257
- module_eval <<'.,.,', 'parser.y', 196
1258
- def _reduce_62( val, _values)
1259
- val[2].routes.replace val[1]
1260
- val[2]
1261
- end
1262
- .,.,
1263
-
1264
- module_eval <<'.,.,', 'parser.y', 200
1265
- def _reduce_63( val, _values)
1266
- val[1]
1267
- end
1268
- .,.,
1269
-
1270
- # reduce 64 omitted
1271
-
1272
- module_eval <<'.,.,', 'parser.y', 203
1273
- def _reduce_65( val, _values)
1274
- [ val[1].join('.') ]
1275
- end
1276
- .,.,
1277
-
1278
- module_eval <<'.,.,', 'parser.y', 204
1279
- def _reduce_66( val, _values)
1280
- val[0].push val[3].join('.'); val[0]
1281
- end
1282
- .,.,
1283
-
1284
- module_eval <<'.,.,', 'parser.y', 206
1285
- def _reduce_67( val, _values)
1286
- Address.new( val[0], val[2] )
1287
- end
1288
- .,.,
1289
-
1290
- module_eval <<'.,.,', 'parser.y', 207
1291
- def _reduce_68( val, _values)
1292
- Address.new( val[0], nil )
1293
- end
1294
- .,.,
1295
-
1296
- # reduce 69 omitted
1297
-
1298
- module_eval <<'.,.,', 'parser.y', 210
1299
- def _reduce_70( val, _values)
1300
- val[0].push ''; val[0]
1301
- end
1302
- .,.,
1303
-
1304
- module_eval <<'.,.,', 'parser.y', 213
1305
- def _reduce_71( val, _values)
1306
- val
1307
- end
1308
- .,.,
1309
-
1310
- module_eval <<'.,.,', 'parser.y', 222
1311
- def _reduce_72( val, _values)
1312
- val[1].times do
1313
- val[0].push ''
1314
- end
1315
- val[0].push val[2]
1316
- val[0]
1317
- end
1318
- .,.,
1319
-
1320
- module_eval <<'.,.,', 'parser.y', 224
1321
- def _reduce_73( val, _values)
1322
- val
1323
- end
1324
- .,.,
1325
-
1326
- module_eval <<'.,.,', 'parser.y', 233
1327
- def _reduce_74( val, _values)
1328
- val[1].times do
1329
- val[0].push ''
1330
- end
1331
- val[0].push val[2]
1332
- val[0]
1333
- end
1334
- .,.,
1335
-
1336
- module_eval <<'.,.,', 'parser.y', 234
1337
- def _reduce_75( val, _values)
1338
- 0
1339
- end
1340
- .,.,
1341
-
1342
- module_eval <<'.,.,', 'parser.y', 235
1343
- def _reduce_76( val, _values)
1344
- 1
1345
- end
1346
- .,.,
1347
-
1348
- # reduce 77 omitted
1349
-
1350
- # reduce 78 omitted
1351
-
1352
- # reduce 79 omitted
1353
-
1354
- # reduce 80 omitted
1355
-
1356
- # reduce 81 omitted
1357
-
1358
- # reduce 82 omitted
1359
-
1360
- # reduce 83 omitted
1361
-
1362
- # reduce 84 omitted
1363
-
1364
- module_eval <<'.,.,', 'parser.y', 253
1365
- def _reduce_85( val, _values)
1366
- val[1] = val[1].spec
1367
- val.join('')
1368
- end
1369
- .,.,
1370
-
1371
- module_eval <<'.,.,', 'parser.y', 254
1372
- def _reduce_86( val, _values)
1373
- val
1374
- end
1375
- .,.,
1376
-
1377
- module_eval <<'.,.,', 'parser.y', 255
1378
- def _reduce_87( val, _values)
1379
- val[0].push val[2]; val[0]
1380
- end
1381
- .,.,
1382
-
1383
- # reduce 88 omitted
1384
-
1385
- module_eval <<'.,.,', 'parser.y', 258
1386
- def _reduce_89( val, _values)
1387
- val[0] << ' ' << val[1]
1388
- end
1389
- .,.,
1390
-
1391
- module_eval <<'.,.,', 'parser.y', 265
1392
- def _reduce_90( val, _values)
1393
- val.push nil
1394
- val
1395
- end
1396
- .,.,
1397
-
1398
- module_eval <<'.,.,', 'parser.y', 269
1399
- def _reduce_91( val, _values)
1400
- val
1401
- end
1402
- .,.,
1403
-
1404
- module_eval <<'.,.,', 'parser.y', 274
1405
- def _reduce_92( val, _values)
1406
- [ val[0].to_i, val[2].to_i ]
1407
- end
1408
- .,.,
1409
-
1410
- module_eval <<'.,.,', 'parser.y', 279
1411
- def _reduce_93( val, _values)
1412
- [ val[0].downcase, val[2].downcase, decode_params(val[3]) ]
1413
- end
1414
- .,.,
1415
-
1416
- module_eval <<'.,.,', 'parser.y', 283
1417
- def _reduce_94( val, _values)
1418
- [ val[0].downcase, nil, decode_params(val[1]) ]
1419
- end
1420
- .,.,
1421
-
1422
- module_eval <<'.,.,', 'parser.y', 288
1423
- def _reduce_95( val, _values)
1424
- {}
1425
- end
1426
- .,.,
1427
-
1428
- module_eval <<'.,.,', 'parser.y', 293
1429
- def _reduce_96( val, _values)
1430
- val[0][ val[2].downcase ] = ('"' + val[4].to_s + '"')
1431
- val[0]
1432
- end
1433
- .,.,
1434
-
1435
- module_eval <<'.,.,', 'parser.y', 298
1436
- def _reduce_97( val, _values)
1437
- val[0][ val[2].downcase ] = val[4]
1438
- val[0]
1439
- end
1440
- .,.,
1441
-
1442
- module_eval <<'.,.,', 'parser.y', 303
1443
- def _reduce_98( val, _values)
1444
- val[0].downcase
1445
- end
1446
- .,.,
1447
-
1448
- module_eval <<'.,.,', 'parser.y', 308
1449
- def _reduce_99( val, _values)
1450
- [ val[0].downcase, decode_params(val[1]) ]
1451
- end
1452
- .,.,
1453
-
1454
- # reduce 100 omitted
1455
-
1456
- # reduce 101 omitted
1457
-
1458
- # reduce 102 omitted
1459
-
1460
- # reduce 103 omitted
1461
-
1462
- # reduce 104 omitted
1463
-
1464
- # reduce 105 omitted
1465
-
1466
- # reduce 106 omitted
1467
-
1468
- # reduce 107 omitted
1469
-
1470
- # reduce 108 omitted
1471
-
1472
- def _reduce_none( val, _values)
1473
- val[0]
1474
- end
1475
-
1476
- end # class Parser
1477
-
1478
- end # module TMail