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
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-07-23 17:35:31 +0300
committerDouwe Maan <douwe@gitlab.com>2015-07-23 17:35:31 +0300
commitb7be08c515a0715d1e0a267287c1dc75b83897e3 (patch)
treed9d92573fb6e64deccf44bcf62e6856040f69ad1 /lib
parent5dd4dea93baa6386ed860a50125dce3ca3890f16 (diff)
parentca451365abc26ede22f9b13482e3120fd61833de (diff)
Merge branch 'changes_for_gmail_inbox_actions' into 'master'
Changes for gmail inbox actions Related to the ongoing efforts to get Gmail inbox actions for GitLab.com in #1517 Not using `mdash` would break the rendering of the html email by switching `Content-Transfer-Encoding` to `quoted-printable` for every email. Removed the rake task and docs to prevent users from sending dummy emails which might cause application rejection. See merge request !1024
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/mail_google_schema_whitelisting.rake73
1 files changed, 0 insertions, 73 deletions
diff --git a/lib/tasks/gitlab/mail_google_schema_whitelisting.rake b/lib/tasks/gitlab/mail_google_schema_whitelisting.rake
deleted file mode 100644
index 102c6ae55d5..00000000000
--- a/lib/tasks/gitlab/mail_google_schema_whitelisting.rake
+++ /dev/null
@@ -1,73 +0,0 @@
-require "#{Rails.root}/app/helpers/emails_helper"
-require 'action_view/helpers'
-extend ActionView::Helpers
-
-include ActionView::Context
-include EmailsHelper
-
-namespace :gitlab do
- desc "Email google whitelisting email with example email for actions in inbox"
- task mail_google_schema_whitelisting: :environment do
- subject = "Rails | Implemented feature"
- url = "#{Gitlab.config.gitlab.url}/base/rails-project/issues/#{rand(1..100)}#note_#{rand(10..1000)}"
- schema = email_action(url)
- body = email_template(schema, url)
- mail = Notify.test_email("schema.whitelisting+sample@gmail.com", subject, body.html_safe)
- if send_now
- mail.deliver
- else
- puts "WOULD SEND:"
- end
- puts mail
- end
-
- def email_template(schema, url)
- "<html lang='en'>
- <head>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <title>
- GitLab
- </title>
- </meta>
- </head>
- <style>
- img {
- max-width: 100%;
- height: auto;
- }
- p.details {
- font-style:italic;
- color:#777
- }
- .footer p {
- font-size:small;
- color:#777
- }
- </style>
- <body>
- <div class='content'>
- <div>
- <p>I like it :+1: </p>
- </div>
- </div>
-
- <div class='footer' style='margin-top: 10px;'>
- <p>
- <br>
- <a href=\"#{url}\">View it on GitLab</a>
- You're receiving this notification because you are a member of the Base / Rails Project project team.
- #{schema}
- </p>
- </div>
- </body>
- </html>"
- end
-
- def send_now
- if ENV['SEND'] == "true"
- true
- else
- false
- end
- end
-end