jenkins-bot has submitted this change and it was merged.

Change subject: Correcting s/handlebars/mustache/
......................................................................


Correcting s/handlebars/mustache/

After reading T379 and the code for TemplateParser, I see that we're running
the lightncandy library in pure Mustache mode, with none of the Handlebars
extensions...  To be revisited :) ...

Bug: T95951
Change-Id: I5481926ecf3bfb6367dd1d8a34784bd3afba71a5
---
M DonationInterface.php
M astropay_gateway/astropay.adapter.php
R gateway_forms/Mustache.php
R gateway_forms/mustache/index.html.mustache
M tests/HandlebarsFormTest.php
R tests/data/mustache/currency.mustache
R tests/data/mustache/empty.mustache
R tests/data/mustache/foo.mustache
8 files changed, 11 insertions(+), 11 deletions(-)

Approvals:
  Ssmith: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DonationInterface.php b/DonationInterface.php
index 5f56ca6..a916f7e 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -118,7 +118,7 @@
 
 //load all possible form classes
 $wgAutoloadClasses['Gateway_Form'] = $donationinterface_dir . 
'gateway_forms/Form.php';
-$wgAutoloadClasses['Gateway_Form_Handlebars'] = $donationinterface_dir . 
'gateway_forms/Handlebars.php';
+$wgAutoloadClasses['Gateway_Form_Mustache'] = $donationinterface_dir . 
'gateway_forms/Mustache.php';
 $wgAutoloadClasses['Gateway_Form_RapidHtml'] = $donationinterface_dir . 
'gateway_forms/RapidHtml.php';
 $wgAutoloadClasses['CountryCodes'] = $donationinterface_dir . 
'gateway_forms/includes/CountryCodes.php';
 $wgAutoloadClasses['ProvinceAbbreviations'] = $donationinterface_dir . 
'gateway_forms/includes/ProvinceAbbreviations.php';
@@ -242,7 +242,7 @@
 /**
  * Default top-level template file.
  */
-$wgDonationInterfaceTemplate = __DIR__ . 
'/gateway_forms/handlebars/index.html.handlebars';
+$wgDonationInterfaceTemplate = __DIR__ . 
'/gateway_forms/mustache/index.html.mustache';
 
 //all of the following variables make sense to override directly,
 //or change "DonationInterface" to the gateway's id to override just for that 
gateway.
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 9557675..ea454ed 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -26,7 +26,7 @@
        const GLOBAL_PREFIX = 'wgAstropayGateway';
 
        public function getFormClass() {
-               return 'Gateway_Form_Handlebars';
+               return 'Gateway_Form_Mustache';
        }
 
        public function getCommunicationType() {
diff --git a/gateway_forms/Handlebars.php b/gateway_forms/Mustache.php
similarity index 93%
rename from gateway_forms/Handlebars.php
rename to gateway_forms/Mustache.php
index b59ae18..d0fcbcf 100644
--- a/gateway_forms/Handlebars.php
+++ b/gateway_forms/Mustache.php
@@ -1,9 +1,9 @@
 <?php
 
 /**
- * Gateway form rendering using Handlebars
+ * Gateway form rendering using Mustache
  */
-class Gateway_Form_Handlebars extends Gateway_Form {
+class Gateway_Form_Mustache extends Gateway_Form {
        /**
         * @var string Janky way to keep track of the template file path that 
will
         * be used as the main entry point for rendering.
diff --git a/gateway_forms/handlebars/index.html.handlebars 
b/gateway_forms/mustache/index.html.mustache
similarity index 100%
rename from gateway_forms/handlebars/index.html.handlebars
rename to gateway_forms/mustache/index.html.mustache
diff --git a/tests/HandlebarsFormTest.php b/tests/HandlebarsFormTest.php
index 768a765..691c2a2 100644
--- a/tests/HandlebarsFormTest.php
+++ b/tests/HandlebarsFormTest.php
@@ -21,7 +21,7 @@
  * @group DonationInterface
  * @group GatewayPage
  */
-class HandlebarsFormTest extends DonationInterfaceTestCase {
+class MustacheFormTest extends DonationInterfaceTestCase {
        protected $form;
        protected $adapter;
 
@@ -44,15 +44,15 @@
        }
 
        /**
-        * Render a few simple handlebars files and match the output
+        * Render a few simple Mustache files and match the output
         *
         * @dataProvider formCases
         */
        public function testRendering( $name, $regexp ) {
                $this->setMwGlobals( array(
-                       'wgDonationInterfaceTemplate' => __DIR__ . 
"/data/handlebars/{$name}.handlebars",
+                       'wgDonationInterfaceTemplate' => __DIR__ . 
"/data/mustache/{$name}.mustache",
                ) );
-               $this->form = new Gateway_Form_Handlebars( $this->adapter );
+               $this->form = new Gateway_Form_Mustache( $this->adapter );
                $html = $this->form->getForm();
 
                $this->assertRegExp( $regexp, $html );
@@ -64,9 +64,9 @@
         */
        public function testNoTemplateFile() {
                $this->setMwGlobals( array(
-                       'wgDonationInterfaceTemplate' => __DIR__ . 
"/data/handlebars/DONOTCREATE.handlebars",
+                       'wgDonationInterfaceTemplate' => __DIR__ . 
"/data/mustache/DONOTCREATE.mustache",
                ) );
-               $this->form = new Gateway_Form_Handlebars( $this->adapter );
+               $this->form = new Gateway_Form_Mustache( $this->adapter );
                // Suppress the error cos: we know.
                $html = @$this->form->getForm();
 
diff --git a/tests/data/handlebars/currency.handlebars 
b/tests/data/mustache/currency.mustache
similarity index 100%
rename from tests/data/handlebars/currency.handlebars
rename to tests/data/mustache/currency.mustache
diff --git a/tests/data/handlebars/empty.handlebars 
b/tests/data/mustache/empty.mustache
similarity index 100%
rename from tests/data/handlebars/empty.handlebars
rename to tests/data/mustache/empty.mustache
diff --git a/tests/data/handlebars/foo.handlebars 
b/tests/data/mustache/foo.mustache
similarity index 100%
rename from tests/data/handlebars/foo.handlebars
rename to tests/data/mustache/foo.mustache

-- 
To view, visit https://gerrit.wikimedia.org/r/204020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5481926ecf3bfb6367dd1d8a34784bd3afba71a5
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to