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
a0cd769e
Commit
a0cd769e
authored
Mar 02, 2020
by
a_luna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address code review comments
- Improve variable name - Add Changelog - Remove unnecessary let_it_be
parent
e54ac90d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
app/presenters/snippet_blob_presenter.rb
app/presenters/snippet_blob_presenter.rb
+2
-2
changelogs/unreleased/al-205505-fix-snippet-blob-viewers.yml
changelogs/unreleased/al-205505-fix-snippet-blob-viewers.yml
+5
-0
spec/presenters/snippet_blob_presenter_spec.rb
spec/presenters/snippet_blob_presenter_spec.rb
+0
-2
No files found.
app/presenters/snippet_blob_presenter.rb
View file @
a0cd769e
...
...
@@ -39,8 +39,8 @@ class SnippetBlobPresenter < BlobPresenter
end
def
renderer
proxy
=
Warden
::
Proxy
.
new
({},
Warden
::
Manager
.
new
({})).
tap
do
|
i
|
i
.
set_user
(
current_user
,
scope: :user
)
proxy
=
Warden
::
Proxy
.
new
({},
Warden
::
Manager
.
new
({})).
tap
do
|
proxy_instance
|
proxy_instance
.
set_user
(
current_user
,
scope: :user
)
end
ApplicationController
.
renderer
.
new
(
'warden'
=>
proxy
)
...
...
changelogs/unreleased/al-205505-fix-snippet-blob-viewers.yml
0 → 100644
View file @
a0cd769e
---
title
:
Fix snippet blob viewers for rich and plain data
merge_request
:
25945
author
:
type
:
fixed
spec/presenters/snippet_blob_presenter_spec.rb
View file @
a0cd769e
...
...
@@ -4,8 +4,6 @@ require 'spec_helper'
describe
SnippetBlobPresenter
do
describe
'#rich_data'
do
let_it_be
(
:snippet
)
{
create
(
:personal_snippet
)
}
before
do
allow_next_instance_of
(
described_class
)
do
|
instance
|
allow
(
instance
).
to
receive
(
:current_user
).
and_return
(
nil
)
...
...
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