email_preview 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/views/email_preview/index.html.erb +1 -1
- data/app/views/email_preview/navigation.html.erb +5 -0
- data/app/views/email_preview/show.html.erb +1 -3
- data/config/routes.rb +1 -1
- data/email_preview.gemspec +2 -2
- data/lib/email_preview.rb +5 -7
- metadata +5 -5
- data/app/views/email_preview/list.html.erb +0 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -19,9 +19,7 @@
|
|
19
19
|
<% end %>
|
20
20
|
<h2>Message Headers</h2>
|
21
21
|
<pre class='headers'>
|
22
|
-
|
23
|
-
<%= header.name %>: <%= header.decoded %>
|
24
|
-
<% end %>
|
22
|
+
<%= @mail.header_fields.collect { |header| "#{header.name}: #{header.decoded}\n"}%>
|
25
23
|
</pre>
|
26
24
|
<!--
|
27
25
|
<h3>Debug output</h3>
|
data/config/routes.rb
CHANGED
data/email_preview.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{email_preview}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Sonnek"]
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"VERSION",
|
26
26
|
"app/controllers/email_preview_controller.rb",
|
27
27
|
"app/views/email_preview/index.html.erb",
|
28
|
-
"app/views/email_preview/
|
28
|
+
"app/views/email_preview/navigation.html.erb",
|
29
29
|
"app/views/email_preview/show.html.erb",
|
30
30
|
"config/routes.rb",
|
31
31
|
"email_preview.gemspec",
|
data/lib/email_preview.rb
CHANGED
@@ -11,14 +11,12 @@ module EmailPreview
|
|
11
11
|
@allowed_environments ||= ['development', 'test']
|
12
12
|
@allowed_environments
|
13
13
|
end
|
14
|
-
def register(
|
15
|
-
self.emails ||=
|
16
|
-
self.emails
|
14
|
+
def register(description, &block)
|
15
|
+
self.emails ||= []
|
16
|
+
self.emails << {:description => description, :block => block }
|
17
17
|
end
|
18
|
-
def preview(
|
19
|
-
|
20
|
-
block = self.emails[key]
|
21
|
-
block.call
|
18
|
+
def preview(index)
|
19
|
+
self.emails[index.to_i][:block].call
|
22
20
|
end
|
23
21
|
end
|
24
22
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_preview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -66,7 +66,7 @@ files:
|
|
66
66
|
- VERSION
|
67
67
|
- app/controllers/email_preview_controller.rb
|
68
68
|
- app/views/email_preview/index.html.erb
|
69
|
-
- app/views/email_preview/
|
69
|
+
- app/views/email_preview/navigation.html.erb
|
70
70
|
- app/views/email_preview/show.html.erb
|
71
71
|
- config/routes.rb
|
72
72
|
- email_preview.gemspec
|