diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2019-04-01 08:55:52 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-01 08:55:52 +0000 |
commit | 0a6478d159cc7ff5d3877780cf30a061ebaf4dac (patch) | |
tree | 12db6fd13fd735b20a83892c68454f2896848a12 /config/initializers | |
parent | 093629fedc43e8b481c6626765e3fcf0603add17 (diff) | |
download | gitlab-ce-0a6478d159cc7ff5d3877780cf30a061ebaf4dac.tar.gz |
Load 'Gitlab::Jira::Middleware' if it exists
Loads 'Gitlab::Jira::Middleware' only if it exists
so this initializer can be backported to CE.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/jira.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/jira.rb b/config/initializers/jira.rb new file mode 100644 index 00000000000..05f784a6a2a --- /dev/null +++ b/config/initializers/jira.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +# Changes JIRA DVCS user agent requests in order to be successfully handled +# by our API. +# +# Gitlab::Jira::Middleware is only defined on EE +# +# Use safe_constantize because the class may exist but has not been loaded yet +if "Gitlab::Jira::Middleware".safe_constantize + Rails.application.config.middleware.use(Gitlab::Jira::Middleware) +end |