File obs-server-2.10-0124-Pass-source-to-Nokogiri-template-handler.patch of Package obs-server

From eecdee804f25b70051857b81fa0fce3bd1b77352 Mon Sep 17 00:00:00 2001
From: Dany Marcoux <dmarcoux@posteo.de>
Date: Wed, 13 Jan 2021 16:57:35 +0100
Subject: [PATCH] Pass source to Nokogiri template handler

To follow changes in other template handlers from Rails upstream
https://github.com/rails/rails/commit/28f88e0074f473f58c2d3fd54cb3daff81027c12

This fixes the following error happening in specs:

ActionView::Template::Error:
  wrong number of arguments (given 2, expected 1)
./config/initializers/nokogiri_builder.rb:10:in `call'
---
 src/api/config/initializers/nokogiri_builder.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/api/config/initializers/nokogiri_builder.rb b/src/api/config/initializers/nokogiri_builder.rb
index 5f4083d599..fabb46c93b 100644
--- a/src/api/config/initializers/nokogiri_builder.rb
+++ b/src/api/config/initializers/nokogiri_builder.rb
@@ -7,9 +7,9 @@ module ActionView
       class_attribute :default_format
       self.default_format = Mime[:xml]
 
-      def call(template)
+      def call(_template, source)
         'xml = ::Nokogiri::XML::Builder.new { |xml|' +
-          template.source +
+          source +
           "}.to_xml(:indent => 2, :encoding => 'UTF-8',
             :save_with => Nokogiri::XML::Node::SaveOptions::NO_DECLARATION | Nokogiri::XML::Node::SaveOptions::FORMAT).gsub('&#13;', '\r')"
       end
-- 
2.31.1