Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
19b0e894
Commit
19b0e894
authored
Apr 04, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
f5db1d53
2bd2fc20
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
1 deletion
+44
-1
app/presenters/ci/bridge_presenter.rb
app/presenters/ci/bridge_presenter.rb
+9
-0
changelogs/unreleased/55964-fix-email-encoding.yml
changelogs/unreleased/55964-fix-email-encoding.yml
+5
-0
config/initializers/premailer.rb
config/initializers/premailer.rb
+2
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+13
-0
spec/presenters/ci/bridge_presenter_spec.rb
spec/presenters/ci/bridge_presenter_spec.rb
+15
-0
No files found.
app/presenters/ci/bridge_presenter.rb
0 → 100644
View file @
19b0e894
# frozen_string_literal: true
module
Ci
class
BridgePresenter
<
CommitStatusPresenter
def
detailed_status
@detailed_status
||=
subject
.
detailed_status
(
user
)
end
end
end
changelogs/unreleased/55964-fix-email-encoding.yml
0 → 100644
View file @
19b0e894
---
title
:
Fix notfication emails having wrong encoding
merge_request
:
26931
author
:
type
:
fixed
config/initializers/premailer.rb
View file @
19b0e894
...
...
@@ -4,5 +4,6 @@ Premailer::Rails.config.merge!(
preserve_styles:
true
,
remove_comments:
true
,
remove_ids:
false
,
remove_scripts:
false
remove_scripts:
false
,
output_encoding:
'US-ASCII'
)
spec/mailers/notify_spec.rb
View file @
19b0e894
...
...
@@ -30,6 +30,19 @@ describe Notify do
description:
'My awesome description!'
)
end
describe
'with HTML-encoded entities'
do
before
do
described_class
.
test_email
(
'test@test.com'
,
'Subject'
,
'Some body with —'
).
deliver
end
subject
{
ActionMailer
::
Base
.
deliveries
.
last
}
it
'retains 7bit encoding'
do
expect
(
subject
.
body
.
ascii_only?
).
to
eq
(
true
)
expect
(
subject
.
body
.
encoding
).
to
eq
(
'7bit'
)
end
end
context
'for a project'
do
shared_examples
'an assignee email'
do
it
'is sent to the assignee as the author'
do
...
...
spec/presenters/ci/bridge_presenter_spec.rb
0 → 100644
View file @
19b0e894
require
'spec_helper'
describe
Ci
::
BridgePresenter
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
set
(
:bridge
)
{
create
(
:ci_bridge
,
pipeline:
pipeline
,
status: :failed
)
}
subject
(
:presenter
)
do
described_class
.
new
(
bridge
)
end
it
'presents information about recoverable state'
do
expect
(
presenter
).
to
be_recoverable
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment