Permalink
Browse files

Remove Hoe and Gemcutter deps, build gem solely with bundler, updatin…

…g gems.
  • Loading branch information...
1 parent 8d2de6f commit cba403fcafca3b09800b6caa73db590fbb5cee28 @monde committed May 31, 2012
Showing with 99 additions and 135 deletions.
  1. +2 −20 Gemfile
  2. +26 −25 Gemfile.lock
  3. +1 −0 Manifest.txt
  4. +1 −2 README.txt
  5. +7 −41 Rakefile
  6. +0 −5 lib/mms2r.rb
  7. +1 −0 lib/mms2r/media.rb
  8. +25 −0 lib/mms2r/version.rb
  9. +28 −40 mms2r.gemspec
  10. +8 −2 test/test_helper.rb
View
22 Gemfile
@@ -1,21 +1,3 @@
-# -*- ruby -*-
+source 'https://rubygems.org'
-source :rubygems
-
-gem "nokogiri"
-gem "mail"
-gem "exifr"
-gem "json"
-# gem "psych"
-
-group :development, :test do
- gem "rdoc"
- gem "rubyforge"
- gem "gemcutter"
- gem "hoe"
- gem "rcov"
- gem "test-unit", "=1.2.3"
- gem "mocha"
-end
-
-# vim: syntax=ruby
+gemspec
View
@@ -1,31 +1,38 @@
+PATH
+ remote: .
+ specs:
+ mms2r (3.6.5)
+ exifr (>= 1.0.3)
+ json (>= 1.6.0)
+ mail (>= 2.4.0)
+ nokogiri (>= 1.5.0)
+ rake (= 0.9.2.2)
+
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
specs:
- exifr (1.1.1)
- gemcutter (0.7.1)
- hoe (2.12.5)
- rake (~> 0.8)
+ exifr (1.1.2)
i18n (0.6.0)
- json (1.6.5)
- json_pure (1.6.5)
- mail (2.4.0)
+ json (1.7.3)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.1)
- mime-types (1.17.2)
- mocha (0.10.2)
+ mime-types (1.18)
+ mocha (0.11.4)
metaclass (~> 0.0.1)
- nokogiri (1.5.0)
+ multi_json (1.3.5)
+ nokogiri (1.5.2)
polyglot (0.3.3)
rake (0.9.2.2)
- rcov (0.9.11)
rdoc (3.12)
json (~> 1.4)
- rubyforge (2.0.4)
- json_pure (>= 1.1.7)
- test-unit (1.2.3)
- hoe (>= 1.5.1)
+ simplecov (0.6.4)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ test-unit (2.4.8)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
@@ -34,14 +41,8 @@ PLATFORMS
ruby
DEPENDENCIES
- exifr
- gemcutter
- hoe
- json
- mail
+ mms2r!
mocha
- nokogiri
- rcov
rdoc
- rubyforge
- test-unit (= 1.2.3)
+ simplecov
+ test-unit
View
@@ -48,6 +48,7 @@ lib/ext/mail.rb
lib/ext/object.rb
lib/mms2r.rb
lib/mms2r/media.rb
+lib/mms2r/version.rb
lib/mms2r/media/sprint.rb
mms2r.gemspec
test/fixtures/1nbox-2images-01.mail
View
@@ -5,9 +5,8 @@
== DESCRIPTION
MMS2R by Mike Mondragon
-http://mms2r.rubyforge.org/
https://github.com/monde/mms2r
-https://github.com/monde/mms2r/issues
+https://rubygems.org/gems/mms2r
http://peepcode.com/products/mms2r-pdf
MMS2R is a library that decodes the parts of an MMS message to disk while
View
@@ -1,45 +1,11 @@
-# -*- ruby -*-
+require 'bundler'
+Bundler::GemHelper.install_tasks
-begin
- require 'hoe'
-rescue LoadError
- require 'rubygems'
- require 'hoe'
-end
-
-
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "lib")
-require 'mms2r'
-require 'rake'
-
-Hoe.plugin :bundler
-Hoe.spec('mms2r') do |p|
- p.version = MMS2R::Media::VERSION
- p.rubyforge_name = 'mms2r'
- p.author = ['Mike Mondragon']
- p.email = ['mikemondragon@gmail.com']
- p.summary = 'Extract user media from MMS (and not carrier cruft)'
- p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
- p.url = p.paragraphs_of('README.txt', 1).first.strip
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
- p.readme_file = 'README.txt'
- p.history_file = 'History.txt'
- p.extra_deps << ['nokogiri', '>= 1.4.4']
- p.extra_deps << ['mail', '>= 2.2.10']
- p.extra_deps << ['uuidtools', '>= 2.1.1']
- p.extra_deps << ['exifr', '>= 1.0.3']
- p.clean_globs << 'coverage'
-end
+require 'rake/testtask'
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |rcov|
- rcov.pattern = 'test/**/test_*.rb'
- rcov.verbose = true
- rcov.rcov_opts << "--exclude rcov.rb"
- end
-rescue
- task :rcov => :check_dependencies
+Rake::TestTask.new do |t|
+ t.libs << 'test'
end
-# vim: syntax=Ruby
+desc "Run tests"
+task :default => :test
View
@@ -37,11 +37,6 @@ def self.register(domain, processor_class)
class MMS2R::Media
##
- # MMS2R library version
-
- VERSION = '3.6.3'
-
- ##
# Spoof User-Agent, primarily for the Sprint CDN
USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2"
View
@@ -803,6 +803,7 @@ def attachment(types)
#get the largest file
files.each do |path|
+ next unless File.exist?(path)
if File.size(path) > size
size = File.size(path)
file = File.new(path)
View
@@ -0,0 +1,25 @@
+module MMS2R
+ class Version
+
+ def self.major
+ 3
+ end
+
+ def self.minor
+ 6
+ end
+
+ def self.patch
+ 5
+ end
+
+ def self.pre
+ nil
+ end
+
+ def self.to_s
+ [major, minor, patch, pre].compact.join('.')
+ end
+
+ end
+end
View
@@ -1,45 +1,33 @@
-# -*- encoding: utf-8 -*-
+$:.unshift File.expand_path("../lib", __FILE__)
+require "mms2r/version"
-Gem::Specification.new do |s|
- s.name = "mms2r"
- s.version = "3.6.2"
+Gem::Specification.new do |gem|
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Mike Mondragon"]
- s.date = "2011-10-31"
- s.description = "== DESCRIPTION\n\nMMS2R by Mike Mondragon\nhttp://mms2r.rubyforge.org/\nhttps://github.com/monde/mms2r\nhttps://github.com/monde/mms2r/issues\nhttp://peepcode.com/products/mms2r-pdf\n\nMMS2R is a library that decodes the parts of an MMS message to disk while\nstripping out advertising injected by the mobile carriers. MMS messages are\nmultipart email and the carriers often inject branding into these messages. Use\nMMS2R if you want to get at the real user generated content from a MMS without\nhaving to deal with the cruft from the carriers.\n\nIf MMS2R is not aware of a particular carrier no extra processing is done to the\nMMS other than decoding and consolidating its media."
- s.email = ["mikemondragon@gmail.com"]
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.TMail.txt", "README.txt"]
- s.files = ["Gemfile", "Gemfile.lock", "History.txt", "Manifest.txt", "README.TMail.txt", "README.txt", "Rakefile", "conf/1nbox.net.yml", "conf/aliases.yml", "conf/bellsouth.net.yml", "conf/from.yml", "conf/mediamessaging.o2.co.uk.yml", "conf/messaging.nextel.com.yml", "conf/mms.3ireland.ie.yml", "conf/mms.ae.yml", "conf/mms.alltel.com.yml", "conf/mms.att.net.yml", "conf/mms.dobson.net.yml", "conf/mms.luxgsm.lu.yml", "conf/mms.mobileiam.ma.yml", "conf/mms.mtn.co.za.yml", "conf/mms.mycricket.com.yml", "conf/mms.myhelio.com.yml", "conf/mms.netcom.no.yml", "conf/mms.o2online.de.yml", "conf/mms.three.co.uk.yml", "conf/mms.uscc.net.mail", "conf/mms.vodacom4me.co.za.yml", "conf/mms2r_media.yml", "conf/mobile.indosat.net.id.yml", "conf/msg.telus.com.yml", "conf/orangemms.net.yml", "conf/pm.sprint.com.yml", "conf/pxt.vodafone.net.nz.yml", "conf/rci.rogers.com.yml", "conf/sms.sasktel.com.yml", "conf/tmomail.net.yml", "conf/txt.bell.ca.yml", "conf/unicel.com.yml", "conf/vmpix.com.yml", "conf/vzwpix.com.yml", "conf/waw.plspictures.com.yml", "dev_tools/anonymizer.rb", "dev_tools/debug_sprint_nokogiri_parsing.rb", "init.rb", "lib/ext/mail.rb", "lib/ext/object.rb", "lib/mms2r.rb", "lib/mms2r/media.rb", "lib/mms2r/media/sprint.rb", "mms2r.gemspec", "test/fixtures/1nbox-2images-01.mail", "test/fixtures/1nbox-2images-02.mail", "test/fixtures/1nbox-2images-03.mail", "test/fixtures/1nbox-2images-04.mail", "test/fixtures/3ireland-mms-01.mail", "test/fixtures/ad_new.txt", "test/fixtures/alltel-image-01.mail", "test/fixtures/alltel-mms-01.mail", "test/fixtures/alltel-mms-03.mail", "test/fixtures/apple-double-image-01.mail", "test/fixtures/att-blackberry-02.mail", "test/fixtures/att-blackberry.mail", "test/fixtures/att-image-01.mail", "test/fixtures/att-image-02.mail", "test/fixtures/att-iphone-01.mail", "test/fixtures/att-iphone-02.mail", "test/fixtures/att-iphone-03.mail", "test/fixtures/att-text-01.mail", "test/fixtures/bell-canada-image-01.mail", "test/fixtures/cingularme-text-01.mail", "test/fixtures/cingularme-text-02.mail", "test/fixtures/dici_un_mois_georgie.txt", "test/fixtures/dobson-image-01.mail", "test/fixtures/dot.jpg", "test/fixtures/generic.mail", "test/fixtures/handsets.yml", "test/fixtures/helio-image-01.mail", "test/fixtures/helio-message-01.mail", "test/fixtures/iconv-fr-text-01.mail", "test/fixtures/indosat-image-01.mail", "test/fixtures/indosat-image-02.mail", "test/fixtures/info2go-image-01.mail", "test/fixtures/iphone-image-01.mail", "test/fixtures/luxgsm-image-01.mail", "test/fixtures/maroctelecom-france-mms-01.mail", "test/fixtures/mediamessaging_o2_co_uk-image-01.mail", "test/fixtures/mmode-image-01.mail", "test/fixtures/mms.ae-image-01.mail", "test/fixtures/mms.mycricket.com-pic-and-text.mail", "test/fixtures/mms.mycricket.com-pic.mail", "test/fixtures/mmsreply.t-mobile.co.uk-text-image-01.mail", "test/fixtures/mobile.mycingular.com-text-01.mail", "test/fixtures/mtn-southafrica-mms.mail", "test/fixtures/mycingular-image-01.mail", "test/fixtures/netcom-image-01.mail", "test/fixtures/nextel-image-01.mail", "test/fixtures/nextel-image-02.mail", "test/fixtures/nextel-image-03.mail", "test/fixtures/nextel-image-04.mail", "test/fixtures/o2-de-image-01.mail", "test/fixtures/orange-uk-image-01.mail", "test/fixtures/orangefrance-text-and-image.mail", "test/fixtures/orangepoland-text-01.mail", "test/fixtures/orangepoland-text-02.mail", "test/fixtures/pics.cingularme.com-image-01.mail", "test/fixtures/pxt-image-01.mail", "test/fixtures/rogers-canada-mms-01.mail", "test/fixtures/sasktel-image-01.mail", "test/fixtures/sprint-broken-image-01.mail", "test/fixtures/sprint-image-01.mail", "test/fixtures/sprint-new-image-01.mail", "test/fixtures/sprint-pcs-text-01.mail", "test/fixtures/sprint-purged-image-01.mail", "test/fixtures/sprint-text-01.mail", "test/fixtures/sprint-two-images-01.mail", "test/fixtures/sprint-video-01.mail", "test/fixtures/sprint.mov", "test/fixtures/suncom-blackberry.mail", "test/fixtures/telus-image-01.mail", "test/fixtures/three-uk-image-01.mail", "test/fixtures/tmo.blackberry.net-image-01.mail", "test/fixtures/tmobile-blackberry-02.mail", "test/fixtures/tmobile-blackberry.mail", "test/fixtures/tmobile-image-01.mail", "test/fixtures/tmobile-image-02.mail", "test/fixtures/unicel-image-01.mail", "test/fixtures/us-cellular-image-01.mail", "test/fixtures/verizon-blackberry.mail", "test/fixtures/verizon-image-01.mail", "test/fixtures/verizon-image-02.mail", "test/fixtures/verizon-image-03.mail", "test/fixtures/verizon-text-01.mail", "test/fixtures/verizon-video-01.mail", "test/fixtures/virgin-mobile-image-01.mail", "test/fixtures/virgin.ca-text-01.mail", "test/fixtures/vodacom4me-co-za-01.mail", "test/fixtures/vodacom4me-co-za-02.mail", "test/fixtures/vodacom4me-southafrica-mms-01.mail", "test/fixtures/vodacom4me-southafrica-mms-04.mail", "test/fixtures/vtext-text-01.mail", "test/fixtures/vzwpix.com-image-01.mail", "test/fixtures/waw.plspictures.com-image-01.mail", "test/hax.rb", "test/test_1nbox_net.rb", "test/test_bell_canada.rb", "test/test_bellsouth_net.rb", "test/test_helper.rb", "test/test_mediamessaging_o2_co_uk.rb", "test/test_messaging_nextel_com.rb", "test/test_messaging_sprintpcs_com.rb", "test/test_mms2r_media.rb", "test/test_mms_3ireland_ie.rb", "test/test_mms_ae.rb", "test/test_mms_alltel_com.rb", "test/test_mms_att_net.rb", "test/test_mms_dobson_net.rb", "test/test_mms_luxgsm_lu.rb", "test/test_mms_mobileiam_ma.rb", "test/test_mms_mtn_co_za.rb", "test/test_mms_mycricket_com.rb", "test/test_mms_myhelio_com.rb", "test/test_mms_netcom_no.rb", "test/test_mms_o2online_de.rb", "test/test_mms_three_co_uk.rb", "test/test_mms_uscc_net.rb", "test/test_mms_vodacom4me_co_za.rb", "test/test_mobile_indosat_net_id.rb", "test/test_msg_telus_com.rb", "test/test_orangemms_net.rb", "test/test_pm_sprint_com.rb", "test/test_pxt_vodafone_net_nz.rb", "test/test_rci_rogers_com.rb", "test/test_sms_sasktel_com.rb", "test/test_tmomail_net.rb", "test/test_unicel_com.rb", "test/test_vmpix_com.rb", "test/test_vzwpix_com.rb", "test/test_waw_plspictures_com.rb", "vendor/plugins/mms2r/lib/autotest/discover.rb", "vendor/plugins/mms2r/lib/autotest/mms2r.rb", ".gemtest"]
- s.homepage = "https://github.com/monde/mms2r"
- s.rdoc_options = ["--main", "README.txt"]
- s.require_paths = ["lib"]
- s.rubyforge_project = "mms2r"
- s.rubygems_version = "1.8.10"
- s.summary = "Extract user media from MMS (and not carrier cruft)"
- s.test_files = ["test/test_orangemms_net.rb", "test/test_waw_plspictures_com.rb", "test/test_mediamessaging_o2_co_uk.rb", "test/test_vzwpix_com.rb", "test/test_unicel_com.rb", "test/test_messaging_sprintpcs_com.rb", "test/test_mms_luxgsm_lu.rb", "test/test_rci_rogers_com.rb", "test/test_mms_uscc_net.rb", "test/test_mms_netcom_no.rb", "test/test_1nbox_net.rb", "test/test_sms_sasktel_com.rb", "test/test_mms_att_net.rb", "test/test_mobile_indosat_net_id.rb", "test/test_messaging_nextel_com.rb", "test/test_mms_mtn_co_za.rb", "test/test_mms_vodacom4me_co_za.rb", "test/test_pxt_vodafone_net_nz.rb", "test/test_mms_dobson_net.rb", "test/test_helper.rb", "test/test_msg_telus_com.rb", "test/test_mms_o2online_de.rb", "test/test_mms2r_media.rb", "test/test_bell_canada.rb", "test/test_tmomail_net.rb", "test/test_mms_3ireland_ie.rb", "test/test_pm_sprint_com.rb", "test/test_mms_alltel_com.rb", "test/test_mms_mobileiam_ma.rb", "test/test_mms_mycricket_com.rb", "test/test_bellsouth_net.rb", "test/test_mms_three_co_uk.rb", "test/test_vmpix_com.rb", "test/test_mms_myhelio_com.rb", "test/test_mms_ae.rb"]
+ gem.add_dependency 'rake', ['= 0.9.2.2']
+ gem.add_dependency 'nokogiri', ['>= 1.5.0']
+ gem.add_dependency 'mail', ['>= 2.4.0']
+ gem.add_dependency 'exifr', ['>= 1.0.3']
+ gem.add_dependency 'json', ['>= 1.6.0']
- if s.respond_to? :specification_version then
- s.specification_version = 3
+ gem.add_development_dependency "rdoc"
+ gem.add_development_dependency "simplecov"
+ gem.add_development_dependency 'test-unit'
+ gem.add_development_dependency 'mocha'
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.4"])
- s.add_runtime_dependency(%q<mail>, [">= 2.2.10"])
- s.add_runtime_dependency(%q<uuidtools>, [">= 2.1.1"])
- s.add_runtime_dependency(%q<exifr>, [">= 1.0.3"])
- s.add_development_dependency(%q<hoe>, ["~> 2.12"])
- else
- s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
- s.add_dependency(%q<mail>, [">= 2.2.10"])
- s.add_dependency(%q<uuidtools>, [">= 2.1.1"])
- s.add_dependency(%q<exifr>, [">= 1.0.3"])
- s.add_dependency(%q<hoe>, ["~> 2.12"])
- end
- else
- s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
- s.add_dependency(%q<mail>, [">= 2.2.10"])
- s.add_dependency(%q<uuidtools>, [">= 2.1.1"])
- s.add_dependency(%q<exifr>, [">= 1.0.3"])
- s.add_dependency(%q<hoe>, ["~> 2.12"])
- end
+ gem.name = "mms2r"
+ gem.version = MMS2R::Version.to_s
+ gem.platform = Gem::Platform::RUBY
+ gem.authors = ["Mike Mondragon"]
+ gem.email = ["mikemondragon@gmail.com"]
+ gem.homepage = "https://github.com/monde/mms2r"
+ gem.summary = "Extract user media from MMS (and not carrier cruft)"
+ gem.description = open(File.join(File.dirname(__FILE__), 'README.txt')).readlines[6...22].join
+ gem.rubyforge_project = "mms2r"
+ gem.rubygems_version = ">= 1.3.6"
+ gem.files = `git ls-files`.split("\n")
+ gem.require_path = ['lib']
+ gem.rdoc_options = ["--main", "README.txt"]
+ gem.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.TMail.txt", "README.txt"]
+
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
end
View
@@ -1,6 +1,12 @@
-# do it like rake http://ozmm.org/posts/do_it_like_rake.html
+if ENV['COVERAGE']
+ require 'simplecov'
+ SimpleCov.start do
+ add_filter 'test'
+ end
+end
-%W{ test/unit set net/http net/https pp tempfile mocha rcov/rcovtask }.each do |g|
+# do it like rake http://ozmm.org/posts/do_it_like_rake.html
+%W{ test/unit set net/http net/https pp tempfile mocha }.each do |g|
begin
require g
rescue LoadError

0 comments on commit cba403f

Please sign in to comment.