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
dcabe624
Commit
dcabe624
authored
Apr 25, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
2164d977
6b90db7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
17 deletions
+3
-17
lib/api/helpers.rb
lib/api/helpers.rb
+0
-4
lib/api/namespaces.rb
lib/api/namespaces.rb
+2
-0
spec/lib/api/helpers_spec.rb
spec/lib/api/helpers_spec.rb
+0
-12
spec/lib/gitlab/git/blob_spec.rb
spec/lib/gitlab/git/blob_spec.rb
+1
-1
No files found.
lib/api/helpers.rb
View file @
dcabe624
...
@@ -67,10 +67,6 @@ module API
...
@@ -67,10 +67,6 @@ module API
initial_current_user
!=
current_user
initial_current_user
!=
current_user
end
end
def
user_namespace
@user_namespace
||=
find_namespace!
(
params
[
:id
])
end
def
user_group
def
user_group
@group
||=
find_group!
(
params
[
:id
])
@group
||=
find_group!
(
params
[
:id
])
end
end
...
...
lib/api/namespaces.rb
View file @
dcabe624
...
@@ -46,6 +46,8 @@ module API
...
@@ -46,6 +46,8 @@ module API
requires
:id
,
type:
String
,
desc:
"Namespace's ID or path"
requires
:id
,
type:
String
,
desc:
"Namespace's ID or path"
end
end
get
':id'
,
requirements:
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
do
get
':id'
,
requirements:
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
do
user_namespace
=
find_namespace!
(
params
[
:id
])
present
user_namespace
,
with:
Entities
::
Namespace
,
current_user:
current_user
present
user_namespace
,
with:
Entities
::
Namespace
,
current_user:
current_user
end
end
end
end
...
...
spec/lib/api/helpers_spec.rb
View file @
dcabe624
...
@@ -137,18 +137,6 @@ describe API::Helpers do
...
@@ -137,18 +137,6 @@ describe API::Helpers do
it_behaves_like
'user namespace finder'
it_behaves_like
'user namespace finder'
end
end
describe
'#user_namespace'
do
let
(
:namespace_finder
)
do
subject
.
user_namespace
end
before
do
allow
(
subject
).
to
receive
(
:params
).
and_return
({
id:
namespace
.
id
})
end
it_behaves_like
'user namespace finder'
end
describe
'#send_git_blob'
do
describe
'#send_git_blob'
do
let
(
:repository
)
{
double
}
let
(
:repository
)
{
double
}
let
(
:blob
)
{
double
(
name:
'foobar'
)
}
let
(
:blob
)
{
double
(
name:
'foobar'
)
}
...
...
spec/lib/gitlab/git/blob_spec.rb
View file @
dcabe624
...
@@ -341,7 +341,7 @@ describe Gitlab::Git::Blob, :seed_helper do
...
@@ -341,7 +341,7 @@ describe Gitlab::Git::Blob, :seed_helper do
it
{
expect
(
blob
.
mode
).
to
eq
(
"100755"
)
}
it
{
expect
(
blob
.
mode
).
to
eq
(
"100755"
)
}
end
end
context
'file with
Chi
nese text'
do
context
'file with
Japa
nese text'
do
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
find
(
repository
,
SeedRepo
::
Commit
::
ID
,
"encoding/テスト.txt"
)
}
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
find
(
repository
,
SeedRepo
::
Commit
::
ID
,
"encoding/テスト.txt"
)
}
it
{
expect
(
blob
.
name
).
to
eq
(
"テスト.txt"
)
}
it
{
expect
(
blob
.
name
).
to
eq
(
"テスト.txt"
)
}
...
...
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