Use module_function in Banzai::Renderer

Using `extend self` prevents GitLab Performance Monitoring from being
able to track class methods.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23347
This commit is contained in:
Yorick Peterse 2016-10-14 14:34:31 +02:00
parent fd2b79b664
commit c5bf8e362c
No known key found for this signature in database
GPG key ID: EDD30D2BEB691AC9
2 changed files with 2 additions and 3 deletions

View file

@ -14,6 +14,7 @@ v 8.13.0 (unreleased)
- Add an example for testing a phoenix application with Gitlab CI in the docs (Manthan Mallikarjun)
- Updating verbiage on git basics to be more intuitive
- Clarify documentation for Runners API (Gennady Trafimenkov)
- The instrumentation for Banzai::Renderer has been restored
- Change user & group landing page routing from /u/:username to /:username
- Prevent running GfmAutocomplete setup for each diff note !6569
- Added documentation for .gitattributes files

View file

@ -1,6 +1,6 @@
module Banzai
module Renderer
extend self
module_function
# Convert a Markdown String into an HTML-safe String of HTML
#
@ -141,8 +141,6 @@ module Banzai
end.html_safe
end
private
def cacheless_render(text, context = {})
Gitlab::Metrics.measure(:banzai_cacheless_render) do
result = render_result(text, context)