mail 2.6.4 → 2.6.5.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +9 -1
- data/Gemfile +7 -4
- data/MIT-LICENSE +1 -1
- data/README.md +5 -2
- data/lib/mail/attachments_list.rb +1 -1
- data/lib/mail/elements/address.rb +9 -4
- data/lib/mail/elements/address_list.rb +1 -1
- data/lib/mail/fields/common/address_container.rb +2 -2
- data/lib/mail/multibyte/chars.rb +2 -2
- data/lib/mail/network/retriever_methods/test_retriever.rb +1 -1
- data/lib/mail/parsers/address_lists_parser.rb +1 -1
- data/lib/mail/utilities.rb +15 -1
- data/lib/mail/version.rb +2 -2
- data/lib/mail/version_specific/ruby_1_9.rb +3 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 355466608fdb0199f2abf66e17375703660da89d
|
4
|
+
data.tar.gz: a084636cc65742d9549eaa2fc69a5f5fe90e3d39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1e02764ba8ddb7f3232f210393866eb6de53cbedef8876ae5b17e6371a385bcc9a1097b87197bf0560cb7b0acb1e62cbbe2949561aab9e70fc045909cbf78b7
|
7
|
+
data.tar.gz: 8416a9f1d38d2c3753641b1eb026c3043fe0fd353f2f5ec47f0dac83a233217c43f9f49b30be3edbd6c7eeef60dcf89980c6917140662e591ed11e156b398ee9
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
==
|
1
|
+
== Version 2.6.5 - Unreleased
|
2
|
+
|
3
|
+
Features:
|
4
|
+
* #1053 - Ruby 2.4.0 compatibility. Fixnum+Bignum unified as Integer. (peterkovacs)
|
5
|
+
|
6
|
+
Bugs:
|
7
|
+
* #605 - Fix Mail::Address#name for nil addresses (peterkovacs)
|
8
|
+
* #1003 - Fix decoding some b encoded headers on specific rubies that don't account for lack of base64 padding (kjg)
|
9
|
+
* #1023 - Fix double-quoting in display names. (garethrees)
|
2
10
|
|
3
11
|
== Version 2.6.4 - Wed Mar 23 08:16 -0700 2016 Jeremy Daer <jeremydaer@gmail.com>
|
4
12
|
|
data/Gemfile
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem
|
6
|
-
gem
|
5
|
+
gem 'tlsmail', '~> 0.0.1' if RUBY_VERSION <= '1.8.6'
|
6
|
+
gem 'jruby-openssl', :platforms => :jruby
|
7
|
+
gem 'rake', '< 11.0', :platforms => :ruby_18
|
8
|
+
gem 'rdoc', '< 4.3', :platforms => [ :ruby_18, :ruby_19 ]
|
9
|
+
gem 'mime-types', '< 2.0', :platforms => [ :ruby_18, :ruby_19 ]
|
7
10
|
|
8
11
|
# For gems not required to run tests
|
9
12
|
group :local_development, :test do
|
10
|
-
gem
|
13
|
+
gem 'appraisal', '~> 1.0' unless RUBY_VERSION < '1.9'
|
11
14
|
end
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -48,9 +48,12 @@ Every Mail commit is tested by Travis on the [following platforms](https://githu
|
|
48
48
|
* ruby-1.9.2 [ x86_64 ]
|
49
49
|
* ruby-1.9.3 [ x86_64 ]
|
50
50
|
* ruby-2.0.0 [ x86_64 ]
|
51
|
-
* ruby-2.1.
|
51
|
+
* ruby-2.1.10 [ x86_64 ]
|
52
|
+
* ruby-2.2.6 [ x86_64 ]
|
53
|
+
* ruby-2.3.3 [ x86_64 ]
|
52
54
|
* ruby-head [ x86_64 ]
|
53
55
|
* jruby [ x86_64 ]
|
56
|
+
* jruby-9.1.6.0 [ x86_64 ]
|
54
57
|
* jruby-head [ x86_64 ]
|
55
58
|
* rbx-2 [ x86_64 ]
|
56
59
|
|
@@ -697,7 +700,7 @@ License
|
|
697
700
|
|
698
701
|
(The MIT License)
|
699
702
|
|
700
|
-
Copyright (c) 2009-
|
703
|
+
Copyright (c) 2009-2017 Mikel Lindsaar
|
701
704
|
|
702
705
|
Permission is hereby granted, free of charge, to any person obtaining
|
703
706
|
a copy of this software and associated documentation files (the
|
@@ -30,7 +30,7 @@ module Mail
|
|
30
30
|
# mail.attachments['test.png'].filename #=> 'test.png'
|
31
31
|
# mail.attachments[1].filename #=> 'test.jpg'
|
32
32
|
def [](index_value)
|
33
|
-
if index_value.is_a?(
|
33
|
+
if index_value.is_a?(Integer)
|
34
34
|
self.fetch(index_value)
|
35
35
|
else
|
36
36
|
self.select { |a| a.filename == index_value }.first
|
@@ -93,7 +93,7 @@ module Mail
|
|
93
93
|
# a.display_name = 'Mikel Lindsaar'
|
94
94
|
# a.format #=> 'Mikel Lindsaar <mikel@test.lindsaar.net>'
|
95
95
|
def display_name=( str )
|
96
|
-
@display_name = str.dup # in case frozen
|
96
|
+
@display_name = str.nil? ? nil : str.dup # in case frozen
|
97
97
|
end
|
98
98
|
|
99
99
|
# Returns the local part (the left hand side of the @ sign in the email address) of
|
@@ -123,7 +123,12 @@ module Mail
|
|
123
123
|
# a.comments #=> ['My email address']
|
124
124
|
def comments
|
125
125
|
parse unless @parsed
|
126
|
-
|
126
|
+
comments = get_comments
|
127
|
+
if comments.nil? || comments.none?
|
128
|
+
nil
|
129
|
+
else
|
130
|
+
comments.map { |c| c.squeeze(SPACE) }
|
131
|
+
end
|
127
132
|
end
|
128
133
|
|
129
134
|
# Sometimes an address will not have a display name, but might have the name
|
@@ -205,9 +210,9 @@ module Mail
|
|
205
210
|
end
|
206
211
|
|
207
212
|
def get_display_name
|
208
|
-
if @data.display_name
|
213
|
+
if @data && @data.display_name
|
209
214
|
str = strip_all_comments(@data.display_name.to_s)
|
210
|
-
elsif @data.comments && @data.domain
|
215
|
+
elsif @data && @data.comments && @data.domain
|
211
216
|
str = strip_domain_comments(format_comments)
|
212
217
|
end
|
213
218
|
str unless Utilities.blank?(str)
|
@@ -20,7 +20,7 @@ module Mail
|
|
20
20
|
# a.group_names #=> ["My Group"]
|
21
21
|
def initialize(string)
|
22
22
|
@addresses_grouped_by_group = nil
|
23
|
-
@address_list = Parsers::AddressListsParser.new.parse(string)
|
23
|
+
@address_list = Mail::Parsers::AddressListsParser.new.parse(string)
|
24
24
|
end
|
25
25
|
|
26
26
|
# Returns a list of address objects from the parsed line
|
data/lib/mail/multibyte/chars.rb
CHANGED
@@ -269,12 +269,12 @@ module Mail #:nodoc:
|
|
269
269
|
@wrapped_string[*args] = replace_by
|
270
270
|
else
|
271
271
|
result = Unicode.u_unpack(@wrapped_string)
|
272
|
-
if args[0].is_a?(
|
272
|
+
if args[0].is_a?(Integer)
|
273
273
|
raise IndexError, "index #{args[0]} out of string" if args[0] >= result.length
|
274
274
|
min = args[0]
|
275
275
|
max = args[1].nil? ? min : (min + args[1] - 1)
|
276
276
|
range = Range.new(min, max)
|
277
|
-
replace_by = [replace_by].pack('U') if replace_by.is_a?(
|
277
|
+
replace_by = [replace_by].pack('U') if replace_by.is_a?(Integer)
|
278
278
|
elsif args.first.is_a?(Range)
|
279
279
|
raise RangeError, "#{args[0]} out of range" if args[0].min >= result.length
|
280
280
|
range = args[0]
|
@@ -25,7 +25,7 @@ module Mail
|
|
25
25
|
emails_index.reverse! if options[:what] == :last
|
26
26
|
emails_index = case count = options[:count]
|
27
27
|
when :all then emails_index
|
28
|
-
when
|
28
|
+
when Integer then emails_index[0, count]
|
29
29
|
else
|
30
30
|
raise 'Invalid count option value: ' + count.inspect
|
31
31
|
end
|
data/lib/mail/utilities.rb
CHANGED
@@ -72,12 +72,26 @@ module Mail
|
|
72
72
|
# unqoute(string) #=> 'This is "a string"'
|
73
73
|
def unquote( str )
|
74
74
|
if str =~ /^"(.*?)"$/
|
75
|
-
$1
|
75
|
+
unescape($1)
|
76
76
|
else
|
77
77
|
str
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
# Removes any \-escaping.
|
82
|
+
#
|
83
|
+
# Example:
|
84
|
+
#
|
85
|
+
# string = 'This is \"a string\"'
|
86
|
+
# unescape(string) #=> 'This is "a string"'
|
87
|
+
#
|
88
|
+
# string = '"This is \"a string\""'
|
89
|
+
# unescape(string) #=> '"This is "a string""'
|
90
|
+
def unescape( str )
|
91
|
+
str.gsub(/\\(.)/, '\1')
|
92
|
+
end
|
93
|
+
module_function :unescape
|
94
|
+
|
81
95
|
# Wraps a string in parenthesis and escapes any that are in the string itself.
|
82
96
|
#
|
83
97
|
# Example:
|
data/lib/mail/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.5.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikel Lindsaar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -264,12 +264,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
264
|
version: '0'
|
265
265
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
266
|
requirements:
|
267
|
-
- - "
|
267
|
+
- - ">"
|
268
268
|
- !ruby/object:Gem::Version
|
269
|
-
version:
|
269
|
+
version: 1.3.1
|
270
270
|
requirements: []
|
271
271
|
rubyforge_project:
|
272
|
-
rubygems_version: 2.
|
272
|
+
rubygems_version: 2.6.10
|
273
273
|
signing_key:
|
274
274
|
specification_version: 4
|
275
275
|
summary: Mail provides a nice Ruby DSL for making, sending and reading emails.
|