holy_cow 0.0.2 → 0.0.3
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 +8 -8
- data/.gitignore +1 -0
- data/lib/holy_cow/kernel.rb +7 -1
- data/lib/holy_cow/mailer.rb +9 -3
- data/lib/holy_cow/mailer/notification.html.erb +17 -0
- data/lib/holy_cow/mailer/notification.text.erb +9 -0
- data/lib/holy_cow/version.rb +1 -1
- metadata +4 -3
- data/template/notification.html.erb +0 -9
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDczOTIyM2RiM2FhYmY2YWQxNmMyZjM2MjI1M2M3ZDc2MGMxN2IwYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWM0MDA5NmZiODE4YmY1NDE0ZGE3OTc2NTU3ZDA3OWU1ZmM1NDRlMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTIxZWJjMzVlOGFkMTAwMzc2N2ExYjgxZTc1MGM4YmRlZmRjMmIzNGZlZjYx
|
10
|
+
ZGM0ODk4ZGY2NDYyZjQzOGQ4ZTJjMWI1MjMyMzY0YzljODI4Yzg1MjMxZjVh
|
11
|
+
ZThlY2E3MWM4NGFjY2Q5MGYwM2I3MGYwMTU4MWUyOWQ2NmJhYTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NThjM2UzYTJmZjFkYTU3YjNmNzA4MTUwNTk3YjNkZDE0YjZiOGZiOTIyMTg2
|
14
|
+
OGUzY2Y0ZTQxODUwMTYwNjJiOWUzNTU1M2Y1YmI1ZTVmYTg2ZGI0NmVmOGE2
|
15
|
+
ZDEyODA0YTZmZTNkNDhiNDJmOTA5YTI0ZWUwYTkyMmUxNDk4YTE=
|
data/.gitignore
CHANGED
data/lib/holy_cow/kernel.rb
CHANGED
data/lib/holy_cow/mailer.rb
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
require 'action_mailer'
|
2
2
|
require 'pp'
|
3
|
+
ActionMailer::Base.append_view_path File.join(File.dirname(__FILE__), "..")
|
3
4
|
class HolyCow::Mailer < ActionMailer::Base
|
4
5
|
def notification(*args)
|
5
6
|
@subject = args.shift || "Somebody did something!"
|
6
|
-
template = File.join(File.dirname(__FILE__), "..", "..", "template", "notification.html.erb")
|
7
|
-
body = ERB.new(File.read(template))
|
8
7
|
@things = args || []
|
9
|
-
mail(
|
8
|
+
mail({
|
9
|
+
from: HolyCow::from_address,
|
10
|
+
to: HolyCow::recipients,
|
11
|
+
subject: "[Holy Cow] #{@subject}"
|
12
|
+
}) do |format|
|
13
|
+
format.html
|
14
|
+
format.text
|
15
|
+
end
|
10
16
|
end
|
11
17
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<h1>Holy Cow!</h1>
|
8
|
+
<p>Somebody did something you (hopefully) care about! Here are the details</p>
|
9
|
+
|
10
|
+
<h2><%= @subject %></h2>
|
11
|
+
<pre>
|
12
|
+
<% @things.each do |thing| %>
|
13
|
+
<%= thing.pretty_inspect %>
|
14
|
+
<% end %>
|
15
|
+
</pre>
|
16
|
+
</body>
|
17
|
+
</html>
|
data/lib/holy_cow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: holy_cow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -69,8 +69,9 @@ files:
|
|
69
69
|
- lib/holy_cow.rb
|
70
70
|
- lib/holy_cow/kernel.rb
|
71
71
|
- lib/holy_cow/mailer.rb
|
72
|
+
- lib/holy_cow/mailer/notification.html.erb
|
73
|
+
- lib/holy_cow/mailer/notification.text.erb
|
72
74
|
- lib/holy_cow/version.rb
|
73
|
-
- template/notification.html.erb
|
74
75
|
homepage: http://github.com/tenforwardconsulting/holy_cow
|
75
76
|
licenses:
|
76
77
|
- MIT
|