Commit f039e8e0 authored by Douwe Maan's avatar Douwe Maan

Don't use required keyword arguments to maintain support for Ruby 2.0.

parent 2953e0d1
...@@ -16,13 +16,17 @@ module Emails ...@@ -16,13 +16,17 @@ module Emails
subject: subject("Project was moved")) subject: subject("Project was moved"))
end end
def repository_push_email(project_id, recipient, author_id:, def repository_push_email(project_id, recipient, author_id: nil,
ref:, ref: nil,
action:, action: nil,
compare: nil, compare: nil,
reverse_compare: false, reverse_compare: false,
send_from_committer_email: false, send_from_committer_email: false,
disable_diffs: false) disable_diffs: false)
unless author_id && ref && action
raise ArgumentError, "missing keywords: author_id, ref, action"
end
@project = Project.find(project_id) @project = Project.find(project_id)
@author = User.find(author_id) @author = User.find(author_id)
@reverse_compare = reverse_compare @reverse_compare = reverse_compare
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment