mail_nerd 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/app/assets/stylesheets/mail_nerd/application.css +13 -0
- data/app/controllers/mail_nerd/application_controller.rb +4 -0
- data/app/helpers/mail_nerd/application_helper.rb +4 -0
- data/app/mailers/invitations.rb +3 -0
- data/app/mailers/reviews.rb +19 -0
- data/app/views/layouts/mail_nerd/application.html.erb +14 -0
- data/config/mail_nerd_config.yml +6 -0
- data/config/routes.rb +2 -0
- data/lib/mail_nerd/mandrill/code_parser.rb +18 -0
- data/lib/mail_nerd/version.rb +1 -1
- metadata +16 -6
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
OThhODNjMjY5N2MyNDY2NGZlNDdjMjIwMjE0NjM4ZDAxNjYzZTk5ODA1NmE5
|
10
|
-
ZWUyY2RiN2I2ODc3ZjMwYmRjYzhhNGUzMjI5YzE4OGM4MWIyNDRlNzg2MTQ0
|
11
|
-
ODk1ZTA4ZmE5OTE2ODM1YTM5ZGVjOWNlZDkxMTFlZWZmMGVkYjY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NjYyNTgxNGY2NTczYjI0M2I2NTQ2YjBkOGE2YzAzNDNkMDIyMTZmOTcyODY1
|
14
|
-
YmEyMjAwZDFmMTZmZWEzNGNkMTMwNGU2OTBkMzU5NzgwOGVhODI3MmQwZDRi
|
15
|
-
YTYxZjM3NjhhMGZmYzBkMDA5ZWQ3NDc1MTUwNmJmYTFjYWE5ZmQ=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 00dc35a685faf0784b6e062897224316818de14f
|
4
|
+
data.tar.gz: d326f5fad9fb4328268efb92a0b2c3ea28fc9969
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1a2a0d239e79ef16401bf23e7deccb1190e4ef49d47564b0b1d131ff673cc44edb79b4b57fcaf004161094f2d7f6f20b12a7386015ef6220b32775b103842999
|
7
|
+
data.tar.gz: e1edfc9c40e509e2249d5ace470c9e659fd5b4d709093bdf7cc319d2b4092184d9116a34480ff0eb2e7df495226ff95774ae9bec54bc312e1720ca525ffad069
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class Reviews < MandrillMailer::TemplateMailer
|
2
|
+
default from: "Chuck@Headwig.com",
|
3
|
+
from_name: "Chuck Headwig"
|
4
|
+
|
5
|
+
def pant_review(pant_review="They're swell", recipients=[{email: "guest@honor.com", name: 'Honored Guest'}])
|
6
|
+
mandrill_mail template: "Pant Review",
|
7
|
+
subject: I18n.t("reviews.pant_review.subject", default: "Love your pants man!"),
|
8
|
+
to: recipients,
|
9
|
+
vars: {
|
10
|
+
pant_review: pant_review
|
11
|
+
},
|
12
|
+
important: true,
|
13
|
+
inline_css: true
|
14
|
+
end
|
15
|
+
|
16
|
+
test_setup_for :pant_review do |mailer, options|
|
17
|
+
mailer.pant_review(*options.values_at(:pant_review), [options.select{|k| [:name,:email].include?(k)}]).deliver
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>MailNerd</title>
|
5
|
+
<%= stylesheet_link_tag "mail_nerd/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "mail_nerd/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
|
3
|
+
module MailNerd
|
4
|
+
module Mandrill
|
5
|
+
class CodeParser < Hash
|
6
|
+
def self.parse(text)
|
7
|
+
Nokogiri::HTML(text).xpath("//*[@*]").inject(new) do |m,e|
|
8
|
+
if name = e.attributes["mc:edit"].try(:value)
|
9
|
+
default = e.text
|
10
|
+
m.merge(name => default)
|
11
|
+
else
|
12
|
+
m
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/mail_nerd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail_nerd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Buxton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -129,12 +129,21 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
+
- app/assets/stylesheets/mail_nerd/application.css
|
133
|
+
- app/controllers/mail_nerd/application_controller.rb
|
134
|
+
- app/helpers/mail_nerd/application_helper.rb
|
135
|
+
- app/mailers/invitations.rb
|
136
|
+
- app/mailers/reviews.rb
|
137
|
+
- app/views/layouts/mail_nerd/application.html.erb
|
132
138
|
- config/cucumber.yml
|
133
139
|
- config/initializers/load_mail_nerd_config.rb
|
140
|
+
- config/mail_nerd_config.yml
|
141
|
+
- config/routes.rb
|
134
142
|
- lib/generators/mail_nerd/mailer/mailer_generator.rb
|
135
143
|
- lib/generators/mail_nerd/mailer/templates/mailer_class.rb
|
136
144
|
- lib/generators/mail_nerd/mailer/USAGE
|
137
145
|
- lib/mail_nerd/engine.rb
|
146
|
+
- lib/mail_nerd/mandrill/code_parser.rb
|
138
147
|
- lib/mail_nerd/version.rb
|
139
148
|
- lib/mail_nerd.rb
|
140
149
|
- lib/tasks/cucumber.rake
|
@@ -142,7 +151,8 @@ files:
|
|
142
151
|
- MIT-LICENSE
|
143
152
|
- Rakefile
|
144
153
|
homepage: https://github.com/cpb/mail_nerd
|
145
|
-
licenses:
|
154
|
+
licenses:
|
155
|
+
- MIT
|
146
156
|
metadata: {}
|
147
157
|
post_install_message:
|
148
158
|
rdoc_options: []
|
@@ -150,17 +160,17 @@ require_paths:
|
|
150
160
|
- lib
|
151
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
162
|
requirements:
|
153
|
-
- -
|
163
|
+
- - '>='
|
154
164
|
- !ruby/object:Gem::Version
|
155
165
|
version: '0'
|
156
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
167
|
requirements:
|
158
|
-
- -
|
168
|
+
- - '>='
|
159
169
|
- !ruby/object:Gem::Version
|
160
170
|
version: '0'
|
161
171
|
requirements: []
|
162
172
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.0.
|
173
|
+
rubygems_version: 2.0.3
|
164
174
|
signing_key:
|
165
175
|
specification_version: 4
|
166
176
|
summary: Take care of the custom email release and delivery cycle.
|