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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1274876b4b77ade250f0c715be10ce93cb49d931bf8f0d76416eee9bba06d895
4
- data.tar.gz: 8dd9a41d488ba5208809541405c8c740018123cbb76107cf9189221a5eceebf9
3
+ metadata.gz: 1870b9111d8d731962de39300f68e6ac57faa8a67e4233d70eda08e32848d675
4
+ data.tar.gz: c0b955ed9bff041c6410d9b5ab93ba1a7292d3377630a1080a416cfb3d4d57cf
5
5
  SHA512:
6
- metadata.gz: 74bd64f6dce3054139754fdd6d5c7102ac432ca8f7427ad6883f21c61ead4ae254b601573ab0fb3ba3f3fde7823ef9b6fd1217b794ce7b21f817b4c989db7b59
7
- data.tar.gz: ede7dab82a61cae0ce9f2741f64491d9122679edd2034d8ede4fad88662db1188d8f52dd4e3a016e5a6d8b76f22c40d2d1e085d6c7239d68691f59257f9f690b
6
+ metadata.gz: d60b56c812cb1198f619442d9bc1758205d458734f6f3e163d385558ca12c6b294367a828189d807571e7699a60cd9a458c2afd529c7fd4c0ffec4021108c378
7
+ data.tar.gz: 78a748fffc10dcd1bf3959b0da4a6649e241a71b14ec6579f9d7376e261e547f67d9cfdafd9938a6f81927dde7c47e2d470043e36811b2630c6506ba4fbaa171
@@ -2,7 +2,7 @@ module Emailfuse
2
2
  class Client
3
3
  class << self
4
4
  def url
5
- Emailfuse.config.host || "https://emailfuse.net"
5
+ Emailfuse.config.host || "https://app.emailfuse.net"
6
6
  end
7
7
 
8
8
  def connection
@@ -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: attributes)
15
+ response = Client.post_request("emails", body: attrs)
16
16
 
17
17
  Email.new(response.body) if response.success?
18
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emailfuse
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
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.3
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-06-14 00:00:00.000000000 Z
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: '7.0'
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: '7.0'
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.9
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