mailosaur 7.15.0 → 7.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/Mailosaur/analysis.rb +16 -0
- data/lib/Mailosaur/models/block_list_result.rb +18 -0
- data/lib/Mailosaur/models/content.rb +36 -0
- data/lib/Mailosaur/models/deliverability_report.rb +32 -0
- data/lib/Mailosaur/models/dns_records.rb +18 -0
- data/lib/Mailosaur/models/email_authentication_result.rb +21 -0
- data/lib/Mailosaur/models/spam_assassin_result.rb +21 -0
- data/lib/Mailosaur/version.rb +1 -1
- data/lib/mailosaur.rb +6 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6504f3e1aef2209e036e67f395949c4fb63fa69dfd0b28bfbcee266c5b3e2930
|
4
|
+
data.tar.gz: 0d464db804db6466e9cbab81f478009f9376d26c0a95f59123a7d56b5638b356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d0bdcaa10eb017668738aa7d09f68f5da4822a06330b045689136f8e6f9df9ce7e788a8dacecfbaf47acad1bebfe969c43083795e1fb324d41345b4f8c729a3
|
7
|
+
data.tar.gz: b1761bddcfaafa75df9f1b3398518447c2c7a547e1a035772f7d523b8688ad26aab3856646505183a4f9adf9401bbcbc9a63faa955b71729ba493dc8cdeb5935
|
data/lib/Mailosaur/analysis.rb
CHANGED
@@ -27,5 +27,21 @@ module Mailosaur
|
|
27
27
|
model = JSON.parse(response.body)
|
28
28
|
Mailosaur::Models::SpamAnalysisResult.new(model)
|
29
29
|
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Perform a deliverability report
|
33
|
+
#
|
34
|
+
# Perform deliverability test on the specified email
|
35
|
+
#
|
36
|
+
# @param email The identifier of the email to be analyzed.
|
37
|
+
#
|
38
|
+
# @return [DeliverabilityReport] operation results.
|
39
|
+
#
|
40
|
+
def deliverability(email)
|
41
|
+
response = conn.get "api/analysis/deliverability/#{email}"
|
42
|
+
@handle_http_error.call(response) unless response.status == 200
|
43
|
+
model = JSON.parse(response.body)
|
44
|
+
Mailosaur::Models::DeliverabilityReport.new(model)
|
45
|
+
end
|
30
46
|
end
|
31
47
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class BlockListResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@id = data['id']
|
6
|
+
@name = data['name']
|
7
|
+
@result = data['result']
|
8
|
+
end
|
9
|
+
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :id
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :name
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :result
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class Content < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@embed = data['embed']
|
6
|
+
@iframe = data['iframe']
|
7
|
+
@object = data['object']
|
8
|
+
@script = data['script']
|
9
|
+
@short_urls = data['shortUrls']
|
10
|
+
@text_size = data['textSize']
|
11
|
+
@total_size = data['totalSize']
|
12
|
+
@missing_alt = data['missingAlt']
|
13
|
+
@missing_list_unsubscribe = data['missingListUnsubscribe']
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_accessor :embed
|
18
|
+
# @return [Boolean]
|
19
|
+
attr_accessor :iframe
|
20
|
+
# @return [Boolean]
|
21
|
+
attr_accessor :object
|
22
|
+
# @return [Boolean]
|
23
|
+
attr_accessor :script
|
24
|
+
# @return [Boolean]
|
25
|
+
attr_accessor :short_urls
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :text_size
|
28
|
+
# @return [Integer]
|
29
|
+
attr_accessor :total_size
|
30
|
+
# @return [Boolean]
|
31
|
+
attr_accessor :missing_alt
|
32
|
+
# @return [Boolean]
|
33
|
+
attr_accessor :missing_list_unsubscribe
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class DeliverabilityReport < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@spf = Mailosaur::Models::EmailAuthenticationResult.new(data['spf'])
|
6
|
+
@dkim = []
|
7
|
+
(data['dkim'] || []).each { |i| @dkim << Mailosaur::Models::EmailAuthenticationResult.new(i) }
|
8
|
+
@dmarc = Mailosaur::Models::EmailAuthenticationResult.new(data['dmarc'])
|
9
|
+
@block_lists = []
|
10
|
+
(data['blockLists'] || []).each { |i| @block_lists << Mailosaur::Models::BlockListResult.new(i) }
|
11
|
+
@content = Mailosaur::Models::Content.new(data['content'])
|
12
|
+
@dns_records = Mailosaur::Models::DnsRecords.new(data['dnsRecords'])
|
13
|
+
@spam_assassin = Mailosaur::Models::SpamAssassinResult.new(data['spamAssassin'])
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [EmailAuthenticationResult]
|
17
|
+
attr_accessor :spf
|
18
|
+
# @return [Array<EmailAuthenticationResult>]
|
19
|
+
attr_accessor :dkim
|
20
|
+
# @return [EmailAuthenticationResult]
|
21
|
+
attr_accessor :dmarc
|
22
|
+
# @return [Array<BlockListResult>]
|
23
|
+
attr_accessor :block_lists
|
24
|
+
# @return [Content]
|
25
|
+
attr_accessor :content
|
26
|
+
# @return [DnsRecords]
|
27
|
+
attr_accessor :dns_records
|
28
|
+
# @return [SpamAssassinResult]
|
29
|
+
attr_accessor :spam_assassin
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class DnsRecords < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@a = data['a']
|
6
|
+
@mx = data['mx']
|
7
|
+
@ptr = data['ptr']
|
8
|
+
end
|
9
|
+
|
10
|
+
# @return [Array<String>]
|
11
|
+
attr_accessor :a
|
12
|
+
# @return [Array<String>]
|
13
|
+
attr_accessor :mx
|
14
|
+
# @return [Array<String>]
|
15
|
+
attr_accessor :ptr
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class EmailAuthenticationResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@result = data['result']
|
6
|
+
@description = data['description']
|
7
|
+
@raw_value = data['rawValue']
|
8
|
+
@tags = data['tags']
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :result
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :description
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :raw_value
|
17
|
+
# @return [Hash<String,String>]
|
18
|
+
attr_accessor :tags
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class SpamAssassinResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@score = data['score']
|
6
|
+
@result = data['result']
|
7
|
+
@rules = []
|
8
|
+
(data['rules'] || []).each { |i| @rules << Mailosaur::Models::SpamAssassinRule.new(i) }
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_accessor :spam_filter_results
|
12
|
+
|
13
|
+
# @return [Float]
|
14
|
+
attr_accessor :score
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :result
|
17
|
+
# @return [Array<SpamAssassinRule>]
|
18
|
+
attr_accessor :rules
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/Mailosaur/version.rb
CHANGED
data/lib/mailosaur.rb
CHANGED
@@ -39,6 +39,12 @@ module Mailosaur
|
|
39
39
|
autoload :Code, 'Mailosaur/models/code.rb'
|
40
40
|
autoload :ServerListResult, 'Mailosaur/models/server_list_result.rb'
|
41
41
|
autoload :SpamFilterResults, 'Mailosaur/models/spam_filter_results.rb'
|
42
|
+
autoload :DeliverabilityReport, 'Mailosaur/models/deliverability_report.rb'
|
43
|
+
autoload :EmailAuthenticationResult, 'Mailosaur/models/email_authentication_result.rb'
|
44
|
+
autoload :BlockListResult, 'Mailosaur/models/block_list_result.rb'
|
45
|
+
autoload :Content, 'Mailosaur/models/content.rb'
|
46
|
+
autoload :DnsRecords, 'Mailosaur/models/dns_records.rb'
|
47
|
+
autoload :SpamAssassinResult, 'Mailosaur/models/spam_assassin_result.rb'
|
42
48
|
autoload :ServerCreateOptions, 'Mailosaur/models/server_create_options.rb'
|
43
49
|
autoload :UsageAccountLimits, 'Mailosaur/models/usage_account_limits.rb'
|
44
50
|
autoload :UsageAccountLimit, 'Mailosaur/models/usage_account_limit.rb'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailosaur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailosaur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -148,10 +148,15 @@ files:
|
|
148
148
|
- lib/Mailosaur/messages.rb
|
149
149
|
- lib/Mailosaur/models/attachment.rb
|
150
150
|
- lib/Mailosaur/models/base_model.rb
|
151
|
+
- lib/Mailosaur/models/block_list_result.rb
|
151
152
|
- lib/Mailosaur/models/code.rb
|
153
|
+
- lib/Mailosaur/models/content.rb
|
154
|
+
- lib/Mailosaur/models/deliverability_report.rb
|
152
155
|
- lib/Mailosaur/models/device.rb
|
153
156
|
- lib/Mailosaur/models/device_create_options.rb
|
154
157
|
- lib/Mailosaur/models/device_list_result.rb
|
158
|
+
- lib/Mailosaur/models/dns_records.rb
|
159
|
+
- lib/Mailosaur/models/email_authentication_result.rb
|
155
160
|
- lib/Mailosaur/models/image.rb
|
156
161
|
- lib/Mailosaur/models/link.rb
|
157
162
|
- lib/Mailosaur/models/message.rb
|
@@ -176,6 +181,7 @@ files:
|
|
176
181
|
- lib/Mailosaur/models/server_create_options.rb
|
177
182
|
- lib/Mailosaur/models/server_list_result.rb
|
178
183
|
- lib/Mailosaur/models/spam_analysis_result.rb
|
184
|
+
- lib/Mailosaur/models/spam_assassin_result.rb
|
179
185
|
- lib/Mailosaur/models/spam_assassin_rule.rb
|
180
186
|
- lib/Mailosaur/models/spam_filter_results.rb
|
181
187
|
- lib/Mailosaur/models/usage_account_limit.rb
|
@@ -212,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
218
|
- !ruby/object:Gem::Version
|
213
219
|
version: '0'
|
214
220
|
requirements: []
|
215
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.4.19
|
216
222
|
signing_key:
|
217
223
|
specification_version: 4
|
218
224
|
summary: The Mailosaur Ruby library
|