From a3c70df9353a16ff69be082ad3f64f6e773b54a6 Mon Sep 17 00:00:00 2001 From: Lobster Date: Tue, 22 Oct 2019 13:12:28 +0200 Subject: [PATCH] Change patch method visibility --- lib/redmine_zulip/issue_patch.rb | 8 ++++---- lib/redmine_zulip/settings.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/redmine_zulip/issue_patch.rb b/lib/redmine_zulip/issue_patch.rb index 521227c..6c21354 100644 --- a/lib/redmine_zulip/issue_patch.rb +++ b/lib/redmine_zulip/issue_patch.rb @@ -95,6 +95,10 @@ def subject_without_punctuation subject.end_with?(".") ? subject[0..-1] : subject end + def zulip_settings + @_zulip_settings ||= RedmineZulip::Settings.new(self) + end + private def zulip_api @@ -105,10 +109,6 @@ def zulip_api ) end - def zulip_settings - @_zulip_settings ||= RedmineZulip::Settings.new(self) - end - def notify_assignment locale = assigned_to.language message = I18n.t("zulip_notify_assignment", { diff --git a/lib/redmine_zulip/settings.rb b/lib/redmine_zulip/settings.rb index 20daf12..c42507c 100644 --- a/lib/redmine_zulip/settings.rb +++ b/lib/redmine_zulip/settings.rb @@ -51,7 +51,7 @@ def version_updates_subject private def evaluate_expression(expression) - return nil if pattern.nil? + return nil if expression.nil? expression.gsub("${issue_id}", "#{@issue.id}") .gsub("${issue_subject}", @issue.subject_without_punctuation) .gsub("${project_name}", @issue.project.name)