mail 1.5.3 → 1.5.4

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/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.5.3"
15
+ s.version = "1.5.4"
16
16
  s.author = "Mike Lindsaar"
17
17
  s.email = "raasdnil@gmail.com"
18
18
  s.homepage = "http://github.com/mikel/mail"
@@ -144,6 +144,10 @@ module Mail
144
144
  decoded
145
145
  end
146
146
 
147
+ def to_str
148
+ to_s
149
+ end
150
+
147
151
  def charset
148
152
  @charset
149
153
  end
@@ -60,7 +60,15 @@ module Mail
60
60
  private
61
61
 
62
62
  def get_addresses
63
- (individual_recipients + group_recipients.map { |g| g.group_list.addresses }).flatten
63
+ (individual_recipients + group_recipients.map { |g| get_group_addresses(g) }).flatten
64
+ end
65
+
66
+ def get_group_addresses(g)
67
+ if g.group_list.respond_to?(:addresses)
68
+ g.group_list.addresses
69
+ else
70
+ []
71
+ end
64
72
  end
65
73
  end
66
74
  end
@@ -37,7 +37,7 @@ module Mail
37
37
  def groups
38
38
  @groups = Hash.new
39
39
  tree.group_recipients.each do |group|
40
- @groups[group.group_name.text_value] = get_group_addresses(group.group_list.addresses)
40
+ @groups[group.group_name.text_value] = get_group_addresses(group.group_list)
41
41
  end
42
42
  @groups
43
43
  end
@@ -87,9 +87,13 @@ module Mail
87
87
  @tree ||= AddressList.new(value)
88
88
  end
89
89
 
90
- def get_group_addresses(group_addresses)
91
- group_addresses.map do |address_tree|
92
- Mail::Address.new(address_tree)
90
+ def get_group_addresses(group_list)
91
+ if group_list.respond_to?(:addresses)
92
+ group_list.addresses.map do |address_tree|
93
+ Mail::Address.new(address_tree)
94
+ end
95
+ else
96
+ []
93
97
  end
94
98
  end
95
99
 
@@ -3,7 +3,7 @@ module Mail
3
3
  module VERSION
4
4
  MAJOR = 1
5
5
  MINOR = 5
6
- TINY = 3
6
+ TINY = 4
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
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.5.3
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Lindsaar
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-12 00:00:00 +11:00
12
+ date: 2010-01-14 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency