diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/graph/commit.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/graph/json_builder.rb | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/gitlab/graph/commit.rb b/lib/gitlab/graph/commit.rb index af8d7828ce9..3d82c34432f 100644 --- a/lib/gitlab/graph/commit.rb +++ b/lib/gitlab/graph/commit.rb @@ -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 diff --git a/lib/gitlab/graph/json_builder.rb b/lib/gitlab/graph/json_builder.rb index c2c3fa662a6..a5914363393 100644 --- a/lib/gitlab/graph/json_builder.rb +++ b/lib/gitlab/graph/json_builder.rb @@ -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 - end - - def commits_json - @commits_json = @commits.map(&:to_graph_hash).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 - - protected + + protected # Get commits from repository # |