Commit d97a9aa4a44ff9f452144fad348fd9d7e3b48260
1 parent
21f3da23
Exists in
master
and in
4 other branches
fixed email markdown
Showing
6 changed files
with
22 additions
and
4 deletions
Show diff stats
app/mailers/notify.rb
1 | class Notify < ActionMailer::Base | 1 | class Notify < ActionMailer::Base |
2 | + add_template_helper ApplicationHelper | ||
3 | + | ||
2 | default_url_options[:host] = EMAIL_OPTS["host"] | 4 | default_url_options[:host] = EMAIL_OPTS["host"] |
3 | default_url_options[:protocol] = -> { EMAIL_OPTS["protocol"] ? EMAIL_OPTS["protocol"] : "http" }.call | 5 | default_url_options[:protocol] = -> { EMAIL_OPTS["protocol"] ? EMAIL_OPTS["protocol"] : "http" }.call |
4 | 6 |
app/views/notify/note_commit_email.html.haml
@@ -18,6 +18,6 @@ | @@ -18,6 +18,6 @@ | ||
18 | %tr | 18 | %tr |
19 | %td{:valign => "top"} | 19 | %td{:valign => "top"} |
20 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } | 20 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } |
21 | - = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe | 21 | + = markdown(@note.note) |
22 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} | 22 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} |
23 | 23 |
app/views/notify/note_issue_email.html.haml
@@ -20,6 +20,6 @@ | @@ -20,6 +20,6 @@ | ||
20 | %tr | 20 | %tr |
21 | %td{:valign => "top"} | 21 | %td{:valign => "top"} |
22 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } | 22 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } |
23 | - = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe | 23 | + = markdown(@note.note) |
24 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} | 24 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} |
25 | 25 |
app/views/notify/note_merge_request_email.html.haml
@@ -18,6 +18,6 @@ | @@ -18,6 +18,6 @@ | ||
18 | %tr | 18 | %tr |
19 | %td{:valign => "top"} | 19 | %td{:valign => "top"} |
20 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } | 20 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } |
21 | - = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe | 21 | + = markdown(@note.note) |
22 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} | 22 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} |
23 | 23 |
app/views/notify/note_wall_email.html.haml
@@ -18,5 +18,5 @@ | @@ -18,5 +18,5 @@ | ||
18 | %tr | 18 | %tr |
19 | %td{:valign => "top"} | 19 | %td{:valign => "top"} |
20 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } | 20 | %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" } |
21 | - = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe | 21 | + = markdown(@note.note) |
22 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} | 22 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} |
spec/monkeypatch.rb
@@ -12,6 +12,10 @@ class Project | @@ -12,6 +12,10 @@ class Project | ||
12 | def path_to_repo | 12 | def path_to_repo |
13 | File.join(Rails.root, "tmp", "tests", path) | 13 | File.join(Rails.root, "tmp", "tests", path) |
14 | end | 14 | end |
15 | + | ||
16 | + def satellite | ||
17 | + @satellite ||= FakeSatellite.new | ||
18 | + end | ||
15 | end | 19 | end |
16 | 20 | ||
17 | class Key | 21 | class Key |
@@ -29,3 +33,15 @@ class UsersProject | @@ -29,3 +33,15 @@ class UsersProject | ||
29 | true | 33 | true |
30 | end | 34 | end |
31 | end | 35 | end |
36 | + | ||
37 | +class FakeSatellite | ||
38 | + def exists? | ||
39 | + true | ||
40 | + end | ||
41 | + | ||
42 | + def create | ||
43 | + true | ||
44 | + end | ||
45 | +end | ||
46 | + | ||
47 | + |