mandrill_mailer 0.4.4 → 0.4.5

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWI2NjAwM2QwM2Q4OWFmZWUyNjQwNjFiOTBlOWYyMWI2NGJmNDEwZQ==
4
+ Yzg2ZGQ3OWZmNWQ2ODA3M2Q0N2UyMGU3MTFlNzc0ODYzYTAxYWMzYQ==
5
5
  data.tar.gz: !binary |-
6
- NTg4NzVlMGU0NjFhNGY4MWM3ZTc4YmM3ZjNlODI3N2EzMjRkMmY0YQ==
6
+ MzQ3MjQzNzM4ZjRmMWU4MWY5NGQ0MWMxMTNlZTlkYTBlYTdiNzU4Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2NhMWM5ZTMwNjNiZmNhNmU1ZDVhYjJiMzkxY2VkNzNiOTQyZDRhZjU5ZmFk
10
- NWJmZjFlYTdkYjJiY2FhNzNjMWZkMGNlN2Q3Y2QyNTQyOTNlNWY4OTQxZGY0
11
- ZDY0ZTgyNWNhYjA0Yzc5ZDdlNzQ5MDdlZTkwYzBjMWFmMjk2ZmY=
9
+ ZDZmZDI2NDllNGNkNzU3ZDk2MTExMmI5ZmM5ZWVlZWU5NzBhNzc2N2U3NWE4
10
+ NjU0NjJmYTkyZGYxZGI2NzIxOGYzOTM2ZjJhMjQwNDNjNzlkMWIxMDE3ZWUz
11
+ ZWM3YjlmNjU3ZjIzNzE1ZTI4ZWM5M2NkMzZkZGI2M2QzN2ZmNWM=
12
12
  data.tar.gz: !binary |-
13
- MWE2ODc4OTI2YzgyZmIyMDQ5NjAxYjQ5ZDhlMWY2ODU0MTNmOThkMTE5N2Jk
14
- YTNmMTBjNWVhOWQ5N2UxMWU1YmFiMGQ0NWExMGE4MmE3NjlmZmE3MzZhYzJl
15
- OGU2ODM2ZTc1NmNkYTU1OWQzNGU5YzQ1ZjMwNzZkMzNhNjc0MTk=
13
+ YzY4YmVmZDZkMDVmODRjNDIzMjMwYThlOTZkZjA4OTc1YTJjYzY4Y2ZhNDA5
14
+ Y2U5NjJmZTZmM2E4MTcyNWFhZjNjMmFlZWFlOTNjYTQwMTc0NGFhNzc3ZDJh
15
+ OTM4NGE0YWQ1ZmNiY2Q4NDQzODM4M2YyMjc2YjdiMjU0MmIxZDc=
@@ -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`(required) - Subject of the email
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
- To use this gem with Sidekiq, add `config/initializers/mandrill_mailer_sidekiq.rb`
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
- Use the same way you use ActionMailer. More info: https://github.com/mperham/sidekiq/wiki/Delayed-Extensions#actionmailer
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
@@ -1,3 +1,3 @@
1
1
  module MandrillMailer
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -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.add_dependency 'mandrill-api', '~>1.0.9'
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
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-03-26 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport