diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-17 12:44:02 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-17 12:44:02 -0700 |
commit | 282904592f1e0e4f98ddeb1a829a1b900cf63451 (patch) | |
tree | 3a48182d7b9ba8b3c1d59c8c0e06e429d329bc15 /config | |
parent | 11dd390c116f163a2e8a46af83e0d1bb194fb1f7 (diff) | |
parent | 2f16eab03d8af372ae8461de5abf91b480ffd761 (diff) | |
download | gitlab-ce-282904592f1e0e4f98ddeb1a829a1b900cf63451.tar.gz |
Merge branch 'master' into sh-support-bitbucket-server-import
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 2 | ||||
-rw-r--r-- | config/initializers/action_mailer_hooks.rb | 12 | ||||
-rw-r--r-- | config/initializers/additional_headers_interceptor.rb | 1 | ||||
-rw-r--r-- | config/initializers/disable_email_interceptor.rb | 5 | ||||
-rw-r--r-- | config/initializers/email_template_interceptor.rb | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 693a2934a1b..4b9cc59ec45 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -135,7 +135,7 @@ Settings.gitlab['signup_enabled'] ||= true if Settings.gitlab['signup_enabled']. Settings.gitlab['signin_enabled'] ||= true if Settings.gitlab['signin_enabled'].nil? Settings.gitlab['restricted_visibility_levels'] = Settings.__send__(:verify_constant_array, Gitlab::VisibilityLevel, Settings.gitlab['restricted_visibility_levels'], []) Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? -Settings.gitlab['issue_closing_pattern'] = '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)|[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?: *,? +and +| *, *)?)|([A-Z][A-Z0-9_]+-\d+))+)' if Settings.gitlab['issue_closing_pattern'].nil? +Settings.gitlab['issue_closing_pattern'] = '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)|[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?: *,? +and +| *,? *)?)|([A-Z][A-Z0-9_]+-\d+))+)' if Settings.gitlab['issue_closing_pattern'].nil? Settings.gitlab['default_projects_features'] ||= {} Settings.gitlab['webhook_timeout'] ||= 10 Settings.gitlab['max_attachment_size'] ||= 10 diff --git a/config/initializers/action_mailer_hooks.rb b/config/initializers/action_mailer_hooks.rb new file mode 100644 index 00000000000..f1b3c1f8ae8 --- /dev/null +++ b/config/initializers/action_mailer_hooks.rb @@ -0,0 +1,12 @@ +unless Gitlab.config.gitlab.email_enabled + ActionMailer::Base.register_interceptor(::Gitlab::Email::Hook::DisableEmailInterceptor) + ActionMailer::Base.logger = nil +end + +ActionMailer::Base.register_interceptors( + ::Gitlab::Email::Hook::AdditionalHeadersInterceptor, + ::Gitlab::Email::Hook::EmailTemplateInterceptor, + ::Gitlab::Email::Hook::DeliveryMetricsObserver +) + +ActionMailer::Base.register_observer(::Gitlab::Email::Hook::DeliveryMetricsObserver) diff --git a/config/initializers/additional_headers_interceptor.rb b/config/initializers/additional_headers_interceptor.rb deleted file mode 100644 index b9159e7c06c..00000000000 --- a/config/initializers/additional_headers_interceptor.rb +++ /dev/null @@ -1 +0,0 @@ -ActionMailer::Base.register_interceptor(AdditionalEmailHeadersInterceptor) diff --git a/config/initializers/disable_email_interceptor.rb b/config/initializers/disable_email_interceptor.rb deleted file mode 100644 index e8770c8d460..00000000000 --- a/config/initializers/disable_email_interceptor.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Interceptor in lib/disable_email_interceptor.rb -unless Gitlab.config.gitlab.email_enabled - ActionMailer::Base.register_interceptor(DisableEmailInterceptor) - ActionMailer::Base.logger = nil -end diff --git a/config/initializers/email_template_interceptor.rb b/config/initializers/email_template_interceptor.rb deleted file mode 100644 index f195ca9bcd6..00000000000 --- a/config/initializers/email_template_interceptor.rb +++ /dev/null @@ -1,2 +0,0 @@ -# Interceptor in lib/email_template_interceptor.rb -ActionMailer::Base.register_interceptor(EmailTemplateInterceptor) |