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
Léo-Paul Géneau
gitlab-ce
Commits
d9cfb798
Commit
d9cfb798
authored
Dec 15, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev seeds & dev scripts
parent
f94d51d7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
4 deletions
+75
-4
db/fixtures/development/002_project.rb
db/fixtures/development/002_project.rb
+1
-1
db/fixtures/development/004_teams.rb
db/fixtures/development/004_teams.rb
+3
-3
db/fixtures/development/006_wall.rb
db/fixtures/development/006_wall.rb
+40
-0
lib/tasks/dev_repo.rake
lib/tasks/dev_repo.rake
+24
-0
lib/tasks/dev_user.sh
lib/tasks/dev_user.sh
+7
-0
No files found.
db/fixtures/development/002_project.rb
View file @
d9cfb798
Project
.
seed
(
:id
,
[
{
:id
=>
1
,
:name
=>
"
Gitlab HQ"
,
:path
=>
"gitlabhq"
,
:code
=>
"gitlabhq
"
,
:owner_id
=>
1
},
{
:id
=>
1
,
:name
=>
"
Rubinius"
,
:path
=>
"rubinius"
,
:code
=>
"rubinius
"
,
:owner_id
=>
1
},
{
:id
=>
2
,
:name
=>
"Diaspora"
,
:path
=>
"diaspora"
,
:code
=>
"diaspora"
,
:owner_id
=>
1
},
{
:id
=>
3
,
:name
=>
"Ruby on Rails"
,
:path
=>
"ruby_on_rails"
,
:code
=>
"ruby_on_rails"
,
:owner_id
=>
1
}
])
db/fixtures/development/004_teams.rb
View file @
d9cfb798
UsersProject
.
seed
(
:id
,
[
{
:id
=>
1
,
:project_id
=>
1
,
:user_id
=>
1
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_
N
},
{
:id
=>
1
,
:project_id
=>
1
,
:user_id
=>
1
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_
RW
},
{
:id
=>
2
,
:project_id
=>
1
,
:user_id
=>
2
,
:project_access
=>
Project
::
PROJECT_RW
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
3
,
:project_id
=>
1
,
:user_id
=>
3
,
:project_access
=>
Project
::
PROJECT_RW
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
4
,
:project_id
=>
1
,
:user_id
=>
4
,
:project_access
=>
Project
::
PROJECT_R
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
5
,
:project_id
=>
1
,
:user_id
=>
5
,
:project_access
=>
Project
::
PROJECT_R
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
6
,
:project_id
=>
2
,
:user_id
=>
1
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_
N
},
{
:id
=>
6
,
:project_id
=>
2
,
:user_id
=>
1
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_
RW
},
{
:id
=>
7
,
:project_id
=>
2
,
:user_id
=>
2
,
:project_access
=>
Project
::
PROJECT_R
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
8
,
:project_id
=>
2
,
:user_id
=>
3
,
:project_access
=>
Project
::
PROJECT_R
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
9
,
:project_id
=>
2
,
:user_id
=>
4
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
11
,
:project_id
=>
2
,
:user_id
=>
5
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
12
,
:project_id
=>
3
,
:user_id
=>
1
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_
N
},
{
:id
=>
12
,
:project_id
=>
3
,
:user_id
=>
1
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_
RW
},
{
:id
=>
13
,
:project_id
=>
3
,
:user_id
=>
2
,
:project_access
=>
Project
::
PROJECT_R
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
14
,
:project_id
=>
3
,
:user_id
=>
3
,
:project_access
=>
Project
::
PROJECT_RWA
,
:repo_access
=>
Repository
::
REPO_N
},
{
:id
=>
15
,
:project_id
=>
3
,
:user_id
=>
4
,
:project_access
=>
Project
::
PROJECT_R
,
:repo_access
=>
Repository
::
REPO_N
},
...
...
db/fixtures/development/006_wall.rb
0 → 100644
View file @
d9cfb798
Note
.
seed
(
:id
,
[
{
:id
=>
1
,
:project_id
=>
1
,
:author_id
=>
1
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
2
,
:project_id
=>
1
,
:author_id
=>
2
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
3
,
:project_id
=>
1
,
:author_id
=>
3
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
4
,
:project_id
=>
1
,
:author_id
=>
4
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
5
,
:project_id
=>
1
,
:author_id
=>
5
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
6
,
:project_id
=>
2
,
:author_id
=>
1
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
7
,
:project_id
=>
2
,
:author_id
=>
2
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
8
,
:project_id
=>
2
,
:author_id
=>
3
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
9
,
:project_id
=>
2
,
:author_id
=>
4
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
11
,
:project_id
=>
2
,
:author_id
=>
5
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
12
,
:project_id
=>
3
,
:author_id
=>
1
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
13
,
:project_id
=>
3
,
:author_id
=>
2
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
14
,
:project_id
=>
3
,
:author_id
=>
3
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
15
,
:project_id
=>
3
,
:author_id
=>
4
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
16
,
:project_id
=>
3
,
:author_id
=>
5
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
21
,
:project_id
=>
1
,
:author_id
=>
1
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
22
,
:project_id
=>
1
,
:author_id
=>
2
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
23
,
:project_id
=>
1
,
:author_id
=>
3
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
24
,
:project_id
=>
1
,
:author_id
=>
4
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
25
,
:project_id
=>
1
,
:author_id
=>
5
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
26
,
:project_id
=>
2
,
:author_id
=>
1
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
27
,
:project_id
=>
2
,
:author_id
=>
2
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
28
,
:project_id
=>
2
,
:author_id
=>
3
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
29
,
:project_id
=>
2
,
:author_id
=>
4
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
30
,
:project_id
=>
2
,
:author_id
=>
5
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
32
,
:project_id
=>
3
,
:author_id
=>
1
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
33
,
:project_id
=>
3
,
:author_id
=>
2
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
34
,
:project_id
=>
3
,
:author_id
=>
3
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
35
,
:project_id
=>
3
,
:author_id
=>
4
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
36
,
:project_id
=>
3
,
:author_id
=>
5
,
:note
=>
Faker
::
Lorem
.
sentence
(
6
)}
])
lib/tasks/dev_repo.rake
0 → 100644
View file @
d9cfb798
desc
"Prepare for development"
task
:dev_repo
=>
:environment
do
key
=
`sudo -u gitlabdev -H cat /home/gitlabdev/.ssh/id_rsa.pub`
raise
"
\n
*** Run ./lib/tasks/dev_user.sh first ***
\n
"
if
key
.
empty?
Key
.
create
(
:user_id
=>
User
.
first
,
:key
=>
key
,
:title
=>
"gitlabdev"
)
puts
"
\n
*** Clone diaspora from github"
`sudo -u gitlabdev -H git clone git://github.com/diaspora/diaspora.git /home/gitlabdev/diaspora`
puts
"
\n
*** Push diaspora source to gitlab"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/diaspora; git remote add local git@localhost:diaspora.git; git push local master; git push local --tags; git checkout -b api origin/api; git push local api; git checkout -b heroku origin/heroku; git push local heroku"`
puts
"
\n
*** Clone rails from github"
`sudo -u gitlabdev -H git clone git://github.com/rails/rails.git /home/gitlabdev/rails`
puts
"
\n
*** Push rails source to gitlab"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/rails; git remote add local git@localhost:ruby_on_rails.git; git push local master; git push local --tags"`
puts
"
\n
*** Clone rubinius from github"
`sudo -u gitlabdev -H git clone git://github.com/rubinius/rubinius.git /home/gitlabdev/rubinius`
puts
"
\n
*** Push rubinius source to gitlab"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/rubinius; git remote add local git@localhost:rubinius.git; git push local master; git push local --tags"`
end
lib/tasks/dev_user.sh
0 → 100755
View file @
d9cfb798
sudo
adduser
\
--gecos
'gitlab dev user'
\
--disabled-password
\
--home
/home/gitlabdev
\
gitlabdev
sudo
-i
-u
gitlabdev
-H
sh
-c
"ssh-keygen -t rsa"
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