Skip to content
This repository
Browse code

Switch from vendored 1.4.3 fork to gem dep on 1.4.5

  • Loading branch information...
commit 2bfa04ae3f474a6eb12b9a78e82ad60b5ab86369 1 parent 9ef1889
Jeremy Kemper authored March 28, 2010
3  .gitmodules
... ...
@@ -1,3 +0,0 @@
1  
-[submodule "lib/mail/vendor/treetop-1.4.4"]
2  
-	path = lib/mail/vendor/treetop-1.4.4
3  
-	url = git://github.com/mikel/treetop.git
1  Gemfile
@@ -3,6 +3,7 @@ source 'http://rubygems.org'
3 3
 gem "activesupport", ">= 2.3.6.pre"
4 4
 gem "tlsmail" if RUBY_VERSION <= '1.8.6'
5 5
 gem "mime-types"
  6
+gem "treetop", ">= 1.4.5"
6 7
 
7 8
 group :test do
8 9
   gem "rcov"
1  Rakefile
@@ -21,6 +21,7 @@ spec = Gem::Specification.new do |s|
21 21
 
22 22
   s.add_dependency('activesupport', ">= 2.3.4")
23 23
   s.add_dependency('mime-types')
  24
+  s.add_dependency('treetop', '>= 1.4.5')
24 25
 
25 26
   s.require_path = 'lib'
26 27
   s.files = %w(README.rdoc Rakefile TODO.rdoc) + Dir.glob("lib/**/*")
1  lib/mail.rb
@@ -50,7 +50,6 @@ module Mail # :doc:
50 50
 
51 51
   require 'mail/envelope'
52 52
 
53  
-  require 'mail/vendor/treetop'
54 53
   parsers = %w[ rfc2822_obsolete rfc2822 address_lists phrase_lists
55 54
                 date_time received message_ids envelope_from rfc2045 
56 55
                 mime_version content_type content_disposition
1  lib/mail/vendor/treetop-1.4.4
... ...
@@ -1 +0,0 @@
1  
-Subproject commit b8f5e4861cad91b6cb88c1754e17a35b9326e51d
2  lib/mail/vendor/treetop.rb
... ...
@@ -1,2 +0,0 @@
1  
-# Have to vendor treetop to avoid loading polyglot
2  
-$:.unshift "#{File.dirname(__FILE__)}/treetop-1.4.4/lib"
8  lib/tasks/treetop.rake
@@ -2,9 +2,9 @@ namespace :treetop do
2 2
 
3 3
   desc "Pre-generate all the .treetop files into .rb files"
4 4
   task :generate do
5  
-    Dir[File.join(File.dirname(__FILE__), '..', 'mail', 'parsers', '*.treetop')].each do |filename|
6  
-      `lib/mail/vendor/treetop-1.4.3/bin/tt #{filename}`
  5
+    Dir.glob(File.expand_path('../../mail/parsers/*.treetop', __FILE__)).each do |filename|
  6
+      `bundle exec tt #{filename}`
7 7
     end
8 8
   end
9  
-  
10  
-end
  9
+
  10
+end
1  spec/mail/parsers/address_lists_parser_spec.rb
... ...
@@ -1,7 +1,6 @@
1 1
 # encoding: utf-8
2 2
 require 'spec_helper'
3 3
 
4  
-require 'mail/vendor/treetop'
5 4
 require 'treetop/compiler'
6 5
 Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/rfc2822_obsolete'))
7 6
 Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/rfc2822'))

0 notes on commit 2bfa04a

Please sign in to comment.
Something went wrong with that request. Please try again.