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
fa8f8343
Commit
fa8f8343
authored
Dec 23, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix import rake task and tests
parent
9f595aa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
lib/tasks/gitlab/import.rake
lib/tasks/gitlab/import.rake
+6
-3
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+1
-0
No files found.
lib/tasks/gitlab/import.rake
View file @
fa8f8343
...
...
@@ -15,15 +15,20 @@ namespace :gitlab do
git_base_path
=
Gitlab
.
config
.
gitolite
.
repos_path
repos_to_import
=
Dir
.
glob
(
git_base_path
+
'/*'
)
namespaces
=
Namespace
.
pluck
(
:path
)
repos_to_import
.
each
do
|
repo_path
|
repo_name
=
File
.
basename
repo_path
# Skip if group or user
next
if
namespaces
.
include?
(
repo_name
)
# skip gitolite admin
next
if
repo_name
==
'gitolite-admin.git'
path
=
repo_name
.
sub
(
/\.git$/
,
''
)
project
=
Project
.
find_
by_path
(
path
)
project
=
Project
.
find_
with_namespace
(
path
)
puts
"Processing
#{
repo_name
}
"
.
yellow
...
...
@@ -34,8 +39,6 @@ namespace :gitlab do
project_params
=
{
:name
=>
path
,
:code
=>
path
,
:path
=>
path
,
}
project
=
Project
.
create_by_user
(
project_params
,
user
)
...
...
spec/requests/api/projects_spec.rb
View file @
fa8f8343
...
...
@@ -64,6 +64,7 @@ describe Gitlab::API do
post
api
(
"/projects"
,
user
),
project
project
.
each_pair
do
|
k
,
v
|
next
if
k
==
:path
json_response
[
k
.
to_s
].
should
==
v
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