mail 2.7.0.rc1 → 2.7.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +71 -98
- data/lib/mail.rb +1 -6
- data/lib/mail/attachments_list.rb +5 -2
- data/lib/mail/body.rb +39 -33
- data/lib/mail/check_delivery_params.rb +8 -6
- data/lib/mail/configuration.rb +2 -0
- data/lib/mail/elements/address.rb +19 -18
- data/lib/mail/encodings.rb +89 -31
- data/lib/mail/encodings/7bit.rb +5 -15
- data/lib/mail/encodings/8bit.rb +2 -21
- data/lib/mail/encodings/base64.rb +11 -12
- data/lib/mail/encodings/binary.rb +3 -22
- data/lib/mail/encodings/identity.rb +24 -0
- data/lib/mail/encodings/quoted_printable.rb +6 -6
- data/lib/mail/encodings/transfer_encoding.rb +38 -29
- data/lib/mail/encodings/unix_to_unix.rb +2 -1
- data/lib/mail/envelope.rb +1 -1
- data/lib/mail/field.rb +93 -61
- data/lib/mail/fields/bcc_field.rb +2 -2
- data/lib/mail/fields/cc_field.rb +1 -1
- data/lib/mail/fields/comments_field.rb +1 -1
- data/lib/mail/fields/common/common_address.rb +32 -7
- data/lib/mail/fields/common/common_field.rb +1 -10
- data/lib/mail/fields/content_description_field.rb +1 -1
- data/lib/mail/fields/content_disposition_field.rb +3 -3
- data/lib/mail/fields/content_id_field.rb +2 -2
- data/lib/mail/fields/content_location_field.rb +1 -1
- data/lib/mail/fields/content_transfer_encoding_field.rb +1 -1
- data/lib/mail/fields/content_type_field.rb +1 -1
- data/lib/mail/fields/date_field.rb +2 -3
- data/lib/mail/fields/from_field.rb +1 -1
- data/lib/mail/fields/in_reply_to_field.rb +1 -1
- data/lib/mail/fields/keywords_field.rb +1 -1
- data/lib/mail/fields/message_id_field.rb +1 -1
- data/lib/mail/fields/mime_version_field.rb +1 -1
- data/lib/mail/fields/optional_field.rb +4 -1
- data/lib/mail/fields/received_field.rb +1 -1
- data/lib/mail/fields/references_field.rb +1 -1
- data/lib/mail/fields/reply_to_field.rb +1 -1
- data/lib/mail/fields/resent_bcc_field.rb +1 -1
- data/lib/mail/fields/resent_cc_field.rb +1 -1
- data/lib/mail/fields/resent_date_field.rb +0 -1
- data/lib/mail/fields/resent_from_field.rb +1 -1
- data/lib/mail/fields/resent_message_id_field.rb +1 -1
- data/lib/mail/fields/resent_sender_field.rb +1 -1
- data/lib/mail/fields/resent_to_field.rb +1 -1
- data/lib/mail/fields/return_path_field.rb +1 -1
- data/lib/mail/fields/sender_field.rb +1 -1
- data/lib/mail/fields/subject_field.rb +1 -1
- data/lib/mail/fields/to_field.rb +1 -1
- data/lib/mail/fields/unstructured_field.rb +19 -2
- data/lib/mail/header.rb +9 -8
- data/lib/mail/mail.rb +2 -10
- data/lib/mail/matchers/has_sent_mail.rb +21 -1
- data/lib/mail/message.rb +64 -51
- data/lib/mail/multibyte.rb +14 -16
- data/lib/mail/multibyte/chars.rb +2 -1
- data/lib/mail/network.rb +1 -0
- data/lib/mail/network/delivery_methods/exim.rb +6 -10
- data/lib/mail/network/delivery_methods/logger_delivery.rb +37 -0
- data/lib/mail/network/delivery_methods/sendmail.rb +8 -4
- data/lib/mail/network/delivery_methods/smtp.rb +56 -55
- data/lib/mail/network/delivery_methods/smtp_connection.rb +9 -1
- data/lib/mail/network/retriever_methods/imap.rb +18 -5
- data/lib/mail/network/retriever_methods/pop3.rb +3 -1
- data/lib/mail/parser_tools.rb +15 -0
- data/lib/mail/parsers/address_lists_parser.rb +30462 -12597
- data/lib/mail/parsers/address_lists_parser.rl +18 -12
- data/lib/mail/parsers/content_disposition_parser.rb +405 -215
- data/lib/mail/parsers/content_disposition_parser.rl +11 -5
- data/lib/mail/parsers/content_location_parser.rb +443 -208
- data/lib/mail/parsers/content_location_parser.rl +9 -3
- data/lib/mail/parsers/content_transfer_encoding_parser.rb +180 -80
- data/lib/mail/parsers/content_transfer_encoding_parser.rl +8 -2
- data/lib/mail/parsers/content_type_parser.rb +436 -245
- data/lib/mail/parsers/content_type_parser.rl +12 -6
- data/lib/mail/parsers/date_time_parser.rb +172 -72
- data/lib/mail/parsers/date_time_parser.rl +10 -4
- data/lib/mail/parsers/envelope_from_parser.rb +2833 -1320
- data/lib/mail/parsers/envelope_from_parser.rl +9 -3
- data/lib/mail/parsers/message_ids_parser.rb +2325 -976
- data/lib/mail/parsers/message_ids_parser.rl +9 -3
- data/lib/mail/parsers/mime_version_parser.rb +164 -64
- data/lib/mail/parsers/mime_version_parser.rl +9 -3
- data/lib/mail/parsers/phrase_lists_parser.rb +582 -237
- data/lib/mail/parsers/phrase_lists_parser.rl +9 -3
- data/lib/mail/parsers/received_parser.rb +7036 -3004
- data/lib/mail/parsers/received_parser.rl +11 -5
- data/lib/mail/parsers/rfc2045_content_transfer_encoding.rl +1 -0
- data/lib/mail/parsers/rfc2045_content_type.rl +1 -0
- data/lib/mail/parsers/rfc2045_mime.rl +1 -0
- data/lib/mail/parsers/rfc2183_content_disposition.rl +1 -0
- data/lib/mail/parsers/rfc3629_utf8.rl +19 -0
- data/lib/mail/parsers/rfc5234_abnf_core_rules.rl +7 -1
- data/lib/mail/parsers/rfc5322.rl +3 -1
- data/lib/mail/parsers/rfc5322_address.rl +3 -1
- data/lib/mail/parsers/rfc5322_date_time.rl +1 -0
- data/lib/mail/parsers/rfc5322_lexical_tokens.rl +9 -5
- data/lib/mail/part.rb +1 -1
- data/lib/mail/utilities.rb +44 -15
- data/lib/mail/version.rb +1 -1
- data/lib/mail/version_specific/ruby_1_8.rb +12 -1
- data/lib/mail/version_specific/ruby_1_9.rb +13 -1
- metadata +7 -13
- data/CHANGELOG.rdoc +0 -822
- data/CONTRIBUTING.md +0 -60
- data/Dependencies.txt +0 -1
- data/Gemfile +0 -11
- data/Rakefile +0 -23
- data/TODO.rdoc +0 -9
- data/lib/mail/multibyte/exceptions.rb +0 -9
data/CONTRIBUTING.md
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
Contributing to Mail
|
2
|
-
====================
|
3
|
-
|
4
|
-
Hi there, I welcome pull requests! Here are some thoughts on how to get your
|
5
|
-
pull request merged quickly:
|
6
|
-
|
7
|
-
1. Check the Reference RFCs, they are in the References directory, so no excuses.
|
8
|
-
2. Check for a ticket on GitHub, maybe someone else has the problem too
|
9
|
-
3. Make a fork of my GitHub repository
|
10
|
-
4. Run the specs. We only take pull requests with passing tests, and it's great
|
11
|
-
to know that you have a clean slate: `bundle && bundle exec rake`
|
12
|
-
5. Add a spec for your change. Only refactoring and documentation changes
|
13
|
-
require no new specs. If you are adding functionality or fixing a bug, we need
|
14
|
-
a spec!
|
15
|
-
6. Test the spec _at_ _least_ against MRI-1.9.3 and MRI-1.8.7
|
16
|
-
7. Update the README if needed to reflect your change / addition
|
17
|
-
8. Update the CHANGELOG and give yourself credit
|
18
|
-
9. With all specs passing push your changes back to your fork
|
19
|
-
10. Send me a pull request.
|
20
|
-
- If it needs any changes, please push or force push to the same branch you made the pull request from. GitHub will just update the pull request with your changes.
|
21
|
-
|
22
|
-
Note, specs that break MRI 1.8.7 or 1.9.3 will not be accepted.
|
23
|
-
|
24
|
-
At this point you're waiting on us. We like to at least comment on, if not
|
25
|
-
accept, pull requests within three business days (and, typically, one business
|
26
|
-
day). We may suggest some changes or improvements or alternatives.
|
27
|
-
|
28
|
-
Some things that will increase the chance that your pull request is accepted,
|
29
|
-
taken straight from the Ruby on Rails guide:
|
30
|
-
|
31
|
-
* Tell me you have tested it against more than one version of Ruby, RVM is great for
|
32
|
-
this. I test against 7 rubies before I push into master.
|
33
|
-
* Use good, idiomatic, structured and modular code
|
34
|
-
* Include tests that fail without your code, and pass with it
|
35
|
-
* Update the documentation, the surrounding one, examples elsewhere, guides,
|
36
|
-
whatever is affected by your contribution
|
37
|
-
|
38
|
-
Syntax:
|
39
|
-
|
40
|
-
* Two spaces, no tabs.
|
41
|
-
* No trailing whitespace. Blank lines should not have any space.
|
42
|
-
* Prefer &&/|| over and/or.
|
43
|
-
* MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
44
|
-
* a = b and not a=b.
|
45
|
-
* Follow the conventions you see used in the source already.
|
46
|
-
|
47
|
-
And in case we didn't emphasize it enough: we love specs!
|
48
|
-
|
49
|
-
### Testing against mime-types versions:
|
50
|
-
|
51
|
-
Use [appraisal](https://github.com/thoughtbot/appraisal) to run against all supported versions of mime-types.
|
52
|
-
|
53
|
-
1. Run `(bundle check || bundle) && appraisal` so that all the 'appraised' gemfiles are bundled.
|
54
|
-
2. Run either `appraisal rake` or `rake appraisal` to run all the tests.
|
55
|
-
|
56
|
-
To run only one 'appraised' gemfile, run. e.g. `BUNDLE_GEMFILE=gemfiles/mime_types_edge.gemfile (bundle check || bundle) && rake`
|
57
|
-
|
58
|
-
To change the appraisals, modify the `Appraisals` file, run `appraisal`, commit the generated gemfiles, and modify the .travis.yml matrix.
|
59
|
-
|
60
|
-
To run on all rubies / gemfiles, just like TravisCI, see [WWTD](https://github.com/grosser/wwtd).
|
data/Dependencies.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
tlsmail: if ruby < 1.8.6... we could make it optional, or embed it in Mail
|
data/Gemfile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'tlsmail', '~> 0.0.1' if RUBY_VERSION <= '1.8.6'
|
6
|
-
gem 'jruby-openssl', :platforms => :jruby
|
7
|
-
|
8
|
-
gem 'rake', '< 11.0' if RUBY_VERSION < '1.9.3'
|
9
|
-
gem 'rdoc', '< 4.3' if RUBY_VERSION < '2.0'
|
10
|
-
|
11
|
-
gem 'mini_mime', :github => 'discourse/mini_mime'
|
data/Rakefile
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
|
2
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__)
|
3
|
-
end
|
4
|
-
require 'rubygems'
|
5
|
-
require 'bundler/setup'
|
6
|
-
|
7
|
-
require 'rake/testtask'
|
8
|
-
require 'rspec/core/rake_task'
|
9
|
-
|
10
|
-
desc "Build a gem file"
|
11
|
-
task :build do
|
12
|
-
system "gem build mail.gemspec"
|
13
|
-
end
|
14
|
-
|
15
|
-
task :default => :spec
|
16
|
-
|
17
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
18
|
-
t.ruby_opts = '-w'
|
19
|
-
t.rspec_opts = %w(--backtrace --color)
|
20
|
-
end
|
21
|
-
|
22
|
-
# load custom rake tasks
|
23
|
-
Dir["#{File.dirname(__FILE__)}/tasks/**/*.rake"].sort.each { |ext| load ext }
|
data/TODO.rdoc
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
== Not really in any order:
|
2
|
-
|
3
|
-
* Add multibyte handling to fields, if they get a multibyte string, try encoding it into
|
4
|
-
UTF-8 B first, if this fails, throw an error.
|
5
|
-
|
6
|
-
* Cleanup the treetop parsers......... do I _really_ need that many entrance files?
|
7
|
-
|
8
|
-
* Simplify the relationship of Headers and Fields. Doing too much of the Field work
|
9
|
-
in the Header class on instantiating fields. Header should just say "Field, do it!"
|