emailfuse 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/emailfuse/client.rb +1 -1
- data/lib/emailfuse/deliverer.rb +5 -1
- data/lib/emailfuse/models/email.rb +2 -2
- data/lib/emailfuse/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1870b9111d8d731962de39300f68e6ac57faa8a67e4233d70eda08e32848d675
|
4
|
+
data.tar.gz: c0b955ed9bff041c6410d9b5ab93ba1a7292d3377630a1080a416cfb3d4d57cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d60b56c812cb1198f619442d9bc1758205d458734f6f3e163d385558ca12c6b294367a828189d807571e7699a60cd9a458c2afd529c7fd4c0ffec4021108c378
|
7
|
+
data.tar.gz: 78a748fffc10dcd1bf3959b0da4a6649e241a71b14ec6579f9d7376e261e547f67d9cfdafd9938a6f81927dde7c47e2d470043e36811b2630c6506ba4fbaa171
|
data/lib/emailfuse/client.rb
CHANGED
data/lib/emailfuse/deliverer.rb
CHANGED
@@ -24,12 +24,16 @@ module Emailfuse
|
|
24
24
|
def deliver!(rails_message)
|
25
25
|
attributes = {
|
26
26
|
from: rails_message[:from],
|
27
|
-
to: rails_message[:to],
|
27
|
+
to: rails_message[:to].formatted,
|
28
28
|
subject: rails_message.subject,
|
29
29
|
html: extract_html(rails_message),
|
30
30
|
text: extract_text(rails_message)
|
31
31
|
}
|
32
32
|
|
33
|
+
[ :reply_to, :cc ].each do |key|
|
34
|
+
attributes[key] = rails_message[key].formatted if rails_message[key]
|
35
|
+
end
|
36
|
+
|
33
37
|
unless rails_message.attachments.empty?
|
34
38
|
attributes[:attachments] = []
|
35
39
|
rails_message.attachments.each do |attachment|
|
@@ -4,7 +4,7 @@ module Emailfuse
|
|
4
4
|
def create(to:, from:, subject:, html: nil, text: nil, **attributes)
|
5
5
|
raise ArgumentError, "You must provide either html or text" if html.nil? && text.nil?
|
6
6
|
|
7
|
-
attributes.merge!(
|
7
|
+
attrs = attributes.merge!(
|
8
8
|
to: to,
|
9
9
|
from: from,
|
10
10
|
subject: subject,
|
@@ -12,7 +12,7 @@ module Emailfuse
|
|
12
12
|
text: text
|
13
13
|
)
|
14
14
|
|
15
|
-
response = Client.post_request("emails", body:
|
15
|
+
response = Client.post_request("emails", body: attrs)
|
16
16
|
|
17
17
|
Email.new(response.body) if response.success?
|
18
18
|
end
|
data/lib/emailfuse/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emailfuse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.5.
|
93
|
+
rubygems_version: 3.5.11
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Ruby library for the Emailfuse API including an Rails Action Mailer adapter
|