BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d8a40d8c
Commit
d8a40d8c
authored
Feb 26, 2013
by
Sato Hiroyuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move graph module from lib or vendor directory to app directory.
Because not autoloading lib directory at development mode.
parent
c9b1df12
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
11 deletions
+5
-11
branch-graph.js
app/assets/javascripts/branch-graph.js
+0
-0
graph_controller.rb
app/controllers/graph_controller.rb
+1
-1
projects_controller.rb
app/controllers/projects_controller.rb
+0
-2
commit.rb
app/models/graph/commit.rb
+1
-3
json_builder.rb
app/models/graph/json_builder.rb
+3
-5
No files found.
vendor
/assets/javascripts/branch-graph.js
→
app
/assets/javascripts/branch-graph.js
View file @
d8a40d8c
File moved
app/controllers/graph_controller.rb
View file @
d8a40d8c
...
...
@@ -20,7 +20,7 @@ class GraphController < ProjectResourceController
respond_to
do
|
format
|
format
.
html
format
.
json
do
graph
=
G
itlab
::
G
raph
::
JsonBuilder
.
new
(
project
,
@ref
,
@commit
)
graph
=
Graph
::
JsonBuilder
.
new
(
project
,
@ref
,
@commit
)
render
:json
=>
graph
.
to_json
end
end
...
...
app/controllers/projects_controller.rb
View file @
d8a40d8c
require
Rails
.
root
.
join
(
'lib'
,
'gitlab'
,
'graph'
,
'json_builder'
)
class
ProjectsController
<
ProjectResourceController
skip_before_filter
:project
,
only:
[
:new
,
:create
]
skip_before_filter
:repository
,
only:
[
:new
,
:create
]
...
...
lib/gitlab
/graph/commit.rb
→
app/models
/graph/commit.rb
View file @
d8a40d8c
require
"grit"
module
Gitlab
module
Graph
module
Graph
class
Commit
include
ActionView
::
Helpers
::
TagHelper
...
...
@@ -48,5 +47,4 @@ module Gitlab
@refs
||=
[]
end
end
end
end
lib/gitlab
/graph/json_builder.rb
→
app/models
/graph/json_builder.rb
View file @
d8a40d8c
require
"grit"
module
Gitlab
module
Graph
module
Graph
class
JsonBuilder
attr_accessor
:days
,
:commits
,
:ref_cache
,
:repo
...
...
@@ -36,10 +35,10 @@ module Gitlab
@commits
=
Grit
::
Commit
.
find_all
(
repo
,
nil
,
{
topo_order:
true
,
max_count:
self
.
class
.
max_count
,
skip:
to_commit
}).
dup
# Decorate with app/models/commit.rb
@commits
.
map!
{
|
commit
|
::
Commit
.
new
(
commit
)
}
@commits
.
map!
{
|
commit
|
Commit
.
new
(
commit
)
}
# Decorate with lib/gitlab/graph/commit.rb
@commits
.
map!
{
|
commit
|
Gitlab
::
Graph
::
Commit
.
new
(
commit
)
}
@commits
.
map!
{
|
commit
|
Graph
::
Commit
.
new
(
commit
)
}
# add refs to each commit
@commits
.
each
{
|
commit
|
commit
.
add_refs
(
ref_cache
,
repo
)
}
...
...
@@ -264,5 +263,4 @@ module Gitlab
end
end
end
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