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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
cc4b638c
Commit
cc4b638c
authored
Aug 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set iid in fixtures. Add rake dev:setup for development
parent
b5593683
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
0 deletions
+25
-0
db/fixtures/development/07_milestones.rb
db/fixtures/development/07_milestones.rb
+5
-0
db/fixtures/development/09_issues.rb
db/fixtures/development/09_issues.rb
+5
-0
db/fixtures/development/10_merge_requests.rb
db/fixtures/development/10_merge_requests.rb
+5
-0
lib/tasks/dev.rake
lib/tasks/dev.rake
+10
-0
No files found.
db/fixtures/development/07_milestones.rb
View file @
cc4b638c
...
@@ -11,3 +11,8 @@ Milestone.seed(:id, [
...
@@ -11,3 +11,8 @@ Milestone.seed(:id, [
{
id:
9
,
project_id:
3
,
title:
'v'
+
Faker
::
Address
.
zip_code
},
{
id:
9
,
project_id:
3
,
title:
'v'
+
Faker
::
Address
.
zip_code
},
{
id:
11
,
project_id:
3
,
title:
'v'
+
Faker
::
Address
.
zip_code
},
{
id:
11
,
project_id:
3
,
title:
'v'
+
Faker
::
Address
.
zip_code
},
])
])
Milestone
.
all
.
map
do
|
ml
|
ml
.
set_iid
ml
.
save
end
db/fixtures/development/09_issues.rb
View file @
cc4b638c
...
@@ -24,4 +24,9 @@ Gitlab::Seeder.quiet do
...
@@ -24,4 +24,9 @@ Gitlab::Seeder.quiet do
}])
}])
print
(
'.'
)
print
(
'.'
)
end
end
Issue
.
all
.
map
do
|
issue
|
issue
.
set_iid
issue
.
save
end
end
end
db/fixtures/development/10_merge_requests.rb
View file @
cc4b638c
...
@@ -34,6 +34,11 @@ Gitlab::Seeder.quiet do
...
@@ -34,6 +34,11 @@ Gitlab::Seeder.quiet do
end
end
end
end
MergeRequest
.
all
.
map
do
|
mr
|
mr
.
set_iid
mr
.
save
end
puts
'Load diffs for Merge Requests (it will take some time)...'
puts
'Load diffs for Merge Requests (it will take some time)...'
MergeRequest
.
all
.
each
do
|
mr
|
MergeRequest
.
all
.
each
do
|
mr
|
mr
.
reload_code
mr
.
reload_code
...
...
lib/tasks/dev.rake
0 → 100644
View file @
cc4b638c
namespace
:dev
do
desc
"GITLAB | Setup developer environment (db, fixtures)"
task
:setup
=>
:environment
do
ENV
[
'force'
]
=
'yes'
Rake
::
Task
[
"db:setup"
].
invoke
Rake
::
Task
[
"db:seed_fu"
].
invoke
Rake
::
Task
[
"gitlab:shell:setup"
].
invoke
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