mandrill_mailer 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +9 -0
- data/README.md +18 -3
- data/lib/mandrill_mailer/template_mailer.rb +1 -1
- data/lib/mandrill_mailer/version.rb +1 -1
- data/mandrill_mailer.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Yzg2ZGQ3OWZmNWQ2ODA3M2Q0N2UyMGU3MTFlNzc0ODYzYTAxYWMzYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzQ3MjQzNzM4ZjRmMWU4MWY5NGQ0MWMxMTNlZTlkYTBlYTdiNzU4Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDZmZDI2NDllNGNkNzU3ZDk2MTExMmI5ZmM5ZWVlZWU5NzBhNzc2N2U3NWE4
|
10
|
+
NjU0NjJmYTkyZGYxZGI2NzIxOGYzOTM2ZjJhMjQwNDNjNzlkMWIxMDE3ZWUz
|
11
|
+
ZWM3YjlmNjU3ZjIzNzE1ZTI4ZWM5M2NkMzZkZGI2M2QzN2ZmNWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzY4YmVmZDZkMDVmODRjNDIzMjMwYThlOTZkZjA4OTc1YTJjYzY4Y2ZhNDA5
|
14
|
+
Y2U5NjJmZTZmM2E4MTcyNWFhZjNjMmFlZWFlOTNjYTQwMTc0NGFhNzc3ZDJh
|
15
|
+
OTM4NGE0YWQ1ZmNiY2Q4NDQzODM4M2YyMjc2YjdiMjU0MmIxZDc=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 0.4.5
|
2
|
+
- [BUGFIX] Declare `mandrill-api` gem as a runtime dependency to prevent load errors.
|
3
|
+
|
4
|
+
# 0.4.4
|
5
|
+
- [FEATURE] Added `to`, `from` and `bcc` getters to `TemplateMailer`. (@renz45)
|
6
|
+
- [IMPROVEMENT] Fixes respond_to method as it doesn't follow the way standard ruby respond_to behaves. (@tpaktop)
|
7
|
+
- [DOCS] Documented how to use the gem with Sidekiq (@elado, @renz45)
|
8
|
+
- [DOCS] Documented fallback to Mandrill default subject on `mandrill_mail` subject. (@Advocation)
|
9
|
+
|
1
10
|
# 0.4.3
|
2
11
|
- [FEATURE] Add the ability to look at deliveries for offline testing.
|
3
12
|
|
data/README.md
CHANGED
@@ -69,7 +69,7 @@ end
|
|
69
69
|
* `.mandrill_mail`
|
70
70
|
* `:template`(required) - Template name from within Mandrill
|
71
71
|
|
72
|
-
* `:subject`
|
72
|
+
* `:subject` - Subject of the email. If no subject supplied, it will fall back to the template default subject from within Mandrill
|
73
73
|
|
74
74
|
* `:to`(required) - Accepts an email String, or hash with :name and :email keys
|
75
75
|
ex. `{email: 'someone@email.com', name: 'Bob Bertly'}`
|
@@ -216,14 +216,29 @@ end
|
|
216
216
|
```
|
217
217
|
|
218
218
|
## Using Sidekiq
|
219
|
+
Create a custom worker:
|
219
220
|
|
220
|
-
|
221
|
+
```ruby
|
222
|
+
class UpdateEmailJob
|
223
|
+
include Sidekiq::Worker
|
224
|
+
def perform(user_id)
|
225
|
+
user = User.find(user_id)
|
226
|
+
HallpassMailer.hallpass_expired(user).deliver
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
#called by
|
231
|
+
UpdateEmailJob.perform_async(<user_id>)
|
232
|
+
```
|
233
|
+
|
234
|
+
Or depending on how up to date things are, try adding the following to to `config/initializers/mandrill_mailer_sidekiq.rb`
|
221
235
|
|
222
236
|
```ruby
|
223
237
|
::MandrillMailer::TemplateMailer.extend(Sidekiq::Extensions::ActionMailer)
|
224
238
|
```
|
225
239
|
|
226
|
-
|
240
|
+
This should enable you to use this mailer the same way you use ActionMailer.
|
241
|
+
More info: https://github.com/mperham/sidekiq/wiki/Delayed-Extensions#actionmailer
|
227
242
|
|
228
243
|
|
229
244
|
## Using an interceptor
|
@@ -343,7 +343,7 @@ module MandrillMailer
|
|
343
343
|
end
|
344
344
|
end
|
345
345
|
else
|
346
|
-
options = args.extract_options!.merge({host: MandrillMailer.config.default_url_options[:host]})
|
346
|
+
options = args.extract_options!.merge({host: MandrillMailer.config.default_url_options[:host], protocol: MandrillMailer.config.default_url_options[:protocol]})
|
347
347
|
args << options
|
348
348
|
Rails.application.routes.url_helpers.method(method).call(*args)
|
349
349
|
end
|
data/mandrill_mailer.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.add_dependency 'activesupport'
|
22
22
|
s.add_dependency 'actionpack'
|
23
|
-
s.
|
23
|
+
s.add_runtime_dependency 'mandrill-api', '~> 1.0.9'
|
24
24
|
|
25
25
|
s.add_development_dependency 'pry'
|
26
26
|
s.add_development_dependency 'rspec'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mandrill_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Rensel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|