summaryrefslogtreecommitdiff
path: root/app/models/graph/commit.rb
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-03-07 15:42:30 +0900
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-03-07 15:42:30 +0900
commite03a018d28488260eb6c69741680691426f823a6 (patch)
treec9118a4271405ee677852ecde239a360cd4ce1d2 /app/models/graph/commit.rb
parent784aa266bdd38ec560c11bea92fc9b815e2ca456 (diff)
downloadgitlab-ce-e03a018d28488260eb6c69741680691426f823a6.tar.gz
Refactor: rename module and class names.
* Module: Graph -> Network * Class: JsonBuilder -> Graph
Diffstat (limited to 'app/models/graph/commit.rb')
-rw-r--r--app/models/graph/commit.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/app/models/graph/commit.rb b/app/models/graph/commit.rb
deleted file mode 100644
index e47a543daa9..00000000000
--- a/app/models/graph/commit.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require "grit"
-
-module Graph
- class Commit
- include ActionView::Helpers::TagHelper
-
- attr_accessor :time, :spaces, :refs, :parent_spaces
-
- def initialize(commit)
- @_commit = commit
- @time = -1
- @spaces = []
- @parent_spaces = []
- end
-
- def method_missing(m, *args, &block)
- @_commit.send(m, *args, &block)
- end
-
- def add_refs(ref_cache, repo)
- if ref_cache.empty?
- repo.refs.each do |ref|
- ref_cache[ref.commit.id] ||= []
- ref_cache[ref.commit.id] << ref
- end
- end
- @refs = ref_cache[@_commit.id] if ref_cache.include?(@_commit.id)
- @refs ||= []
- end
-
- def space
- if @spaces.size > 0
- @spaces.first
- else
- 0
- end
- end
- end
-end