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
Jérome Perrin
gitlab-ce
Commits
38985390
Commit
38985390
authored
Feb 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored and fixed seeds to work with gitlab-shell
parent
152f8786
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
14 additions
and
24 deletions
+14
-24
db/fixtures/development/01_admin.rb
db/fixtures/development/01_admin.rb
+0
-0
db/fixtures/development/02_source_code.rb
db/fixtures/development/02_source_code.rb
+9
-11
db/fixtures/development/03_group.rb
db/fixtures/development/03_group.rb
+5
-0
db/fixtures/development/04_project.rb
db/fixtures/development/04_project.rb
+0
-6
db/fixtures/development/05_users.rb
db/fixtures/development/05_users.rb
+0
-0
db/fixtures/development/06_teams.rb
db/fixtures/development/06_teams.rb
+0
-7
db/fixtures/development/07_milestones.rb
db/fixtures/development/07_milestones.rb
+0
-0
db/fixtures/development/08_wall.rb
db/fixtures/development/08_wall.rb
+0
-0
db/fixtures/development/09_issues.rb
db/fixtures/development/09_issues.rb
+0
-0
db/fixtures/development/10_merge_requests.rb
db/fixtures/development/10_merge_requests.rb
+0
-0
db/fixtures/development/11_keys.rb
db/fixtures/development/11_keys.rb
+0
-0
No files found.
db/fixtures/development/0
0
1_admin.rb
→
db/fixtures/development/01_admin.rb
View file @
38985390
File moved
db/fixtures/development/0
09
_source_code.rb
→
db/fixtures/development/0
2
_source_code.rb
View file @
38985390
...
...
@@ -13,19 +13,17 @@ projects = [
projects
.
each
do
|
project
|
project_path
=
File
.
join
(
root
,
project
[
:path
])
next
if
File
.
exists?
(
project_path
)
cmds
=
[
"cd
#{
root
}
&& sudo -u git -H git clone --bare
#{
project
[
:git
]
}
./
#{
project
[
:path
]
}
"
,
"sudo ln -s ./lib/hooks/post-receive
#{
project_path
}
/hooks/post-receive"
,
"sudo chown git:git -R
#{
project_path
}
"
,
"sudo chmod 770 -R
#{
project_path
}
"
,
]
if
File
.
exists?
(
project_path
)
print
'-'
next
end
cmds
.
each
do
|
cmd
|
puts
cmd
.
yellow
`
#{
cmd
}
`
if
system
(
"/home/git/gitlab-shell/bin/gitlab-projects import-project
#{
project
[
:path
]
}
#{
project
[
:git
]
}
"
)
print
'.'
else
print
'F'
end
end
puts
"OK"
.
green
db/fixtures/development/03_group.rb
0 → 100644
View file @
38985390
Group
.
seed
(
:id
,
[
{
id:
99
,
name:
"GitLab"
,
path:
'gitlab'
,
owner_id:
1
},
{
id:
100
,
name:
"Brightbox"
,
path:
'brightbox'
,
owner_id:
1
},
{
id:
101
,
name:
"KDE"
,
path:
'kde'
,
owner_id:
1
},
])
db/fixtures/development/0
02
_project.rb
→
db/fixtures/development/0
4
_project.rb
View file @
38985390
Group
.
seed
(
:id
,
[
{
id:
99
,
name:
"GitLab"
,
path:
'gitlab'
,
owner_id:
1
},
{
id:
100
,
name:
"Brightbox"
,
path:
'brightbox'
,
owner_id:
1
},
{
id:
101
,
name:
"KDE"
,
path:
'kde'
,
owner_id:
1
},
])
Project
.
seed
(
:id
,
[
# Global
...
...
db/fixtures/development/0
03
_users.rb
→
db/fixtures/development/0
5
_users.rb
View file @
38985390
File moved
db/fixtures/development/0
04
_teams.rb
→
db/fixtures/development/0
6
_teams.rb
View file @
38985390
UsersProject
.
skip_callback
(
:save
,
:after
,
:update_repository
)
Gitlab
::
Seeder
.
quiet
do
(
1
..
300
).
each
do
|
i
|
...
...
@@ -21,9 +19,4 @@ Gitlab::Seeder.quiet do
print
(
'.'
)
end
end
UsersProject
.
set_callback
(
:save
,
:after
,
:update_repository
)
puts
"
\n
Rebuild gitolite
\n
"
.
yellow
Project
.
all
.
each
(
&
:update_repository
)
puts
"OK"
.
green
db/fixtures/development/0
05
_milestones.rb
→
db/fixtures/development/0
7
_milestones.rb
View file @
38985390
File moved
db/fixtures/development/0
06
_wall.rb
→
db/fixtures/development/0
8
_wall.rb
View file @
38985390
File moved
db/fixtures/development/0
07
_issues.rb
→
db/fixtures/development/0
9
_issues.rb
View file @
38985390
File moved
db/fixtures/development/
008
_merge_requests.rb
→
db/fixtures/development/
10
_merge_requests.rb
View file @
38985390
File moved
db/fixtures/development/
010
_keys.rb
→
db/fixtures/development/
11
_keys.rb
View file @
38985390
File moved
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