mms2r 1.1.12 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. data/History.txt +32 -2
  2. data/Manifest.txt +41 -79
  3. data/README.txt +50 -51
  4. data/Rakefile +3 -2
  5. data/conf/aliases.yml +8 -0
  6. data/conf/message.alltel.com.yml +14 -0
  7. data/conf/messaging.nextel.com.yml +10 -0
  8. data/conf/mms.att.net.yml +9 -0
  9. data/conf/mms.dobson.net.yml +4 -0
  10. data/conf/mms.luxgsm.lu.yml +8 -0
  11. data/conf/mms.myhelio.com.yml +12 -0
  12. data/conf/mms.netcom.no.yml +4 -0
  13. data/conf/mms.o2online.de.yml +8 -0
  14. data/conf/mms.three.co.uk.yml +15 -0
  15. data/conf/mms2r_media.yml +6 -0
  16. data/conf/orangemms.net.yml +13 -0
  17. data/conf/pm.sprint.com.yml +10 -0
  18. data/conf/pxt.vodafone.net.nz.yml +5 -0
  19. data/conf/tmomail.net.yml +16 -0
  20. data/conf/vzwpix.com.yml +8 -0
  21. data/dev_tools/anonymizer.rb +20 -0
  22. data/lib/mms2r.rb +19 -45
  23. data/lib/mms2r/media.rb +288 -300
  24. data/lib/mms2r/media/sprint.rb +189 -0
  25. data/test/fixtures/att-text-01.mail +27 -0
  26. data/test/fixtures/helio-image-01.mail +8 -8
  27. data/test/fixtures/helio-message-01.mail +327 -0
  28. data/test/fixtures/luxgsm-image-01.mail +388 -0
  29. data/test/fixtures/netcom-image-01.mail +556 -0
  30. data/test/fixtures/o2-de-image-01.mail +314 -0
  31. data/test/fixtures/orange-uk-image-01.mail +71 -0
  32. data/test/fixtures/pxt-image-01.mail +118 -0
  33. data/test/fixtures/sprint-broken-image-01.mail +1 -1
  34. data/test/fixtures/sprint-image-01.mail +211 -195
  35. data/test/fixtures/sprint-purged-image-01.mail +1 -1
  36. data/test/fixtures/sprint-two-images-01.mail +231 -198
  37. data/test/fixtures/sprint-video-01.mail +210 -195
  38. data/test/fixtures/three-uk-image-01.mail +1202 -0
  39. data/test/test_helper.rb +39 -0
  40. data/test/{test_mms2r_alltel_media.rb → test_message_alltel_com.rb} +13 -17
  41. data/test/{test_mms2r_nextel_media.rb → test_messaging_nextel_com.rb} +12 -19
  42. data/test/{test_mms2r_sprint_pcs_media.rb → test_messaging_sprintpcs_com.rb} +9 -10
  43. data/test/test_mms2r_media.rb +474 -316
  44. data/test/test_mms_att_net.rb +92 -0
  45. data/test/test_mms_dobson_net.rb +41 -0
  46. data/test/test_mms_luxgsm_lu.rb +50 -0
  47. data/test/test_mms_myhelio_com.rb +60 -0
  48. data/test/test_mms_netcom_no.rb +52 -0
  49. data/test/test_mms_o2online_de.rb +53 -0
  50. data/test/test_mms_three_co_uk.rb +42 -0
  51. data/test/test_orangemms_net.rb +100 -0
  52. data/test/test_pm_sprint_com.rb +201 -0
  53. data/test/test_pxt_vodafone_net_nz.rb +37 -0
  54. data/test/{test_mms2r_t_mobile_media.rb → test_tmomail_net.rb} +8 -19
  55. data/test/{test_mms2r_verizon_media.rb → test_vzwpix_com.rb} +34 -27
  56. data/vendor/plugins/mms2r/lib/autotest/mms2r.rb +16 -11
  57. metadata +128 -157
  58. data/conf/mms2r_alltel_media_ignore.yml +0 -13
  59. data/conf/mms2r_att_media_subject.yml +0 -3
  60. data/conf/mms2r_cingular_me_media_subject.yml +0 -3
  61. data/conf/mms2r_cingular_me_media_transform.yml +0 -7
  62. data/conf/mms2r_dobson_media_ignore.yml +0 -4
  63. data/conf/mms2r_helio_media_ignore.yml +0 -6
  64. data/conf/mms2r_media_ignore.yml +0 -5
  65. data/conf/mms2r_media_subject.yml +0 -3
  66. data/conf/mms2r_my_cingular_media_subject.yml +0 -3
  67. data/conf/mms2r_nextel_media_ignore.yml +0 -11
  68. data/conf/mms2r_orange_france_media_ignore.yml +0 -6
  69. data/conf/mms2r_orange_poland_media_subject.yml +0 -3
  70. data/conf/mms2r_sprint_media_ignore.yml +0 -7
  71. data/conf/mms2r_sprint_media_subject.yml +0 -3
  72. data/conf/mms2r_t_mobile_media_ignore.yml +0 -16
  73. data/conf/mms2r_verizon_media_ignore.yml +0 -4
  74. data/conf/mms2r_verizon_media_transform.yml +0 -5
  75. data/lib/mms2r/alltel_media.rb +0 -10
  76. data/lib/mms2r/att_media.rb +0 -13
  77. data/lib/mms2r/cingular_me_media.rb +0 -23
  78. data/lib/mms2r/dobson_media.rb +0 -13
  79. data/lib/mms2r/helio_media.rb +0 -20
  80. data/lib/mms2r/m_mode_media.rb +0 -13
  81. data/lib/mms2r/my_cingular_media.rb +0 -15
  82. data/lib/mms2r/nextel_media.rb +0 -17
  83. data/lib/mms2r/orange_france_media.rb +0 -10
  84. data/lib/mms2r/orange_poland_media.rb +0 -10
  85. data/lib/mms2r/sprint_media.rb +0 -182
  86. data/lib/mms2r/sprint_pcs_media.rb +0 -16
  87. data/lib/mms2r/t_mobile_media.rb +0 -21
  88. data/lib/mms2r/verizon_media.rb +0 -19
  89. data/lib/mms2r/vtext_media.rb +0 -16
  90. data/lib/vendor/text/format.rb +0 -1466
  91. data/lib/vendor/tmail.rb +0 -3
  92. data/lib/vendor/tmail/address.rb +0 -242
  93. data/lib/vendor/tmail/attachments.rb +0 -39
  94. data/lib/vendor/tmail/base64.rb +0 -71
  95. data/lib/vendor/tmail/config.rb +0 -69
  96. data/lib/vendor/tmail/encode.rb +0 -467
  97. data/lib/vendor/tmail/facade.rb +0 -552
  98. data/lib/vendor/tmail/header.rb +0 -914
  99. data/lib/vendor/tmail/info.rb +0 -35
  100. data/lib/vendor/tmail/loader.rb +0 -1
  101. data/lib/vendor/tmail/mail.rb +0 -447
  102. data/lib/vendor/tmail/mailbox.rb +0 -433
  103. data/lib/vendor/tmail/mbox.rb +0 -1
  104. data/lib/vendor/tmail/net.rb +0 -280
  105. data/lib/vendor/tmail/obsolete.rb +0 -135
  106. data/lib/vendor/tmail/parser.rb +0 -1522
  107. data/lib/vendor/tmail/port.rb +0 -377
  108. data/lib/vendor/tmail/quoting.rb +0 -131
  109. data/lib/vendor/tmail/scanner.rb +0 -41
  110. data/lib/vendor/tmail/scanner_r.rb +0 -263
  111. data/lib/vendor/tmail/stringio.rb +0 -277
  112. data/lib/vendor/tmail/tmail.rb +0 -1
  113. data/lib/vendor/tmail/utils.rb +0 -238
  114. data/test/fixtures/broken_from_spam.mail +0 -80
  115. data/test/fixtures/hello_world_empty_text.mail +0 -7
  116. data/test/fixtures/hello_world_mail_multipart.mail +0 -24
  117. data/test/fixtures/hello_world_mail_plain_no_content_type.mail +0 -7
  118. data/test/fixtures/hello_world_mail_plain_with_content_type.mail +0 -8
  119. data/test/fixtures/simple-with-two-images-two-texts.mail +0 -49
  120. data/test/fixtures/simple_image.mail +0 -19
  121. data/test/fixtures/simple_multipart_alternative.mail +0 -42
  122. data/test/test_mms2r_att_media.rb +0 -54
  123. data/test/test_mms2r_cingular_me_media.rb +0 -51
  124. data/test/test_mms2r_dobson_media.rb +0 -46
  125. data/test/test_mms2r_helio_media.rb +0 -49
  126. data/test/test_mms2r_m_mode_media.rb +0 -36
  127. data/test/test_mms2r_my_cingular_media.rb +0 -31
  128. data/test/test_mms2r_orange_france_media.rb +0 -53
  129. data/test/test_mms2r_orange_poland_media.rb +0 -42
  130. data/test/test_mms2r_sprint_media.rb +0 -269
  131. data/test/test_mms2r_vtext_media.rb +0 -28
@@ -1,28 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
2
- require File.dirname(__FILE__) + "/test_helper"
3
- require 'test/unit'
4
- require 'rubygems'
5
- require 'mms2r'
6
- require 'mms2r/media'
7
- require 'tmail/mail'
8
- require 'logger'
9
-
10
- class MMS2R::VtextMediaTest < Test::Unit::TestCase
11
- include MMS2R::TestHelper
12
-
13
- def test_simple_text_vtext
14
-
15
- mail = TMail::Mail.parse(load_mail('vtext-text-01.mail').join)
16
- mms = MMS2R::Media.create(mail)
17
- assert_equal(MMS2R::VtextMedia, mms.class, "expected a #{MMS2R::VtextMedia} and received a #{mms.class}")
18
- mms.process
19
- assert_not_nil(mms.media['text/plain'])
20
- file = mms.media['text/plain'][0]
21
- assert_not_nil(file)
22
- assert(File::exist?(file), "file #{file} does not exist")
23
- text = IO.readlines("#{file}").join
24
- assert_match(/hello world/, text)
25
- mms.purge
26
- end
27
-
28
- end