mms2r 3.7.0 → 3.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mms2r (3.7.0)
4
+ mms2r (3.7.1)
5
5
  exifr (>= 1.0.3)
6
6
  json (>= 1.6.0)
7
7
  mail (>= 2.4.0)
@@ -11,7 +11,7 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- exifr (1.1.2)
14
+ exifr (1.1.3)
15
15
  i18n (0.6.0)
16
16
  json (1.7.3)
17
17
  mail (2.4.4)
@@ -1,3 +1,9 @@
1
+ ### 3.7.1 / 2012-06-04 (Abrigail Remeltindtdrinc - The Record Cleaner)
2
+
3
+ * 2 minor enhancements
4
+ * Improve processing of Sprint media - James McGrath
5
+ * RDoc format documentation - James McGrath
6
+
1
7
  ### 3.7.0 / 2012-05-31 (The Teenager - Edgar's brother via Eric's face)
2
8
 
3
9
  * 2 major enhancements
data/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2007-2012 Mike Mondragon (mikemondragon@gmail.com).
4
+ All rights reserved.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ 'Software'), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -2,9 +2,10 @@
2
2
  Gemfile
3
3
  Gemfile.lock
4
4
  History.txt
5
+ LICENSE
5
6
  Manifest.txt
6
7
  README.TMail.txt
7
- README.txt
8
+ README.rdoc
8
9
  Rakefile
9
10
  conf/1nbox.net.yml
10
11
  conf/aliases.yml
@@ -24,7 +24,7 @@ parts the mail is comprised of.
24
24
  Contact the author to add additional carriers to be processed by the library.
25
25
  Suggestions and patches appreciated and welcomed!
26
26
 
27
- Corpus of carriers currently processed by MMS2R:
27
+ === Corpus of carriers currently processed by MMS2R:
28
28
 
29
29
  * 1nbox/Idea: 1nbox.net
30
30
  * 3 Ireland: mms.3ireland.ie
@@ -62,7 +62,7 @@ Corpus of carriers currently processed by MMS2R:
62
62
  * Virgin Mobile of Canada: vmobile.ca
63
63
  * Vodacom: mms.vodacom4me.co.za
64
64
 
65
- Corpus of smart phones known to MMS2R:
65
+ === Corpus of smart phones known to MMS2R:
66
66
  * Apple iPhone variants
67
67
  * Blackberry / Research In Motion variants
68
68
  * Casio variants
@@ -77,15 +77,15 @@ Corpus of smart phones known to MMS2R:
77
77
  * Sprint variants
78
78
  * UTStarCom variants
79
79
 
80
- As Seen On The Internets - sites known to be using MMS2R in some fashion
80
+ === As Seen On The Internets - sites known to be using MMS2R in some fashion
81
81
 
82
- * twitpic.com [http://www.twitpic.com/]
83
- * Simplton [http://simplton.com/]
84
- * fanchatter.com [http://www.fanchatter.com/]
85
- * camura.com [http://www.camura.com/]
86
- * eachday.com [http://www.eachday.com/]
87
- * beenup2.com [http://www.beenup2.com/]
88
- * snapmylife.com [http://www.snapmylife.com/]
82
+ * twitpic.com[http://www.twitpic.com/]
83
+ * Simplton[http://simplton.com/]
84
+ * fanchatter.com[http://www.fanchatter.com/]
85
+ * camura.com[http://www.camura.com/]
86
+ * eachday.com[http://www.eachday.com/]
87
+ * beenup2.com[http://www.beenup2.com/]
88
+ * snapmylife.com[http://www.snapmylife.com/]
89
89
  * email the author to be listed here
90
90
 
91
91
 
@@ -195,53 +195,28 @@ git clone git://github.com/monde/mms2r.git
195
195
 
196
196
  == AUTHORS
197
197
 
198
- Copyright (c) 2007-2010 by Mike Mondragon (blog[http://plasti.cx/])
198
+ Copyright (c) 2007-2012 by Mike Mondragon blog[http://plasti.cx/]
199
199
 
200
- MMS2R's Flickr page[http://www.flickr.com/photos/8627919@N05/]
200
+ MMS2R's {Flickr page}[http://www.flickr.com/photos/8627919@N05/]
201
201
 
202
202
  == CONTRIBUTORS
203
203
 
204
- * Luke Francl (blog[http://railspikes.com/])
205
- * Will Jessup (blog[http://www.willjessup.com/])
206
- * Shane Vitarana (blog[http://www.shanesbrain.net/])
207
- * Layton Wedgeworth (http://www.beenup2.com/)
208
- * Jason Haruska (blog[http://software.haruska.com/])
209
- * Dave Myron (company[http://contentfree.com/])
204
+ * Luke Francl - blog[http://railspikes.com/]
205
+ * Will Jessup - blog[http://www.willjessup.com/]
206
+ * Shane Vitarana - blog[http://www.shanesbrain.net/]
207
+ * Layton Wedgeworth - company[http://www.beenup2.com/]
208
+ * Jason Haruska - blog[http://software.haruska.com/]
209
+ * Dave Myron - company[http://contentfree.com/]
210
210
  * Vijay Yellapragada
211
- * Jesse Dp (github profile[http://github.com/jessedp])
211
+ * Jesse Dp - {github profile}[http://github.com/jessedp]
212
212
  * David Alm
213
213
  * Jeremy Wilkins
214
- * Matt Conway (github profile[http://github.com/wr0ngway])
214
+ * Matt Conway - {github profile}[http://github.com/wr0ngway]
215
215
  * Kai Kai
216
216
  * Michael DelGaudio
217
- * Sai Emrys (blog[http://saizai.com])
218
- * Brendan Lim (github profile[http://github.com/brendanlim])
219
- * Scott Taylor (github profile[http://github.com/smtlaissezfaire])
220
- * Jaap van der Meer (github profile[http://github.com/japetheape])
221
- * Karl Baum (github profile[http://github.com/kbaum])
222
-
223
- == LICENSE
224
-
225
- (The MIT License)
226
-
227
- Copyright (c) 2007, 2008 Mike Mondragon (mikemondragon@gmail.com).
228
- All rights reserved.
229
-
230
- Permission is hereby granted, free of charge, to any person obtaining
231
- a copy of this software and associated documentation files (the
232
- 'Software'), to deal in the Software without restriction, including
233
- without limitation the rights to use, copy, modify, merge, publish,
234
- distribute, sublicense, and/or sell copies of the Software, and to
235
- permit persons to whom the Software is furnished to do so, subject to
236
- the following conditions:
237
-
238
- The above copyright notice and this permission notice shall be
239
- included in all copies or substantial portions of the Software.
240
-
241
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
242
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
243
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
244
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
245
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
246
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
247
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
217
+ * Sai Emrys - blog[http://saizai.com]
218
+ * Brendan Lim - {github profile}[http://github.com/brendanlim]
219
+ * Scott Taylor - {github profile}[http://github.com/smtlaissezfaire]
220
+ * Jaap van der Meer - {github profile}[http://github.com/japetheape]
221
+ * Karl Baum - {github profile}[http://github.com/kbaum]
222
+ * James McGrath - blog[http://jamespmcgrath.com]
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2010 by Mike Mondragon (mikemondragon@gmail.com)
2
+ # Copyright (c) 2012 by Mike Mondragon (mikemondragon@gmail.com)
3
3
  #
4
4
  # Please see the LICENSE file for licensing information.
5
5
  #++
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2007-2010 by Mike Mondragon (mikemondragon@gmail.com)
2
+ # Copyright (c) 2007-2012 by Mike Mondragon (mikemondragon@gmail.com)
3
3
  #
4
4
  # Please see the LICENSE file for licensing information.
5
5
  #++
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2007-2010 by Mike Mondragon (mikemondragon@gmail.com)
2
+ # Copyright (c) 2007-2012 by Mike Mondragon (mikemondragon@gmail.com)
3
3
  #
4
4
  # Please see the LICENSE file for licensing information.
5
5
  #++
@@ -47,7 +47,7 @@
47
47
  #
48
48
  # == More Examples
49
49
  #
50
- # See the README.txt file for more examples
50
+ # See the README.rdoc file for more examples
51
51
  #
52
52
  # == Built In Configuration
53
53
  #
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2007-2010 by Mike Mondragon (mikemondragon@gmail.com)
2
+ # Copyright (c) 2007-2012 by Mike Mondragon (mikemondragon@gmail.com)
3
3
  #
4
4
  # Please see the LICENSE file for licensing information.
5
5
  #++
@@ -139,7 +139,8 @@ module MMS2R
139
139
  # message the sender sent with the images
140
140
  json["Results"].each do |result|
141
141
  type = 'text/plain'
142
- text = result["description"] ? result["description"].strip : nil
142
+ # remove any   chars from the resulting text
143
+ text = result["description"] ? result["description"].gsub(/[[:space:]]/, " ").strip : nil
143
144
  next if text.empty?
144
145
  type, text = transform_text(type, text)
145
146
  type, file = sprint_write_file(type, text.strip)
@@ -10,7 +10,7 @@ module MMS2R
10
10
  end
11
11
 
12
12
  def self.patch
13
- 0
13
+ 1
14
14
  end
15
15
 
16
16
  def self.pre
@@ -21,13 +21,13 @@ Gem::Specification.new do |gem|
21
21
  gem.email = ["mikemondragon@gmail.com"]
22
22
  gem.homepage = "https://github.com/monde/mms2r"
23
23
  gem.summary = "Extract user media from MMS (and not carrier cruft)"
24
- gem.description = open(File.join(File.dirname(__FILE__), 'README.txt')).readlines[6...22].join
24
+ gem.description = "MMS2R is a library that decodes the parts of an MMS message to disk while stripping out advertising injected by the mobile carriers."
25
25
  gem.rubyforge_project = "mms2r"
26
26
  gem.rubygems_version = ">= 1.3.6"
27
27
  gem.files = `git ls-files`.split("\n")
28
28
  gem.require_path = ['lib']
29
- gem.rdoc_options = ["--main", "README.txt"]
30
- gem.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.TMail.txt", "README.txt"]
29
+ gem.rdoc_options = ["--main", "README.rdoc"]
30
+ gem.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.TMail.txt", "README.rdoc"]
31
31
 
32
32
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
33
33
  end
@@ -1 +1 @@
1
- {"totalMediaItems":1,"shareType":"normal","nomediaItem":"false","isOnlyVideo":null,"creationDate":"Apr 16, 2012","from":"(513)545-5510","offset":null,"externalMessageId":"GEc4YYms2Y7KAkmhaoFL","Results":[{"elementID":"2","hasVoiceCaption":false,"URL":{"elementID":"2","indexCount":0,"audio":null,"thumb":"http:\/\/pictures.sprintpcs.com:80\/mmps\/031_36415d1a9c3c73f0_1\/2.jpg?partExt=.jpg&&&outquality=90&ext=.jpg&&size=40,40&squareoutput=255,255,255&aspectcrop=0.5,0.5,1.0,1.0,1.0","annotationVoiceID":null,"image":"http:\/\/pictures.sprintpcs.com:80\/mmps\/031_36415d1a9c3c73f0_1\/2.jpg?partExt=.jpg&&&outquality=90&ext=.jpg","video":null},"description":"Just testing the caption on Sprint","mediaItemNum":0,"isDRMProtected":false,"externalMessageId":"GEc4YYms2Y7KAkmhaoFL","mediaType":"IMAGE","restOperation":"false","folderFullName":"\/RECIPIENT"}],"invite":null,"tmemo":null,"toAddress":"submit@CapStory.com","mediaIndex":0,"subject":"New Message","isDRMProtected":false,"expirationDate":"Expires in 18 days","voiceURL":null,"guest":"true","folderFullName":"\/RECIPIENT"}
1
+ {"totalMediaItems":2,"shareType":"normal","nomediaItem":"false","isOnlyVideo":null,"creationDate":"May 31, 2012","from":"(513)545-0000","offset":null,"externalMessageId":"XXXXXXXXXXXXXXXXXX","Results":[{"elementID":"0","hasVoiceCaption":false,"URL":{"elementID":"0","indexCount":0,"audio":null,"thumb":"\/retailers\/PCSNEXTEL\/ui-refresh\/images\/background\/slide_no_media_90x90.gif","annotationVoiceID":null,"image":"\/retailers\/PCSNEXTEL\/ui-refresh\/images\/background\/slide_no_media_90x90.gif","video":null},"description":"First text content. ","mediaItemNum":0,"isDRMProtected":false,"externalMessageId":"XXXXXXXXXXXXXXXXXX","mediaType":"TEXT","restOperation":"false","folderFullName":"\/RECIPIENT"},{"elementID":"3","hasVoiceCaption":false,"URL":{"elementID":"3","indexCount":1,"audio":"","thumb":"http:\/\/pictures.sprintpcs.com:80\/mmps\/048_0736849c3f1a9d27_1\/3.jpg?partExt=.jpg&&&outquality=90&ext=.jpg&&size=40,40&squareoutput=255,255,255&aspectcrop=0.5,0.5,1.0,1.0,1.0","annotationVoiceID":null,"image":"http:\/\/pictures.sprintpcs.com:80\/mmps\/048_0736849c3f1a9d27_1\/3.jpg?partExt=.jpg&&&outquality=90&ext=.jpg","video":""},"description":"Second text content. ","mediaItemNum":1,"isDRMProtected":false,"externalMessageId":"XXXXXXXXXXXXXXXXXX","mediaType":"IMAGE","restOperation":"false","folderFullName":"\/RECIPIENT"}],"invite":null,"tmemo":null,"toAddress":"textinsubmit@gmail.com","mediaIndex":0,"subject":"New Message","isDRMProtected":false,"expirationDate":"Expires in 57 Days","voiceURL":null,"guest":"true","folderFullName":"\/RECIPIENT"}
@@ -239,12 +239,15 @@ class TestPmSprintCom < Test::Unit::TestCase
239
239
  mock_sprint_ajax
240
240
  mms = MMS2R::Media.new(mail)
241
241
 
242
- assert_equal 1, mms.media['text/plain'].size
243
-
242
+ assert_equal 2, mms.media['text/plain'].size
243
+
244
244
  # test that the message was extracted from the ajax response
245
245
  message = IO.readlines(mms.media['text/plain'].first).join("")
246
- assert_equal "Just testing the caption on Sprint", message
247
-
246
+ assert_equal "First text content.", message
247
+
248
+ # test that the &nbsp; was removed ()
249
+ assert message.last.bytes.to_a != [194, 160]
250
+
248
251
  mms.purge
249
252
  end
250
253
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mms2r
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-31 00:00:00.000000000 Z
12
+ date: 2012-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -155,36 +155,8 @@ dependencies:
155
155
  - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
- description: ! 'MMS2R by Mike Mondragon
159
-
160
- https://github.com/monde/mms2r
161
-
162
- https://rubygems.org/gems/mms2r
163
-
164
- http://peepcode.com/products/mms2r-pdf
165
-
166
-
167
- MMS2R is a library that decodes the parts of an MMS message to disk while
168
-
169
- stripping out advertising injected by the mobile carriers. MMS messages are
170
-
171
- multipart email and the carriers often inject branding into these messages. Use
172
-
173
- MMS2R if you want to get at the real user generated content from a MMS without
174
-
175
- having to deal with the cruft from the carriers.
176
-
177
-
178
- If MMS2R is not aware of a particular carrier no extra processing is done to the
179
-
180
- MMS other than decoding and consolidating its media.
181
-
182
-
183
- MMS2R can be used to process any multipart email to conveniently access the
184
-
185
- parts the mail is comprised of.
186
-
187
- '
158
+ description: MMS2R is a library that decodes the parts of an MMS message to disk while
159
+ stripping out advertising injected by the mobile carriers.
188
160
  email:
189
161
  - mikemondragon@gmail.com
190
162
  executables: []
@@ -193,15 +165,16 @@ extra_rdoc_files:
193
165
  - History.txt
194
166
  - Manifest.txt
195
167
  - README.TMail.txt
196
- - README.txt
168
+ - README.rdoc
197
169
  files:
198
170
  - .gitignore
199
171
  - Gemfile
200
172
  - Gemfile.lock
201
173
  - History.txt
174
+ - LICENSE
202
175
  - Manifest.txt
203
176
  - README.TMail.txt
204
- - README.txt
177
+ - README.rdoc
205
178
  - Rakefile
206
179
  - conf/1nbox.net.yml
207
180
  - conf/aliases.yml
@@ -390,7 +363,7 @@ licenses: []
390
363
  post_install_message:
391
364
  rdoc_options:
392
365
  - --main
393
- - README.txt
366
+ - README.rdoc
394
367
  require_paths:
395
368
  - - lib
396
369
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -401,7 +374,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
401
374
  version: '0'
402
375
  segments:
403
376
  - 0
404
- hash: -822088507277629508
377
+ hash: -3061222747631140380
405
378
  required_rubygems_version: !ruby/object:Gem::Requirement
406
379
  none: false
407
380
  requirements:
@@ -410,7 +383,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
383
  version: '0'
411
384
  segments:
412
385
  - 0
413
- hash: -822088507277629508
386
+ hash: -3061222747631140380
414
387
  requirements: []
415
388
  rubyforge_project: mms2r
416
389
  rubygems_version: 1.8.24