mailtrap 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -5
- data/.ruby-version +1 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +67 -41
- data/lib/mailtrap/attachment.rb +1 -1
- data/lib/mailtrap/mail.rb +15 -2
- data/lib/mailtrap/version.rb +1 -1
- data/mailtrap.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5423fd6ba2817ace06e724da478e925615f3c8b4dfcbf24eb271f6bb12fded4c
|
4
|
+
data.tar.gz: b331be242b93d7176adf0ca92d01f33d0bc7a9407766d8d139d8bb39d7d2382b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c2556e7ea3b7405ec76910a718ba949694563dabc4547fc6b33771bd52a2bd0e444e287bcc341c6c5e1bdab07bd12573c3ce9607cbcc84afbd8398aafbccf4c
|
7
|
+
data.tar.gz: 06f0ea3e473461ad889e101540ba2d2a37cfda75ce3a4677ab58708ddae8ce4cae53d16426f4b30e54bf899e9a5f3cca0c46e0616c49b9da80be9c1e8c308c67
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
require:
|
1
|
+
require:
|
2
|
+
- rubocop-rake
|
3
|
+
- rubocop-rspec
|
4
|
+
|
5
|
+
inherit_mode:
|
6
|
+
merge:
|
7
|
+
- Exclude
|
2
8
|
|
3
9
|
AllCops:
|
4
|
-
TargetRubyVersion:
|
10
|
+
TargetRubyVersion: 3.0
|
5
11
|
NewCops: enable
|
6
12
|
Exclude:
|
7
|
-
-
|
13
|
+
- "gemfiles/**/*"
|
8
14
|
|
9
15
|
Layout/LineLength:
|
10
16
|
Max: 120
|
@@ -34,8 +40,8 @@ Style/StringLiteralsInInterpolation:
|
|
34
40
|
|
35
41
|
Style/FrozenStringLiteralComment:
|
36
42
|
Exclude:
|
37
|
-
-
|
43
|
+
- "examples/**/*"
|
38
44
|
|
39
45
|
Style/TrailingCommaInHashLiteral:
|
40
46
|
Exclude:
|
41
|
-
-
|
47
|
+
- "examples/**/*"
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.3.3
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,68 +1,93 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mailtrap (2.
|
4
|
+
mailtrap (2.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
addressable (2.8.
|
10
|
-
public_suffix (>= 2.0.2, <
|
11
|
-
appraisal (2.
|
9
|
+
addressable (2.8.7)
|
10
|
+
public_suffix (>= 2.0.2, < 7.0)
|
11
|
+
appraisal (2.5.0)
|
12
12
|
bundler
|
13
13
|
rake
|
14
14
|
thor (>= 0.14.0)
|
15
15
|
ast (2.4.2)
|
16
|
-
|
16
|
+
bigdecimal (3.1.8)
|
17
|
+
crack (1.0.0)
|
18
|
+
bigdecimal
|
17
19
|
rexml
|
18
|
-
|
19
|
-
|
20
|
-
|
20
|
+
date (3.3.4)
|
21
|
+
diff-lcs (1.5.1)
|
22
|
+
hashdiff (1.1.0)
|
23
|
+
json (2.7.2)
|
24
|
+
language_server-protocol (3.17.0.3)
|
25
|
+
mail (2.8.1)
|
21
26
|
mini_mime (>= 0.1.1)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
27
|
+
net-imap
|
28
|
+
net-pop
|
29
|
+
net-smtp
|
30
|
+
mini_mime (1.1.5)
|
31
|
+
net-imap (0.4.14)
|
32
|
+
date
|
33
|
+
net-protocol
|
34
|
+
net-pop (0.1.2)
|
35
|
+
net-protocol
|
36
|
+
net-protocol (0.2.2)
|
37
|
+
timeout
|
38
|
+
net-smtp (0.5.0)
|
39
|
+
net-protocol
|
40
|
+
parallel (1.25.1)
|
41
|
+
parser (3.3.3.0)
|
26
42
|
ast (~> 2.4.1)
|
27
|
-
|
43
|
+
racc
|
44
|
+
public_suffix (5.1.1)
|
45
|
+
racc (1.8.0)
|
28
46
|
rainbow (3.1.1)
|
29
|
-
rake (13.
|
30
|
-
regexp_parser (2.
|
31
|
-
rexml (3.
|
32
|
-
|
33
|
-
|
34
|
-
rspec-
|
35
|
-
rspec-
|
36
|
-
|
37
|
-
|
38
|
-
|
47
|
+
rake (13.2.1)
|
48
|
+
regexp_parser (2.9.2)
|
49
|
+
rexml (3.3.1)
|
50
|
+
strscan
|
51
|
+
rspec (3.13.0)
|
52
|
+
rspec-core (~> 3.13.0)
|
53
|
+
rspec-expectations (~> 3.13.0)
|
54
|
+
rspec-mocks (~> 3.13.0)
|
55
|
+
rspec-core (3.13.0)
|
56
|
+
rspec-support (~> 3.13.0)
|
57
|
+
rspec-expectations (3.13.1)
|
39
58
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
59
|
+
rspec-support (~> 3.13.0)
|
41
60
|
rspec-its (1.3.0)
|
42
61
|
rspec-core (>= 3.0.0)
|
43
62
|
rspec-expectations (>= 3.0.0)
|
44
|
-
rspec-mocks (3.
|
63
|
+
rspec-mocks (3.13.1)
|
45
64
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
-
rspec-support (~> 3.
|
47
|
-
rspec-support (3.
|
48
|
-
rubocop (1.
|
65
|
+
rspec-support (~> 3.13.0)
|
66
|
+
rspec-support (3.13.1)
|
67
|
+
rubocop (1.64.1)
|
68
|
+
json (~> 2.3)
|
69
|
+
language_server-protocol (>= 3.17.0)
|
49
70
|
parallel (~> 1.10)
|
50
|
-
parser (>= 3.
|
71
|
+
parser (>= 3.3.0.2)
|
51
72
|
rainbow (>= 2.2.2, < 4.0)
|
52
73
|
regexp_parser (>= 1.8, < 3.0)
|
53
74
|
rexml (>= 3.2.5, < 4.0)
|
54
|
-
rubocop-ast (>= 1.
|
75
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
55
76
|
ruby-progressbar (~> 1.7)
|
56
|
-
unicode-display_width (>=
|
57
|
-
rubocop-ast (1.
|
58
|
-
parser (>= 3.
|
59
|
-
rubocop-
|
60
|
-
rubocop (~> 1.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
77
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
78
|
+
rubocop-ast (1.31.3)
|
79
|
+
parser (>= 3.3.1.0)
|
80
|
+
rubocop-rake (0.6.0)
|
81
|
+
rubocop (~> 1.0)
|
82
|
+
rubocop-rspec (3.0.2)
|
83
|
+
rubocop (~> 1.61)
|
84
|
+
ruby-progressbar (1.13.0)
|
85
|
+
strscan (3.1.0)
|
86
|
+
thor (1.3.1)
|
87
|
+
timeout (0.4.1)
|
88
|
+
unicode-display_width (2.5.0)
|
89
|
+
vcr (6.2.0)
|
90
|
+
webmock (3.23.1)
|
66
91
|
addressable (>= 2.8.0)
|
67
92
|
crack (>= 0.3.2)
|
68
93
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -79,9 +104,10 @@ DEPENDENCIES
|
|
79
104
|
rspec (~> 3.0)
|
80
105
|
rspec-its
|
81
106
|
rubocop (~> 1.21)
|
107
|
+
rubocop-rake
|
82
108
|
rubocop-rspec
|
83
109
|
vcr
|
84
110
|
webmock
|
85
111
|
|
86
112
|
BUNDLED WITH
|
87
|
-
2.
|
113
|
+
2.5.14
|
data/lib/mailtrap/attachment.rb
CHANGED
data/lib/mailtrap/mail.rb
CHANGED
@@ -26,7 +26,7 @@ module Mailtrap
|
|
26
26
|
|
27
27
|
private
|
28
28
|
|
29
|
-
|
29
|
+
SPECIAL_HEADERS = %w[
|
30
30
|
from
|
31
31
|
to
|
32
32
|
cc
|
@@ -37,6 +37,19 @@ module Mailtrap
|
|
37
37
|
contenttype
|
38
38
|
].freeze
|
39
39
|
|
40
|
+
# ActionMailer adds these headers by calling `Mail::Message#encoded`,
|
41
|
+
# as if the message is to be delivered via SMTP.
|
42
|
+
# Since the message will actually be generated on the Mailtrap side from its components,
|
43
|
+
# the headers are redundant and potentially conflicting, so we remove them.
|
44
|
+
ACTIONMAILER_ADDED_HEADERS = %w[
|
45
|
+
contenttransferencoding
|
46
|
+
date
|
47
|
+
messageid
|
48
|
+
mimeversion
|
49
|
+
].freeze
|
50
|
+
|
51
|
+
HEADERS_TO_REMOVE = (SPECIAL_HEADERS + ACTIONMAILER_ADDED_HEADERS).freeze
|
52
|
+
|
40
53
|
def address_list(header)
|
41
54
|
header.respond_to?(:element) ? header.element : header&.address_list
|
42
55
|
end
|
@@ -48,7 +61,7 @@ module Mailtrap
|
|
48
61
|
def prepare_headers(message)
|
49
62
|
message
|
50
63
|
.header_fields
|
51
|
-
.reject { |header|
|
64
|
+
.reject { |header| HEADERS_TO_REMOVE.include?(header.name.downcase.delete('-')) }
|
52
65
|
.to_h { |header| [header.name, header.value] }
|
53
66
|
.compact
|
54
67
|
end
|
data/lib/mailtrap/version.rb
CHANGED
data/mailtrap.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Official mailtrap.io API client'
|
13
13
|
spec.homepage = 'https://github.com/railsware/mailtrap-ruby'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = '>=
|
15
|
+
spec.required_ruby_version = '>= 3.0.0'
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = 'https://github.com/railsware/mailtrap-ruby'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailtrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Railsware Products Studio LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Official mailtrap.io API client
|
14
14
|
email:
|
@@ -56,14 +56,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 3.0.0
|
60
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
|
-
rubygems_version: 3.
|
66
|
+
rubygems_version: 3.5.11
|
67
67
|
signing_key:
|
68
68
|
specification_version: 4
|
69
69
|
summary: Official mailtrap.io API client
|