send_grid_mailer 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -65,6 +65,13 @@ describe SendGridMailer::Definition do
65
65
  end
66
66
  end
67
67
 
68
+ describe "#set_reply_to" do
69
+ it "adds reply to to mail object" do
70
+ definition.set_reply_to("Sender Name <reply_to@platan.us>")
71
+ expect(mail.reply_to).to eq("email" => "reply_to@platan.us", "name" => "Sender Name")
72
+ end
73
+ end
74
+
68
75
  describe "#set_recipients" do
69
76
  let(:m1) { "leandro@platan.us" }
70
77
  let(:m2) { "ldlsegovia@gmail.com" }
@@ -305,7 +305,52 @@ describe TestMailer do
305
305
  end
306
306
  end
307
307
 
308
- context "when setting subject" do
308
+ context "when setting reply to" do
309
+ let(:request_body) do
310
+ {
311
+ "from" =>
312
+ {
313
+ "email" => "default-sender@platan.us"
314
+ },
315
+ "reply_to" =>
316
+ {
317
+ "email" => "reply-to@platan.us"
318
+ },
319
+ "personalizations" => [
320
+ {
321
+ "subject" => subject
322
+ }
323
+ ],
324
+ "content" => [
325
+ {
326
+ "type" => "text/plain",
327
+ "value" => "X"
328
+ }
329
+ ]
330
+ }
331
+ end
332
+
333
+ context "when using methods" do
334
+ let(:deliver) { described_class.reply_to_email.deliver_now! }
335
+ let(:subject) { "Reply to email" }
336
+
337
+
338
+ it "sends mail with valid reply to email" do
339
+ expect_valid_sg_api_send_mail_request(request_body)
340
+ end
341
+ end
342
+
343
+ context "when using params" do
344
+ let(:deliver) { described_class.reply_to_params_email.deliver_now! }
345
+ let(:subject) { "Reply to params email" }
346
+
347
+ it "sends mail with valid reply to email" do
348
+ expect_valid_sg_api_send_mail_request(request_body)
349
+ end
350
+ end
351
+ end
352
+
353
+ context "when setting subject" do
309
354
  let(:request_body) do
310
355
  {
311
356
  "from" =>
@@ -0,0 +1 @@
1
+ 3fafb8bd4fe7c863eb643f4a289f2e535d3969121ff44a304d953f4e8df557a23b9eee50074a0c81ee6f8792b25b288b6882bbe76c7a0857efd6793388930082
@@ -0,0 +1 @@
1
+ 9c7c674719b6177b1dacaf49e2d60a44200767a866f6681f3e426cf56a9b6e48537661cc485416394c703b3a5825ebc1126860015456d94d906ff3f3e7c38c2f
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: send_grid_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platanus
8
8
  - Leandro Segovia
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-07-03 00:00:00.000000000 Z
12
+ date: 2024-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-handlebars
@@ -291,6 +291,8 @@ files:
291
291
  - spec/dummy/config/puma.rb
292
292
  - spec/dummy/config/routes.rb
293
293
  - spec/dummy/config/storage.yml
294
+ - spec/dummy/db/test.sqlite3
295
+ - spec/dummy/log/test.log
294
296
  - spec/dummy/public/404.html
295
297
  - spec/dummy/public/422.html
296
298
  - spec/dummy/public/500.html
@@ -301,13 +303,15 @@ files:
301
303
  - spec/dummy/spec/assets/video.mp4
302
304
  - spec/dummy/spec/lib/send_grid_mailer/definition_spec.rb
303
305
  - spec/dummy/spec/mailers/test_mailer_spec.rb
306
+ - spec/dummy/tmp/development_secret.txt
307
+ - spec/dummy/tmp/local_secret.txt
304
308
  - spec/rails_helper.rb
305
309
  - spec/spec_helper.rb
306
310
  homepage: https://github.com/platanus/send_grid_mailer
307
311
  licenses:
308
312
  - MIT
309
313
  metadata: {}
310
- post_install_message:
314
+ post_install_message:
311
315
  rdoc_options: []
312
316
  require_paths:
313
317
  - lib
@@ -322,8 +326,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
322
326
  - !ruby/object:Gem::Version
323
327
  version: '0'
324
328
  requirements: []
325
- rubygems_version: 3.4.10
326
- signing_key:
329
+ rubygems_version: 3.4.1
330
+ signing_key:
327
331
  specification_version: 4
328
332
  summary: Action Mailer adapter for using SendGrid
329
333
  test_files:
@@ -370,6 +374,8 @@ test_files:
370
374
  - spec/dummy/config/routes.rb
371
375
  - spec/dummy/config/storage.yml
372
376
  - spec/dummy/config.ru
377
+ - spec/dummy/db/test.sqlite3
378
+ - spec/dummy/log/test.log
373
379
  - spec/dummy/public/404.html
374
380
  - spec/dummy/public/422.html
375
381
  - spec/dummy/public/500.html
@@ -380,5 +386,7 @@ test_files:
380
386
  - spec/dummy/spec/assets/video.mp4
381
387
  - spec/dummy/spec/lib/send_grid_mailer/definition_spec.rb
382
388
  - spec/dummy/spec/mailers/test_mailer_spec.rb
389
+ - spec/dummy/tmp/development_secret.txt
390
+ - spec/dummy/tmp/local_secret.txt
383
391
  - spec/rails_helper.rb
384
392
  - spec/spec_helper.rb