Merge branch 'gh-issue-1509' of https://github.com/koenpunt/gitlabhq into koenpunt-gh-issue-1509

Conflicts:
	vendor/assets/javascripts/branch-graph.js
This commit is contained in:
Dmitriy Zaporozhets 2012-12-21 13:07:34 +02:00
commit a47032bc29
8 changed files with 276 additions and 201 deletions

View file

@ -28,7 +28,7 @@ module Gitlab
h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil?
h[:id] = sha
h[:date] = date
h[:message] = escape_once(message)
h[:message] = message
h[:login] = author.email
h
end

View file

@ -17,16 +17,15 @@ module Gitlab
@commits = collect_commits
@days = index_commits
end
def days_json
@days_json = @days.compact.map { |d| [d.day, d.strftime("%b")] }.to_json
def to_json(*args)
{
days: @days.compact.map { |d| [d.day, d.strftime("%b")] },
commits: @commits.map(&:to_graph_hash)
}.to_json(*args)
end
def commits_json
@commits_json = @commits.map(&:to_graph_hash).to_json
end
protected
protected
# Get commits from repository
#