Adrian Lang has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201165

Change subject: Move wikibase.ValueViewBuilder from repo/ to view/
......................................................................

Move wikibase.ValueViewBuilder from repo/ to view/

Change-Id: Ie2f657c5be266f9d3c06bf5fdc91217286ac6304
---
M repo/resources/Resources.php
M repo/tests/qunit/resources.php
M view/resources/resources.php
A view/resources/wikibase/resources.php
R view/resources/wikibase/wikibase.ValueViewBuilder.js
M view/tests/qunit/resources.php
A view/tests/qunit/wikibase/resources.php
R view/tests/qunit/wikibase/wikibase.ValueViewBuilder.tests.js
8 files changed, 66 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/65/201165/1

diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index f663345..b8caa9a 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -82,16 +82,6 @@
                        'scripts' => 'templates.js',
                ),
 
-               'wikibase.ValueViewBuilder' => $moduleTemplate + array(
-                       'scripts' => array(
-                               'wikibase.ValueViewBuilder.js',
-                       ),
-                       'dependencies' => array(
-                               'wikibase',
-                               'jquery.valueview',
-                       ),
-               ),
-
                'wikibase.ui.entityViewInit' => $moduleTemplate + array(
                        'scripts' => array(
                                'wikibase.ui.entityViewInit.js' // should 
probably be adjusted for more modularity
diff --git a/repo/tests/qunit/resources.php b/repo/tests/qunit/resources.php
index 62b8e17..df5caa1 100644
--- a/repo/tests/qunit/resources.php
+++ b/repo/tests/qunit/resources.php
@@ -74,16 +74,6 @@
                        )
                ),
 
-               'wikibase.ValueViewBuilder.tests' => $moduleBase + array(
-                       'scripts' => array(
-                               'wikibase.ValueViewBuilder.tests.js'
-                       ),
-                       'dependencies' => array(
-                               'test.sinonjs',
-                               'wikibase.ValueViewBuilder'
-                       )
-               ),
-
        );
 
        return array_merge(
diff --git a/view/resources/resources.php b/view/resources/resources.php
index 4b346e4..e9305e0 100644
--- a/view/resources/resources.php
+++ b/view/resources/resources.php
@@ -8,6 +8,7 @@
        return array_merge(
                include( __DIR__ . '/jquery/resources.php' ),
                include( __DIR__ . '/jquery/ui/resources.php' ),
+               include( __DIR__ . '/wikibase/resources.php' ),
                include( __DIR__ . '/wikibase/entityChangers/resources.php' ),
                include( __DIR__ . '/wikibase/store/resources.php' ),
                include( __DIR__ . '/wikibase/view/resources.php' )
diff --git a/view/resources/wikibase/resources.php 
b/view/resources/wikibase/resources.php
new file mode 100644
index 0000000..30bf149
--- /dev/null
+++ b/view/resources/wikibase/resources.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author Daniel Werner
+ * @author H. Snater < mediaw...@snater.com >
+ */
+return call_user_func( function() {
+       preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
+               . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, 
$remoteExtPath );
+
+       $moduleTemplate = array(
+               'localBasePath' => __DIR__,
+               'remoteExtPath' => '..' . $remoteExtPath[0],
+       );
+
+       $modules = array(
+
+               'wikibase.ValueViewBuilder' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'wikibase.ValueViewBuilder.js',
+                       ),
+                       'dependencies' => array(
+                               'wikibase',
+                               'jquery.valueview',
+                       ),
+               ),
+
+       );
+
+       return $modules;
+} );
diff --git a/repo/resources/wikibase.ValueViewBuilder.js 
b/view/resources/wikibase/wikibase.ValueViewBuilder.js
similarity index 100%
rename from repo/resources/wikibase.ValueViewBuilder.js
rename to view/resources/wikibase/wikibase.ValueViewBuilder.js
diff --git a/view/tests/qunit/resources.php b/view/tests/qunit/resources.php
index 4ae3125..febbfdb 100644
--- a/view/tests/qunit/resources.php
+++ b/view/tests/qunit/resources.php
@@ -7,6 +7,7 @@
 return array_merge(
        include( __DIR__ . '/jquery/resources.php' ),
        include( __DIR__ . '/jquery/ui/resources.php' ),
+       include( __DIR__ . '/wikibase/resources.php' ),
        include( __DIR__ . '/wikibase/entityChangers/resources.php' ),
        include( __DIR__ . '/wikibase/store/resources.php' ),
        include( __DIR__ . '/wikibase/view/resources.php' )
diff --git a/view/tests/qunit/wikibase/resources.php 
b/view/tests/qunit/wikibase/resources.php
new file mode 100644
index 0000000..fe0bea8
--- /dev/null
+++ b/view/tests/qunit/wikibase/resources.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater < mediaw...@snater.com >
+ */
+return call_user_func( function() {
+       $remoteExtPathParts = explode(
+               DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, 
__DIR__, 2
+       );
+       $moduleBase = array(
+               'localBasePath' => __DIR__,
+               'remoteExtPath' => $remoteExtPathParts[1],
+       );
+
+       $modules = array(
+
+               'wikibase.ValueViewBuilder.tests' => $moduleBase + array(
+                       'scripts' => array(
+                               'wikibase.ValueViewBuilder.tests.js'
+                       ),
+                       'dependencies' => array(
+                               'test.sinonjs',
+                               'wikibase.ValueViewBuilder'
+                       )
+               ),
+
+       );
+
+       return $modules;
+
+} );
diff --git a/repo/tests/qunit/wikibase.ValueViewBuilder.tests.js 
b/view/tests/qunit/wikibase/wikibase.ValueViewBuilder.tests.js
similarity index 100%
rename from repo/tests/qunit/wikibase.ValueViewBuilder.tests.js
rename to view/tests/qunit/wikibase/wikibase.ValueViewBuilder.tests.js

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2f657c5be266f9d3c06bf5fdc91217286ac6304
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <adrian.he...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to