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,13 +0,0 @@
1
- ---
2
- text/html:
3
- - !ruby/regexp /^<html> <head> <title>Picture Messaging<\/title>.*/
4
- multipart/alternative:
5
- - mms
6
- image/gif:
7
- - spacer.gif
8
- - header.gif
9
- - bluebar.gif
10
- - divider.gif
11
- - greenbar.gif
12
- image/jpeg:
13
- - alltel_logo.jpg
@@ -1,3 +0,0 @@
1
- ---
2
- - !ruby/regexp /^Multimedia message$/i
3
-
@@ -1,3 +0,0 @@
1
- ---
2
- - !ruby/regexp /^Multimedia message$/i
3
-
@@ -1,7 +0,0 @@
1
- ---
2
- text/plain:
3
- "\n--\n\
4
- ===============================================\n\
5
- Brought to you by, Cingular Wireless Messaging\n\
6
- http://www.CingularMe.COM/": ""
7
-
@@ -1,4 +0,0 @@
1
- ---
2
- application/smil:
3
- - !ruby/regexp /^<smil><head><layout><root-layout width=/
4
-
@@ -1,6 +0,0 @@
1
- ---
2
- image/gif:
3
- - top.gif
4
- - bottom.gif
5
- - middle_img.gif
6
-
@@ -1,5 +0,0 @@
1
- ---
2
- multipart/mixed:
3
- - !ruby/regexp /^Attachment\:\ /
4
- text/plain:
5
- - !ruby/regexp /^\s+$/
@@ -1,3 +0,0 @@
1
- ---
2
- - !ruby/regexp /^\(no subject\)$/i
3
-
@@ -1,3 +0,0 @@
1
- ---
2
- - !ruby/regexp /^Multimedia message$/i
3
-
@@ -1,11 +0,0 @@
1
- ---
2
- text/plain:
3
- - !ruby/regexp /^This is an MMS message. 20\d\d Sprint Nextel. All rights reserved./
4
- - !ruby/regexp /^This is an MMS message. Please go to http:\/\/mms.nextel.com\/mms\/anon\/do\/legacy\/viewDirect/
5
- - !ruby/regexp /^This is a multi-part message in MIME format./
6
- text/html:
7
- - !ruby/regexp /^<html><body> This is an MMS message. <br><center> 20\d\d Sprint Nextel. All rights reserved <br><\/center> <\/body><\/html>/
8
- - !ruby/regexp /^<html><body> <center>This is an MMS message. <br><center> 20\d\d Sprint Nextel. All rights reserved<\/center><br><img/
9
- - !ruby/regexp /^<html><body> This is an MMS message. <br><center> 20\d\d Sprint Nextel. All rights reserved<\/center> <\/body><\/html>/
10
- - !ruby/regexp /^<html><body> This is an MMS message. Please go to <a href="http:\/\/mms.nextel.com\/mms\/anon\/do\/legacy\/viewDirect/
11
-
@@ -1,6 +0,0 @@
1
- ---
2
- application/smil:
3
- - !ruby/regexp /^<smil><head><layout><root-layout height=/
4
- text/plain:
5
- - banniere.txt
6
-
@@ -1,3 +0,0 @@
1
- ---
2
- - !ruby/regexp /^Wiadomość multimedialna.\s*$/i
3
-
@@ -1,7 +0,0 @@
1
- ---
2
- text/html:
3
- - !ruby/regexp /Ze're sorry, this page is not available. We apologize for the inconvenience./
4
- text/plain:
5
- - !ruby/regexp /^You have new Picture Mail! Click Go/View to see now./
6
- - !ruby/regexp /^You have new Video Mail! Click Go/View to see now./
7
-
@@ -1,3 +0,0 @@
1
- ---
2
- - !ruby/regexp /^You have new Picture Mail!$/i
3
-
@@ -1,16 +0,0 @@
1
- ---
2
- text/html:
3
- - !ruby/regexp /^<html> <head> <title>T-Mobile</title>/
4
- image/jpeg:
5
- - masthead.jpg
6
- image/gif:
7
- - dottedline350.gif
8
- - dottedline600.gif
9
- - dottedLine_350.gif
10
- - dottedLine_600.gif
11
- - spacer.gif
12
- - video.gif
13
- - audio.gif
14
- - tmobilelogo.gif
15
- - tmobilespace.gif
16
-
@@ -1,4 +0,0 @@
1
- ---
2
- text/plain:
3
- - !ruby/regexp /^This message was sent using PIX-FLIX Messaging service from Verizon Wireless!.*$/
4
-
@@ -1,5 +0,0 @@
1
- ---
2
- text/plain:
3
- ? !ruby/regexp /^(.+?)\s+This message was sent using PIX-FLIX Messaging service from Verizon Wireless!.*/m
4
- : \1
5
-
@@ -1,10 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # Alltel version of MMS2R::Media
5
- #
6
- # Alltel inlcudes various Alltel advertising wrapped in a HTML presentation
7
-
8
- class MMS2R::AlltelMedia < MMS2R::Media
9
- end
10
- end
@@ -1,13 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # AT&T version of MMS2R::Media
5
- #
6
- # The AT&T examples (like their MMode brothers)
7
- # do not contain advertising and the subject of the
8
- # message can be the file name of the media attached
9
- # to the MMS or empty.
10
-
11
- class MMS2R::AttMedia < MMS2R::Media
12
- end
13
- end
@@ -1,23 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # Cingular Me version of MMS2R::Media
5
- #
6
- # The characteristics of Cingular Me is that its the
7
- # MMS version of a SMS, essentially just a non-multipart
8
- # (plain) email.
9
- #
10
- # The default Subject from the carrier these messages
11
- # is just an empty string
12
- #
13
- # There is often a text footer in these messages:
14
- #
15
- # --
16
- # ===============================================
17
- # Brought to you by, Cingular Wireless Messaging
18
- # http://www.CingularMe.COM/
19
- #
20
-
21
- class MMS2R::CingularMeMedia < MMS2R::Media
22
- end
23
- end
@@ -1,13 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # Dobson/Cellular One version version of MMS2R::Media
5
- #
6
- # So far, Dobson MMS messages do not contain advertising
7
- # They do, however, have a SMIL part that gives markup
8
- # structure to any user generated content the MMS may
9
- # contain and can be safely ignored.
10
-
11
- class MMS2R::DobsonMedia < MMS2R::Media
12
- end
13
- end
@@ -1,20 +0,0 @@
1
- require 'rubygems'
2
- require 'hpricot'
3
- module MMS2R
4
-
5
- ##
6
- # Helio version version of MMS2R::Media
7
- #
8
- # Helio has a clean multipart/mixed message format. It
9
- # includes markup that holds some branding around the media
10
- # artifact. If text is included with the message it is located
11
- # in the markup.
12
-
13
- class MMS2R::HelioMedia < MMS2R::Media
14
- def body
15
- d = Hpricot(default_text())
16
- body = d.search("//table/tr[2]/td/table/tr/td/table/tr[6]/td").inner_html
17
- body
18
- end
19
- end
20
- end
@@ -1,13 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # MMode version of MMS2R::Media
5
- #
6
- # The only examples of MMode seen so far do not
7
- # contain advertising and the subject of the
8
- # message is the file name of the media attached
9
- # to the MMS.
10
-
11
- class MMS2R::MModeMedia < MMS2R::Media
12
- end
13
- end
@@ -1,15 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # My Cingular version of MMS2R::Media
5
- #
6
- # The Cingular MMS messages are well formed multipart
7
- # mails and do not contain any extra advertising or
8
- # mark up for structure.
9
- #
10
- # The default subject from the carrier if the user does
11
- # not provide one is "Multimedia message"
12
-
13
- class MMS2R::MyCingularMedia < MMS2R::Media
14
- end
15
- end
@@ -1,17 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # Nextel version of MMS2R::Media
5
- #
6
- # Typically these messages have two multiparts, one is the
7
- # image attached to the MMS and the other is a multipart
8
- # alternative. The alternative has text and html alternative
9
- # parts announcing the fact that its a MMS message from
10
- # Sprint Nextel and these parts can be ignored.
11
- #
12
- # The default subject on these messages from the carrier
13
- # is the name of the image or video attached to the message.
14
-
15
- class MMS2R::NextelMedia < MMS2R::Media
16
- end
17
- end
@@ -1,10 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # Orange-France version of MMS2R::Media
5
- #
6
- # Orange uses multipart/mixed
7
-
8
- class MMS2R::OrangeFranceMedia < MMS2R::Media
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- module MMS2R
2
-
3
- ##
4
- # Orange-Poland version of MMS2R::Media
5
- #
6
- # Orange-Poland adds its own subject if it's empty.
7
-
8
- class MMS2R::OrangePolandMedia < MMS2R::Media
9
- end
10
- end
@@ -1,182 +0,0 @@
1
- require 'net/http'
2
- require 'rubygems'
3
- require 'hpricot'
4
- require 'cgi'
5
-
6
- module MMS2R
7
-
8
- ##
9
- # Sprint version of MMS2R::Media
10
- #
11
- # Sprint is an annoying carrier because they think they
12
- # are so important that they don't actually transmit
13
- # user generated content (like images or videos) directly
14
- # in the MMS message. Instead, what they do is hijack the
15
- # media that is sent from the cellular subscriber and place
16
- # that content on a content server. In place of the media
17
- # the recipient receives a HTML part telling the recipient
18
- # how great Sprint is with links back to their content server.
19
- # Then the recipient has to click through Sprint more pages
20
- # to view the content.
21
- #
22
- # The default subject on these messages from the
23
- # carrier is "You have new Picture Mail!"
24
-
25
- class MMS2R::SprintMedia < MMS2R::Media
26
-
27
- ##
28
- # MMS2R::SprintMedia has to override process() because Sprint
29
- # doesn't attach media (images, video, etc.) to its MMS. Media such
30
- # as images and videos are hosted on a Sprint content server.
31
- # MMS2R::SprintMedia has to pick apart an HTML attachment to find
32
- # the URL to the media on Sprint's content server and download
33
- # each piece of content. Any text message part of the MMS
34
- # if it exists is embedded in the html.
35
-
36
- def process
37
- @logger.info("#{self.class} processing") unless @logger.nil?
38
- #sprint MMS are multipart
39
- parts = @mail.parts
40
-
41
- #find the payload html
42
- doc = nil
43
- parts.each do |p|
44
- next unless self.class.part_type?(p).eql?('text/html')
45
- d = Hpricot(p.body)
46
- title = d.at('title').inner_html
47
- doc = d if title =~ /You have new Picture Mail!/
48
- end
49
- return if doc.nil? #it was a dud
50
-
51
- # break it down
52
- sprint_phone_number(doc)
53
- sprint_process_text(doc)
54
- sprint_process_media(doc)
55
-
56
- # when process acts upon a block
57
- if block_given?
58
- media.each do |k, v|
59
- yield(k, v)
60
- end
61
- end
62
-
63
- end
64
-
65
- private
66
-
67
- ##
68
- # Digs out where Sprint hides the phone number
69
-
70
- def sprint_phone_number(doc)
71
- c = doc.search("/html/head/comment()").last
72
- t = c.content.gsub(/\s+/m," ").strip
73
- #@number returned in parent's #number
74
- @number = / name=&quot;MDN&quot;&gt;(\d+)&lt;/.match(t)[1]
75
- end
76
-
77
- ##
78
- # pulls out the user text form the MMS and adds the text
79
- # to media hash
80
-
81
- def sprint_process_text(doc)
82
- # there is at least one <pre> with MMS text if text has been included by
83
- # the user. (note) we'll have to verify that if they attach multiple texts
84
- # to the MMS then Sprint stacks it up in multiple <pre>'s. The only <pre>
85
- # tag in the document is for text from the user.
86
- doc.search("/html/body//pre").each do |pre|
87
- type = 'text/plain'
88
- text = pre.inner_html.strip
89
- next if text.empty?
90
- type, text = transform_text(type, text)
91
- type, file = sprint_write_file(type, text.strip)
92
- add_file(type, file) unless type.nil? || file.nil?
93
- end
94
- end
95
-
96
- ##
97
- # Fetch all the media that is referred to in the doc
98
-
99
- def sprint_process_media(doc)
100
- srcs = Array.new
101
- # collect all the images in the document, even though
102
- # they are <img> tag some might actually refer to video.
103
- # To know the link refers to vide one must look at the
104
- # content type on the http GET response.
105
- imgs = doc.search("/html/body//img")
106
- imgs.each do |i|
107
- src = i.attributes['src']
108
- # we don't want to double fetch content and we only
109
- # want to fetch media from the content server, you get
110
- # a clue about that as there is a RECIPIENT in the URI path
111
- # of real content
112
- next unless /mmps\/RECIPIENT\//.match(src)
113
- next if srcs.detect{|s| s.eql?(src)}
114
- srcs << src
115
- end
116
-
117
- #we've got the payload now, go fetch them
118
- cnt = 0
119
- srcs.each do |src|
120
- begin
121
- # clean out the limiting parameters for images for the content server
122
- # to get at the original image
123
- url = URI.parse(CGI.unescapeHTML(src))
124
- query={}
125
- url.query.split('&').each{|a| p=a.split('='); query[p[0]] = p[1]}
126
- query.delete_if{|k, v| k == 'limitsize' or k == 'squareoutput' }
127
- url.query = query.map{|k,v| "#{k}=#{v}"}.join("&")
128
-
129
- #res = Net::HTTP.get_response(url)
130
- #lets be vanilla stealth
131
- agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)"
132
- res = Net::HTTP.start(url.host, url.port) do |http|
133
- req = Net::HTTP::Get.new(url.request_uri, {'User-Agent' => agent})
134
- http.request(req)
135
- end
136
- rescue StandardError => err
137
- @logger.error("#{self.class} processing error, #{$!}") unless @logger.nil?
138
- next
139
- end
140
-
141
- # if the Sprint content server uses response code 500 when the content is purged
142
- # the content type will text/html and the body will be the message
143
- if res.content_type == 'text/html' && res.code = 500
144
- @logger.error("Sprint content server returned response code 500") unless @logger.nil?
145
- next
146
- end
147
-
148
- # setup the file path and file
149
- base = /\/RECIPIENT\/([^\/]+)\//.match(src)[1]
150
- type = res.content_type
151
- file_name = "#{base}-#{cnt}.#{self.class.default_ext(type)}"
152
- file = File.join(msg_tmp_dir(),File.basename(file_name))
153
-
154
- # write it and add it to the media hash
155
- type, file = sprint_write_file(type, res.body, file)
156
- add_file(type, file) unless type.nil? || file.nil?
157
- cnt = cnt + 1
158
- end
159
-
160
- end
161
-
162
- ##
163
- # Creates a temporary file based on the type
164
-
165
- def sprint_temp_file(type)
166
- file_name = "#{Time.now.to_f}.#{self.class.default_ext(type)}"
167
- File.join(msg_tmp_dir(),File.basename(file_name))
168
- end
169
-
170
- ##
171
- # Writes the content to a file and returns the type, file as a tuple.
172
- def sprint_write_file(type, content, file = nil)
173
- file = sprint_temp_file(type) if file.nil?
174
- @logger.info("#{self.class} writing file #{file}") unless @logger.nil?
175
- File.open(file,'w'){ |f|
176
- f.write(content)
177
- }
178
- return type, file
179
- end
180
-
181
- end
182
- end