leadersend 1.0.2 → 1.1.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
  SHA1:
3
- metadata.gz: fc4330110cb3c2886948c54ad5c5f4a39c33d0a2
4
- data.tar.gz: 62d3623c959bfd6e7ef508d29fdaea77af73afcf
3
+ metadata.gz: b7f6389955380ae269c5776a138f7b0112bcbe18
4
+ data.tar.gz: e7cdce3333fb0151e510afef9b2cb652a0e4877a
5
5
  SHA512:
6
- metadata.gz: e9276e529f80e01a205b232cf17d740ac044682e745eb04b977d914a97e365f009c7f4ba0541eb84458474ae4046dadac92c0771252c4fa431e3c70023938092
7
- data.tar.gz: 8c425ffc11a4c5111904ff710548bb5d693f58d0e8b3cf8de507d8e52b753511dfff9bbb546bf122dfdf53c0f5f11a347cd2f1c3a247a817eb66054cae5a416f
6
+ metadata.gz: c83672e4de816b4a1b4e159b23baeb1a8cd4f4840156d570db6671ed4cb4c47f5aca6a54b05a24f9f409f0eb57ed32f5bc3520a866297335cdfce4225ec9419a
7
+ data.tar.gz: e71aea2e75a3081ea02a13fce4802bac4b070dde5af4304fe439c888d8189b2ab53e568d7855659f3cba6453210d04ff0bc86089137b15dc78e20a5768f52f8f
data/README.md CHANGED
@@ -47,10 +47,15 @@ ActionMailer::Base.smtp_settings = {
47
47
  ```
48
48
 
49
49
  ### Send Email
50
- Instantiate a `Leadersend::Mail` object with given parameters
50
+ ####Instantiate a `Leadersend::Mail` object with given parameters
51
+ ##### Version with template_path and locals
51
52
  ```ruby
52
53
  mailer = Leadersend::Mail.new to: self.email, from: from, fromname: fromname, subject: subject, template_path: template_path, locals: locals, title: title
53
54
  ```
55
+ ##### Version with template (raw html)
56
+ ```ruby
57
+ mailer = Leadersend::Mail.new to: self.email, from: from, fromname: fromname, subject: subject, template: template, title: title
58
+ ```
54
59
  Parameter examples and explanations:
55
60
  ```ruby
56
61
  to: "example@email.com"
@@ -62,7 +67,7 @@ title: "It is friday!"
62
67
  locals: {variable: value, another_variable: different_value} # These will be made available in the template
63
68
  ```
64
69
 
65
- Call the *#send* method on the instantiated objec to send an email. This method returns a hash with response
70
+ Call the `#send` method on the instantiated object to send an email. This method returns a hash with response
66
71
  ```ruby
67
72
  sent_mail_hash = mailer.send
68
73
  ```
@@ -1,6 +1,6 @@
1
1
  module Leadersend
2
2
  class Mail
3
- def initialize to: nil, from: nil, fromname: nil, subject: "System", template_path: nil, locals: {}, title: "System"
3
+ def initialize to: nil, from: nil, fromname: nil, subject: "System", template_path: nil, locals: {}, title: "System", template: ""
4
4
  @api_email_url = Leadersend.config.api_url
5
5
  @api_user = Leadersend.config.username
6
6
  @api_key = Leadersend.config.api_key
@@ -12,6 +12,7 @@ module Leadersend
12
12
  @from = from
13
13
  @fromname = fromname
14
14
  @template_path = template_path
15
+ @template = template
15
16
 
16
17
  if @template_path
17
18
  @template = ApplicationController.new.render_to_string(:partial => @template_path, :locals => @locals )
@@ -1,3 +1,3 @@
1
1
  module Leadersend
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leadersend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Epigene
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-02-06 00:00:00.000000000 Z
13
+ date: 2015-02-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler