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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
fb919a63
Commit
fb919a63
authored
Mar 21, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dmedvinsky-username-keys-content-type'
parents
60c3e841
ac35ee37
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG
CHANGELOG
+1
-0
app/controllers/profiles/keys_controller.rb
app/controllers/profiles/keys_controller.rb
+1
-1
spec/controllers/profile_keys_controller_spec.rb
spec/controllers/profile_keys_controller_spec.rb
+10
-0
No files found.
CHANGELOG
View file @
fb919a63
...
...
@@ -30,6 +30,7 @@ v 6.7.0
- Requires at least 2 unicorn workers
- Requires gitlab-shell v1.9+
- Replaced gemoji(due to closed licencing problem) with Phantom Open Emoji library(combined SIL Open Font License, MIT License and the CC 3.0 License)
- Fix `/:username.keys` response content type (Dmitry Medvinsky)
v 6.6.5
- Added option to remove issue assignee on project issue page and issue edit page (Jason Blanchard)
...
...
app/controllers/profiles/keys_controller.rb
View file @
fb919a63
...
...
@@ -41,7 +41,7 @@ class Profiles::KeysController < ApplicationController
begin
user
=
User
.
find_by_username
(
params
[
:username
])
if
user
.
present?
render
text:
user
.
all_ssh_keys
.
join
(
"
\n
"
)
render
text:
user
.
all_ssh_keys
.
join
(
"
\n
"
)
,
content_type:
"text/plain"
else
render_404
and
return
end
...
...
spec/controllers/profile_keys_controller_spec.rb
View file @
fb919a63
...
...
@@ -24,6 +24,11 @@ describe Profiles::KeysController do
expect
(
response
.
body
).
to
eq
(
""
)
end
it
"should respond with text/plain content type"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
content_type
).
to
eq
(
"text/plain"
)
end
end
describe
"user with keys"
do
...
...
@@ -44,6 +49,11 @@ describe Profiles::KeysController do
expect
(
response
.
body
).
not_to
eq
(
""
)
expect
(
response
.
body
).
to
eq
(
user
.
all_ssh_keys
.
join
(
"
\n
"
))
end
it
"should respond with text/plain content type"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
content_type
).
to
eq
(
"text/plain"
)
end
end
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