Commit d97a9aa4a44ff9f452144fad348fd9d7e3b48260

Authored by gitlabhq
1 parent 21f3da23

fixed email markdown

app/mailers/notify.rb
1 1 class Notify < ActionMailer::Base
  2 + add_template_helper ApplicationHelper
  3 +
2 4 default_url_options[:host] = EMAIL_OPTS["host"]
3 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 18 %tr
19 19 %td{:valign => "top"}
20 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 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 20 %tr
21 21 %td{:valign => "top"}
22 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 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 18 %tr
19 19 %td{:valign => "top"}
20 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 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 18 %tr
19 19 %td{:valign => "top"}
20 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 22 %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
... ...
spec/monkeypatch.rb
... ... @@ -12,6 +12,10 @@ class Project
12 12 def path_to_repo
13 13 File.join(Rails.root, "tmp", "tests", path)
14 14 end
  15 +
  16 + def satellite
  17 + @satellite ||= FakeSatellite.new
  18 + end
15 19 end
16 20  
17 21 class Key
... ... @@ -29,3 +33,15 @@ class UsersProject
29 33 true
30 34 end
31 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 +
... ...