mms2r 1.1.12 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +32 -2
- data/Manifest.txt +41 -79
- data/README.txt +50 -51
- data/Rakefile +3 -2
- data/conf/aliases.yml +8 -0
- data/conf/message.alltel.com.yml +14 -0
- data/conf/messaging.nextel.com.yml +10 -0
- data/conf/mms.att.net.yml +9 -0
- data/conf/mms.dobson.net.yml +4 -0
- data/conf/mms.luxgsm.lu.yml +8 -0
- data/conf/mms.myhelio.com.yml +12 -0
- data/conf/mms.netcom.no.yml +4 -0
- data/conf/mms.o2online.de.yml +8 -0
- data/conf/mms.three.co.uk.yml +15 -0
- data/conf/mms2r_media.yml +6 -0
- data/conf/orangemms.net.yml +13 -0
- data/conf/pm.sprint.com.yml +10 -0
- data/conf/pxt.vodafone.net.nz.yml +5 -0
- data/conf/tmomail.net.yml +16 -0
- data/conf/vzwpix.com.yml +8 -0
- data/dev_tools/anonymizer.rb +20 -0
- data/lib/mms2r.rb +19 -45
- data/lib/mms2r/media.rb +288 -300
- data/lib/mms2r/media/sprint.rb +189 -0
- data/test/fixtures/att-text-01.mail +27 -0
- data/test/fixtures/helio-image-01.mail +8 -8
- data/test/fixtures/helio-message-01.mail +327 -0
- data/test/fixtures/luxgsm-image-01.mail +388 -0
- data/test/fixtures/netcom-image-01.mail +556 -0
- data/test/fixtures/o2-de-image-01.mail +314 -0
- data/test/fixtures/orange-uk-image-01.mail +71 -0
- data/test/fixtures/pxt-image-01.mail +118 -0
- data/test/fixtures/sprint-broken-image-01.mail +1 -1
- data/test/fixtures/sprint-image-01.mail +211 -195
- data/test/fixtures/sprint-purged-image-01.mail +1 -1
- data/test/fixtures/sprint-two-images-01.mail +231 -198
- data/test/fixtures/sprint-video-01.mail +210 -195
- data/test/fixtures/three-uk-image-01.mail +1202 -0
- data/test/test_helper.rb +39 -0
- data/test/{test_mms2r_alltel_media.rb → test_message_alltel_com.rb} +13 -17
- data/test/{test_mms2r_nextel_media.rb → test_messaging_nextel_com.rb} +12 -19
- data/test/{test_mms2r_sprint_pcs_media.rb → test_messaging_sprintpcs_com.rb} +9 -10
- data/test/test_mms2r_media.rb +474 -316
- data/test/test_mms_att_net.rb +92 -0
- data/test/test_mms_dobson_net.rb +41 -0
- data/test/test_mms_luxgsm_lu.rb +50 -0
- data/test/test_mms_myhelio_com.rb +60 -0
- data/test/test_mms_netcom_no.rb +52 -0
- data/test/test_mms_o2online_de.rb +53 -0
- data/test/test_mms_three_co_uk.rb +42 -0
- data/test/test_orangemms_net.rb +100 -0
- data/test/test_pm_sprint_com.rb +201 -0
- data/test/test_pxt_vodafone_net_nz.rb +37 -0
- data/test/{test_mms2r_t_mobile_media.rb → test_tmomail_net.rb} +8 -19
- data/test/{test_mms2r_verizon_media.rb → test_vzwpix_com.rb} +34 -27
- data/vendor/plugins/mms2r/lib/autotest/mms2r.rb +16 -11
- metadata +128 -157
- data/conf/mms2r_alltel_media_ignore.yml +0 -13
- data/conf/mms2r_att_media_subject.yml +0 -3
- data/conf/mms2r_cingular_me_media_subject.yml +0 -3
- data/conf/mms2r_cingular_me_media_transform.yml +0 -7
- data/conf/mms2r_dobson_media_ignore.yml +0 -4
- data/conf/mms2r_helio_media_ignore.yml +0 -6
- data/conf/mms2r_media_ignore.yml +0 -5
- data/conf/mms2r_media_subject.yml +0 -3
- data/conf/mms2r_my_cingular_media_subject.yml +0 -3
- data/conf/mms2r_nextel_media_ignore.yml +0 -11
- data/conf/mms2r_orange_france_media_ignore.yml +0 -6
- data/conf/mms2r_orange_poland_media_subject.yml +0 -3
- data/conf/mms2r_sprint_media_ignore.yml +0 -7
- data/conf/mms2r_sprint_media_subject.yml +0 -3
- data/conf/mms2r_t_mobile_media_ignore.yml +0 -16
- data/conf/mms2r_verizon_media_ignore.yml +0 -4
- data/conf/mms2r_verizon_media_transform.yml +0 -5
- data/lib/mms2r/alltel_media.rb +0 -10
- data/lib/mms2r/att_media.rb +0 -13
- data/lib/mms2r/cingular_me_media.rb +0 -23
- data/lib/mms2r/dobson_media.rb +0 -13
- data/lib/mms2r/helio_media.rb +0 -20
- data/lib/mms2r/m_mode_media.rb +0 -13
- data/lib/mms2r/my_cingular_media.rb +0 -15
- data/lib/mms2r/nextel_media.rb +0 -17
- data/lib/mms2r/orange_france_media.rb +0 -10
- data/lib/mms2r/orange_poland_media.rb +0 -10
- data/lib/mms2r/sprint_media.rb +0 -182
- data/lib/mms2r/sprint_pcs_media.rb +0 -16
- data/lib/mms2r/t_mobile_media.rb +0 -21
- data/lib/mms2r/verizon_media.rb +0 -19
- data/lib/mms2r/vtext_media.rb +0 -16
- data/lib/vendor/text/format.rb +0 -1466
- data/lib/vendor/tmail.rb +0 -3
- data/lib/vendor/tmail/address.rb +0 -242
- data/lib/vendor/tmail/attachments.rb +0 -39
- data/lib/vendor/tmail/base64.rb +0 -71
- data/lib/vendor/tmail/config.rb +0 -69
- data/lib/vendor/tmail/encode.rb +0 -467
- data/lib/vendor/tmail/facade.rb +0 -552
- data/lib/vendor/tmail/header.rb +0 -914
- data/lib/vendor/tmail/info.rb +0 -35
- data/lib/vendor/tmail/loader.rb +0 -1
- data/lib/vendor/tmail/mail.rb +0 -447
- data/lib/vendor/tmail/mailbox.rb +0 -433
- data/lib/vendor/tmail/mbox.rb +0 -1
- data/lib/vendor/tmail/net.rb +0 -280
- data/lib/vendor/tmail/obsolete.rb +0 -135
- data/lib/vendor/tmail/parser.rb +0 -1522
- data/lib/vendor/tmail/port.rb +0 -377
- data/lib/vendor/tmail/quoting.rb +0 -131
- data/lib/vendor/tmail/scanner.rb +0 -41
- data/lib/vendor/tmail/scanner_r.rb +0 -263
- data/lib/vendor/tmail/stringio.rb +0 -277
- data/lib/vendor/tmail/tmail.rb +0 -1
- data/lib/vendor/tmail/utils.rb +0 -238
- data/test/fixtures/broken_from_spam.mail +0 -80
- data/test/fixtures/hello_world_empty_text.mail +0 -7
- data/test/fixtures/hello_world_mail_multipart.mail +0 -24
- data/test/fixtures/hello_world_mail_plain_no_content_type.mail +0 -7
- data/test/fixtures/hello_world_mail_plain_with_content_type.mail +0 -8
- data/test/fixtures/simple-with-two-images-two-texts.mail +0 -49
- data/test/fixtures/simple_image.mail +0 -19
- data/test/fixtures/simple_multipart_alternative.mail +0 -42
- data/test/test_mms2r_att_media.rb +0 -54
- data/test/test_mms2r_cingular_me_media.rb +0 -51
- data/test/test_mms2r_dobson_media.rb +0 -46
- data/test/test_mms2r_helio_media.rb +0 -49
- data/test/test_mms2r_m_mode_media.rb +0 -36
- data/test/test_mms2r_my_cingular_media.rb +0 -31
- data/test/test_mms2r_orange_france_media.rb +0 -53
- data/test/test_mms2r_orange_poland_media.rb +0 -42
- data/test/test_mms2r_sprint_media.rb +0 -269
- data/test/test_mms2r_vtext_media.rb +0 -28
data/conf/mms2r_media_ignore.yml
DELETED
@@ -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,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,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
|
-
|
data/lib/mms2r/alltel_media.rb
DELETED
data/lib/mms2r/att_media.rb
DELETED
@@ -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
|
data/lib/mms2r/dobson_media.rb
DELETED
@@ -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
|
data/lib/mms2r/helio_media.rb
DELETED
@@ -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
|
data/lib/mms2r/m_mode_media.rb
DELETED
@@ -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
|
data/lib/mms2r/nextel_media.rb
DELETED
@@ -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
|
data/lib/mms2r/sprint_media.rb
DELETED
@@ -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="MDN">(\d+)</.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
|