Refactor: rename module and class names.
* Module: Graph -> Network * Class: JsonBuilder -> Graph
This commit is contained in:
parent
784aa266bd
commit
e03a018d28
5 changed files with 13 additions and 13 deletions
|
@ -22,7 +22,7 @@ class GraphController < ProjectResourceController
|
|||
format.html
|
||||
|
||||
format.json do
|
||||
@graph = Graph::JsonBuilder.new(project, @ref, @commit)
|
||||
@graph = Network::Graph.new(project, @ref, @commit)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "grit"
|
||||
|
||||
module Graph
|
||||
module Network
|
||||
class Commit
|
||||
include ActionView::Helpers::TagHelper
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
require "grit"
|
||||
|
||||
module Graph
|
||||
class JsonBuilder
|
||||
module Network
|
||||
class Graph
|
||||
attr_accessor :days, :commits, :ref_cache, :repo
|
||||
|
||||
def self.max_count
|
||||
|
@ -19,7 +19,7 @@ module Graph
|
|||
@days = index_commits
|
||||
end
|
||||
|
||||
protected
|
||||
protected
|
||||
|
||||
# Get commits from repository
|
||||
#
|
||||
|
@ -30,8 +30,8 @@ module Graph
|
|||
# Decorate with app/models/commit.rb
|
||||
@commits.map! { |commit| Commit.new(commit) }
|
||||
|
||||
# Decorate with lib/gitlab/graph/commit.rb
|
||||
@commits.map! { |commit| Graph::Commit.new(commit) }
|
||||
# Decorate with app/model/network/commit.rb
|
||||
@commits.map! { |commit| Network::Commit.new(commit) }
|
||||
|
||||
# add refs to each commit
|
||||
@commits.each { |commit| commit.add_refs(ref_cache, repo) }
|
Loading…
Add table
Add a link
Reference in a new issue