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
iv
gitlab-ce
Commits
36dbac2f
Commit
36dbac2f
authored
Oct 30, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More seeds
parent
e4cf99db
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
65 deletions
+49
-65
app/views/milestones/_milestone.html.haml
app/views/milestones/_milestone.html.haml
+9
-8
db/fixtures/development/005_issues.rb
db/fixtures/development/005_issues.rb
+0
-40
db/fixtures/development/005_milestones.rb
db/fixtures/development/005_milestones.rb
+0
-0
db/fixtures/development/007_issues.rb
db/fixtures/development/007_issues.rb
+20
-0
db/fixtures/development/008_merge_requests.rb
db/fixtures/development/008_merge_requests.rb
+20
-17
No files found.
app/views/milestones/_milestone.html.haml
View file @
36dbac2f
...
...
@@ -9,13 +9,14 @@
%small
=
milestone
.
expires_at
.row
.progress.progress-info.span4
.bar
{
style:
"width: #{milestone.percent_complete}%;"
}
.span4
.progress.progress-info
.bar
{
style:
"width: #{milestone.percent_complete}%;"
}
.span6
-
if
milestone
.
issues
.
any?
=
link_to
project_issues_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
issues
.
count
,
'Issue'
=
link_to
project_issues_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
issues
.
count
,
'Issue'
-
if
milestone
.
merge_requests
.
any?
=
link_to
project_merge_requests_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
merge_requests
.
count
,
'Merge Request'
=
link_to
project_merge_requests_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
merge_requests
.
count
,
'Merge Request'
%span
.light
#{
milestone
.
percent_complete
}
% complete
db/fixtures/development/005_issues.rb
deleted
100644 → 0
View file @
e4cf99db
Issue
.
seed
(
:id
,
[
{
:id
=>
1
,
:project_id
=>
1
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
2
,
:project_id
=>
1
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
3
,
:project_id
=>
1
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
4
,
:project_id
=>
1
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
5
,
:project_id
=>
1
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
6
,
:project_id
=>
2
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
7
,
:project_id
=>
2
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
8
,
:project_id
=>
2
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
9
,
:project_id
=>
2
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
11
,
:project_id
=>
2
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
12
,
:project_id
=>
3
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
13
,
:project_id
=>
3
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
14
,
:project_id
=>
3
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
15
,
:project_id
=>
3
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
16
,
:project_id
=>
3
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
21
,
:project_id
=>
1
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
22
,
:project_id
=>
1
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
23
,
:project_id
=>
1
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
24
,
:project_id
=>
1
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
25
,
:project_id
=>
1
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
26
,
:project_id
=>
2
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
27
,
:project_id
=>
2
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
28
,
:project_id
=>
2
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
29
,
:project_id
=>
2
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
30
,
:project_id
=>
2
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
32
,
:project_id
=>
3
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
33
,
:project_id
=>
3
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
34
,
:project_id
=>
3
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
35
,
:project_id
=>
3
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
36
,
:project_id
=>
3
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)}
])
db/fixtures/development/00
7
_milestones.rb
→
db/fixtures/development/00
5
_milestones.rb
View file @
36dbac2f
File moved
db/fixtures/development/007_issues.rb
0 → 100644
View file @
36dbac2f
(
1
..
300
).
each
do
|
i
|
# Random Project
project_id
=
rand
(
2
)
+
1
project
=
Project
.
find
(
project_id
)
# Random user
user
=
project
.
users
.
sample
user_id
=
user
.
id
IssueObserver
.
current_user
=
user
Issue
.
seed
(
:id
,
[{
id:
i
,
project_id:
project_id
,
author_id:
user_id
,
assignee_id:
user_id
,
closed:
[
true
,
false
].
sample
,
milestone:
project
.
milestones
.
sample
,
title:
Faker
::
Lorem
.
sentence
(
6
)
}])
end
db/fixtures/development/008_merge_requests.rb
View file @
36dbac2f
MergeRequest
.
seed
(
:id
,
[
{
:id
=>
1
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
1
,
assignee_id:
1
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
2
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
2
,
assignee_id:
2
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
3
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
3
,
assignee_id:
3
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
4
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
4
,
assignee_id:
4
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
5
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
5
,
assignee_id:
5
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
(
1
..
300
).
each
do
|
i
|
# Random Project
project_id
=
rand
(
2
)
+
1
project
=
Project
.
find
(
project_id
)
{
:id
=>
6
,
milestone_id:
5
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
1
,
assignee_id:
1
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
7
,
milestone_id:
6
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
2
,
assignee_id:
2
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
8
,
milestone_id:
6
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
3
,
assignee_id:
3
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
9
,
milestone_id:
6
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
4
,
assignee_id:
4
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
11
,
milestone_id:
5
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
5
,
assignee_id:
5
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
# Random user
user
=
project
.
users
.
sample
user_id
=
user
.
id
MergeRequestObserver
.
current_user
=
user
{
:id
=>
12
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
1
,
assignee_id:
1
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
13
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
2
,
assignee_id:
2
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
14
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
3
,
assignee_id:
3
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
15
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
4
,
assignee_id:
4
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
16
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
5
,
assignee_id:
5
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
])
MergeRequest
.
seed
(
:id
,
[{
id:
i
,
source_branch:
'master'
,
target_branch:
'feature'
,
project_id:
project_id
,
author_id:
user_id
,
assignee_id:
user_id
,
closed:
[
true
,
false
].
sample
,
milestone:
project
.
milestones
.
sample
,
title:
Faker
::
Lorem
.
sentence
(
6
)
}])
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