mail 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mail might be problematic. Click here for more details.

data/CHANGELOG.rdoc CHANGED
@@ -1,11 +1,19 @@
1
+ == Sun Dec 27 10:38:24 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
2
+
3
+ * Updating treetop and mail to initialize uninitialized instance variables to
4
+ nil
5
+ * Version bump to 1.4.1
6
+
1
7
  == Sun Dec 27 09:51:27 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
2
8
 
3
- * Version bump to 1.4 because now :to_s calls :decoded for all fields and body while
4
- :to_s calls :encoded for Message and Header containers. Makes sense... really.
9
+ * Version bump to 1.4 because now :to_s calls :decoded for all fields and body
10
+ while :to_s calls :encoded for Message and Header containers. Makes sense...
11
+ really.
5
12
 
6
13
  == Sun Dec 27 07:30:02 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
7
14
 
8
- * Changed fields to default to :decoded on :to_s, all container objects retain :encoded as the default for :to_s
15
+ * Changed fields to default to :decoded on :to_s, all container objects
16
+ retain :encoded as the default for :to_s
9
17
 
10
18
  == Thu Dec 17 06:35:05 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
11
19
 
@@ -47,8 +55,7 @@
47
55
 
48
56
  == Mon Nov 23 22:35:50 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
49
57
 
50
- * Changed the way attachments are added so that it does not break depending on the order
51
- of the Hash passed in.
58
+ * Changed the way attachments are added so that it does not break depending on the order of the Hash passed in.
52
59
  * Version bump to 1.3.0 - Now works with Edge ActionMailer, MRI 1.8.6, 1.8.7, 1.9.1, all tests passing
53
60
 
54
61
  == Sun Nov 22 12:19:44 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ require 'bundler'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = "mail"
15
- s.version = "1.4.0"
15
+ s.version = "1.4.1"
16
16
  s.author = "Mike Lindsaar"
17
17
  s.email = "raasdnil@gmail.com"
18
18
  s.homepage = "http://github.com/mikel/mail"
data/lib/mail/body.rb CHANGED
@@ -27,6 +27,10 @@ module Mail
27
27
  class Body
28
28
 
29
29
  def initialize(string = '')
30
+ @boundary = nil
31
+ @preamble = nil
32
+ @epilogue = nil
33
+ @parts = []
30
34
  if string.blank?
31
35
  @raw_source = ''
32
36
  else
@@ -168,7 +172,7 @@ module Mail
168
172
  end
169
173
 
170
174
  def parts
171
- @parts ||= []
175
+ @parts
172
176
  end
173
177
 
174
178
  def <<( val )
@@ -21,6 +21,8 @@ module Mail
21
21
  # a.comments #=> ['My email address']
22
22
  # a.to_s #=> 'Mikel Lindsaar <mikel@test.lindsaar.net> (My email address)'
23
23
  def initialize(value = nil)
24
+ @output_type = nil
25
+ @tree = nil
24
26
  @raw_text = value
25
27
  case
26
28
  when value.nil?
@@ -2,6 +2,11 @@ module Mail
2
2
  class SMTP
3
3
  include Singleton
4
4
 
5
+ def initialize
6
+ @user = nil
7
+ @pass = nil
8
+ end
9
+
5
10
  def settings(&block)
6
11
  if block_given?
7
12
  instance_eval(&block)
@@ -11,6 +11,11 @@ module Mail
11
11
  class POP3
12
12
  include Singleton
13
13
 
14
+ def initialize
15
+ @user = nil
16
+ @pass = nil
17
+ end
18
+
14
19
  require 'net/pop'
15
20
 
16
21
  def settings(&block)
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary_address
9
+ @root ||= :primary_address
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :content_disposition
9
+ @root ||= :content_disposition
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary
9
+ @root ||= :primary
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary
9
+ @root ||= :primary
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :content_type
9
+ @root ||= :content_type
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary
9
+ @root ||= :primary
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary
9
+ @root ||= :primary
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary
9
+ @root ||= :primary
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :version
9
+ @root ||= :version
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary_phrase
9
+ @root ||= :primary_phrase
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :primary
9
+ @root ||= :primary
10
10
  end
11
11
 
12
12
  include RFC2822
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :tspecials
9
+ @root ||= :tspecials
10
10
  end
11
11
 
12
12
  def _nt_tspecials
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :ALPHA
9
+ @root ||= :ALPHA
10
10
  end
11
11
 
12
12
  include RFC2822Obsolete
@@ -6,7 +6,7 @@ module Mail
6
6
  include Treetop::Runtime
7
7
 
8
8
  def root
9
- @root || :obs_qp
9
+ @root ||= :obs_qp
10
10
  end
11
11
 
12
12
  module ObsQp0
data/lib/mail/version.rb CHANGED
@@ -3,7 +3,7 @@ module Mail
3
3
  module VERSION
4
4
  MAJOR = 1
5
5
  MINOR = 4
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
@@ -8,6 +8,13 @@ You can `.treetop` files into Ruby source code with the `tt` command line script
8
8
  ##Loading A Grammar Directly
9
9
  The Polyglot gem makes it possible to load `.treetop` or `.tt` files directly with `require`. This will invoke `Treetop.load`, which automatically compiles the grammar to Ruby and then evaluates the Ruby source. If you are getting errors in methods you define on the syntax tree, try using the command line compiler for better stack trace feedback. A better solution to this issue is in the works.
10
10
 
11
+ In order to use Polyglot dynamic loading of `.treetop` or `.tt` files though, you need to require the Polyglot gem before you require the Treetop gem as Treetop will only create hooks into Polyglot for the treetop files if Polyglot is already loaded. So you need to use:
12
+
13
+ require 'polyglot'
14
+ require 'treetop'
15
+
16
+ in order to use Polyglot auto loading with Treetop in Ruby.
17
+
11
18
  ##Instantiating and Using Parsers
12
19
  If a grammar by the name of `Foo` is defined, the compiled Ruby source will define a `FooParser` class. To parse input, create an instance and call its `parse` method with a string. The parser will return the syntax tree of the match or `nil` if there is a failure.
13
20
 
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
 
2
3
  module Treetop
3
4
  VALID_GRAMMAR_EXT = ['treetop', 'tt']
@@ -11,6 +12,8 @@ require File.join(TREETOP_ROOT, "ruby_extensions")
11
12
  require File.join(TREETOP_ROOT, "runtime")
12
13
  require File.join(TREETOP_ROOT, "compiler")
13
14
 
15
+ # To have Polyglot extensions loaded, you need to require 'polyglot'
16
+ # before you require 'treetop'
14
17
  if defined?(Polyglot)
15
18
  Polyglot.register(Treetop::VALID_GRAMMAR_EXT, Treetop)
16
- end
19
+ end
@@ -5,7 +5,7 @@ module Treetop
5
5
  def compile(builder)
6
6
  unless rules.empty?
7
7
  builder.method_declaration("root") do
8
- builder << "@root || :#{rules.first.name}"
8
+ builder << "@root ||= :#{rules.first.name}"
9
9
  end
10
10
  builder.newline
11
11
  end
@@ -2,6 +2,7 @@ dir = File.dirname(__FILE__)
2
2
  require 'rubygems'
3
3
  require 'benchmark'
4
4
  require 'spec'
5
+ require 'polyglot'
5
6
 
6
7
  unless $bootstrapped_gen_1_metagrammar
7
8
  load File.join(dir, '..', 'lib', 'treetop', 'bootstrap_gen_1_metagrammar.rb')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Lindsaar