mjml-rails 2.1.1 → 2.1.4

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: 9204547c6624e463ff1082518b9952f7583235ce
4
- data.tar.gz: 0d8da054e7c4741edcb3f0c89568c2d9c2365a5d
3
+ metadata.gz: bf6eef06d74f2371d4fb2ea04df243440ad47df6
4
+ data.tar.gz: 11a9f4de6b6e6bcc161578da22243fc5fe11e364
5
5
  SHA512:
6
- metadata.gz: db387778f72d62202acf4e3f17b68b24e552b7c16b12dc2fd2b2e973211a6634615e32ab9c38b9d36c5e350a5ec7fa4bf845ae10c99d2ec2f4d0388f91813e6e
7
- data.tar.gz: 9c8bcb710f5b7ff0ca65c105369c221dbb80cc087641ea76c986ebb2ee0c4a1c73f516317b6b87c09980ea7a42cda99e9c1c02e3e815bb71bc42363cc2b09582
6
+ metadata.gz: 0549178dd254f105866c35dce89506efdc72d249275c780e1961fc196f6ce2ea617b270885bfe661db206a1447336d22168b4c7a35acd74d94c15a7d0010e39d
7
+ data.tar.gz: 948508e87b46bf9732ae8aedf07e285cdbcf9cb1fb85b39a21b9fa7763c99f5caf75ad0127192803c61e1fa447cf7eca30d978256f2df28a19e71a2711da94ff
checksums.yaml.gz.sig CHANGED
Binary file
data/MIT-LICENSE CHANGED
@@ -1,3 +1,7 @@
1
+ Copyright 2016 Simon Loffler (https://sighmon.com)
2
+
3
+ Based on Markerb Gem:
4
+
1
5
  Copyright 2011-2015 Plataformatec (http://blog.plataformatec.com.br)
2
6
 
3
7
  Permission is hereby granted, free of charge, to any person obtaining
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # MJML-Rails
2
2
 
3
- [![Build Status](https://api.travis-ci.org/sighmon/mjml-rails.png?branch=master)](http://travis-ci.org/sighmon/mjml-rails)
3
+ [![Build Status](https://api.travis-ci.org/sighmon/mjml-rails.svg?branch=master)](http://travis-ci.org/sighmon/mjml-rails) [![Gem Version](https://badge.fury.io/rb/mjml-rails.svg)](https://badge.fury.io/rb/mjml-rails)
4
4
 
5
5
  **MJML-Rails** allows you to render HTML e-mails from an [MJML](https://mjml.io) template.
6
6
 
7
- An example template might look like `app/views/user_mailer/email.mjml`:
7
+ An example template might look like:
8
8
 
9
9
  ```erb
10
+ <!-- ./app/views/user_mailer/email.mjml -->
10
11
  <mjml>
11
12
  <mj-body>
12
13
  <mj-container>
@@ -24,11 +25,26 @@ An example template might look like `app/views/user_mailer/email.mjml`:
24
25
  And the partial `_info.mjml`:
25
26
 
26
27
  ```erb
28
+ <!-- ./app/views/user_mailer/_info.mjml -->
27
29
  <mj-text>This is <%= @user.username %></mj-text>
28
30
  ```
29
31
 
30
32
  * Notice you can use ERb and partials inside the template.
31
33
 
34
+ Your `user_mailer.rb` might look like this::
35
+
36
+ ```ruby
37
+ # ./app/mailers/user_mailer.rb
38
+ class UserMailer < ActionMailer::Base
39
+ def user_signup_confirmation()
40
+ mail(to: 'test@example.com', subject: 'test') do |format|
41
+ format.text
42
+ format.mjml
43
+ end
44
+ end
45
+ end
46
+ ```
47
+
32
48
  ## Installation
33
49
 
34
50
  Add it to your Gemfile.
@@ -46,9 +62,58 @@ bundle install
46
62
  Install the MJML parser
47
63
 
48
64
  ```console
49
- npm install -g mjml@2.1.1
65
+ npm install -g mjml@2.1.4
50
66
  ```
51
67
 
68
+ ## Deploying with Heroku
69
+
70
+ To deploy with [Heroku](https://heroku.com) you'll need to setup [multiple buildpacks](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app) so that Heroku first builds Node for MJML and then the Ruby environment for your app.
71
+
72
+ Once you've installed the [Heroku Toolbelt](https://toolbelt.heroku.com/) you can setup the buildpacks from the commandline:
73
+
74
+ `$ heroku buildpacks:set heroku/ruby`
75
+
76
+ And then add the Node buildpack to index 1 so it's run first:
77
+
78
+ `$ heroku buildpacks:add --index 1 heroku/nodejs`
79
+
80
+ Check that's all setup by running:
81
+
82
+ `$ heroku buildpacks`
83
+
84
+ Next you'll need to setup a `package.json` file in the root, something like this:
85
+
86
+ ```json
87
+ {
88
+ "name": "your-site",
89
+ "version": "1.0.0",
90
+ "description": "Now with MJML email templates!",
91
+ "main": "index.js",
92
+ "directories": {
93
+ "doc": "doc",
94
+ "test": "test"
95
+ },
96
+ "dependencies": {
97
+ "mjml": "2.1.4"
98
+ },
99
+ "repository": {
100
+ "type": "git",
101
+ "url": "git+https://github.com/your-repo/your-site.git"
102
+ },
103
+ "keywords": [
104
+ "mailer"
105
+ ],
106
+ "author": "Your Name",
107
+ "license": "ISC",
108
+ "bugs": {
109
+ "url": "https://github.com/sighmon/mjml-rails/issues"
110
+ },
111
+ "homepage": "https://github.com/sighmon/mjml-rails"
112
+ }
113
+ ```
114
+
115
+ Then `$ git push heroku master` and it should Just WorkTM.
116
+
52
117
  ## Bug reports
53
118
 
54
119
  If you discover any bugs, feel free to create an issue on GitHub. Please add as much information as possible to help us fixing the possible bug. We also encourage you to help even more by forking and sending us a pull request.
data/lib/mjml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Mjml
2
2
  # Version number matches MJML.io version
3
- VERSION = "2.1.1"
3
+ VERSION = "2.1.4"
4
4
  end
data.tar.gz.sig CHANGED
@@ -1 +1,3 @@
1
- -�4�M��:���Q�4�DԂv)���^.��MG��.Q�K|���u�+�3x(��RY�V�ܪQdH���"p�&��T�Z�L )3j��E@�@��!��$R '�(^�L ��SEl�V��d\;И��(Zc�<�J�P�@u�w��Ԑ��`��):�13UJ�%g"
1
+ ��B��M���<��I0 q���y��?a�+] 4��U$�8Ygg���`��� sNt=sX=�«� �܀<��3�ȫ��fkY&ɿղ�������B���K�~������$ϵTf� L�6��H]�ҭ
2
+ ��
3
+ ~(_ �1�{�9C�����ʾ�L�4�����t%�<b�ֹ��!F��-ҰE``c���`2Wo���Ez���s��
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mjml-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Loffler
@@ -30,7 +30,7 @@ cert_chain:
30
30
  5hPZOkUdP3egZ1xAHeFIOhTIaOJezjUEDQVattPkgwl25+Q2EXJ+5ehDU86v+lxH
31
31
  E9hMwkxwQntg0fKVFbnVMOg2itaj8fJ7
32
32
  -----END CERTIFICATE-----
33
- date: 2016-05-30 00:00:00.000000000 Z
33
+ date: 2016-06-02 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description: Render MJML + ERb template views in Rails
36
36
  email: sighmon@sighmon.com
metadata.gz.sig CHANGED
Binary file