Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2012-04-23 16:32:56 +0400
committergitlabhq <m@gitlabhq.com>2012-04-23 16:32:56 +0400
commitd97a9aa4a44ff9f452144fad348fd9d7e3b48260 (patch)
tree905c33874b064778199f806749d5688e33d64be3
parent21f3da23589d50038728393f0badc6255b5762ca (diff)
fixed email markdownv2.4.1
-rw-r--r--app/mailers/notify.rb2
-rw-r--r--app/views/notify/note_commit_email.html.haml2
-rw-r--r--app/views/notify/note_issue_email.html.haml2
-rw-r--r--app/views/notify/note_merge_request_email.html.haml2
-rw-r--r--app/views/notify/note_wall_email.html.haml2
-rw-r--r--spec/monkeypatch.rb16
6 files changed, 22 insertions, 4 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 9c2cc7c5b29..4c72d9175f0 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -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
diff --git a/app/views/notify/note_commit_email.html.haml b/app/views/notify/note_commit_email.html.haml
index 41501deebb8..aee8fe6c5da 100644
--- a/app/views/notify/note_commit_email.html.haml
+++ b/app/views/notify/note_commit_email.html.haml
@@ -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"}
diff --git a/app/views/notify/note_issue_email.html.haml b/app/views/notify/note_issue_email.html.haml
index 28db944f8e1..eb2cbc0c33d 100644
--- a/app/views/notify/note_issue_email.html.haml
+++ b/app/views/notify/note_issue_email.html.haml
@@ -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"}
diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml
index 6a97f9cadc3..e2dfec35b7f 100644
--- a/app/views/notify/note_merge_request_email.html.haml
+++ b/app/views/notify/note_merge_request_email.html.haml
@@ -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"}
diff --git a/app/views/notify/note_wall_email.html.haml b/app/views/notify/note_wall_email.html.haml
index 77b58f15eef..da18f64f937 100644
--- a/app/views/notify/note_wall_email.html.haml
+++ b/app/views/notify/note_wall_email.html.haml
@@ -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"}
diff --git a/spec/monkeypatch.rb b/spec/monkeypatch.rb
index 75099e0553a..b4c358c21a3 100644
--- a/spec/monkeypatch.rb
+++ b/spec/monkeypatch.rb
@@ -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
+
+