nifty-email 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdc03fac178fbca4e4afaef478fea4d275d7baf2
4
- data.tar.gz: 04ee7c8581182a78c095b11c3fc01144dbbd9138
3
+ metadata.gz: 265b030cebf93aea24952d570bf5de1e3bd26c4e
4
+ data.tar.gz: 0deb03aa77c8bcf9c881c4c29fad947deed678ca
5
5
  SHA512:
6
- metadata.gz: e518d33b8896948d2e9b4e9e3b6b179a144b84039846eb72de93f540b4e54100cfebd0e11c2fd8c17c2fde898cc0cf7a5c4dd7f9c97983ed838f55f627adb453
7
- data.tar.gz: b94c1b589e1a9d204858bbb808fa8786762c56e45510cf6dcdba2fad914001732dab5122a32443a1ebcce261b3ea889d598d76dac61a6a463a708a0703137445
6
+ metadata.gz: 7804c868170a9ef6dc7b1f3be795c8d01e156665e109df9532865e8143884d6d42bba84f5526072be706f97cccdb2c1546810d82159bb504ec86a84e1377a6a2
7
+ data.tar.gz: b37741dd57fcace6981a665f50e192054a76c835b0fa14755ec0e23ba13fd6ec2a9a9f6a6f0a88e6c1ba5f6d8a23fb50712c730379e93a2a86c4db62bb378162
data/README.md CHANGED
@@ -18,6 +18,8 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
+ ### General example
22
+
21
23
  ```
22
24
  NiftyEmail.token = '123abc'
23
25
 
@@ -26,6 +28,23 @@ puts email.html
26
28
  puts email.text
27
29
  ```
28
30
 
31
+ ### Rails example
32
+
33
+ ```
34
+ # initializer
35
+
36
+ NiftyEmail.token = '123abc'
37
+
38
+ # mailer
39
+
40
+ email = NiftyEmail.get_email('awesome-email', full_name: 'Jim Tom')
41
+
42
+ mail(to: 'jimtom@example.com', subject: 'Welcome!') do |format|
43
+ format.html { email.html }
44
+ format.text { email.text }
45
+ end
46
+ ```
47
+
29
48
  ## Contributing
30
49
 
31
50
  1. Fork it ( https://github.com/[my-github-username]/nifty-email/fork )
@@ -9,7 +9,7 @@ class NiftyEmail
9
9
  @token
10
10
  end
11
11
 
12
- def self.get_email(slug_or_id, placeholders)
12
+ def self.get_email(slug_or_id, placeholders = {})
13
13
  connection = Faraday.new(url: 'http://nifty-email-production.herokuapp.com/api/emails')
14
14
  connection.authorization('Token', token: @token)
15
15
 
@@ -1,5 +1,5 @@
1
1
  module Nifty
2
2
  module Email
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nifty-email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Albertson