diff options
author | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-07 15:42:30 +0900 |
---|---|---|
committer | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-07 15:42:30 +0900 |
commit | e03a018d28488260eb6c69741680691426f823a6 (patch) | |
tree | c9118a4271405ee677852ecde239a360cd4ce1d2 /app | |
parent | 784aa266bdd38ec560c11bea92fc9b815e2ca456 (diff) | |
download | gitlab-ce-e03a018d28488260eb6c69741680691426f823a6.tar.gz |
Refactor: rename module and class names.
* Module: Graph -> Network
* Class: JsonBuilder -> Graph
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/graph_controller.rb | 2 | ||||
-rw-r--r-- | app/models/network/commit.rb (renamed from app/models/graph/commit.rb) | 2 | ||||
-rw-r--r-- | app/models/network/graph.rb (renamed from app/models/graph/json_builder.rb) | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb index d27fd039478..b4bf9565112 100644 --- a/app/controllers/graph_controller.rb +++ b/app/controllers/graph_controller.rb @@ -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 diff --git a/app/models/graph/commit.rb b/app/models/network/commit.rb index e47a543daa9..9c0a99ccd41 100644 --- a/app/models/graph/commit.rb +++ b/app/models/network/commit.rb @@ -1,6 +1,6 @@ require "grit" -module Graph +module Network class Commit include ActionView::Helpers::TagHelper diff --git a/app/models/graph/json_builder.rb b/app/models/network/graph.rb index 2e0edb8a9ca..c9ecbc910e8 100644 --- a/app/models/graph/json_builder.rb +++ b/app/models/network/graph.rb @@ -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) } |