From 6afd69f4445cc0688aa1695389eb3f79033e3121 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 26 Aug 2015 17:47:18 -0700 Subject: Update gitignore, change literal DB table names, fix errors, fix fontawesome --- lib/ci/charts.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ci') diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb index e50a7a59c27..915a4f526a6 100644 --- a/lib/ci/charts.rb +++ b/lib/ci/charts.rb @@ -17,10 +17,10 @@ module Ci def push(from, to, format) @labels << from.strftime(format) @total << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?", to, from). count(:all) @success << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?", to, from). success.count(:all) end end @@ -60,7 +60,7 @@ module Ci class BuildTime < Chart def collect - commits = project.commits.joins(:builds).where('builds.finished_at is NOT NULL AND builds.started_at is NOT NULL').last(30) + commits = project.commits.joins(:builds).where("#{Ci::Build.table_name}.finished_at is NOT NULL AND #{Ci::Build.table_name}.started_at is NOT NULL").last(30) commits.each do |commit| @labels << commit.short_sha @build_times << (commit.duration / 60) -- cgit v1.2.1