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
03e51c30
Commit
03e51c30
authored
Dec 04, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixtures added
parent
a41d5769
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
17 deletions
+58
-17
app/models/repository.rb
app/models/repository.rb
+4
-2
db/fixtures/development/001_admin.rb
db/fixtures/development/001_admin.rb
+17
-15
db/fixtures/development/002_project.rb
db/fixtures/development/002_project.rb
+5
-0
db/fixtures/development/003_users.rb
db/fixtures/development/003_users.rb
+11
-0
db/fixtures/development/004_teams.rb
db/fixtures/development/004_teams.rb
+21
-0
No files found.
app/models/repository.rb
View file @
03e51c30
require
File
.
join
(
Rails
.
root
,
"lib"
,
"gitlabhq"
,
"git_host"
)
class
Repository
class
Repository
attr_accessor
:project
attr_accessor
:project
...
@@ -34,13 +36,13 @@ class Repository
...
@@ -34,13 +36,13 @@ class Repository
end
end
def
update_gitosis_project
def
update_gitosis_project
Git
Proxy
.
system
.
new
.
configure
do
|
c
|
Git
labhq
::
GitHost
.
system
.
new
.
configure
do
|
c
|
c
.
update_project
(
path
,
project
.
gitosis_writers
)
c
.
update_project
(
path
,
project
.
gitosis_writers
)
end
end
end
end
def
destroy_gitosis_project
def
destroy_gitosis_project
Git
Proxy
.
system
.
new
.
configure
do
|
c
|
Git
labhq
::
GitHost
.
system
.
new
.
configure
do
|
c
|
c
.
destroy_project
(
@project
)
c
.
destroy_project
(
@project
)
end
end
end
end
...
...
db/fixtures/development/001_admin.rb
View file @
03e51c30
admin
=
User
.
create
(
unless
User
.
count
>
0
admin
=
User
.
create
(
:email
=>
"admin@local.host"
,
:email
=>
"admin@local.host"
,
:name
=>
"Administrator"
,
:name
=>
"Administrator"
,
:password
=>
"5iveL!fe"
,
:password
=>
"5iveL!fe"
,
:password_confirmation
=>
"5iveL!fe"
:password_confirmation
=>
"5iveL!fe"
)
)
admin
.
projects_limit
=
10000
admin
.
projects_limit
=
10000
admin
.
admin
=
true
admin
.
admin
=
true
admin
.
save!
admin
.
save!
if
admin
.
valid?
if
admin
.
valid?
puts
%q[
puts
%q[
Administrator account created:
Administrator account created:
login.........admin@local.host
login.........admin@local.host
password......5iveL!fe
password......5iveL!fe
]
]
end
end
end
db/fixtures/development/002_project.rb
0 → 100644
View file @
03e51c30
Project
.
seed
(
:id
,
[
{
:id
=>
1
,
:name
=>
"Gitlab HQ"
,
:path
=>
"gitlabhq"
,
:code
=>
"gitlabhq"
,
: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/003_users.rb
0 → 100644
View file @
03e51c30
User
.
seed
(
:id
,
[
{
:id
=>
2
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
3
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
4
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
5
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
6
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
7
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
8
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
},
{
:id
=>
9
,
:name
=>
Faker
::
Internet
.
user_name
,
:email
=>
Faker
::
Internet
.
email
}
])
db/fixtures/development/004_teams.rb
0 → 100644
View file @
03e51c30
UsersProject
.
seed
(
:id
,
[
{
:id
=>
1
,
:project_id
=>
1
,
:user_id
=>
1
},
{
:id
=>
2
,
:project_id
=>
1
,
:user_id
=>
2
},
{
:id
=>
3
,
:project_id
=>
1
,
:user_id
=>
3
},
{
:id
=>
4
,
:project_id
=>
1
,
:user_id
=>
4
},
{
:id
=>
5
,
:project_id
=>
1
,
:user_id
=>
5
},
{
:id
=>
6
,
:project_id
=>
2
,
:user_id
=>
1
},
{
:id
=>
7
,
:project_id
=>
2
,
:user_id
=>
2
},
{
:id
=>
8
,
:project_id
=>
2
,
:user_id
=>
3
},
{
:id
=>
9
,
:project_id
=>
2
,
:user_id
=>
4
},
{
:id
=>
11
,
:project_id
=>
2
,
:user_id
=>
5
},
{
:id
=>
12
,
:project_id
=>
3
,
:user_id
=>
1
},
{
:id
=>
13
,
:project_id
=>
3
,
:user_id
=>
2
},
{
:id
=>
14
,
:project_id
=>
3
,
:user_id
=>
3
},
{
:id
=>
15
,
:project_id
=>
3
,
:user_id
=>
4
},
{
:id
=>
16
,
:project_id
=>
3
,
:user_id
=>
5
}
])
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