sendwithus_ruby_action_mailer 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CODEOWNERS +2 -0
- data/.github/SUPPORT.md +3 -0
- data/README.md +7 -1
- data/lib/sendwithus_ruby_action_mailer/mail_params.rb +2 -2
- data/lib/sendwithus_ruby_action_mailer/version.rb +1 -1
- data/test/lib/sendwithus_ruby_action_mailer/mail_params_test.rb +7 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 109a2f7d114a0440a9eea67f86f0e8d008d23b8dd6b93af946baff76e29edc4a
|
4
|
+
data.tar.gz: 2d1ccbeb55c1cfcf9b49d0d0654071823c607a492bb9061d3970193243439028
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de1fef796dfede09a2ab30969297815e1c1a916fb6e00f9953fe0ac112e1bf2b49af5c991f606b4bc59cb1ec31472de2d279762d47fff74cd27c65eb0c32ff57
|
7
|
+
data.tar.gz: 8e1adf065f066d41d85824d28f44f1650d380e1bb2f119d2ec07b35fa35ab5cda7da9a03ba4fc8b3afde40ce8b0e50c88f75d8268af5c5c6d4fa87b073b68871
|
data/.github/CODEOWNERS
ADDED
data/.github/SUPPORT.md
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
Please only file issues that you believe represent actual bugs or feature requests for this API client.
|
2
|
+
|
3
|
+
If you are having issues with your Sendwithus integration, have questions about email, or have found a bug with Sendwithus’ API please reach out to support@sendwithus.com and our support team will be happy to help.
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ class Notifier < SendWithUsMailer::Base
|
|
51
51
|
assign(:captain_name, recipient.name)
|
52
52
|
#=> in sendwithus email template {{ captain_name }}
|
53
53
|
assign :team, {team_name: recipient.team_name, captain: recipient.name}
|
54
|
-
#=> in sendwithus email template {{ team.team_name }} and {{ team.captain }}
|
54
|
+
#=> in sendwithus email template {{ team.team_name }} and {{ team.captain }}
|
55
55
|
|
56
56
|
mail(
|
57
57
|
email_id: 'ID-CODE-FROM-SEND-WITH-US',
|
@@ -100,6 +100,12 @@ Notifier.welcome(nick).deliver_later # sends the email asynchronously
|
|
100
100
|
|
101
101
|
mail = Notifier.welcome(david) # => a SendWithUsMailer::MailParams object
|
102
102
|
mail.deliver_later # sends the email asynchronously
|
103
|
+
|
104
|
+
mail = Notifier.welcome(david) # => a SendWithUsMailer::MailParams object
|
105
|
+
mail.deliver_later( # send the email asynchronously in
|
106
|
+
wait: 5.minutes, # 5 minutes via the mailers queue
|
107
|
+
queue: :priority
|
108
|
+
)
|
103
109
|
`````
|
104
110
|
|
105
111
|
You never instantiate your mailer class. Rather, you just call the method you defined
|
@@ -88,8 +88,8 @@ module SendWithUsMailer
|
|
88
88
|
# IMPORTANT NOTE: <tt>SendWithUs</tt> must be configured prior to calling this method.
|
89
89
|
# In particular, the +api_key+ must be set (following the guidelines in the
|
90
90
|
# +send_with_us+ documentation).
|
91
|
-
def deliver_later
|
92
|
-
Jobs::MailJob.perform_later(
|
91
|
+
def deliver_later(options = {})
|
92
|
+
Jobs::MailJob.set(options).perform_later(
|
93
93
|
@email_id,
|
94
94
|
@to,
|
95
95
|
data: @email_data,
|
@@ -100,6 +100,13 @@ describe SendWithUsMailer::MailParams do
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
103
|
+
it "enqueues the job with options" do
|
104
|
+
subject.merge!(email_id: 'x')
|
105
|
+
assert_enqueued_with(job: SendWithUsMailer::Jobs::MailJob, at: 3.minutes.from_now) do
|
106
|
+
subject.deliver_later(wait: 3.minutes)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
103
110
|
it "doesn't call the send_with_us gem if no email_id" do
|
104
111
|
assert_no_enqueued_jobs do
|
105
112
|
subject.deliver_later
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendwithus_ruby_action_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Rempel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: send_with_us
|
@@ -104,8 +104,10 @@ executables: []
|
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
|
+
- ".github/CODEOWNERS"
|
107
108
|
- ".github/ISSUE_TEMPLATE"
|
108
109
|
- ".github/PULL_REQUEST_TEMPLATE"
|
110
|
+
- ".github/SUPPORT.md"
|
109
111
|
- ".gitignore"
|
110
112
|
- Gemfile
|
111
113
|
- LICENSE.txt
|
@@ -140,8 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
142
|
- !ruby/object:Gem::Version
|
141
143
|
version: '0'
|
142
144
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.4.5
|
145
|
+
rubygems_version: 3.0.3
|
145
146
|
signing_key:
|
146
147
|
specification_version: 4
|
147
148
|
summary: An ActionMailer look alike for Send With Us.
|