mail 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecb5e9115e61802f251480eef90c6698ac665d0b
4
- data.tar.gz: a1105d5defc2c7b374598a392e5f5dc4d1452a21
3
+ metadata.gz: b36c7dad6398232438e90270f9814eb04aeda138
4
+ data.tar.gz: 7dbe4c27bd7cab8569892fc5d6a676718aaf755b
5
5
  SHA512:
6
- metadata.gz: 103d2126c02d1aeb5ffd4982f261407af16652fd181f6e0fc63bf12702e5aa1ea3c7f863a3c39f822ba3b8e8cf704782d1beb7c4e2e28cba5f4fc2931151cf0e
7
- data.tar.gz: 6f25c0decaf77a0314b42d0fbf6c61edfc7f2fe9b4bbeef004e34a7127882093b660108cd7728a108f26b1b3dcf2664beac4e5e6d0d0d3e68565f78fdd273d4e
6
+ metadata.gz: 0628c04e7acf3cf0c3a801aff33a6008fe338ebd9a96a1d2b290ffbd98af1c287c0bdd958eda0ec77f495f498880dd69aaf8325da77e2f7d6ddb9f50396b1635
7
+ data.tar.gz: 1d813d0f8b64feb0a5a0561e7d031d795b54bf3d0160c02fcd35a9f11e04875dd6ea05a67b5a565b3d67486ce8941a14ac2d1362a288032eb3863641c533fece
@@ -1,5 +1,16 @@
1
1
  == HEAD
2
2
 
3
+ Features:
4
+
5
+ Performance:
6
+
7
+ Bugs:
8
+
9
+ == Version 2.6.1 - Sun Jun 8 15:34 +1100 2014 Mikel Lindsaar <mikel@reinteractive.net>
10
+
11
+ Features:
12
+ * Silence warnings on loading ragel-generated parsers (bf4)
13
+
3
14
  == Version 2.6.0 - Mon Jun 2 22:49 +1100 2014 Mikel Lindsaar <mikel@reinteractive.net>
4
15
 
5
16
  Features:
@@ -14,8 +14,10 @@ pull request merged quickly:
14
14
  a spec!
15
15
  6. Test the spec _at_ _least_ against MRI-1.9.3 and MRI-1.8.7
16
16
  7. Update the README if needed to reflect your change / addition
17
- 8. With all specs passing push your changes back to your fork
18
- 9. Send me a pull request
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.
19
21
 
20
22
  Note, specs that break MRI 1.8.7 or 1.9.3 will not be accepted.
21
23
 
data/README.md CHANGED
@@ -56,11 +56,9 @@ Every Mail commit is tested by Travis on the [following platforms](https://githu
56
56
 
57
57
  Testing a specific mime type (needed for 1.8.7 for example) can be done manually with:
58
58
 
59
- $ BUNDLE_GEMFILE=gemfiles/mime_types_1.16.gemfile bundle check
60
- $ BUNDLE_GEMFILE=gemfiles/mime_types_1.16.gemfile bundle
61
- $ BUNDLE_GEMFILE=gemfiles/mime_types_1.16.gemfile rake
62
-
63
-
59
+ ```sh
60
+ BUNDLE_GEMFILE=gemfiles/mime_types_1.16.gemfile (bundle check || bundle) && rake
61
+ ```
64
62
 
65
63
  Discussion
66
64
  ----------
data/VERSION CHANGED
@@ -1,4 +1,4 @@
1
1
  major:2
2
2
  minor:6
3
- patch:0
3
+ patch:1
4
4
  build:
@@ -2,8 +2,18 @@ module Mail
2
2
  module Parsers
3
3
  module Ragel
4
4
  module Ruby
5
- Mail::Parsers::Ragel::FIELD_PARSERS.each do |field_parser|
6
- require "mail/parsers/ragel/ruby/machines/#{field_parser}_machine"
5
+ def self.silence_warnings
6
+ original_verbose = $VERBOSE
7
+ $VERBOSE = nil
8
+ yield
9
+ $VERBOSE = original_verbose
10
+ end
11
+ # Ragel-generated parsers give a lot of warnings
12
+ # and may cause logs to balloon in size
13
+ silence_warnings do
14
+ Mail::Parsers::Ragel::FIELD_PARSERS.each do |field_parser|
15
+ require "mail/parsers/ragel/ruby/machines/#{field_parser}_machine"
16
+ end
7
17
  end
8
18
 
9
19
  MACHINE_LIST = {
@@ -2,19 +2,19 @@
2
2
  module Mail
3
3
  module Utilities
4
4
  include Patterns
5
-
5
+
6
6
  # Returns true if the string supplied is free from characters not allowed as an ATOM
7
7
  def atom_safe?( str )
8
8
  not ATOM_UNSAFE === str
9
9
  end
10
10
 
11
- # If the string supplied has ATOM unsafe characters in it, will return the string quoted
11
+ # If the string supplied has ATOM unsafe characters in it, will return the string quoted
12
12
  # in double quotes, otherwise returns the string unmodified
13
13
  def quote_atom( str )
14
14
  atom_safe?( str ) ? str : dquote(str)
15
15
  end
16
16
 
17
- # If the string supplied has PHRASE unsafe characters in it, will return the string quoted
17
+ # If the string supplied has PHRASE unsafe characters in it, will return the string quoted
18
18
  # in double quotes, otherwise returns the string unmodified
19
19
  def quote_phrase( str )
20
20
  if RUBY_VERSION >= '1.9'
@@ -37,7 +37,7 @@ module Mail
37
37
  not TOKEN_UNSAFE === str
38
38
  end
39
39
 
40
- # If the string supplied has TOKEN unsafe characters in it, will return the string quoted
40
+ # If the string supplied has TOKEN unsafe characters in it, will return the string quoted
41
41
  # in double quotes, otherwise returns the string unmodified
42
42
  def quote_token( str )
43
43
  token_safe?( str ) ? str : dquote(str)
@@ -74,106 +74,106 @@ module Mail
74
74
  str
75
75
  end
76
76
  end
77
-
77
+
78
78
  # Wraps a string in parenthesis and escapes any that are in the string itself.
79
- #
79
+ #
80
80
  # Example:
81
- #
81
+ #
82
82
  # paren( 'This is a string' ) #=> '(This is a string)'
83
83
  def paren( str )
84
84
  RubyVer.paren( str )
85
85
  end
86
-
86
+
87
87
  # Unwraps a string from being wrapped in parenthesis
88
- #
88
+ #
89
89
  # Example:
90
- #
90
+ #
91
91
  # str = '(This is a string)'
92
92
  # unparen( str ) #=> 'This is a string'
93
93
  def unparen( str )
94
94
  match = str.match(/^\((.*?)\)$/)
95
95
  match ? match[1] : str
96
96
  end
97
-
97
+
98
98
  # Wraps a string in angle brackets and escapes any that are in the string itself
99
- #
99
+ #
100
100
  # Example:
101
- #
101
+ #
102
102
  # bracket( 'This is a string' ) #=> '<This is a string>'
103
103
  def bracket( str )
104
104
  RubyVer.bracket( str )
105
105
  end
106
-
106
+
107
107
  # Unwraps a string from being wrapped in parenthesis
108
- #
108
+ #
109
109
  # Example:
110
- #
110
+ #
111
111
  # str = '<This is a string>'
112
112
  # unbracket( str ) #=> 'This is a string'
113
113
  def unbracket( str )
114
114
  match = str.match(/^\<(.*?)\>$/)
115
115
  match ? match[1] : str
116
116
  end
117
-
117
+
118
118
  # Escape parenthesies in a string
119
- #
119
+ #
120
120
  # Example:
121
- #
121
+ #
122
122
  # str = 'This is (a) string'
123
123
  # escape_paren( str ) #=> 'This is \(a\) string'
124
124
  def escape_paren( str )
125
125
  RubyVer.escape_paren( str )
126
126
  end
127
-
127
+
128
128
  def uri_escape( str )
129
129
  uri_parser.escape(str)
130
130
  end
131
-
131
+
132
132
  def uri_unescape( str )
133
133
  uri_parser.unescape(str)
134
134
  end
135
-
135
+
136
136
  def uri_parser
137
137
  @uri_parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI
138
138
  end
139
-
139
+
140
140
  # Matches two objects with their to_s values case insensitively
141
- #
141
+ #
142
142
  # Example:
143
- #
143
+ #
144
144
  # obj2 = "This_is_An_object"
145
145
  # obj1 = :this_IS_an_object
146
146
  # match_to_s( obj1, obj2 ) #=> true
147
147
  def match_to_s( obj1, obj2 )
148
148
  obj1.to_s.casecmp(obj2.to_s) == 0
149
149
  end
150
-
150
+
151
151
  # Capitalizes a string that is joined by hyphens correctly.
152
- #
152
+ #
153
153
  # Example:
154
- #
154
+ #
155
155
  # string = 'resent-from-field'
156
156
  # capitalize_field( string ) #=> 'Resent-From-Field'
157
157
  def capitalize_field( str )
158
158
  str.to_s.split("-").map { |v| v.capitalize }.join("-")
159
159
  end
160
-
160
+
161
161
  # Takes an underscored word and turns it into a class name
162
- #
162
+ #
163
163
  # Example:
164
- #
164
+ #
165
165
  # constantize("hello") #=> "Hello"
166
166
  # constantize("hello-there") #=> "HelloThere"
167
167
  # constantize("hello-there-mate") #=> "HelloThereMate"
168
168
  def constantize( str )
169
169
  str.to_s.split(/[-_]/).map { |v| v.capitalize }.to_s
170
170
  end
171
-
171
+
172
172
  # Swaps out all underscores (_) for hyphens (-) good for stringing from symbols
173
173
  # a field name.
174
- #
174
+ #
175
175
  # Example:
176
- #
176
+ #
177
177
  # string = :resent_from_field
178
178
  # dasherize ( string ) #=> 'resent_from_field'
179
179
  def dasherize( str )
@@ -182,9 +182,9 @@ module Mail
182
182
 
183
183
  # Swaps out all hyphens (-) for underscores (_) good for stringing to symbols
184
184
  # a field name.
185
- #
185
+ #
186
186
  # Example:
187
- #
187
+ #
188
188
  # string = :resent_from_field
189
189
  # underscoreize ( string ) #=> 'resent_from_field'
190
190
  def underscoreize( str )
@@ -200,7 +200,7 @@ module Mail
200
200
  end
201
201
  results
202
202
  end
203
-
203
+
204
204
  def map_with_index( enum, &block )
205
205
  results = []
206
206
  enum.each_with_index do |token, i|
@@ -208,7 +208,7 @@ module Mail
208
208
  end
209
209
  results
210
210
  end
211
-
211
+
212
212
  else
213
213
 
214
214
  def map_lines( str, &block )
metadata CHANGED
@@ -1,89 +1,89 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikel Lindsaar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-02 00:00:00.000000000 Z
11
+ date: 2014-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.16'
20
- - - "<"
20
+ - - <
21
21
  - !ruby/object:Gem::Version
22
22
  version: '3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '1.16'
30
- - - "<"
30
+ - - <
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - '>='
38
38
  - !ruby/object:Gem::Version
39
39
  version: 1.0.3
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.3
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">"
51
+ - - '>'
52
52
  - !ruby/object:Gem::Version
53
53
  version: 0.8.7
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">"
58
+ - - '>'
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.8.7
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - ~>
66
66
  - !ruby/object:Gem::Version
67
67
  version: 2.12.0
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - ~>
73
73
  - !ruby/object:Gem::Version
74
74
  version: 2.12.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rdoc
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">="
79
+ - - '>='
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ">="
86
+ - - '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  description: A really Ruby Mail handler.
@@ -96,16 +96,15 @@ extra_rdoc_files:
96
96
  - CHANGELOG.rdoc
97
97
  - TODO.rdoc
98
98
  files:
99
- - CHANGELOG.rdoc
99
+ - README.md
100
+ - VERSION
101
+ - MIT-LICENSE
100
102
  - CONTRIBUTING.md
103
+ - CHANGELOG.rdoc
101
104
  - Dependencies.txt
102
105
  - Gemfile
103
- - MIT-LICENSE
104
- - README.md
105
106
  - Rakefile
106
107
  - TODO.rdoc
107
- - VERSION
108
- - lib/mail.rb
109
108
  - lib/mail/attachments_list.rb
110
109
  - lib/mail/body.rb
111
110
  - lib/mail/check_delivery_params.rb
@@ -113,10 +112,9 @@ files:
113
112
  - lib/mail/core_extensions/nil.rb
114
113
  - lib/mail/core_extensions/object.rb
115
114
  - lib/mail/core_extensions/smtp.rb
116
- - lib/mail/core_extensions/string.rb
117
115
  - lib/mail/core_extensions/string/access.rb
118
116
  - lib/mail/core_extensions/string/multibyte.rb
119
- - lib/mail/elements.rb
117
+ - lib/mail/core_extensions/string.rb
120
118
  - lib/mail/elements/address.rb
121
119
  - lib/mail/elements/address_list.rb
122
120
  - lib/mail/elements/content_disposition_element.rb
@@ -129,17 +127,17 @@ files:
129
127
  - lib/mail/elements/mime_version_element.rb
130
128
  - lib/mail/elements/phrase_list.rb
131
129
  - lib/mail/elements/received_element.rb
132
- - lib/mail/encodings.rb
130
+ - lib/mail/elements.rb
133
131
  - lib/mail/encodings/7bit.rb
134
132
  - lib/mail/encodings/8bit.rb
135
133
  - lib/mail/encodings/base64.rb
136
134
  - lib/mail/encodings/binary.rb
137
135
  - lib/mail/encodings/quoted_printable.rb
138
136
  - lib/mail/encodings/transfer_encoding.rb
137
+ - lib/mail/encodings.rb
139
138
  - lib/mail/envelope.rb
140
139
  - lib/mail/field.rb
141
140
  - lib/mail/field_list.rb
142
- - lib/mail/fields.rb
143
141
  - lib/mail/fields/bcc_field.rb
144
142
  - lib/mail/fields/cc_field.rb
145
143
  - lib/mail/fields/comments_field.rb
@@ -178,17 +176,17 @@ files:
178
176
  - lib/mail/fields/subject_field.rb
179
177
  - lib/mail/fields/to_field.rb
180
178
  - lib/mail/fields/unstructured_field.rb
179
+ - lib/mail/fields.rb
181
180
  - lib/mail/header.rb
182
181
  - lib/mail/indifferent_hash.rb
183
182
  - lib/mail/mail.rb
184
183
  - lib/mail/matchers/has_sent_mail.rb
185
184
  - lib/mail/message.rb
186
- - lib/mail/multibyte.rb
187
185
  - lib/mail/multibyte/chars.rb
188
186
  - lib/mail/multibyte/exceptions.rb
189
187
  - lib/mail/multibyte/unicode.rb
190
188
  - lib/mail/multibyte/utils.rb
191
- - lib/mail/network.rb
189
+ - lib/mail/multibyte.rb
192
190
  - lib/mail/network/delivery_methods/exim.rb
193
191
  - lib/mail/network/delivery_methods/file_delivery.rb
194
192
  - lib/mail/network/delivery_methods/sendmail.rb
@@ -199,7 +197,7 @@ files:
199
197
  - lib/mail/network/retriever_methods/imap.rb
200
198
  - lib/mail/network/retriever_methods/pop3.rb
201
199
  - lib/mail/network/retriever_methods/test_retriever.rb
202
- - lib/mail/parsers.rb
200
+ - lib/mail/network.rb
203
201
  - lib/mail/parsers/address_lists_parser.rb
204
202
  - lib/mail/parsers/content_disposition_parser.rb
205
203
  - lib/mail/parsers/content_location_parser.rb
@@ -210,11 +208,9 @@ files:
210
208
  - lib/mail/parsers/message_ids_parser.rb
211
209
  - lib/mail/parsers/mime_version_parser.rb
212
210
  - lib/mail/parsers/phrase_lists_parser.rb
213
- - lib/mail/parsers/ragel.rb
214
211
  - lib/mail/parsers/ragel/common.rl
215
212
  - lib/mail/parsers/ragel/date_time.rl
216
213
  - lib/mail/parsers/ragel/parser_info.rb
217
- - lib/mail/parsers/ragel/ruby.rb
218
214
  - lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb
219
215
  - lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl
220
216
  - lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb
@@ -239,7 +235,10 @@ files:
239
235
  - lib/mail/parsers/ragel/ruby/machines/received_machine.rb
240
236
  - lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl
241
237
  - lib/mail/parsers/ragel/ruby/parser.rb.rl.erb
238
+ - lib/mail/parsers/ragel/ruby.rb
239
+ - lib/mail/parsers/ragel.rb
242
240
  - lib/mail/parsers/received_parser.rb
241
+ - lib/mail/parsers.rb
243
242
  - lib/mail/part.rb
244
243
  - lib/mail/parts_list.rb
245
244
  - lib/mail/patterns.rb
@@ -248,29 +247,30 @@ files:
248
247
  - lib/mail/version.rb
249
248
  - lib/mail/version_specific/ruby_1_8.rb
250
249
  - lib/mail/version_specific/ruby_1_9.rb
250
+ - lib/mail.rb
251
251
  homepage: http://github.com/mikel/mail
252
252
  licenses:
253
253
  - MIT
254
254
  metadata: {}
255
255
  post_install_message:
256
256
  rdoc_options:
257
- - "--exclude"
257
+ - --exclude
258
258
  - lib/mail/values/unicode_tables.dat
259
259
  require_paths:
260
260
  - lib
261
261
  required_ruby_version: !ruby/object:Gem::Requirement
262
262
  requirements:
263
- - - ">="
263
+ - - '>='
264
264
  - !ruby/object:Gem::Version
265
265
  version: '0'
266
266
  required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  requirements:
268
- - - ">="
268
+ - - '>='
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
271
  requirements: []
272
272
  rubyforge_project:
273
- rubygems_version: 2.2.2
273
+ rubygems_version: 2.1.11
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Mail provides a nice Ruby DSL for making, sending and reading emails.