diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-23 20:47:17 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-23 20:47:17 +0000 |
commit | 17192d1bb31eb04d01569f815595632b8cf14ba8 (patch) | |
tree | 0d70398e050342d8f1036cb07fd2f62d597b8c0b | |
parent | 2953e0d19b46a937ee9d84139adbc263c8e89757 (diff) | |
parent | 8a7b4eeb0e547251e97b7fd466de009dcbd7fe37 (diff) | |
download | gitlab-ce-17192d1bb31eb04d01569f815595632b8cf14ba8.tar.gz |
Merge branch 'keyword-args-2.0' into 'master'
Don't use required keyword arguments to maintain support for Ruby 2.0.
See merge request !433
-rw-r--r-- | Gemfile.lock | 2 | ||||
-rw-r--r-- | app/mailers/emails/projects.rb | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 4f1cab43dd5..513e2c643e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,7 +188,7 @@ GEM dotenv (>= 0.7) thor (>= 0.13.6) formatador (0.2.4) - gemnasium-gitlab-service (0.2.5) + gemnasium-gitlab-service (0.2.4) rugged (~> 0.21) gemojione (2.0.0) json diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index 48458baa674..3cd812825e2 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -16,13 +16,17 @@ module Emails subject: subject("Project was moved")) end - def repository_push_email(project_id, recipient, author_id:, - ref:, - action:, + def repository_push_email(project_id, recipient, author_id: nil, + ref: nil, + action: nil, compare: nil, reverse_compare: false, send_from_committer_email: false, disable_diffs: false) + unless author_id && ref && action + raise ArgumentError, "missing keywords: author_id, ref, action" + end + @project = Project.find(project_id) @author = User.find(author_id) @reverse_compare = reverse_compare |