lib/application/application.rb in git-visualiser-0.0.5 vs lib/application/application.rb in git-visualiser-0.0.6
- old
+ new
@@ -44,14 +44,13 @@
end
get '/author_stats.json' do
ref = params[:ref]
- @authors = Visualisation.branch_author_stats(ref)
- @authors = @authors.slice(0, 3) #show a max of 3 authors
-
- haml :'/authors_list' if @authors.length > 0
+ authors = Visualisation.branch_author_stats(ref)
+ content_type :json
+ authors.to_json
end
get '/commits.json' do
ref = params[:ref]
commits = Visualisation.commits_for_branch(ref)
@@ -65,18 +64,10 @@
file_diff_stats = Visualisation.merge_base_file_stats(ref)
content_type :json
file_diff_stats.to_json
end
-
- helpers do
-
- def gravatar_image(email)
- hash = Digest::MD5.hexdigest(email).to_s
- "<img src=\"http://www.gravatar.com/avatar/#{hash}?s=48\" />"
- end
-
- end
+
end
puts "Running GitVisualiser"
GitVisualiser.run!