mailtrap 2.1.2 → 2.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 314cfc7c3cd8a6e45f719fc3d8063a5ca9d9cb96109989d558699460c5246735
4
- data.tar.gz: 6db332cea7a1c9e8409c22a47145b74b9a5a45d74cc34a3663bc138fd7bf52a7
3
+ metadata.gz: c959ed779f29713f1c7cb977d5037b6ab184e3841ad79a77450fb92bf6d21a05
4
+ data.tar.gz: 8fa5d1112e6fa683227bd6b00b2e538dccae08edf2894c1d8f8f275aa247e42e
5
5
  SHA512:
6
- metadata.gz: 9d86a290cd93fea1c62a5bf5c5ee1d32a49bf23bd9736edf1d4cffe5d1c40d474b62cda3741deb388ff24e937eb036ce618605155f5b7e66f4a95918d400315e
7
- data.tar.gz: 51548a285463a11ef0c408f9cb03d2621bb0ede07c75c63773218a85616fcd727724b15687389350fdaf4907f6c173a95fee1d17d4648c5f0d315817acf7bbec
6
+ metadata.gz: a88a1161a35e016f35a452822edf0c7483b984f9161612b4e433d9782e9177017af7483eab24c03727523dbbb03ba98ad5b25f22683b1e4c5b949aa604f7266e
7
+ data.tar.gz: 88aeb1e006f5f2e1c2ac9a50d4dfaf4090b36435955ad790aa60b320f17cffe05aa15a998dd630977015e05352e48f54908fbbff0f15316944f6c773546866e2
data/.rubocop.yml CHANGED
@@ -7,7 +7,7 @@ inherit_mode:
7
7
  - Exclude
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 3.0
10
+ TargetRubyVersion: 3.1
11
11
  NewCops: enable
12
12
  Exclude:
13
13
  - "gemfiles/**/*"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [2.3.0] - 2025-03-06
2
+
3
+ - Drop Ruby 3.0 support
4
+ - Update dependencies
5
+
6
+ ## [2.2.0] - 2024-12-18
7
+
8
+ - Added `reply_to` parameter support
9
+
1
10
  ## [2.1.2] - 2024-12-13
2
11
 
3
12
  - Improved handling of invalid `from`, `to`, `cc`, `bcc` headers when sending
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mailtrap (2.1.2)
4
+ mailtrap (2.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -17,7 +17,7 @@ GEM
17
17
  crack (1.0.0)
18
18
  bigdecimal
19
19
  rexml
20
- date (3.3.4)
20
+ date (3.4.1)
21
21
  diff-lcs (1.5.1)
22
22
  hashdiff (1.1.0)
23
23
  json (2.7.2)
@@ -28,7 +28,7 @@ GEM
28
28
  net-pop
29
29
  net-smtp
30
30
  mini_mime (1.1.5)
31
- net-imap (0.4.14)
31
+ net-imap (0.5.6)
32
32
  date
33
33
  net-protocol
34
34
  net-pop (0.1.2)
@@ -82,7 +82,7 @@ GEM
82
82
  rubocop (~> 1.61)
83
83
  ruby-progressbar (1.13.0)
84
84
  thor (1.3.1)
85
- timeout (0.4.1)
85
+ timeout (0.4.3)
86
86
  unicode-display_width (2.5.0)
87
87
  vcr (6.2.0)
88
88
  webmock (3.23.1)
@@ -108,4 +108,4 @@ DEPENDENCIES
108
108
  webmock
109
109
 
110
110
  BUNDLED WITH
111
- 2.5.14
111
+ 2.6.5
data/README.md CHANGED
@@ -52,6 +52,7 @@ mail = Mailtrap::Mail::Base.new(
52
52
  to: [
53
53
  { email: 'your@email.com' }
54
54
  ],
55
+ reply_to: { email: 'support@example.com', name: 'Mailtrap Reply-To' },
55
56
  subject: 'You are awesome!',
56
57
  text: "Congrats for sending test email with Mailtrap!"
57
58
  )
@@ -35,7 +35,7 @@ module Mailtrap
35
35
  raise ArgumentError, 'api_key is required' if api_key.nil?
36
36
  raise ArgumentError, 'api_port is required' if api_port.nil?
37
37
 
38
- api_host ||= select_api_host(bulk: bulk, sandbox: sandbox)
38
+ api_host ||= select_api_host(bulk:, sandbox:)
39
39
  raise ArgumentError, 'inbox_id is required for sandbox API' if sandbox && inbox_id.nil?
40
40
 
41
41
  @api_key = api_key
@@ -5,12 +5,13 @@ require 'json'
5
5
  module Mailtrap
6
6
  module Mail
7
7
  class Base
8
- attr_accessor :from, :to, :cc, :bcc, :headers, :custom_variables, :subject, :text, :html, :category
8
+ attr_accessor :from, :to, :reply_to, :cc, :bcc, :headers, :custom_variables, :subject, :text, :html, :category
9
9
  attr_reader :attachments
10
10
 
11
11
  def initialize( # rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
12
12
  from: nil,
13
13
  to: [],
14
+ reply_to: nil,
14
15
  cc: [],
15
16
  bcc: [],
16
17
  subject: nil,
@@ -23,6 +24,7 @@ module Mailtrap
23
24
  )
24
25
  @from = from
25
26
  @to = to
27
+ @reply_to = reply_to
26
28
  @cc = cc
27
29
  @bcc = bcc
28
30
  @subject = subject
@@ -38,6 +40,7 @@ module Mailtrap
38
40
  {
39
41
  'from' => from,
40
42
  'to' => to,
43
+ 'reply_to' => reply_to,
41
44
  'cc' => cc,
42
45
  'bcc' => bcc,
43
46
  'subject' => subject,
@@ -64,11 +67,11 @@ module Mailtrap
64
67
 
65
68
  def add_attachment(content:, filename:, type: nil, disposition: nil, content_id: nil)
66
69
  attachment = Mailtrap::Attachment.new(
67
- content: content,
68
- filename: filename,
69
- type: type,
70
- disposition: disposition,
71
- content_id: content_id
70
+ content:,
71
+ filename:,
72
+ type:,
73
+ disposition:,
74
+ content_id:
72
75
  )
73
76
  attachments << attachment
74
77
 
@@ -8,6 +8,7 @@ module Mailtrap
8
8
  def initialize( # rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
9
9
  from: nil,
10
10
  to: [],
11
+ reply_to: nil,
11
12
  cc: [],
12
13
  bcc: [],
13
14
  attachments: [],
@@ -17,13 +18,14 @@ module Mailtrap
17
18
  template_variables: {}
18
19
  )
19
20
  super(
20
- from: from,
21
- to: to,
22
- cc: cc,
23
- bcc: bcc,
24
- attachments: attachments,
25
- headers: headers,
26
- custom_variables: custom_variables
21
+ from:,
22
+ to:,
23
+ reply_to:,
24
+ cc:,
25
+ bcc:,
26
+ attachments:,
27
+ headers:,
28
+ custom_variables:
27
29
  )
28
30
  @template_uuid = template_uuid
29
31
  @template_variables = template_variables
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailtrap
4
- VERSION = '2.1.2'
4
+ VERSION = '2.3.0'
5
5
  end
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 = '>= 3.0.0'
15
+ spec.required_ruby_version = '>= 3.1.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.1.2
4
+ version: 2.3.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-12-13 00:00:00.000000000 Z
11
+ date: 2025-03-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Official mailtrap.io API client
14
14
  email:
@@ -55,7 +55,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
55
55
  requirements:
56
56
  - - ">="
57
57
  - !ruby/object:Gem::Version
58
- version: 3.0.0
58
+ version: 3.1.0
59
59
  required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="