summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-27 11:38:29 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-27 11:38:29 +0300
commit2cbdfbfd1edd251fdeab0e238552175644fe18d1 (patch)
treefa98080e8ac6aac1acaa94bc62275d52a7cca1a9 /lib
parent817d93e8607c77e5f6a521f708addb3997d412f8 (diff)
parent38e2ae5ae0a8e0ca5baefbd0ffc41cc11eba2db1 (diff)
downloadgitlab-ce-2cbdfbfd1edd251fdeab0e238552175644fe18d1.tar.gz
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Diffstat (limited to 'lib')
-rw-r--r--lib/api/system_hooks.rb2
-rw-r--r--lib/gitlab/contributions_calendar.rb2
-rw-r--r--lib/tasks/gitlab/check.rake3
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb
index 518964db50d..22b8f90dc5c 100644
--- a/lib/api/system_hooks.rb
+++ b/lib/api/system_hooks.rb
@@ -47,7 +47,7 @@ module API
owner_name: "Someone",
owner_email: "example@gitlabhq.com"
}
- @hook.execute(data)
+ @hook.execute(data, 'system_hooks')
data
end
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb
index 3fd0823df06..45bb904ed7a 100644
--- a/lib/gitlab/contributions_calendar.rb
+++ b/lib/gitlab/contributions_calendar.rb
@@ -17,7 +17,7 @@ module Gitlab
events = Event.reorder(nil).contributions.where(author_id: user.id).
where("created_at > ?", date_from).where(project_id: projects).
group('date(created_at)').
- select('date(created_at), count(id) as total_amount').
+ select('date(created_at) as date, count(id) as total_amount').
map(&:attributes)
dates = (1.year.ago.to_date..(Date.today + 1.day)).to_a
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 04a2eb12db0..1a6303b6c82 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -282,7 +282,8 @@ namespace :gitlab do
def check_redis_version
print "Redis version >= 2.0.0? ... "
- if run_and_match(%W(redis-cli --version), /redis-cli 2.\d.\d/)
+ redis_version = run(%W(redis-cli --version))
+ if redis_version.try(:match, /redis-cli 2.\d.\d/) || redis_version.try(:match, /redis-cli 3.\d.\d/)
puts "yes".green
else
puts "no".red