From b9a902bb041baaafcd926c6aa6adf26e055526e7 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 24 Jul 2015 23:09:28 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index fc05b082d..ada42e1f2 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -729,7 +729,7 @@ update :scale_integers => true, :show_data_values => true, :rotate_y_labels => false, - :graph_title => l(:label_author_commits_six_month), + :graph_title => l(:label_author_code_six_month), :show_graph_title => true ) graph.add_data( From 0a1afd7c450cb80dbd77ef9bd4968a234b5589c3 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 24 Jul 2015 23:25:56 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index ada42e1f2..bc3c0af02 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -711,6 +711,8 @@ update end all_author = all_author.collect {|c| c.gsub(%r{<.+@.+>}, '') } commits_by_author = repository.commits(all_author, @date_from, @date_to) + logger.info "start******************************************************************" + commits_by_author + logger.info "end**************************************************************8" fields = commits_by_author.collect {|r| r.first} commits_data = commits_by_author.collect {|r| r.last} @@ -719,7 +721,7 @@ update commits_data = commits_data + [0]*(10 - commits_data.length) if commits_data.length<10 # Remove email adress in usernames - fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') } + # fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') } graph = SVG::Graph::BarHorizontal.new( :height => 400, From 6aa332d1f66fda984da852a7ce54d9ca5222c27e Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 24 Jul 2015 23:36:24 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=B0=83=E8=AF=95=E3=80=81=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index bc3c0af02..d15b581f6 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -711,8 +711,7 @@ update end all_author = all_author.collect {|c| c.gsub(%r{<.+@.+>}, '') } commits_by_author = repository.commits(all_author, @date_from, @date_to) - logger.info "start******************************************************************" + commits_by_author - logger.info "end**************************************************************8" + Rails.logger.debug "######################################{commits_by_author}" fields = commits_by_author.collect {|r| r.first} commits_data = commits_by_author.collect {|r| r.last} @@ -721,7 +720,7 @@ update commits_data = commits_data + [0]*(10 - commits_data.length) if commits_data.length<10 # Remove email adress in usernames - # fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') } + fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') } graph = SVG::Graph::BarHorizontal.new( :height => 400, From c339e9071bf91752cc2ead3dcaa07956830abf00 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 24 Jul 2015 23:55:13 +0800 Subject: [PATCH 4/6] =?UTF-8?q?date=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E6=88=90string=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index d15b581f6..03ab9d2e3 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -710,7 +710,7 @@ update all_author << cba.first end all_author = all_author.collect {|c| c.gsub(%r{<.+@.+>}, '') } - commits_by_author = repository.commits(all_author, @date_from, @date_to) + commits_by_author = repository.commits(all_author, "#{@date_from}", "#{@date_to}") Rails.logger.debug "######################################{commits_by_author}" fields = commits_by_author.collect {|r| r.first} From 088e9b200a8e1b44759e97ad7b116f4bf071f1e9 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 25 Jul 2015 00:05:28 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8C=BA=E9=97=B4?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 03ab9d2e3..e59d90052 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -710,7 +710,7 @@ update all_author << cba.first end all_author = all_author.collect {|c| c.gsub(%r{<.+@.+>}, '') } - commits_by_author = repository.commits(all_author, "#{@date_from}", "#{@date_to}") + commits_by_author = repository.commits(all_author, "2015-01-24", "2015-07-24") Rails.logger.debug "######################################{commits_by_author}" fields = commits_by_author.collect {|r| r.first} From a04fe786ea246b10769f2da61a2d813e94e394d1 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 25 Jul 2015 00:24:59 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E5=90=8E=E7=9A=84=E7=A9=BA=E6=A0=BC=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=8C=BA=E9=97=B4=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index e59d90052..3dee2af3e 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -709,7 +709,8 @@ update commits_by_author.each do |cba| all_author << cba.first end - all_author = all_author.collect {|c| c.gsub(%r{<.+@.+>}, '') } + # all_author = all_author.collect {|c| c.gsub(%r{/ /<.+@.+>}, '') } + all_author = all_author.collect {|c| c.split.first } commits_by_author = repository.commits(all_author, "2015-01-24", "2015-07-24") Rails.logger.debug "######################################{commits_by_author}"