OSDN Git Service

fixed email markdown v2.4.1
authorgitlabhq <m@gitlabhq.com>
Mon, 23 Apr 2012 12:32:56 +0000 (15:32 +0300)
committergitlabhq <m@gitlabhq.com>
Mon, 23 Apr 2012 12:32:56 +0000 (15:32 +0300)
app/mailers/notify.rb
app/views/notify/note_commit_email.html.haml
app/views/notify/note_issue_email.html.haml
app/views/notify/note_merge_request_email.html.haml
app/views/notify/note_wall_email.html.haml
spec/monkeypatch.rb

index 9c2cc7c..4c72d91 100644 (file)
@@ -1,4 +1,6 @@
 class Notify < ActionMailer::Base
+  add_template_helper ApplicationHelper
+
   default_url_options[:host] = EMAIL_OPTS["host"]
   default_url_options[:protocol] = -> { EMAIL_OPTS["protocol"] ? EMAIL_OPTS["protocol"] : "http" }.call
 
index 41501de..aee8fe6 100644 (file)
@@ -18,6 +18,6 @@
             %tr
               %td{:valign => "top"}
                 %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
-                  = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
+                  = markdown(@note.note)
       %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
 
index 28db944..eb2cbc0 100644 (file)
@@ -20,6 +20,6 @@
             %tr
               %td{:valign => "top"}
                 %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
-                  = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
+                  = markdown(@note.note)
       %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
 
index 6a97f9c..e2dfec3 100644 (file)
@@ -18,6 +18,6 @@
             %tr
               %td{:valign => "top"}
                 %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
-                  = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
+                  = markdown(@note.note)
       %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
 
index 77b58f1..da18f64 100644 (file)
@@ -18,5 +18,5 @@
             %tr
               %td{:valign => "top"}
                 %div{ :style => "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
-                  = RDiscount.new(@note.note, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
+                  = markdown(@note.note)
       %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
index 75099e0..b4c358c 100644 (file)
@@ -12,6 +12,10 @@ class Project
   def path_to_repo
     File.join(Rails.root, "tmp", "tests", path)
   end
+
+  def satellite
+    @satellite ||= FakeSatellite.new
+  end
 end
 
 class Key
@@ -29,3 +33,15 @@ class UsersProject
     true
   end
 end
+
+class FakeSatellite
+  def exists? 
+    true
+  end
+
+  def create
+    true
+  end
+end
+
+