[MediaWiki-commits] [Gerrit] k8s: Use regular puppet cert path - change (operations/puppet)

2015-12-06 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: k8s: Use regular puppet cert path
..


k8s: Use regular puppet cert path

Nodes no longer use the strange role::puppet::self related
stuff, so we can just treat them like 'normal' nodes

Change-Id: I8c06cf8319d99bdd1f5b8cde0925ba0fedb2ee61
---
M modules/k8s/manifests/ssl.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/k8s/manifests/ssl.pp b/modules/k8s/manifests/ssl.pp
index 0f4ff46..6ffa111 100644
--- a/modules/k8s/manifests/ssl.pp
+++ b/modules/k8s/manifests/ssl.pp
@@ -6,7 +6,7 @@
 $provide_private = false,
 $user = 'root',
 $group = 'root',
-$ssldir = '/var/lib/puppet/client/ssl', # FIXME: This is different for 
self hosted puppet vs not. WHY?
+$ssldir = '/var/lib/puppet/ssl',
 $target_basedir = '/var/lib/kubernetes'
 ) {
 $puppet_cert_name = $::fqdn

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c06cf8319d99bdd1f5b8cde0925ba0fedb2ee61
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Ghostscript engine - change (thumbor/ghostscript-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Ghostscript engine
..

Ghostscript engine

Bug: T120207
Change-Id: I60d92731c0806bace1e4012009f9d20ba8ee0df1
---
A LICENSE
A requirements.txt
A setup.py
A tox.ini
A wikimedia_thumbor_ghostscript_engine/__init__.py
5 files changed, 158 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/ghostscript-engine 
refs/changes/80/257180/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..39195db
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..f565bef
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_ghostscript_engine',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-ghostscript-engine',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor Ghostscript engine',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..9e359d2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_ghostscript_engine/__init__.py 
b/wikimedia_thumbor_ghostscript_engine/__init__.py
new file mode 100644
index 000..3ce4f66
--- /dev/null
+++ b/wikimedia_thumbor_ghostscript_engine/__init__.py
@@ -0,0 +1,89 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# thumbor imaging service
+# https://github.com/thumbor/thumbor/wiki
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2011 globo.com timeh...@corp.globo.com
+# Copyright (c) 2015 Wikimedia Foundation
+
+# Ghostscript engine
+
+import os
+import subprocess
+from tempfile import NamedTemporaryFile
+
+from thumbor.engines import BaseEngine
+from thumbor.engines.pil import Engine as PilEngine
+from thumbor.utils import EXTENSION
+
+
+# Unfortunately there is no elegant way to extend Thumbor to support
+# a new MIME type, which is why this monkey-patching is done here
+EXTENSION['application/pdf'] = '.pdf'
+
+old_get_mimetype = BaseEngine.get_mimetype
+
+@classmethod
+def new_get_mimetype(cls, buffer):
+if buffer.startswith('%PDF'):
+return 'application/pdf'
+
+return old_get_mimetype(buffer)
+
+BaseEngine.get_mimetype = new_get_mimetype
+
+class Engine(PilEngine):
+def should_run(self, extension, buffer):
+return (extension == '.pdf')
+
+def create_image(self, buffer):
+destination = NamedTemporaryFile(delete=False)
+source = NamedTemporaryFile(delete=False)
+source.write(buffer)
+source.close()
+
+self.pdf_buffer = buffer
+
+try:
+page = self.context.request.page
+except AttributeError:

[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/page)

2015-12-06 Thread Gilles (Code Review)
Gilles has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

Change-Id: I4d7d2cf2335775ed9cd33fa10742b43b6f71730a
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..029a13c
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/page.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d7d2cf2335775ed9cd33fa10742b43b6f71730a
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/page
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gilles 

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


[MediaWiki-commits] [Gerrit] Fill getSubpagesForPrefixSearch of Special:Tags - change (mediawiki/core)

2015-12-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Fill getSubpagesForPrefixSearch of Special:Tags
..

Fill getSubpagesForPrefixSearch of Special:Tags

Adding all the possible sub pages to getSubpagesForPrefixSearch will
show them up on search suggestion

Change-Id: I4bd99376bbddbbce1812119a43484f08e2360ff5
---
M includes/specials/SpecialTags.php
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/257195/1

diff --git a/includes/specials/SpecialTags.php 
b/includes/specials/SpecialTags.php
index 71f387b..97f2380 100644
--- a/includes/specials/SpecialTags.php
+++ b/includes/specials/SpecialTags.php
@@ -451,6 +451,20 @@
}
}
 
+   /**
+* Return an array of subpages that this special page will accept.
+*
+* @return string[] subpages
+*/
+   public function getSubpagesForPrefixSearch() {
+   return array(
+   'delete',
+   'activate',
+   'deactivate',
+   'create',
+   );
+   }
+
protected function getGroupName() {
return 'changes';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bd99376bbddbbce1812119a43484f08e2360ff5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Remove obsolete category links code - change (mediawiki/core)

2015-12-06 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: Remove obsolete category links code
..


Remove obsolete category links code

* These calls and methods should no longer be needed
* Follow-up to 6dedffc2d7f8

Change-Id: Iff121263610117112c84edb5e575f039456d1ac8
---
M includes/deferred/LinksUpdate.php
M includes/jobqueue/jobs/RefreshLinksJob.php
2 files changed, 0 insertions(+), 36 deletions(-)

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



diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index f9d7e9c..755a7cd 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -61,9 +61,6 @@
/** @var bool Whether to queue jobs for recursive updates */
public $mRecursive;
 
-   /** @var bool Whether this job was triggered by a recursive update job 
*/
-   private $mTriggeredRecursive;
-
/** @var Revision Revision for which this update has been triggered */
private $mRevision;
 
@@ -866,15 +863,6 @@
 */
public function getImages() {
return $this->mImages;
-   }
-
-   /**
-* Set this object as being triggered by a recursive LinksUpdate
-*
-* @since 1.27
-*/
-   public function setTriggeredRecursive() {
-   $this->mTriggeredRecursive = true;
}
 
/**
diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index fa3278d..0314352 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -229,30 +229,6 @@
$parserOutput
);
 
-   foreach ( $updates as $key => $update ) {
-   // FIXME: move category change RC stuff to a separate 
update.
-   // RC entry addition aborts if edits where since made, 
which is not necessary.
-   // It's also an SoC violation for links update code to 
care about RC.
-   if ( $update instanceof LinksUpdate ) {
-   if ( !empty( 
$this->params['triggeredRecursive'] ) ) {
-   $update->setTriggeredRecursive();
-   }
-   if ( !empty( $this->params['triggeringUser'] ) 
) {
-   $userInfo = 
$this->params['triggeringUser'];
-   if ( $userInfo['userId'] ) {
-   $user = User::newFromId( 
$userInfo['userId'] );
-   } else {
-   // Anonymous, use the username
-   $user = User::newFromName( 
$userInfo['userName'], false );
-   }
-   $update->setTriggeringUser( $user );
-   }
-   if ( !empty( 
$this->params['triggeringRevisionId'] ) ) {
-   $update->setRevision( $revision );
-   }
-   }
-   }
-
$latestNow = $page->lockAndGetLatest();
if ( !$latestNow || $revision->getId() != $latestNow ) {
// Do not clobber over newer updates with older ones. 
If all jobs where FIFO and

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff121263610117112c84edb5e575f039456d1ac8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix a typo in the message extdist-created-skins - change (mediawiki...ExtensionDistributor)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix a typo in the message extdist-created-skins
..


Fix a typo in the message extdist-created-skins

To make it closer to extdist-created-extensions.

Change-Id: I477cf3e58d5cc72bfc8bd68c0c72ff4562b8cf6b
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 837c7cc..9bdc2c0 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,7 +21,7 @@
"extdist-no-versions-skins": "The selected skin ($1) is not available 
in any version!",
"extdist-submit-version": "Continue",
"extdist-created-extensions": "A snapshot of version $2 of the 
$1 extension for MediaWiki $3 has been created. Your download 
should start automatically in 5 seconds.\n\nThe URL for this snapshot 
is:\n:$4\nYou can use this link to download the extension on any computer, but 
please do not bookmark it, since its contents will not be updated, and it may 
be deleted at a later date.\n\nYou should extract the tar archive's contents 
into the extensions directory of your MediaWiki installation. For example, on a 
Unix-like OS:\n\n\ntar -xzf $5 -C 
/var/www/mediawiki/extensions\n\n\nOn Windows, you can use 
[http://www.7-zip.org/ 7-zip] to extract the files.\n\nIf your wiki is on a 
remote server, extract the files to a temporary directory on your local 
computer, and then upload '''all''' of the extracted files to the extensions 
directory on the server.\n\nAfter you have extracted the files, you will need 
to register the extension in LocalSettings.php. The extension documentation 
should have instructions on how to do this.\n\nIf you have any questions about 
this extension distribution system, please go to [[Extension 
talk:ExtensionDistributor]].",
-   "extdist-created-skins": "A snapshot of version $2 of the 
$1 skin for MediaWiki $3 has been created. Your download should 
start automatically in 5 seconds.\n\nThe URL for this snapshot is:\n:$4\nYou 
can use this link to download the skin on any computer, but please do not 
bookmark it, since its contents will not be updated, and it may be deleted at a 
later date.\n\nYou should extract the tar archive's contents into the skins 
directory of your MediaWiki installation. For example, on a Unixn\ntar 
-xzf $5 -C /var/www/mediawiki/skins\n\n\nOn Windows, you can use 
[http://www.7-zip.org/ 7-zip] to extract the files.\n\nIf your wiki is on a 
remote server, extract the files to a temporary directory on your local 
computer, and then upload '''all''' of the extracted files to the skins 
directory on the server.\n\nAfter you have extracted the files, you will need 
to register the skin in LocalSettings.php. The skin documentation should have 
instructions on how to do this.\n\nIf you have any questions about this skin 
distribution system, please go to [[Extension talk:ExtensionDistributor]].",
+   "extdist-created-skins": "A snapshot of version $2 of the 
$1 skin for MediaWiki $3 has been created. Your download should 
start automatically in 5 seconds.\n\nThe URL for this snapshot is:\n:$4\nYou 
can use this link to download the skin on any computer, but please do not 
bookmark it, since its contents will not be updated, and it may be deleted at a 
later date.\n\nYou should extract the tar archive's contents into the skins 
directory of your MediaWiki installation. For example, on a Unix-like 
OS:\n\n\ntar -xzf $5 -C /var/www/mediawiki/skins\n\n\nOn Windows, 
you can use [http://www.7-zip.org/ 7-zip] to extract the files.\n\nIf your wiki 
is on a remote server, extract the files to a temporary directory on your local 
computer, and then upload '''all''' of the extracted files to the skins 
directory on the server.\n\nAfter you have extracted the files, you will need 
to register the skin in LocalSettings.php. The skin documentation should have 
instructions on how to do this.\n\nIf you have any questions about this skin 
distribution system, please go to [[Extension talk:ExtensionDistributor]].",
"extdist-want-more-extensions": "Get another extension",
"extdist-want-more-skins": "Get another skin",
"extdist-tar-error": "Unable to fetch archive URL from archive API.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I477cf3e58d5cc72bfc8bd68c0c72ff4562b8cf6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>


[MediaWiki-commits] [Gerrit] Add user autocomplete and autofocus to Special:ActiveUsers - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add user autocomplete and autofocus to Special:ActiveUsers
..


Add user autocomplete and autofocus to Special:ActiveUsers

Add autocomplete and autofocus as already exists on Special:ListUsers

Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e
---
M includes/specials/SpecialActiveusers.php
1 file changed, 14 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/SpecialActiveusers.php 
b/includes/specials/SpecialActiveusers.php
index 047e941..e51b6c0 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -212,10 +212,20 @@
$out .= Xml::fieldset( $this->msg( 'activeusers' )->text() ) . 
"\n";
$out .= Html::hidden( 'title', $self->getPrefixedDBkey() ) . 
$limit . "\n";
 
-   # Username field
-   $out .= Xml::inputLabel( $this->msg( 'activeusers-from' 
)->text(),
-   'username', 'offset', 20, $this->requestedUser,
-   array( 'class' => 'mw-ui-input-inline', 'tabindex' => 1 
) ) . '';
+   # Username field (with autocompletion support)
+   $this->getOutput()->addModules( 'mediawiki.userSuggest' );
+   $out .= Xml::inputLabel(
+   $this->msg( 'activeusers-from' )->text(),
+   'username',
+   'offset',
+   20,
+   $this->requestedUser,
+   array(
+   'class' => 'mw-ui-input-inline 
mw-autocomplete-user',
+   'tabindex' => 1,
+   'autofocus' => $this->requestedUser === '',
+   )
+   ) . '';
 
$out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' 
)->text(),
'hidebots', 'hidebots', $this->opts->getValue( 
'hidebots' ), array( 'tabindex' => 2 ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] tests: Remove unused $wgMemc resets - change (mediawiki/core)

2015-12-06 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: tests: Remove unused $wgMemc resets
..

tests: Remove unused $wgMemc resets

If we really need this we can do it in MediaWikiTestCase, next
to the setting of wgMainCacheType. But from what I can see the
code being tested here already doesn't use the old $wgMemc.

Change-Id: I9e4b2109b2f3c18d8d5551bbadae5711c1d4c0a6
---
M tests/phpunit/includes/ExtraParserTest.php
M tests/phpunit/includes/TemplateParserTest.php
M tests/phpunit/includes/TitlePermissionTest.php
M tests/phpunit/includes/api/ApiTestCase.php
M tests/phpunit/includes/jobqueue/JobQueueTest.php
M tests/phpunit/languages/LanguageConverterTest.php
6 files changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/257200/1

diff --git a/tests/phpunit/includes/ExtraParserTest.php 
b/tests/phpunit/includes/ExtraParserTest.php
index 7b60fb3..46ec6bc 100644
--- a/tests/phpunit/includes/ExtraParserTest.php
+++ b/tests/phpunit/includes/ExtraParserTest.php
@@ -21,7 +21,6 @@
'wgLanguageCode' => 'en',
'wgContLang' => $contLang,
'wgLang' => Language::factory( 'en' ),
-   'wgMemc' => new EmptyBagOStuff,
'wgCleanSignatures' => true,
) );
 
diff --git a/tests/phpunit/includes/TemplateParserTest.php 
b/tests/phpunit/includes/TemplateParserTest.php
index 3b37f4a..ddef24a 100644
--- a/tests/phpunit/includes/TemplateParserTest.php
+++ b/tests/phpunit/includes/TemplateParserTest.php
@@ -12,7 +12,6 @@
 
$this->setMwGlobals( array(
'wgSecretKey' => 'foo',
-   'wgMemc' => new EmptyBagOStuff(),
) );
 
$this->templateDir = dirname( __DIR__ ) . '/data/templates/';
diff --git a/tests/phpunit/includes/TitlePermissionTest.php 
b/tests/phpunit/includes/TitlePermissionTest.php
index 1318d10..4dc8350 100644
--- a/tests/phpunit/includes/TitlePermissionTest.php
+++ b/tests/phpunit/includes/TitlePermissionTest.php
@@ -31,7 +31,6 @@
$localOffset = date( 'Z' ) / 60;
 
$this->setMwGlobals( array(
-   'wgMemc' => new EmptyBagOStuff,
'wgContLang' => $langObj,
'wgLanguageCode' => 'en',
'wgLang' => $langObj,
diff --git a/tests/phpunit/includes/api/ApiTestCase.php 
b/tests/phpunit/includes/api/ApiTestCase.php
index 21345ac..01113a6 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -37,7 +37,6 @@
);
 
$this->setMwGlobals( array(
-   'wgMemc' => new EmptyBagOStuff(),
'wgAuth' => new StubObject( 'wgAuth', 'AuthPlugin' ),
'wgRequest' => new FauxRequest( array() ),
'wgUser' => self::$users['sysop']->user,
diff --git a/tests/phpunit/includes/jobqueue/JobQueueTest.php 
b/tests/phpunit/includes/jobqueue/JobQueueTest.php
index 9808a55..3cb1af6 100644
--- a/tests/phpunit/includes/jobqueue/JobQueueTest.php
+++ b/tests/phpunit/includes/jobqueue/JobQueueTest.php
@@ -19,8 +19,6 @@
global $wgJobTypeConf;
parent::setUp();
 
-   $this->setMwGlobals( 'wgMemc', new HashBagOStuff() );
-
if ( $this->getCliArg( 'use-jobqueue' ) ) {
$name = $this->getCliArg( 'use-jobqueue' );
if ( !isset( $wgJobTypeConf[$name] ) ) {
diff --git a/tests/phpunit/languages/LanguageConverterTest.php 
b/tests/phpunit/languages/LanguageConverterTest.php
index d4ccca9..8fc0bee 100644
--- a/tests/phpunit/languages/LanguageConverterTest.php
+++ b/tests/phpunit/languages/LanguageConverterTest.php
@@ -13,7 +13,6 @@
'wgContLang' => Language::factory( 'tg' ),
'wgLanguageCode' => 'tg',
'wgDefaultLanguageVariant' => false,
-   'wgMemc' => new EmptyBagOStuff,
'wgRequest' => new FauxRequest( array() ),
'wgUser' => new User,
) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e4b2109b2f3c18d8d5551bbadae5711c1d4c0a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Add user autocomplete and autofocus to Special:Emailuser - change (mediawiki/core)

2015-12-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Add user autocomplete and autofocus to Special:Emailuser
..

Add user autocomplete and autofocus to Special:Emailuser

Add autocomplete and autofocus as already exists on Special:ListUsers

Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e
---
M includes/specials/SpecialActiveusers.php
1 file changed, 14 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/257194/1

diff --git a/includes/specials/SpecialActiveusers.php 
b/includes/specials/SpecialActiveusers.php
index 047e941..e51b6c0 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -212,10 +212,20 @@
$out .= Xml::fieldset( $this->msg( 'activeusers' )->text() ) . 
"\n";
$out .= Html::hidden( 'title', $self->getPrefixedDBkey() ) . 
$limit . "\n";
 
-   # Username field
-   $out .= Xml::inputLabel( $this->msg( 'activeusers-from' 
)->text(),
-   'username', 'offset', 20, $this->requestedUser,
-   array( 'class' => 'mw-ui-input-inline', 'tabindex' => 1 
) ) . '';
+   # Username field (with autocompletion support)
+   $this->getOutput()->addModules( 'mediawiki.userSuggest' );
+   $out .= Xml::inputLabel(
+   $this->msg( 'activeusers-from' )->text(),
+   'username',
+   'offset',
+   20,
+   $this->requestedUser,
+   array(
+   'class' => 'mw-ui-input-inline 
mw-autocomplete-user',
+   'tabindex' => 1,
+   'autofocus' => $this->requestedUser === '',
+   )
+   ) . '';
 
$out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' 
)->text(),
'hidebots', 'hidebots', $this->opts->getValue( 
'hidebots' ), array( 'tabindex' => 2 ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a89023491cfff4d36c3214a4d56d4c0d35d192e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Fill getSubpagesForPrefixSearch of Special:Tags - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fill getSubpagesForPrefixSearch of Special:Tags
..


Fill getSubpagesForPrefixSearch of Special:Tags

Adding all the possible sub pages to getSubpagesForPrefixSearch will
show them up on search suggestion

Change-Id: I4bd99376bbddbbce1812119a43484f08e2360ff5
---
M includes/specials/SpecialTags.php
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/specials/SpecialTags.php 
b/includes/specials/SpecialTags.php
index 71f387b..97f2380 100644
--- a/includes/specials/SpecialTags.php
+++ b/includes/specials/SpecialTags.php
@@ -451,6 +451,20 @@
}
}
 
+   /**
+* Return an array of subpages that this special page will accept.
+*
+* @return string[] subpages
+*/
+   public function getSubpagesForPrefixSearch() {
+   return array(
+   'delete',
+   'activate',
+   'deactivate',
+   'create',
+   );
+   }
+
protected function getGroupName() {
return 'changes';
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bd99376bbddbbce1812119a43484f08e2360ff5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix button order in donation-age titlebar - change (wikimedia...dash)

2015-12-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix button order in donation-age titlebar
..

Fix button order in donation-age titlebar

X goes at the end!

Change-Id: I5d129dc176bcf6c1bb83e5153a218dd47513827f
---
M src/components/widgets/donation-age/donation-age.html
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/99/257199/1

diff --git a/src/components/widgets/donation-age/donation-age.html 
b/src/components/widgets/donation-age/donation-age.html
index 3bff046..78a5ff7 100644
--- a/src/components/widgets/donation-age/donation-age.html
+++ b/src/components/widgets/donation-age/donation-age.html
@@ -3,8 +3,8 @@



-   

+   




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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d129dc176bcf6c1bb83e5153a218dd47513827f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Chinese Conversion Table Update 2015-9 - change (mediawiki/core)

2015-12-06 Thread Chiefwei (Code Review)
Chiefwei has uploaded a new change for review.

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

Change subject: Chinese Conversion Table Update 2015-9
..

Chinese Conversion Table Update 2015-9

Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82
 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Icb47cf7d30a9bf09d55af9e96e34b9b5c6d6c9cf
---
M includes/ZhConversion.php
M maintenance/language/zhtable/simp2trad.manual
M maintenance/language/zhtable/toCN.manual
M maintenance/language/zhtable/toHK.manual
M maintenance/language/zhtable/toTW.manual
M maintenance/language/zhtable/toTrad.manual
M maintenance/language/zhtable/tradphrases.manual
M maintenance/language/zhtable/tradphrases_exclude.manual
8 files changed, 101 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/257196/1

diff --git a/includes/ZhConversion.php b/includes/ZhConversion.php
index 9e7d12c..e70f3e6 100644
--- a/includes/ZhConversion.php
+++ b/includes/ZhConversion.php
@@ -294,6 +294,7 @@
 '卖' => '賣',
 '卢' => '盧',
 '卤' => '鹵',
+'卧' => '臥',
 '卫' => '衛',
 '却' => '卻',
 '厂' => '廠',
@@ -3424,6 +3425,7 @@
 '干股' => '乾股',
 '干肥' => '乾肥',
 '干脆' => '乾脆',
+'干脆面' => '乾脆麵',
 '干花' => '乾花',
 '干刍' => '乾芻',
 '干苔' => '乾苔',
@@ -3564,6 +3566,7 @@
 '于慧' => '于慧',
 '于成龍' => '于成龍',
 '于成龙' => '于成龍',
+'于承惠' => '于承惠',
 '于振' => '于振',
 '于振武' => '于振武',
 '于敏' => '于敏',
@@ -3644,6 +3647,7 @@
 '于赠' => '于贈',
 '于越' => '于越',
 '于軍' => '于軍',
+'于逸堯' => '于逸堯',
 '于道泉' => '于道泉',
 '于远伟' => '于遠偉',
 '于遠偉' => '于遠偉',
@@ -3829,6 +3833,8 @@
 '信托' => '信託',
 '修杰楷' => '修杰楷',
 '修杰麟' => '修杰麟',
+'修筑前' => '修築前',
+'修筑后' => '修築後',
 '修胡刀' => '修鬍刀',
 '俯冲' => '俯衝',
 '个月里' => '個月裡',
@@ -4112,7 +4118,6 @@
 '削面' => '削麵',
 '克剥' => '剋剝',
 '克扣' => '剋扣',
-'克星' => '剋星',
 '克期' => '剋期',
 '克死' => '剋死',
 '克薄' => '剋薄',
@@ -4235,6 +4240,7 @@
 '去山里' => '去山裡',
 '参数只' => '參數只',
 '参数里' => '參數裡',
+'反反复复' => '反反覆覆',
 '反应制得' => '反應製得',
 '反朴' => '反樸',
 '反冲' => '反衝',
@@ -4736,14 +4742,10 @@
 '委托书' => '委託書',
 '奸夫' => '姦夫',
 '奸妇' => '姦婦',
-'奸宄' => '姦宄',
 '奸情' => '姦情',
 '奸杀' => '姦殺',
 '奸污' => '姦污',
 '奸淫' => '姦淫',
-'奸猾' => '姦猾',
-'奸细' => '姦細',
-'奸邪' => '姦邪',
 '威棱' => '威稜',
 '婢仆' => '婢僕',
 '嫁祸于' => '嫁禍於',
@@ -4758,6 +4760,7 @@
 '子里' => '子裡',
 '子里甲' => '子里甲',
 '字汇' => '字彙',
+'字母后' => '字母後',
 '字码表' => '字碼表',
 '字里行间' => '字裡行間',
 '存折' => '存摺',
@@ -5056,8 +5059,11 @@
 '廢后' => '廢后',
 '广征' => '廣徵',
 '广舍' => '廣捨',
+'广播里' => '廣播裡',
 '延历' => '延曆',
 '建于' => '建於',
+'建筑前' => '建築前',
+'建筑后' => '建築後',
 '弄干' => '弄乾',
 '弄丑' => '弄醜',
 '弄脏胸' => '弄髒胸',
@@ -5131,6 +5137,7 @@
 '影后' => '影后',
 '影相吊' => '影相弔',
 '役于' => '役於',
+'往复式' => '往復式',
 '往日无仇' => '往日無讎',
 '往里' => '往裡',
 '待复' => '待覆',
@@ -5405,7 +5412,6 @@
 '欲令智昏' => '慾令智昏',
 '欲壑难填' => '慾壑難填',
 '欲念' => '慾念',
-'欲望' => '慾望',
 '欲海' => '慾海',
 '欲火' => '慾火',
 '欲障' => '慾障',
@@ -5472,6 +5478,7 @@
 '手表面' => '手表面',
 '手里剑' => '手裏劍',
 '手里' => '手裡',
+'手游' => '手遊',
 '手表' => '手錶',
 '手链' => '手鍊',
 '手松' => '手鬆',
@@ -6227,6 +6234,7 @@
 '水来汤里去' => '水來湯裡去',
 '水准' => '水準',
 '水无怜奈' => '水無怜奈',
+'水表示' => '水表示',
 '水表面' => '水表面',
 '水里' => '水裡',
 '水里商工' => '水里商工',
@@ -6499,6 +6507,7 @@
 '沈丹客运' => '瀋丹客運',
 '沈丹线' => '瀋丹線',
 '沈丹铁路' => '瀋丹鐵路',
+'沈丹高' => '瀋丹高',
 '沈北' => '瀋北',
 '沈吉' => '瀋吉',
 '沈大线' => '瀋大線',
@@ -6714,7 +6723,6 @@
 '发松' => '發鬆',
 '发面' => '發麵',
 '白干儿' => '白乾兒',
-'白子里' => '白子里',
 '白术' => '白朮',
 '白朴' => '白樸',
 '白净面皮' => '白淨面皮',
@@ -6735,6 +6743,7 @@
 '百只足夠' => '百只足夠',
 '百周后' => '百周後',
 '百天后' => '百天後',
+'百子里' => '百子里',
 '百年' => '百年',
 '百拙千丑' => '百拙千醜',
 '百科里' => '百科裡',
@@ -6970,6 +6979,7 @@
 '窗明几净' => '窗明几淨',
 '窗帘' => '窗簾',
 '窝里' => '窩裡',
+'窝里斗' => '窩裡鬥',
 '穷于' => '窮於',
 '穷追不舍' => '窮追不捨',
 '穷发' => '窮髮',
@@ -7280,6 +7290,7 @@
 '聚药雄蕊' => '聚葯雄蕊',
 '闻风后' => '聞風後',
 '联系' => '聯繫',
+'声母后' => '聲母後',
 '听于' => '聽於',
 '肉干' => '肉乾',
 '肉欲' => '肉慾',
@@ -7970,11 +7981,13 @@
 '警报钟' => '警報鐘',
 '警示钟' => '警示鐘',
 '警钟' => '警鐘',
+'译制' => '譯製',
 '译注' => '譯註',
 '护发' => '護髮',
 '变征' => '變徵',
 '变丑' => '變醜',
 '仇隙' => '讎隙',
+'赞一个' => '讚一個',
 '赞不绝口' => '讚不絕口',
 '赞佩' => '讚佩',
 '赞呗' => '讚唄',
@@ -8593,7 +8606,6 @@
 '防御' => '防禦',
 '防范' => '防範',
 '防锈' => '防鏽',
-'防台' => '防颱',
 '阻于' => '阻於',
 '阿里' => '阿里',
 '附于' => '附於',
@@ -8683,6 +8695,7 @@
 '电码表' => '電碼表',
 '电冲' => '電衝',
 '电视台风' => '電視台風',
+'电视里' => '電視裡',
 '电表' => '電錶',
 '电钟' => '電鐘',
 '震栗' => '震慄',
@@ -9345,7 +9358,6 @@
 '齿危发秀' => '齒危髮秀',
 '齿落发白' => '齒落髮白',
 '齿发' => '齒髮',
-'出儿' => '齣兒',
 '龙岩' => '龍巖',
 '龙卷' => '龍捲',
 '龙眼干' => '龍眼乾',
@@ -9354,6 +9366,10 @@
 '龙斗虎伤' => '龍鬥虎傷',
 '龜山庄' => '龜山庄',
 '龟鉴' => '龜鑑',
+',并力' => ',並力',
+',并力攻' => ',并力攻',
+',并力討' => ',并力討',
+',并力讨' => ',并力討',
 ',个中' => ',箇中',
 );
 
@@ -13874,6 +13890,8 @@
 '傅里叶' => '傅立葉',
 '光盘' => '光碟',
 '光驱' => '光碟機',
+'开普勒' => '克卜勒',
+'開普勒' => '克卜勒',
 '克罗地亚' => '克羅埃西亞',
 '克羅地亞' => '克羅埃西亞',
 '克里斯托弗' => '克里斯多福',
@@ -13896,6 +13914,7 @@
 '包豪斯' => '包浩斯',
 '北朝鲜' => '北韓',
 '局域网' 

[MediaWiki-commits] [Gerrit] Add TIFF support - change (thumbor/vips-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Add TIFF support
..

Add TIFF support

Bug: T120203
Change-Id: I57e10664aa8515240f2d2d795d7f1dbee465d8df
---
M wikimedia_thumbor_vips_engine/__init__.py
1 file changed, 44 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/vips-engine 
refs/changes/98/257198/1

diff --git a/wikimedia_thumbor_vips_engine/__init__.py 
b/wikimedia_thumbor_vips_engine/__init__.py
index cba5721..a78b9d5 100644
--- a/wikimedia_thumbor_vips_engine/__init__.py
+++ b/wikimedia_thumbor_vips_engine/__init__.py
@@ -17,14 +17,55 @@
 from gi.repository import Vips
 
 from thumbor.engines import BaseEngine
+from thumbor.utils import EXTENSION
+
+
+# Unfortunately there is no elegant way to extend Thumbor to support
+# a new MIME type, which is why this monkey-patching is done here
+EXTENSION['image/tiff'] = '.tiff'
+
+old_get_mimetype = BaseEngine.get_mimetype
+
+
+@classmethod
+def new_get_mimetype(cls, buffer):
+if (buffer.startswith('II*\x00') or buffer.startswith('MM\x00*')):
+return 'image/tiff'
+
+return old_get_mimetype(buffer)
+
+BaseEngine.get_mimetype = new_get_mimetype
 
 
 class Engine(BaseEngine):
 def create_image(self, buffer):
-return Vips.Image().new_from_buffer(data=buffer, option_string=None)
+self.original_buffer = buffer
+option_string = None
+
+if (BaseEngine.get_mimetype(buffer) == 'image/tiff'):
+self.extension = '.png'
+try:
+option_string = 'page=%d' % (self.context.request.page - 1)
+except AttributeError:
+pass
+self.extension = '.jpg'
+
+img = Vips.Image().new_from_buffer(
+data=buffer,
+option_string=option_string
+)
+
+return img
 
 def read(self, extension=None, quality=None):
-return self.image.write_to_buffer(format_string=extension)
+# Save the potentially multipage original for TIFFs
+if (extension == '.tiff' and quality is None):
+return self.original_buffer
+
+if (extension == '.tiff' or extension == '.jpg'):
+return self.image.write_to_buffer('.jpg')
+
+return self.image.write_to_buffer('.png')
 
 def resize(self, width, height):
 # In the context of thumbnailing we're fine with a resize
@@ -45,7 +86,7 @@
 )
 
 def should_run(self, extension, buffer):
-if (extension != '.png'):
+if (extension != '.png' or extension != '.tiff'):
 return False
 
 image = self.create_image(buffer)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57e10664aa8515240f2d2d795d7f1dbee465d8df
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/vips-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Add numeric filters - change (wikimedia...dash)

2015-12-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add numeric filters
..

Add numeric filters

Change-Id: I90ccc9e76778c8212cd44a730fc111f44f8f6265
---
M src/app/startup.js
M src/components/filters/filters.js
A src/components/filters/number-filter/number-filter.html
A src/components/filters/number-filter/number-filter.js
4 files changed, 50 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/03/257203/1

diff --git a/src/app/startup.js b/src/app/startup.js
index 0e2998e..775e4bd 100644
--- a/src/app/startup.js
+++ b/src/app/startup.js
@@ -15,10 +15,11 @@
ko.components.register( 'date-pickers',   { 
require: 'components/utils/date-pickers/date-pickers' });
 
//register boards
-   ko.components.register( 'generic-board',   
{ require: 'components/boards/generic-board/generic-board' });
+   ko.components.register( 'generic-board',  { 
require: 'components/boards/generic-board/generic-board' });
//register filters
ko.components.register( 'filters',{ 
require: 'components/filters/filters' });
ko.components.register( 'dropdown-filter',{ 
require: 'components/filters/dropdown-filter/dropdown-filter' });
+   ko.components.register( 'number-filter',  { 
require: 'components/filters/number-filter/number-filter' });
ko.components.register( 'text-filter',{ 
require: 'components/filters/text-filter/text-filter' });
 
//register individual widgets
diff --git a/src/components/filters/filters.js 
b/src/components/filters/filters.js
index ed232d7..479536e 100644
--- a/src/components/filters/filters.js
+++ b/src/components/filters/filters.js
@@ -43,6 +43,7 @@
filter.userChoices = 
ko.observableArray( params.userChoices()[name] || [] );
break;
case 'text':
+   case 'number':
filter.userChoices = 
ko.observable( params.userChoices()[name] || {} );
break;
default:
diff --git a/src/components/filters/number-filter/number-filter.html 
b/src/components/filters/number-filter/number-filter.html
new file mode 100644
index 000..e029fb3
--- /dev/null
+++ b/src/components/filters/number-filter/number-filter.html
@@ -0,0 +1,2 @@
+
+
diff --git a/src/components/filters/number-filter/number-filter.js 
b/src/components/filters/number-filter/number-filter.js
new file mode 100644
index 000..b0c59b7
--- /dev/null
+++ b/src/components/filters/number-filter/number-filter.js
@@ -0,0 +1,45 @@
+define( [
+   'knockout',
+   'text!components/filters/text-filter/text-filter.html',
+   'operators'
+   ],
+function( ko, template, ops ){
+
+   function NumberFilterViewModel( params ){
+   var self = this;
+
+   this.operators = [
+   ops.eq,
+   ops.gt,
+   ops.lt
+   ];
+   this.selectedOperator = ko.observable( 
params.userChoices().operator || 'eq' );
+   this.value = ko.observable( params.userChoices().value || '' );
+   this.min = params.metadata.min;
+   this.max = params.metadata.max;
+
+   this.changed = function() {
+   var value = self.value();
+
+   params.userChoices( {
+   operator: self.selectedOperator(),
+   value: value
+   } );
+
+   if ( value === '' ) {
+   params.queryString( null );
+   return;
+   }
+
+   params.queryString(
+   params.name + ' ' + 
self.selectedOperator() + ' \'' + value + '\''
+   );
+   return;
+   };
+
+   this.selectedOperator.subscribe( this.changed );
+   this.value.subscribe( this.changed );
+   }
+
+   return { viewModel: NumberFilterViewModel, template: template };
+} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90ccc9e76778c8212cd44a730fc111f44f8f6265
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: 

[MediaWiki-commits] [Gerrit] Fix filter summary for non-dropdowns - change (wikimedia...dash)

2015-12-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix filter summary for non-dropdowns
..

Fix filter summary for non-dropdowns

FIXME: introduce a filter base class with this functionality,
override it in dropdown-filter.

Change-Id: I3867f92932a4202d083e22afac017d4201b89276
---
M src/app/require.config.js
M src/app/widgetBase.js
A src/components/filters/operators.js
3 files changed, 67 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/02/257202/1

diff --git a/src/app/require.config.js b/src/app/require.config.js
index 5a06a8a..ea6a69d 100644
--- a/src/app/require.config.js
+++ b/src/app/require.config.js
@@ -25,7 +25,8 @@
'c3':   'bower_modules/c3/c3',
'numeraljs':'bower_modules/numeraljs/numeral',
'decemberData': 'bower_modules/fakeData/decemberData',
-   'WidgetBase':   'app/widgetBase'
+   'WidgetBase':   'app/widgetBase',
+   'operators':'components/filters/operators'
},
shim: {
'bootstrap': {
diff --git a/src/app/widgetBase.js b/src/app/widgetBase.js
index 77369a4..71d623b 100644
--- a/src/app/widgetBase.js
+++ b/src/app/widgetBase.js
@@ -1,8 +1,8 @@
 define([
'jquery',
'knockout',
-   'momentjs'
-], function( $, ko, moment ){
+   'operators'
+], function( $, ko, ops ){
 
function zeroPad( number ) {
if ( number < 10 ) {
@@ -42,17 +42,45 @@
localStorage.setItem( storageKey, 
JSON.stringify( fetchedData ) );
} );
} )();
+
self.filterText = ko.computed( function() {
-   var filterName, text, parts = [], choices = 
self.userChoices();
+   var filterName,
+   text,
+   parts = [],
+   choices = self.userChoices(),
+   filterChoices,
+   operator;
+
for ( filterName in choices ) {
-   if ( !choices.hasOwnProperty( filterName ) || 
choices[filterName].length === 0 ) {
+   if ( !choices.hasOwnProperty( filterName ) ) {
continue;
}
-   text = filterName;
-   if ( choices[filterName].length === 1 ) {
-   text += ' = ' + choices[filterName][0];
+   text = filterName + ' ';
+   filterChoices = choices[filterName];
+   // FIXME: this should be part of a filter base 
class so different
+   // types of filter can define their own summary 
text generation
+   if ( filterChoices.constructor === Array ) {
+   // Dropdown filter
+   if ( filterChoices.length === 0 ) {
+   continue;
+   }
+   if ( filterChoices.length === 1 ) {
+   text += '= ' + filterChoices[0];
+   } else {
+   text += 'in (' + 
filterChoices.join( ', ' ) + ')';
+   }
} else {
-   text += ' in (' + 
choices[filterName].join( ', ' ) + ')';
+   // Text or numeric filter
+   if ( filterChoices.value === '' ) {
+   continue;
+   }
+   operator = ops[filterChoices.operator];
+   if ( operator.abbr ) {
+   text += operator.abbr;
+   } else {
+   text += 
operator.text.toLowerCase();
+   }
+   text += ' ' + filterChoices.value;
}
parts.push( text );
}
diff --git a/src/components/filters/operators.js 
b/src/components/filters/operators.js
new file mode 100644
index 000..a3ba22e
--- /dev/null
+++ b/src/components/filters/operators.js
@@ -0,0 +1,29 @@
+define({
+   gt: {
+ 

[MediaWiki-commits] [Gerrit] Use wfGetParserCache() instead of $wgMemc in showCacheStats.php - change (mediawiki/core)

2015-12-06 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Use wfGetParserCache() instead of $wgMemc in showCacheStats.php
..

Use wfGetParserCache() instead of $wgMemc in showCacheStats.php

This script interacts with keys set by ParserCache.php, which
uses singleton set by $wgParserCacheType, not $wgMainCacheType.

Change-Id: Id6a62aec57801085ed684af9362a96eca0914e92
---
M maintenance/showCacheStats.php
1 file changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/257206/1

diff --git a/maintenance/showCacheStats.php b/maintenance/showCacheStats.php
index 3d16af1..6f5a181 100644
--- a/maintenance/showCacheStats.php
+++ b/maintenance/showCacheStats.php
@@ -40,18 +40,18 @@
}
 
public function execute() {
-   global $wgMemc;
+   $cache = wfGetParserCacheStorage();
 
// Can't do stats if
-   if ( get_class( $wgMemc ) == 'EmptyBagOStuff' ) {
+   if ( get_class( $cache ) == 'EmptyBagOStuff' ) {
$this->error( "You are running EmptyBagOStuff, I can 
not provide any statistics.", true );
}
 
$this->output( "\nParser cache\n" );
-   $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' 
) ) );
-   $expired = intval( $wgMemc->get( wfMemcKey( 'stats', 
'pcache_miss_expired' ) ) );
-   $absent = intval( $wgMemc->get( wfMemcKey( 'stats', 
'pcache_miss_absent' ) ) );
-   $stub = intval( $wgMemc->get( wfMemcKey( 'stats', 
'pcache_miss_stub' ) ) );
+   $hits = intval( $cache->get( wfMemcKey( 'stats', 'pcache_hit' ) 
) );
+   $expired = intval( $cache->get( wfMemcKey( 'stats', 
'pcache_miss_expired' ) ) );
+   $absent = intval( $cache->get( wfMemcKey( 'stats', 
'pcache_miss_absent' ) ) );
+   $stub = intval( $cache->get( wfMemcKey( 'stats', 
'pcache_miss_stub' ) ) );
$total = $hits + $expired + $absent + $stub;
if ( $total ) {
$this->output( sprintf( "hits:  %-10d 
%6.2f%%\n", $hits, $hits / $total * 100 ) );
@@ -72,9 +72,9 @@
}
 
$this->output( "\nImage cache\n" );
-   $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 
'image_cache_hit' ) ) );
-   $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 
'image_cache_miss' ) ) );
-   $updates = intval( $wgMemc->get( wfMemcKey( 'stats', 
'image_cache_update' ) ) );
+   $hits = intval( $cache->get( wfMemcKey( 'stats', 
'image_cache_hit' ) ) );
+   $misses = intval( $cache->get( wfMemcKey( 'stats', 
'image_cache_miss' ) ) );
+   $updates = intval( $cache->get( wfMemcKey( 'stats', 
'image_cache_update' ) ) );
$total = $hits + $misses;
if ( $total ) {
$this->output( sprintf( "hits:  %-10d 
%6.2f%%\n", $hits, $hits / $total * 100 ) );
@@ -89,9 +89,9 @@
}
 
$this->output( "\nDiff cache\n" );
-   $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 
'diff_cache_hit' ) ) );
-   $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 
'diff_cache_miss' ) ) );
-   $uncacheable = intval( $wgMemc->get( wfMemcKey( 'stats', 
'diff_uncacheable' ) ) );
+   $hits = intval( $cache->get( wfMemcKey( 'stats', 
'diff_cache_hit' ) ) );
+   $misses = intval( $cache->get( wfMemcKey( 'stats', 
'diff_cache_miss' ) ) );
+   $uncacheable = intval( $cache->get( wfMemcKey( 'stats', 
'diff_uncacheable' ) ) );
$total = $hits + $misses + $uncacheable;
if ( $total ) {
$this->output( sprintf( "hits:  %-10d 
%6.2f%%\n", $hits, $hits / $total * 100 ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6a62aec57801085ed684af9362a96eca0914e92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Use common operators in text filter - change (wikimedia...dash)

2015-12-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Use common operators in text filter
..

Use common operators in text filter

And push some code around.  Assumption that operators without a
pipe symbol had to be 'eq' looked like an error.

Change-Id: If27482d55d5ffec3ab96277635a14545c654fedf
---
M src/components/filters/text-filter/text-filter.js
1 file changed, 13 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/05/257205/1

diff --git a/src/components/filters/text-filter/text-filter.js 
b/src/components/filters/text-filter/text-filter.js
index a977951..df2fe98 100644
--- a/src/components/filters/text-filter/text-filter.js
+++ b/src/components/filters/text-filter/text-filter.js
@@ -1,50 +1,41 @@
 define( [
'knockout',
-   'text!components/filters/text-filter/text-filter.html'
+   'text!components/filters/text-filter/text-filter.html',
+   'operators'
],
-function( ko, template ){
+function( ko, template, ops ){
 
function TextFilterViewModel( params ){
var self = this;
 
this.operators = [
-   {
-   value: 'eq',
-   text: 'Exactly'
-   },
-   {
-   value: 'fn|startswith',
-   text: 'Starts with'
-   },
-   {
-   value: 'fn|endswith',
-   text: 'Ends with'
-   },
-   {
-   value: 'fn|substringof',
-   text: 'Contains'
-   }
+   ops.eq,
+   ops.startswith,
+   ops.endswith,
+   ops.contains
];
this.selectedOperator = ko.observable( 
params.userChoices().operator || 'eq' );
this.value = ko.observable( params.userChoices().value || '' );
 
this.changed = function() {
+   var value = self.value();
+
params.userChoices( {
operator: self.selectedOperator(),
-   value: self.value()
+   value: value
} );
 
-   if ( self.value() === '' ) {
+   if ( value === '' ) {
params.queryString( null );
return;
}
var parts = self.selectedOperator().split( '|' );
 
if ( parts.length === 1 ) {
-   params.queryString( params.name + ' eq \'' + 
self.value() + '\'' );
+   params.queryString( params.name + ' ' + 
parts[0] + ' \'' + value + '\'' );
return;
}
-   params.queryString( parts[1] + '(\'' + self.value() + 
'\',' + params.name + ')'  );
+   params.queryString( parts[1] + '(\'' + value + '\',' + 
params.name + ')'  );
};
 
this.selectedOperator.subscribe( this.changed );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If27482d55d5ffec3ab96277635a14545c654fedf
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Hide filters not intended for user selection - change (wikimedia...dash)

2015-12-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Hide filters not intended for user selection
..

Hide filters not intended for user selection

We define filters for components of date, but those are meant
for use in code, not by users.  Zap their display names and hide
their controls.

Change-Id: I71cc01b2715cd5141da74510fc2c189bfc1bb6dc
---
M src/components/filters/filters.js
M widgets/common-filters.js
2 files changed, 3 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/04/257204/1

diff --git a/src/components/filters/filters.js 
b/src/components/filters/filters.js
index 479536e..a84e0ac 100644
--- a/src/components/filters/filters.js
+++ b/src/components/filters/filters.js
@@ -33,6 +33,9 @@
params.metadataRequest.then( function( metadata ) {
var filters = [];
$.each( metadata.filters, function( name, filterMeta ) {
+   if ( !filterMeta.display ) {
+   return;
+   }
var filter = {
name: name,
metadata: filterMeta,
diff --git a/widgets/common-filters.js b/widgets/common-filters.js
index b12fd90..6e334d2 100644
--- a/widgets/common-filters.js
+++ b/widgets/common-filters.js
@@ -19,7 +19,6 @@
table: 'cc',
func: 'YEAR',
column: 'receive_date',
-   display: 'Year',
type: 'number',
canGroup: true
},
@@ -27,7 +26,6 @@
table: 'cc',
func: 'MONTH',
column: 'receive_date',
-   display: 'Month',
type: 'number',
canGroup: true
},
@@ -35,7 +33,6 @@
table: 'cc',
func: 'DAY',
column: 'receive_date',
-   display: 'Year',
type: 'number',
canGroup: true
},
@@ -43,7 +40,6 @@
table: 'cc',
func: 'HOUR',
column: 'receive_date',
-   display: 'Hour',
type: 'number',
canGroup: true
},
@@ -51,7 +47,6 @@
table: 'cc',
column : 'receive_date',
func: 'timestampdiff(YEAR, [[COL]], utc_timestamp())',
-   display: 'Years ago',
type: 'number',
min: 0,
max: 12
@@ -60,7 +55,6 @@
table: 'cc',
column : 'receive_date',
func: 'timestampdiff(MONTH, [[COL]], utc_timestamp())',
-   display: 'Months ago',
type: 'number',
min: 0,
max: 1
@@ -69,7 +63,6 @@
table: 'cc',
column : 'receive_date',
func: 'timestampdiff(DAY, [[COL]], utc_timestamp())',
-   display: 'Days ago',
type: 'number',
min: 0,
max: 1
@@ -188,7 +181,6 @@
table: 'pf',
func: 'YEAR',
column: 'date',
-   display: 'Year',
type: 'number',
canGroup: true
},
@@ -196,7 +188,6 @@
table: 'pf',
func: 'MONTH',
column: 'date',
-   display: 'Month',
type: 'number',
canGroup: true
},
@@ -204,7 +195,6 @@
table: 'pf',
func: 'DAY',
column: 'date',
-   display: 'Year',
type: 'number',
canGroup: true
},
@@ -212,7 +202,6 @@
table: 'pf',
func: 'HOUR',
column: 'date',
-   display: 'Hour',
type: 'number',
canGroup: true
},
@@ -220,7 +209,6 @@
table: 'pf',
column : 'date',
func: 'timestampdiff(YEAR, [[COL]], utc_timestamp())',
-   display: 'Years ago',
 

[MediaWiki-commits] [Gerrit] pybal: whitespace-only: align => - change (operations/puppet)

2015-12-06 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: pybal: whitespace-only: align =>
..


pybal: whitespace-only: align =>

Change-Id: I1dcfa5259d84bfe812e26e99066eb986d61d577c
---
M modules/pybal/manifests/init.pp
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/modules/pybal/manifests/init.pp b/modules/pybal/manifests/init.pp
index ad609f6..15bf69a 100644
--- a/modules/pybal/manifests/init.pp
+++ b/modules/pybal/manifests/init.pp
@@ -4,16 +4,16 @@
 }
 
 file { '/etc/default/pybal':
-mode   => '0555',
-owner  => 'root',
-group  => 'root',
-source => 'puppet:///modules/pybal/default',
+mode=> '0555',
+owner   => 'root',
+group   => 'root',
+source  => 'puppet:///modules/pybal/default',
 require => Package['pybal'],
 }
 
 service { 'pybal':
-ensure => running,
-enable => true,
+ensure  => running,
+enable  => true,
 require => File['/etc/default/pybal'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1dcfa5259d84bfe812e26e99066eb986d61d577c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] pybal: persist journal logs to disk - change (operations/puppet)

2015-12-06 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: pybal: persist journal logs to disk
..

pybal: persist journal logs to disk

Currently the pybal service logs directly to the systemd journal
via stdio, and then isn't persisted to actual log files.  This
persists the log data to /var/log/pybal.log with daily logrotate
and 15 days of history.

Change-Id: Iec425f7866ee3e596e5eb5f4a388de46a798fe12
---
A modules/pybal/files/pybal.logrotate.conf
A modules/pybal/files/pybal.rsyslog.conf
M modules/pybal/manifests/init.pp
3 files changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/257208/1

diff --git a/modules/pybal/files/pybal.logrotate.conf 
b/modules/pybal/files/pybal.logrotate.conf
new file mode 100644
index 000..dbe9edd
--- /dev/null
+++ b/modules/pybal/files/pybal.logrotate.conf
@@ -0,0 +1,12 @@
+/var/log/pybal.log
+{
+rotate 15
+daily
+missingok
+notifempty
+delaycompress
+compress
+postrotate
+reload rsyslog >/dev/null 2>&1 || true
+endscript
+}
diff --git a/modules/pybal/files/pybal.rsyslog.conf 
b/modules/pybal/files/pybal.rsyslog.conf
new file mode 100644
index 000..6c46d20
--- /dev/null
+++ b/modules/pybal/files/pybal.rsyslog.conf
@@ -0,0 +1,4 @@
+# NOTE: This file is managed by Puppet.
+
+# rsyslogd varnishkafka config.
+if $programname == 'pybal' then /var/log/pybal.log
diff --git a/modules/pybal/manifests/init.pp b/modules/pybal/manifests/init.pp
index 15bf69a..e6c0154 100644
--- a/modules/pybal/manifests/init.pp
+++ b/modules/pybal/manifests/init.pp
@@ -17,6 +17,18 @@
 require => File['/etc/default/pybal'],
 }
 
+rsyslog::conf { 'pybal':
+source   => 'puppet:///modules/pybal/pybal.rsyslog.conf',
+priority => 75,
+before   => Service['pybal'],
+}
+
+file { '/etc/logrotate.d/pybal':
+ensure => present,
+source => 'puppet:///modules/pybal/pybal.logrotate.conf',
+mode   => '0444',
+}
+
 nrpe::monitor_service { 'pybal':
 description  => 'pybal',
 nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -u root -a 
/usr/sbin/pybal',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec425f7866ee3e596e5eb5f4a388de46a798fe12
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] pybal: whitespace-only: align => - change (operations/puppet)

2015-12-06 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: pybal: whitespace-only: align =>
..

pybal: whitespace-only: align =>

Change-Id: I1dcfa5259d84bfe812e26e99066eb986d61d577c
---
M modules/pybal/manifests/init.pp
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/257207/1

diff --git a/modules/pybal/manifests/init.pp b/modules/pybal/manifests/init.pp
index ad609f6..15bf69a 100644
--- a/modules/pybal/manifests/init.pp
+++ b/modules/pybal/manifests/init.pp
@@ -4,16 +4,16 @@
 }
 
 file { '/etc/default/pybal':
-mode   => '0555',
-owner  => 'root',
-group  => 'root',
-source => 'puppet:///modules/pybal/default',
+mode=> '0555',
+owner   => 'root',
+group   => 'root',
+source  => 'puppet:///modules/pybal/default',
 require => Package['pybal'],
 }
 
 service { 'pybal':
-ensure => running,
-enable => true,
+ensure  => running,
+enable  => true,
 require => File['/etc/default/pybal'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dcfa5259d84bfe812e26e99066eb986d61d577c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] Fix get()/getMulti() check key race condition in WANObjectCache - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix get()/getMulti() check key race condition in WANObjectCache
..


Fix get()/getMulti() check key race condition in WANObjectCache

If a set() happened around the exact same time as check key was
initialized via get(), the curTTL in future get() calls could
sometimes be 0 instead of a negative value, even though hold-off
should apply.

Change-Id: Ide1fd65112aff425a4798e2ec406d71f2a8e84a7
---
M includes/libs/objectcache/WANObjectCache.php
M tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
2 files changed, 45 insertions(+), 11 deletions(-)

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



diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index 4005abb..95bf743 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -251,6 +251,7 @@
 
// Fetch all of the raw values
$wrappedValues = $this->cache->getMulti( array_merge( 
$valueKeys, $checkKeysFlat ) );
+   // Time used to compare/init "check" keys (derived after 
getMulti() to be pessimistic)
$now = microtime( true );
 
// Collect timestamps from all "check" keys
@@ -282,7 +283,10 @@
foreach ( $purgeValues as $purge ) {
$safeTimestamp = $purge[self::FLD_TIME] 
+ $purge[self::FLD_HOLDOFF];
if ( $safeTimestamp >= 
$wrappedValues[$vKey][self::FLD_TIME] ) {
-   $curTTL = min( $curTTL, 
$purge[self::FLD_TIME] - $now );
+   // How long ago this value was 
expired by *this* check key
+   $ago = min( 
$purge[self::FLD_TIME] - $now, self::TINY_NEGATIVE );
+   // How long ago this value was 
expired by *any* known check key
+   $curTTL = min( $curTTL, $ago );
}
}
}
diff --git a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php 
b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
index 1511557..efc37d2 100644
--- a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
+++ b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
@@ -303,9 +303,9 @@
// Fake initial check key to be set in the past. Otherwise we'd 
have to sleep for
// several seconds during the test to assert the behaviour.
foreach ( array( $checkAll, $check1, $check2 ) as $checkKey ) {
-   $this->internalCache->set( $cache::TIME_KEY_PREFIX . 
$checkKey,
-   $cache::PURGE_VAL_PREFIX . microtime( true ) - 
$cache::HOLDOFF_TTL, $cache::CHECK_KEY_TTL );
+   $cache->touchCheckKey( $checkKey, 
WANObjectCache::HOLDOFF_NONE );
}
+   usleep( 100 );
 
$cache->set( 'key1', $value1, 10 );
$cache->set( 'key2', $value2, 10 );
@@ -322,14 +322,12 @@
$result,
'Initial values'
);
-   $this->assertEquals(
-   array( 'key1' => 0, 'key2' => 0 ),
-   $curTTLs,
-   'Initial ttls'
-   );
+   $this->assertGreaterThanOrEqual( 9.5, $curTTLs['key1'], 
'Initial ttls' );
+   $this->assertLessThanOrEqual( 10.5, $curTTLs['key1'], 'Initial 
ttls' );
+   $this->assertGreaterThanOrEqual( 9.5, $curTTLs['key2'], 
'Initial ttls' );
+   $this->assertLessThanOrEqual( 10.5, $curTTLs['key2'], 'Initial 
ttls' );
 
$cache->touchCheckKey( $check1 );
-   usleep( 100 );
 
$curTTLs = array();
$result = $cache->getMulti( array( 'key1', 'key2', 'key3' ), 
$curTTLs, array(
@@ -344,10 +342,9 @@
'key1 expired by check1, but value still provided'
);
$this->assertLessThan( 0, $curTTLs['key1'], 'key1 TTL expired' 
);
-   $this->assertEquals( 0, $curTTLs['key2'], 'key2 still valid' );
+   $this->assertGreaterThan( 0, $curTTLs['key2'], 'key2 still 
valid' );
 
$cache->touchCheckKey( $checkAll );
-   usleep( 100 );
 
$curTTLs = array();
$result = $cache->getMulti( array( 'key1', 'key2', 'key3' ), 
$curTTLs, array(
@@ -366,6 +363,39 @@
}
 
/**
+* @covers WANObjectCache::get()
+* @covers WANObjectCache::processCheckKeys()
+*/
+   

[MediaWiki-commits] [Gerrit] Make ForkController destroy redis instances too - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make ForkController destroy redis instances too
..


Make ForkController destroy redis instances too

Bug: T85565
Change-Id: I79e1b6aab30ef8ddfee2dd4f5f41e991562dbf13
---
M includes/ForkController.php
M includes/clientpool/RedisConnectionPool.php
2 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/includes/ForkController.php b/includes/ForkController.php
index c1765e2..4a021ee 100644
--- a/includes/ForkController.php
+++ b/includes/ForkController.php
@@ -153,7 +153,9 @@
wfGetLBFactory()->destroyInstance();
FileBackendGroup::destroySingleton();
LockManagerGroup::destroySingletons();
+   JobQueueGroup::destroySingletons();
ObjectCache::clear();
+   RedisConnectionPool::destroySingletons();
$wgMemc = null;
}
 
diff --git a/includes/clientpool/RedisConnectionPool.php 
b/includes/clientpool/RedisConnectionPool.php
index 64db0d6..1b9f9b3 100644
--- a/includes/clientpool/RedisConnectionPool.php
+++ b/includes/clientpool/RedisConnectionPool.php
@@ -167,6 +167,14 @@
}
 
/**
+* Destroy all singleton() instances
+* @since 1.27
+*/
+   public static function destroySingletons() {
+   self::$instances = array();
+   }
+
+   /**
 * Get a connection to a redis server. Based on code in 
RedisBagOStuff.php.
 *
 * @param string $server A hostname/port combination or the absolute 
path of a UNIX socket.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79e1b6aab30ef8ddfee2dd4f5f41e991562dbf13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix PHPDoc for getTimeAndDelay() - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix PHPDoc for getTimeAndDelay()
..


Fix PHPDoc for getTimeAndDelay()

Change-Id: I7e5b368d13489afec6df56cdc3e71c2e60e07e20
---
M includes/utils/UIDGenerator.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php
index 6171d58..e2de900 100644
--- a/includes/utils/UIDGenerator.php
+++ b/includes/utils/UIDGenerator.php
@@ -429,6 +429,7 @@
 * @param string $lockFile Name of a local lock file
 * @param int $clockSeqSize The number of possible clock sequence values
 * @param int $counterSize The number of possible counter values
+* @param int $offsetSize The number of possible offset values
 * @return array (result of UIDGenerator::millitime(), counter, clock 
sequence)
 * @throws RuntimeException
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e5b368d13489afec6df56cdc3e71c2e60e07e20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make RefreshLinksJob de-duplication more robust - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make RefreshLinksJob de-duplication more robust
..


Make RefreshLinksJob de-duplication more robust

* Do not de-duplicate jobs with "masterPos". It either does not
  catch anything or is not correct. Previously, it was the later,
  by making getDuplicationInfo() ignore the position. That made the
  oldest DB position win among "duplicate" jobs, which is unsafe.
* From graphite, deduplication only applies .5-2% of the time for
  "refreshLinks", so there should not be much more duplicated
  effort. Dynamic and Prioritized refreshLinks jobs remain
  de-duplicated on push() and root job de-duplication still applies
  as it did before. Also, getLinksTimestamp() is still checked to
  avoid excess work.
* Document the class constants.

Change-Id: Ie9a10aa58f14fa76917501065dfe65083afb985c
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 11 insertions(+), 20 deletions(-)

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



diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index fa3278d..fa614d5 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -35,29 +35,22 @@
  * @ingroup JobQueue
  */
 class RefreshLinksJob extends Job {
+   /** @var float Cache parser output when it takes this long to render */
const PARSE_THRESHOLD_SEC = 1.0;
-
+   /** @var integer Lag safety margin when comparing root job times to 
last-refresh times */
const CLOCK_FUDGE = 10;
 
function __construct( Title $title, array $params ) {
parent::__construct( 'refreshLinks', $title, $params );
-   // Base backlink update jobs and per-title update jobs can be 
de-duplicated.
-   // If template A changes twice before any jobs run, a clean 
queue will have:
-   //  (A base, A base)
-   // The second job is ignored by the queue on insertion.
-   // Suppose, many pages use template A, and that template itself 
uses template B.
-   // An edit to both will first create two base jobs. A clean 
FIFO queue will have:
-   //  (A base, B base)
-   // When these jobs run, the queue will have per-title and 
remnant partition jobs:
-   //  (titleX,titleY,titleZ,...,A 
remnant,titleM,titleN,titleO,...,B remnant)
-   // Some these jobs will be the same, and will automatically be 
ignored by
-   // the queue upon insertion. Some title jobs will run before 
the duplicate is
-   // inserted, so the work will still be done twice in those 
cases. More titles
-   // can be de-duplicated as the remnant jobs continue to be 
broken down. This
-   // works best when $wgUpdateRowsPerJob, and either the pages 
have few backlinks
-   // and/or the backlink sets for pages A and B are almost 
identical.
-   $this->removeDuplicates = !isset( $params['range'] )
-   && ( !isset( $params['pages'] ) || count( 
$params['pages'] ) == 1 );
+   // Avoid the overhead of de-duplication when it would be 
pointless
+   $this->removeDuplicates = (
+   // Master positions won't match
+   !isset( $params['masterPos'] ) &&
+   // Ranges rarely will line up
+   !isset( $params['range'] ) &&
+   // Multiple pages per job make matches unlikely
+   !( isset( $params['pages'] ) && count( $params['pages'] 
) != 1 )
+   );
}
 
/**
@@ -273,8 +266,6 @@
public function getDeduplicationInfo() {
$info = parent::getDeduplicationInfo();
if ( is_array( $info['params'] ) ) {
-   // Don't let highly unique "masterPos" values ruin 
duplicate detection
-   unset( $info['params']['masterPos'] );
// For per-pages jobs, the job title is that of the 
template that changed
// (or similar), so remove that since it ruins 
duplicate detection
if ( isset( $info['pages'] ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9a10aa58f14fa76917501065dfe65083afb985c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] Add and use CentralAuthUser::getMasterInstance() method - change (mediawiki...CentralAuth)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add and use CentralAuthUser::getMasterInstance() method
..


Add and use CentralAuthUser::getMasterInstance() method

* Make onAbortLogin use this method
* Converted onAbortNewAccount to using this too
* Fix a few IDEA errors too

Change-Id: Iac63c577d2dfabb773b5a219185f4a8d90fc9257
---
M includes/CentralAuthHooks.php
M includes/CentralAuthUser.php
2 files changed, 32 insertions(+), 8 deletions(-)

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



diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 3c8fcfd..926e84e 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -443,11 +443,11 @@
 * @param $abortError
 * @return bool
 */
-   static function onAbortNewAccount( $user, &$abortError ) {
+   static function onAbortNewAccount( User $user, &$abortError ) {
global $wgCentralAuthPreventUnattached;
global $wgCentralAuthEnableGlobalRenameRequest;
 
-   $centralUser = new CentralAuthUser( $user->getName(), 
CentralAuthUser::READ_LATEST );
+   $centralUser = CentralAuthUser::getMasterInstance( $user );
if ( $centralUser->exists() || 
$centralUser->renameInProgressOn( wfWikiID() ) ) {
$abortError = wfMessage( 'centralauth-account-exists' 
)->text();
return false;
@@ -498,7 +498,7 @@
 * @throws Exception
 */
static function onAbortLogin( User $user, $pass, &$retval, &$msg ) {
-   $centralUser = CentralAuthUser::getInstance( $user );
+   $centralUser = CentralAuthUser::getMasterInstance( $user );
 
// Since logins are rare, check the actual DB
$rename = $centralUser->renameInProgressOn( wfWikiID() );
@@ -579,8 +579,8 @@
/**
 * Show a nicer error when the user account does not exist on the local 
wiki, but
 * does exist globally
-* @param $users Array
-* @param $data Array
+* @param $users User[]
+* @param $data array
 * @param $abortError String
 * @return bool
 */
@@ -608,7 +608,7 @@
 * @return bool
 */
static function onUserLoginComplete( &$user, &$inject_html ) {
-   global $wgCentralAuthLoginWiki, $wgCentralAuthCookies;
+   global $wgCentralAuthCookies;
global $wgCentralAuthCheckSULMigration;
 
if ( $wgCentralAuthCheckSULMigration &&
@@ -980,7 +980,7 @@
 * @param $userName
 * @return bool
 */
-   static function onUserLogoutComplete( &$user, &$inject_html, $userName 
) {
+   static function onUserLogoutComplete( User &$user, &$inject_html, 
$userName ) {
global $wgCentralAuthCookies, $wgCentralAuthLoginWiki, 
$wgCentralAuthAutoLoginWikis;
 
if ( !$wgCentralAuthCookies ) {
@@ -1356,9 +1356,10 @@
}
 
/**
-* @param $id user_id integer
+* @param integer $id User ID
 * @param User $user
 * @param SpecialPage $sp
+* @return bool
 */
static function onSpecialContributionsBeforeMainOutput( $id, User 
$user, SpecialPage $sp ) {
if ( $user->isAnon() ) {
@@ -1910,6 +1911,7 @@
 * @param array &$namesById array of userIds=>names to associate
 * @param bool|User $audience show hidden names based on this user, or 
false for public
 * @param string $wgMWOAuthSharedUserSource the authoritative extension
+* @return bool
 */
public static function onOAuthGetUserNamesFromCentralIds( 
$wgMWOAuthCentralWiki, &$namesById, $audience, $wgMWOAuthSharedUserSource ) {
if ( $wgMWOAuthSharedUserSource !== 'CentralAuth' ) {
@@ -1944,6 +1946,8 @@
 * @param string $wgMWOAuthCentralWiki
 * @param User &$user the loca user object
 * @param string $wgMWOAuthSharedUserSource the authoritative extension
+* @return bool
+* @throws Exception
 */
public static function onOAuthGetLocalUserFromCentralId( $userId, 
$wgMWOAuthCentralWiki, &$user, $wgMWOAuthSharedUserSource ) {
if ( $wgMWOAuthSharedUserSource !== 'CentralAuth' ) {
@@ -1992,6 +1996,7 @@
 * @param string $wgMWOAuthCentralWiki
 * @param int &$id the user_id of the matching name on the central wiki
 * @param string $wgMWOAuthSharedUserSource the authoritative extension
+* @return bool
 */
public static function onOAuthGetCentralIdFromLocalUser( $user, 
$wgMWOAuthCentralWiki, &$id, $wgMWOAuthSharedUserSource ) {
if ( $wgMWOAuthSharedUserSource !== 'CentralAuth' ) {
@@ -2020,6 +2025,7 @@
 * @param string $wgMWOAuthCentralWiki
 * 

[MediaWiki-commits] [Gerrit] Allow auto suggestion for subpages of some special pages - change (mediawiki/core)

2015-12-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Allow auto suggestion for subpages of some special pages
..

Allow auto suggestion for subpages of some special pages

The autocomplete search allows special pages to define the list of
subpages to be excepted. Fill up the function to show auto suggestion
for subpages of the following special pages:

Special:AllPages
Special:ChangeContentModel
Special:FileDuplicateSearch
Special:Movepage
Special:PageLanguage
Special:Prefixindex
Special:Recentchangeslinked
Special:Undelete

This makes it easier to navigate to this special pages with a prefilled
title/target field.

Change-Id: I71f77c3001a12d75b901807c20115cead9c64e93
---
M includes/specials/SpecialAllPages.php
M includes/specials/SpecialChangeContentModel.php
M includes/specials/SpecialFileDuplicateSearch.php
M includes/specials/SpecialMovepage.php
M includes/specials/SpecialPageLanguage.php
M includes/specials/SpecialPrefixindex.php
M includes/specials/SpecialRecentchangeslinked.php
M includes/specials/SpecialUndelete.php
8 files changed, 149 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/257197/1

diff --git a/includes/specials/SpecialAllPages.php 
b/includes/specials/SpecialAllPages.php
index 190fe8f..c255fcd 100644
--- a/includes/specials/SpecialAllPages.php
+++ b/includes/specials/SpecialAllPages.php
@@ -356,6 +356,24 @@
}
}
 
+   /**
+* Return an array of subpages beginning with $search that this special 
page will accept.
+*
+* @param string $search Prefix to search for
+* @param int $limit Maximum number of results to return (usually 10)
+* @param int $offset Number of results to skip (usually 0)
+* @return string[] Matching subpages
+*/
+   public function prefixSearchSubpages( $search, $limit, $offset ) {
+   if ( $search === '' ) {
+   return array();
+   }
+   // Autocomplete subpage the same as a normal search
+   $prefixSearcher = new StringPrefixSearch;
+   $result = $prefixSearcher->search( $search, $limit, array(), 
$offset );
+   return $result;
+   }
+
protected function getGroupName() {
return 'pages';
}
diff --git a/includes/specials/SpecialChangeContentModel.php 
b/includes/specials/SpecialChangeContentModel.php
index b702ca0..4179f11 100644
--- a/includes/specials/SpecialChangeContentModel.php
+++ b/includes/specials/SpecialChangeContentModel.php
@@ -221,6 +221,24 @@
$out->addWikiMsg( 'changecontentmodel-success-text', 
$this->title );
}
 
+   /**
+* Return an array of subpages beginning with $search that this special 
page will accept.
+*
+* @param string $search Prefix to search for
+* @param int $limit Maximum number of results to return (usually 10)
+* @param int $offset Number of results to skip (usually 0)
+* @return string[] Matching subpages
+*/
+   public function prefixSearchSubpages( $search, $limit, $offset ) {
+   if ( $search === '' ) {
+   return array();
+   }
+   // Autocomplete subpage the same as a normal search
+   $prefixSearcher = new StringPrefixSearch;
+   $result = $prefixSearcher->search( $search, $limit, array(), 
$offset );
+   return $result;
+   }
+
protected function getGroupName() {
return 'pagetools';
}
diff --git a/includes/specials/SpecialFileDuplicateSearch.php 
b/includes/specials/SpecialFileDuplicateSearch.php
index 8c9a76b..4829e7b 100644
--- a/includes/specials/SpecialFileDuplicateSearch.php
+++ b/includes/specials/SpecialFileDuplicateSearch.php
@@ -232,6 +232,29 @@
return "$plink . . $user . . $time";
}
 
+
+   /**
+* Return an array of subpages beginning with $search that this special 
page will accept.
+*
+* @param string $search Prefix to search for
+* @param int $limit Maximum number of results to return (usually 10)
+* @param int $offset Number of results to skip (usually 0)
+* @return string[] Matching subpages
+*/
+   public function prefixSearchSubpages( $search, $limit, $offset ) {
+   if ( $search === '' ) {
+   return array();
+   }
+   // Autocomplete subpage the same as a normal search, but just 
for files
+   $prefixSearcher = new TitlePrefixSearch;
+   $result = $prefixSearcher->search( $search, $limit, array( 
NS_FILE ), $offset );
+
+   return array_map( function ( Title $t ) {
+   // Remove namespace in search suggestion

[MediaWiki-commits] [Gerrit] Add new Thumbor repos - change (integration/config)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add new Thumbor repos
..


Add new Thumbor repos

And reorder the whole list alphabetically

Change-Id: Ia00be6e1b08d14fe2b08f8c1d692bfde191413eb
---
M zuul/layout.yaml
1 file changed, 26 insertions(+), 6 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 026f30d..42dde88 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2195,15 +2195,11 @@
 template:
   - name: npm
 
-  - name: thumbor/purger
-template:
-  - name: tox-jessie
-
   - name: thumbor/conditional-sharpen
 template:
   - name: tox-jessie
 
-  - name: thumbor/result-storage
+  - name: thumbor/djvu-engine
 template:
   - name: tox-jessie
 
@@ -2211,7 +2207,11 @@
 template:
   - name: tox-jessie
 
-  - name: thumbor/vips-engine
+  - name: thumbor/ghostscript-engine
+template:
+  - name: tox-jessie
+
+  - name: thumbor/page
 template:
   - name: tox-jessie
 
@@ -2219,6 +2219,26 @@
 template:
   - name: tox-jessie
 
+  - name: thumbor/purger
+template:
+  - name: tox-jessie
+
+  - name: thumbor/result-storage
+template:
+  - name: tox-jessie
+
+  - name: thumbor/tiff-engine
+template:
+  - name: tox-jessie
+
+  - name: thumbor/vips-engine
+template:
+  - name: tox-jessie
+
+  - name: thumbor/xcf-engine
+template:
+  - name: tox-jessie
+
   - name: integration/docroot
 test:
  - php-composer-test

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia00be6e1b08d14fe2b08f8c1d692bfde191413eb
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] SpecialContributions: Fix whitespace in tagfilter - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialContributions: Fix whitespace in tagfilter
..


SpecialContributions: Fix whitespace in tagfilter

Removing the first element of an array, and using it as a label, doesn't make
much sense, if the array will be imploded using a whitespace to add a whitespace
between both array parts.

Instead of writing:
Tag filter:

this will result in the expected output:
Tag filter: 

Change-Id: Ifc9de7cc6ab380fcff435fcd0410963e72ef6203
---
M includes/specials/SpecialContributions.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 71d2b23..b1908c2 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -482,7 +482,7 @@
$filterSelection = Html::rawElement(
'td',
array(),
-   array_shift( $tagFilter ) . implode( '', 
$tagFilter )
+   implode( '', $tagFilter )
);
} else {
$filterSelection = Html::rawElement( 'td', array( 
'colspan' => 2 ), '' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc9de7cc6ab380fcff435fcd0410963e72ef6203
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix FOUC: Make graph styles load ahead of HTML - change (mediawiki...Graph)

2015-12-06 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Fix FOUC: Make graph styles load ahead of HTML
..

Fix FOUC: Make graph styles load ahead of HTML

Thanks @maxsem

Change-Id: I13579697d7672f001d7f02b4e5e599955b34f47e
---
M Graph.body.php
M extension.json
2 files changed, 10 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/01/257201/1

diff --git a/Graph.body.php b/Graph.body.php
index 8964b4c..0de41a7 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -73,6 +73,7 @@
$output->addJsConfigVars( 
'wgGraphUrlBlacklist', $wgGraphUrlBlacklist );
$output->addJsConfigVars( 'wgGraphIsTrusted', 
$wgGraphIsTrusted );
 
+   $output->addModuleStyles( 'ext.graph' );
$vegaVer = $output->getExtensionData( 
'graph_vega2' ) ? 2 : 1;
if ( $liveSpecs ) {
$output->addModules( 'ext.graph.vega' . 
$vegaVer );
diff --git a/extension.json b/extension.json
index cdd01a4..3682d35 100644
--- a/extension.json
+++ b/extension.json
@@ -24,28 +24,22 @@
"graph": "Graph\\ApiGraph"
},
"ResourceModules": {
-   "ext.graph.loader": {
-   "scripts": [
-   "modules/graph-loader.js"
-   ],
+   "ext.graph": {
"styles": [
- "styles/common.less"
-   ],
-   "messages": [
-   "graph-loading",
-   "graph-loading-done"
-   ],
-   "dependencies": [
-   "mediawiki.Uri"
+   "styles/common.less"
],
"targets": [
"mobile",
"desktop"
]
},
-   "ext.graph": {
-   "styles": [
-   "styles/common.less"
+   "ext.graph.loader": {
+   "scripts": [
+   "modules/graph-loader.js"
+   ],
+   "messages": [
+   "graph-loading",
+   "graph-loading-done"
],
"dependencies": [
"mediawiki.Uri"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13579697d7672f001d7f02b4e5e599955b34f47e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] Add License - change (mediawiki...MsUpload)

2015-12-06 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged.

Change subject: Add License
..


Add License

Based on the license defined on extension.json, putting GPLv2+
license on the root dir.

Change-Id: I51c5a713506e94fd034f1d9dd85ac33470af9c65
---
A COPYING
1 file changed, 339 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  Umherirrender: Verified; Looks good to me, approved



diff --git a/COPYING b/COPYING
new file mode 100644
index 000..d159169
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this 

[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/ghostscript-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

Change-Id: I863b76cc581ef2a29c905e561c1a1745d4315662
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..879f558
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/ghostscript-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I863b76cc581ef2a29c905e561c1a1745d4315662
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/ghostscript-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gilles 

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/ghostscript-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Initial commit
..

Initial commit

Change-Id: I863b76cc581ef2a29c905e561c1a1745d4315662
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/ghostscript-engine 
refs/changes/78/257178/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..879f558
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/ghostscript-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I863b76cc581ef2a29c905e561c1a1745d4315662
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/ghostscript-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] k8s: Roll etcd into master role - change (operations/puppet)

2015-12-06 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: k8s: Roll etcd into master role
..


k8s: Roll etcd into master role

We don't have a separate etcd right now, and if we do we
can just use the general etcd roles

Change-Id: I25c13ad24110750a395701bc25bc2bb0352ebbdd
---
M manifests/role/tools.pp
1 file changed, 6 insertions(+), 16 deletions(-)

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



diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index 254a49b..cf9c3e9 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -1,19 +1,4 @@
 # Roles for Kubernetes and co on Tool Labs
-class role::toollabs::etcd {
-# To deny access to etcd - atm the kubernetes master
-# and etcd will be on the same host, so ok to just deny
-# access to everyone else
-include base::firewall
-include toollabs::infrastructure
-
-include etcd
-
-ferm::service{'etcd-clients':
-proto  => 'tcp',
-port   => hiera('etcd::client_port', '2379'),
-}
-}
-
 class role::toollabs::docker::registry {
 include ::toollabs::infrastructure
 
@@ -36,7 +21,12 @@
 include base::firewall
 include toollabs::infrastructure
 
-include role::toollabs::etcd
+include ::etcd
+
+ferm::service{'etcd-clients':
+proto  => 'tcp',
+port   => hiera('etcd::client_port', '2379'),
+}
 
 $master_host = hiera('k8s_master', $::fqdn)
 $etcd_url = join(prefix(suffix(hiera('etcd_hosts', [$::fqdn]), ':2379'), 
'https://'), ',')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25c13ad24110750a395701bc25bc2bb0352ebbdd
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/page)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Initial commit
..

Initial commit

Change-Id: I4d7d2cf2335775ed9cd33fa10742b43b6f71730a
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/page 
refs/changes/79/257179/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..029a13c
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/page.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d7d2cf2335775ed9cd33fa10742b43b6f71730a
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/page
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Fix a typo in the message extdist-created-skins - change (mediawiki...ExtensionDistributor)

2015-12-06 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Fix a typo in the message extdist-created-skins
..

Fix a typo in the message extdist-created-skins

To make it closer to extdist-created-extensions.

Change-Id: I477cf3e58d5cc72bfc8bd68c0c72ff4562b8cf6b
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExtensionDistributor 
refs/changes/90/257190/1

diff --git a/i18n/en.json b/i18n/en.json
index 837c7cc..9bdc2c0 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,7 +21,7 @@
"extdist-no-versions-skins": "The selected skin ($1) is not available 
in any version!",
"extdist-submit-version": "Continue",
"extdist-created-extensions": "A snapshot of version $2 of the 
$1 extension for MediaWiki $3 has been created. Your download 
should start automatically in 5 seconds.\n\nThe URL for this snapshot 
is:\n:$4\nYou can use this link to download the extension on any computer, but 
please do not bookmark it, since its contents will not be updated, and it may 
be deleted at a later date.\n\nYou should extract the tar archive's contents 
into the extensions directory of your MediaWiki installation. For example, on a 
Unix-like OS:\n\n\ntar -xzf $5 -C 
/var/www/mediawiki/extensions\n\n\nOn Windows, you can use 
[http://www.7-zip.org/ 7-zip] to extract the files.\n\nIf your wiki is on a 
remote server, extract the files to a temporary directory on your local 
computer, and then upload '''all''' of the extracted files to the extensions 
directory on the server.\n\nAfter you have extracted the files, you will need 
to register the extension in LocalSettings.php. The extension documentation 
should have instructions on how to do this.\n\nIf you have any questions about 
this extension distribution system, please go to [[Extension 
talk:ExtensionDistributor]].",
-   "extdist-created-skins": "A snapshot of version $2 of the 
$1 skin for MediaWiki $3 has been created. Your download should 
start automatically in 5 seconds.\n\nThe URL for this snapshot is:\n:$4\nYou 
can use this link to download the skin on any computer, but please do not 
bookmark it, since its contents will not be updated, and it may be deleted at a 
later date.\n\nYou should extract the tar archive's contents into the skins 
directory of your MediaWiki installation. For example, on a Unixn\ntar 
-xzf $5 -C /var/www/mediawiki/skins\n\n\nOn Windows, you can use 
[http://www.7-zip.org/ 7-zip] to extract the files.\n\nIf your wiki is on a 
remote server, extract the files to a temporary directory on your local 
computer, and then upload '''all''' of the extracted files to the skins 
directory on the server.\n\nAfter you have extracted the files, you will need 
to register the skin in LocalSettings.php. The skin documentation should have 
instructions on how to do this.\n\nIf you have any questions about this skin 
distribution system, please go to [[Extension talk:ExtensionDistributor]].",
+   "extdist-created-skins": "A snapshot of version $2 of the 
$1 skin for MediaWiki $3 has been created. Your download should 
start automatically in 5 seconds.\n\nThe URL for this snapshot is:\n:$4\nYou 
can use this link to download the skin on any computer, but please do not 
bookmark it, since its contents will not be updated, and it may be deleted at a 
later date.\n\nYou should extract the tar archive's contents into the skins 
directory of your MediaWiki installation. For example, on a Unix-like 
OS:\n\n\ntar -xzf $5 -C /var/www/mediawiki/skins\n\n\nOn Windows, 
you can use [http://www.7-zip.org/ 7-zip] to extract the files.\n\nIf your wiki 
is on a remote server, extract the files to a temporary directory on your local 
computer, and then upload '''all''' of the extracted files to the skins 
directory on the server.\n\nAfter you have extracted the files, you will need 
to register the skin in LocalSettings.php. The skin documentation should have 
instructions on how to do this.\n\nIf you have any questions about this skin 
distribution system, please go to [[Extension talk:ExtensionDistributor]].",
"extdist-want-more-extensions": "Get another extension",
"extdist-want-more-skins": "Get another skin",
"extdist-tar-error": "Unable to fetch archive URL from archive API.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I477cf3e58d5cc72bfc8bd68c0c72ff4562b8cf6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki.ForeignStructuredUpload: Always use '|1=' for desc... - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mediawiki.ForeignStructuredUpload: Always use '|1=' for 
description templates
..


mediawiki.ForeignStructuredUpload: Always use '|1=' for description templates

'|1=' should be always used, following the standard on Commons.

Follow-up to 56af60ab91e0b74af9e416b11fa487e15097f5bc.

Bug: T119691
Change-Id: Ied787ecb91aaae3f643c9d013b8982ddabea8142
---
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  TTO: Looks good to me, but someone else must approve
  Florianschmidtwelzow: Looks good to me, approved
  Steinsplitter: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js 
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
index 5e79039..0117cea 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
@@ -136,12 +136,11 @@
 * @return {string}
 */
ForeignStructuredUpload.prototype.getDescriptions = function () {
-   var i, desc, hasEquals, templateCalls = [];
+   var i, desc, templateCalls = [];
 
for ( i = 0; i < this.descriptions.length; i++ ) {
desc = this.descriptions[ i ];
-   hasEquals = desc.text.indexOf( '=' ) !== -1;
-   templateCalls.push( '{{' + desc.language + ( hasEquals 
? '|1=' : '|' ) + desc.text + '}}' );
+   templateCalls.push( '{{' + desc.language + '|1=' + 
desc.text + '}}' );
}
 
return templateCalls.join( '\n' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied787ecb91aaae3f643c9d013b8982ddabea8142
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Steinsplitter 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Page filter - change (thumbor/page)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Page filter
..

Page filter

Needed by multipage formats (PDF, DjVu, TIFF)

Bug: T120207
Bug: T120202
Bug: T120203
Change-Id: I0e6cfb805c60b6bcbcad9be4d71dc2f5e8f8d74f
---
A LICENSE
A requirements.txt
A setup.py
A tox.ini
A wikimedia_thumbor_page/__init__.py
5 files changed, 91 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/page 
refs/changes/81/257181/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..ef29d7d
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..61a0de0
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_page',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-page',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor filter to pass page number',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..9e359d2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_page/__init__.py 
b/wikimedia_thumbor_page/__init__.py
new file mode 100644
index 000..5620a6d
--- /dev/null
+++ b/wikimedia_thumbor_page/__init__.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# thumbor imaging service
+# https://github.com/thumbor/thumbor/wiki
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2011 globo.com timeh...@corp.globo.com
+# Copyright (c) 2015 Wikimedia Foundation
+
+# Simply passes the page parameter
+
+from thumbor.filters import BaseFilter, filter_method, PHASE_PRE_LOAD
+
+
+class Filter(BaseFilter):
+phase = PHASE_PRE_LOAD
+
+@filter_method(BaseFilter.PositiveNumber)
+def page(self, value):
+self.context.request.page = value

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e6cfb805c60b6bcbcad9be4d71dc2f5e8f8d74f
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/page
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] dynamicproxy: Increase websocket timeout - change (operations/puppet)

2015-12-06 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: dynamicproxy: Increase websocket timeout
..


dynamicproxy: Increase websocket timeout

Bug: T120335
Change-Id: Ib19ca16dd4f37fcad4f18bb3f0837d786df67446
---
M modules/dynamicproxy/templates/domainproxy.conf
M modules/dynamicproxy/templates/nginx.conf
M modules/dynamicproxy/templates/urlproxy.conf
3 files changed, 7 insertions(+), 10 deletions(-)

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



diff --git a/modules/dynamicproxy/templates/domainproxy.conf 
b/modules/dynamicproxy/templates/domainproxy.conf
index f794d98..a84c5a1 100644
--- a/modules/dynamicproxy/templates/domainproxy.conf
+++ b/modules/dynamicproxy/templates/domainproxy.conf
@@ -54,11 +54,6 @@
 listen 80;
 <%- end -%>
 
-# Some projects have tools that take data in and process them
-# for a long time. While ideally they should be made async, this
-# is an interim solution that works for now.
-proxy_read_timeout 600s;
-
 # People upload large files, and that is okay.
 # We can make this larger if need be.
 client_max_body_size 128m;
diff --git a/modules/dynamicproxy/templates/nginx.conf 
b/modules/dynamicproxy/templates/nginx.conf
index e71efc0..9145d77 100644
--- a/modules/dynamicproxy/templates/nginx.conf
+++ b/modules/dynamicproxy/templates/nginx.conf
@@ -17,6 +17,12 @@
 keepalive_timeout 15; # Default of 65 is a bit too high, reducing to 
decrease load
 types_hash_max_size 2048;
 
+# Some projects have tools that take data in and process them
+# for a long time. While ideally they should be made async, this
+# is an interim solution that works for now.
+# This is doubly important for websockets
+proxy_read_timeout 3600s;
+
 include /etc/nginx/mime.types;
 default_type application/octet-stream;
 
@@ -25,4 +31,4 @@
 
 include /etc/nginx/conf.d/*.conf;
 include /etc/nginx/sites-enabled/*;
-}
\ No newline at end of file
+}
diff --git a/modules/dynamicproxy/templates/urlproxy.conf 
b/modules/dynamicproxy/templates/urlproxy.conf
index 118a1e4..7bf4c64 100644
--- a/modules/dynamicproxy/templates/urlproxy.conf
+++ b/modules/dynamicproxy/templates/urlproxy.conf
@@ -58,10 +58,6 @@
 #  b) or, if puppet doesn't work, remove the # from the next line and 
remove all lines after it (!)
 <% if !@error_enabled %>#<% end %>root /var/www/error; default_type 
text/html; error_page 503 /errorpage.html; try_files $uri =503;
 <% if !@error_enabled %>
-# Some projects have tools that take data in and process them
-# for a long time. While ideally they should be made async, this
-# is an interim solution that works for now.
-proxy_read_timeout 600s;
 
 # People upload large files, and that is okay.
 # We can make this larger if need be.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib19ca16dd4f37fcad4f18bb3f0837d786df67446
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/djvu-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

Change-Id: Iec65678e9882489f49bccf47ba3f7868ea530a82
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..d7721cd
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/djvu-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec65678e9882489f49bccf47ba3f7868ea530a82
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/djvu-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gilles 

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/djvu-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Initial commit
..

Initial commit

Change-Id: Iec65678e9882489f49bccf47ba3f7868ea530a82
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/djvu-engine 
refs/changes/82/257182/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..d7721cd
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/djvu-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec65678e9882489f49bccf47ba3f7868ea530a82
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/djvu-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Add new Thumbor repos - change (integration/config)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Add new Thumbor repos
..

Add new Thumbor repos

And reorder the whole list alphabetically

Change-Id: Ia00be6e1b08d14fe2b08f8c1d692bfde191413eb
---
M zuul/layout.yaml
1 file changed, 26 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/88/257188/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 026f30d..42dde88 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2195,15 +2195,11 @@
 template:
   - name: npm
 
-  - name: thumbor/purger
-template:
-  - name: tox-jessie
-
   - name: thumbor/conditional-sharpen
 template:
   - name: tox-jessie
 
-  - name: thumbor/result-storage
+  - name: thumbor/djvu-engine
 template:
   - name: tox-jessie
 
@@ -2211,7 +2207,11 @@
 template:
   - name: tox-jessie
 
-  - name: thumbor/vips-engine
+  - name: thumbor/ghostscript-engine
+template:
+  - name: tox-jessie
+
+  - name: thumbor/page
 template:
   - name: tox-jessie
 
@@ -2219,6 +2219,26 @@
 template:
   - name: tox-jessie
 
+  - name: thumbor/purger
+template:
+  - name: tox-jessie
+
+  - name: thumbor/result-storage
+template:
+  - name: tox-jessie
+
+  - name: thumbor/tiff-engine
+template:
+  - name: tox-jessie
+
+  - name: thumbor/vips-engine
+template:
+  - name: tox-jessie
+
+  - name: thumbor/xcf-engine
+template:
+  - name: tox-jessie
+
   - name: integration/docroot
 test:
  - php-composer-test

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia00be6e1b08d14fe2b08f8c1d692bfde191413eb
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Fix redirections in gerrit - change (operations/puppet)

2015-12-06 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Fix redirections in gerrit
..

Fix redirections in gerrit

This fixes the link so that it at least links to the correct project.

This depends on patch I38de3c6b5b6c8924f9ec7f12ed94142b1050185f

Change-Id: I791130d848d6c42fff4678bc41a581bbdb4f2c62
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/257193/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index bfaba07..85ccaa7 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -61,10 +61,10 @@
 [gitweb]
 url = https://phabricator.wikimedia.org
 type = custom
-revision = /r/revision/${project};${commit}
+revision = /r/project/${project}/revision/${commit}
 project = /r/project/${project}
-branch = /r/branch/${project};${branch}
-filehistory = /r/browse/${project};${branch};${file}
+branch = /r/project/${project}/branch/${branch}
+filehistory = /r/${project}/browse/${branch}/${file}
 linkname = diffusion
 linkDrafts = false
 urlEncode = false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I791130d848d6c42fff4678bc41a581bbdb4f2c62
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] TIFF engine - change (thumbor/tiff-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: TIFF engine
..

TIFF engine

Bug: T120203
Change-Id: I3a1c12707f329e7e49937b51de049719aacae597
---
A LICENSE
A requirements.txt
A setup.py
A tox.ini
A wikimedia_thumbor_tiff_engine/__init__.py
5 files changed, 131 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/tiff-engine 
refs/changes/87/257187/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..39195db
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..9112cdb
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_tiff_engine',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-tiff-engine',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor TIFF engine',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..9e359d2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_tiff_engine/__init__.py 
b/wikimedia_thumbor_tiff_engine/__init__.py
new file mode 100644
index 000..bf7c183
--- /dev/null
+++ b/wikimedia_thumbor_tiff_engine/__init__.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# thumbor imaging service
+# https://github.com/thumbor/thumbor/wiki
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2011 globo.com timeh...@corp.globo.com
+# Copyright (c) 2015 Wikimedia Foundation
+
+# TIFF engine
+
+from thumbor.engines import BaseEngine
+from thumbor.engines.pil import Engine as PilEngine
+from thumbor.utils import EXTENSION
+
+
+# Unfortunately there is no elegant way to extend Thumbor to support
+# a new MIME type, which is why this monkey-patching is done here
+EXTENSION['image/tiff'] = '.tiff'
+
+old_get_mimetype = BaseEngine.get_mimetype
+
+@classmethod
+def new_get_mimetype(cls, buffer):
+if (buffer.startswith('II*\x00') or buffer.startswith('MM\x00*')):
+return 'image/tiff'
+
+return old_get_mimetype(buffer)
+
+BaseEngine.get_mimetype = new_get_mimetype
+
+class Engine(PilEngine):
+def should_run(self, extension, buffer):
+return (extension == '.tiff')
+
+def create_image(self, buffer):
+self.tiff_buffer = buffer
+img = super(Engine, self).create_image(buffer)
+
+try:
+page = self.context.request.page
+img.seek(page - 1)
+except (AttributeError, EOFError):
+page = 1
+img.seek(0)
+
+self.extension = '.jpg'
+
+return img
+
+def read(self, extension=None, quality=None):
+if (extension == 

[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/tiff-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

Change-Id: I4ebf7edefad92e0db5ec116e3c05b6ace92f0bb9
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..0de2cb3
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/tiff-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ebf7edefad92e0db5ec116e3c05b6ace92f0bb9
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/tiff-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gilles 

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


[MediaWiki-commits] [Gerrit] Simplify getattr/setattr magic - change (thumbor/proxy-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Simplify getattr/setattr magic
..

Simplify getattr/setattr magic

By whitelisting local attributes, code is a lot less verbose

Bug: T120566
Change-Id: I7b49b76d48896f8708665e3ef6abac6e224e1504
---
M wikimedia_thumbor_proxy_engine/__init__.py
1 file changed, 57 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/proxy-engine 
refs/changes/89/257189/1

diff --git a/wikimedia_thumbor_proxy_engine/__init__.py 
b/wikimedia_thumbor_proxy_engine/__init__.py
index 5c30b80..01e4b75 100644
--- a/wikimedia_thumbor_proxy_engine/__init__.py
+++ b/wikimedia_thumbor_proxy_engine/__init__.py
@@ -17,13 +17,22 @@
 
 from thumbor.engines import BaseEngine
 
+# These attributes aren't to be proxied, they are local to the class
+LOCAL_ATTRIBUTES = [
+'buffer',
+'context',
+'engines',
+'extension',
+'start'
+]
+
 
 class Engine(BaseEngine):
 def __init__(self, context):
 engines = context.config.PROXY_ENGINE_ENGINES
 
-object.__setattr__(self, 'context', context)
-object.__setattr__(self, 'engines', engines)
+self.context = context
+self.engines = engines
 
 for engine in engines:
 self.init_engine(context, engine)
@@ -31,17 +40,15 @@
 def init_engine(self, context, module):
 mod = importlib.import_module(module)
 klass = getattr(mod, 'Engine')
-object.__setattr__(self, module, klass(context))
+LOCAL_ATTRIBUTES.append(module)
+
+setattr(self, module, klass(context))
 
 def select_engine(self):
-buffer = object.__getattribute__(self, 'buffer')
-extension = object.__getattribute__(self, 'extension')
-engines = object.__getattribute__(self, 'engines')
-
-for enginename in engines:
-engine = object.__getattribute__(self, enginename)
+for enginename in self.engines:
+engine = getattr(self, enginename)
 try:
-if engine.should_run(extension, buffer):
+if engine.should_run(self.extension, self.buffer):
 return enginename
 
 # Not implementing should_run means that the engine
@@ -51,72 +58,85 @@
 except AttributeError:
 return enginename
 
-raise Exception('Unable to find a suitable engine, tried %r' % engines)
+raise Exception(
+'Unable to find a suitable engine, tried %r' % self.engines
+)
 
 # This is our entry point for the proxy, it's the first call to the engine
 def load(self, buffer, extension):
-object.__setattr__(self, 'start', datetime.datetime.now())
+self.start = datetime.datetime.now()
 
 # buffer and extension are needed by select_engine
-object.__setattr__(self, 'extension', extension)
-object.__setattr__(self, 'buffer', buffer)
+self.extension = extension
+self.buffer = buffer
 
 # Now that we'll select the right engine, let's initialize it
-context = object.__getattribute__(self, 'context')
-engine = getattr(self, 'select_engine')()
-context.request_handler.set_header('Engine', engine)
+self.context.request_handler.set_header('Engine', self.select_engine())
 
-super(Engine, self).__init__(context)
+super(Engine, self).__init__(self.context)
 super(Engine, self).load(buffer, extension)
 
 def __getattr__(self, name):
-engine = getattr(self, 'select_engine')()
+# These attributes need to be local to the proxy
+if (name in LOCAL_ATTRIBUTES):
+return super(Engine, self).__getattr__(name)
 
-return getattr(object.__getattribute__(self, engine), name)
+# Any other attributes are to be proxied
+return self.proxy(name)
+
+def proxy(self, name):
+return getattr(getattr(self, self.select_engine()), name)
 
 def __delattr__(self, name):
-engine = self.select_engine()
-return delattr(object.__getattribute__(self, engine), name)
+# These attributes need to be local to the proxy
+if (name in LOCAL_ATTRIBUTES):
+return super(Engine, self).__delattr__(name)
+
+# Any other attributes are to be proxied
+return delattr(getattr(self, self.select_engine()), name)
 
 def __setattr__(self, name, value):
-engine = self.select_engine()
-return setattr(object.__getattribute__(self, engine), name, value)
+# These attributes need to be local to the proxy
+if (name in LOCAL_ATTRIBUTES):
+return super(Engine, self).__setattr__(name, value)
+
+# Any other attributes are to be proxied
+return setattr(getattr(self, self.select_engine()), name, value)
 
 # The following have to be redefined 

[MediaWiki-commits] [Gerrit] |1= should be always used. Following standard on commons. - change (mediawiki/core)

2015-12-06 Thread Zhuyifei1999 (Code Review)
Zhuyifei1999 has uploaded a new change for review.

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

Change subject: |1= should be always used. Following standard on commons.
..

|1= should be always used. Following standard on commons.


This reverts commit 02c2cbc166f720a4d8b0d957e0a908893822e0b4.
Bug: T119691
Change-Id: Ied787ecb91aaae3f643c9d013b8982ddabea8142
---
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/74/257174/1

diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js 
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
index 5e79039..c336676 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
@@ -136,12 +136,11 @@
 * @return {string}
 */
ForeignStructuredUpload.prototype.getDescriptions = function () {
-   var i, desc, hasEquals, templateCalls = [];
+   var i, desc, templateCalls = [];
 
for ( i = 0; i < this.descriptions.length; i++ ) {
desc = this.descriptions[ i ];
-   hasEquals = desc.text.indexOf( '=' ) !== -1;
-   templateCalls.push( '{{' + desc.language + ( hasEquals 
? '|1=' : '|' ) + desc.text + '}}' );
+   templateCalls.push( '{{' + desc.language + '|' + 
desc.text + '}}' );
}
 
return templateCalls.join( '\n' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied787ecb91aaae3f643c9d013b8982ddabea8142
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 
Gerrit-Reviewer: Steinsplitter 

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-12-06T10:00:01+0000 - change (mediawiki...Wikidata)

2015-12-06 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 2015-12-06T10:00:01+
..

New Wikidata Build - 2015-12-06T10:00:01+

Change-Id: I7e1318ec0fd0badd363385cfd0fd3e62a80559a9
---
M composer.lock
M extensions/ExternalValidation/i18n/ca.json
M extensions/Wikibase/client/i18n/as.json
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/prs.json
M extensions/Wikibase/client/i18n/sk.json
M extensions/Wikibase/client/i18n/tt-cyrl.json
M extensions/Wikibase/composer.json
M extensions/Wikibase/repo/i18n/ca.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/he.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/lt.json
M extensions/Wikibase/repo/i18n/mr.json
M extensions/Wikibase/repo/i18n/prs.json
M extensions/Wikibase/repo/i18n/tr.json
M extensions/Wikibase/repo/i18n/tt-cyrl.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/view/tests/phpunit/ClaimHtmlGeneratorTest.php
M extensions/Wikibase/view/tests/phpunit/EmptyEditSectionGeneratorTest.php
M extensions/Wikibase/view/tests/phpunit/EntityTermsViewTest.php
M extensions/Wikibase/view/tests/phpunit/EntityViewFactoryTest.php
M extensions/Wikibase/view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
M extensions/Wikibase/view/tests/phpunit/EntityViewTest.php
M extensions/Wikibase/view/tests/phpunit/ItemViewTest.php
M extensions/Wikibase/view/tests/phpunit/Module/TemplateModuleTest.php
M extensions/Wikibase/view/tests/phpunit/PropertyViewTest.php
M extensions/Wikibase/view/tests/phpunit/SiteLinksViewTest.php
M extensions/Wikibase/view/tests/phpunit/SnakHtmlGeneratorTest.php
M extensions/Wikibase/view/tests/phpunit/StatementGroupListViewTest.php
M extensions/Wikibase/view/tests/phpunit/StatementSectionsViewTest.php
M extensions/Wikibase/view/tests/phpunit/Template/TemplateFactoryTest.php
M extensions/Wikibase/view/tests/phpunit/Template/TemplateRegistryTest.php
M extensions/Wikibase/view/tests/phpunit/Template/TemplateTest.php
M extensions/Wikibase/view/tests/phpunit/TextInjectorTest.php
M extensions/Wikibase/view/tests/phpunit/ToolbarEditSectionGeneratorTest.php
M vendor/composer/autoload_psr4.php
M vendor/composer/installed.json
38 files changed, 99 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/77/257177/1

diff --git a/composer.lock b/composer.lock
index ae45bb6..edf37a4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1194,7 +1194,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityExternalValidation;,
-"reference": "31edf674cecf7fa6bc8ff16f5f45e6dc81ba968c"
+"reference": "0cf923b8db6aff3a334fc30539d50e13412fcf70"
 },
 "require": {
 "php": ">=5.3.0",
@@ -1242,7 +1242,7 @@
 "support": {
 "issues": 
"https://phabricator.wikimedia.org/project/profile/1203/;
 },
-"time": "2015-12-04 22:40:20"
+"time": "2015-12-05 22:16:43"
 },
 {
 "name": "wikibase/internal-serialization",
@@ -1448,12 +1448,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "35d3c1752c38e58644ba1d068504934a4d26e870"
+"reference": "65379a1b64da28411df65169bdc292a9083ac4fa"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/35d3c1752c38e58644ba1d068504934a4d26e870;,
-"reference": "35d3c1752c38e58644ba1d068504934a4d26e870",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/65379a1b64da28411df65169bdc292a9083ac4fa;,
+"reference": "65379a1b64da28411df65169bdc292a9083ac4fa",
 "shasum": ""
 },
 "require": {
@@ -1501,6 +1501,7 @@
 ],
 "psr-4": {
 "Wikibase\\View\\": "view/src",
+"Wikibase\\View\\Tests\\": "view/tests/phpunit",
 "Wikimedia\\Purtle\\": "purtle/src",
 "Wikimedia\\Purtle\\Tests\\": "purtle/tests/phpunit"
 }
@@ -1523,7 +1524,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2015-12-05 00:09:26"
+"time": "2015-12-05 23:33:22"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ExternalValidation/i18n/ca.json 
b/extensions/ExternalValidation/i18n/ca.json
index e374149..67dabad 100644
--- 

[MediaWiki-commits] [Gerrit] k8s: Use regular puppet cert path - change (operations/puppet)

2015-12-06 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: k8s: Use regular puppet cert path
..

k8s: Use regular puppet cert path

Nodes no longer use the strange role::puppet::self related
stuff, so we can just treat them like 'normal' nodes

Change-Id: I8c06cf8319d99bdd1f5b8cde0925ba0fedb2ee61
---
M modules/k8s/manifests/ssl.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/257176/1

diff --git a/modules/k8s/manifests/ssl.pp b/modules/k8s/manifests/ssl.pp
index 0f4ff46..6ffa111 100644
--- a/modules/k8s/manifests/ssl.pp
+++ b/modules/k8s/manifests/ssl.pp
@@ -6,7 +6,7 @@
 $provide_private = false,
 $user = 'root',
 $group = 'root',
-$ssldir = '/var/lib/puppet/client/ssl', # FIXME: This is different for 
self hosted puppet vs not. WHY?
+$ssldir = '/var/lib/puppet/ssl',
 $target_basedir = '/var/lib/kubernetes'
 ) {
 $puppet_cert_name = $::fqdn

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c06cf8319d99bdd1f5b8cde0925ba0fedb2ee61
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Add AUTHORS file and update authors for Special:Version - change (mediawiki...ConfirmEdit)

2015-12-06 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Add AUTHORS file and update authors for Special:Version
..

Add AUTHORS file and update authors for Special:Version

The list of authors was generated with:
git log --all --format='%cN <%cE>' | sort -u

I removed duplicate entries (mostly users.mediawiki.org addresses).

Extra points:
 * Added composer.lock to gitignore

Change-Id: If3e5d3e6dada06b7230d1746932dd5bce88993e7
---
M .gitignore
A AUTHORS.txt
M extension.json
3 files changed, 76 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/91/257191/1

diff --git a/.gitignore b/.gitignore
index 3463cca..a8cb1a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 .DS_Store
 node_modules/
 vendor/
+composer.lock
diff --git a/AUTHORS.txt b/AUTHORS.txt
new file mode 100644
index 000..30ec505
--- /dev/null
+++ b/AUTHORS.txt
@@ -0,0 +1,73 @@
+Contributors (alphabetically)
+
+Aaron Schulz 
+addshore 
+Ævar Arnfjörð Bjarmason 
+Alexandre Emsenhuber 
+Alex Monk 
+Alex Z. 
+Amir E. Aharoni 
+Anders Wegge Jakobsen 
+Andrew Garrett 
+Antoine Musso 
+Aryeh Gregor 
+Bertrand Grondin 
+Brad Jorsch 
+Brion Vibber 
+Bryan Davis 
+Bryan Tong Minh 
+Chad Horohoe 
+Charles Melbye 
+csteipp 
+Derk-Jan Hartman 
+EBernhardson 
+Erik Bernhardson 
+Federico Leva 
+Florian 
+Gilles Dubuc 
+Greg Sabino Mullane 
+Happy-melon 
+Huji 
+Ivan Lanin 
+Jackmcbarn 
+jdlrobson 
+Jeroen De Dauw 
+Jimmy Collins 
+John Du Hart 
+Juliusz Gonera 
+Legoktm 
+Leon Weber 
+Lewis Cawte 
+Luis Felipe Schenone 
+Marius Hoch 
+Mark A. Hershberger 
+Matthew Flaschen 
+Max Semenik 
+Mukunda Modell 
+Nick Jenkins 
+Nikerabbit 
+Ori.livneh 
+paladox 
+Peter Gehres 
+Platonides 
+Purodha B Blissenbach 
+raymond 
+Reedy 
+River Tarnell 
+Roan Kattouw 
+Rob Church 
+Rotem Liss 
+Shinjiman 
+Siebrand Mazeland 
+Southparkfan 
+S Page 
+Sven Heinemann 
+Timo Tijhof 
+Tim Starling 
+Tobias 
+tonythomas01 <01tonytho...@gmail.com>
+Tyler Cipriani 
+Umherirrender 
+yaron 
+Yuki Shira 
+YuviPanda 
diff --git a/extension.json b/extension.json
index 8082005..e1b8663 100644
--- a/extension.json
+++ b/extension.json
@@ -4,6 +4,8 @@
"version": "1.4.0",
"author": [
"Brion Vibber",
+   "Florian Schmidt",
+   "Sam Reed",
"..."
],
"url": "https://www.mediawiki.org/wiki/Extension:ConfirmEdit;,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3e5d3e6dada06b7230d1746932dd5bce88993e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Fix redirections in gerrit - change (phabricator/extensions)

2015-12-06 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Fix redirections in gerrit
..

Fix redirections in gerrit

Currently links in gerrit are linking to wrong places causing errors to
show. This fixes the redirection in gerrit.

Change-Id: I38de3c6b5b6c8924f9ec7f12ed94142b1050185f
---
M GerritApplication.php
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions 
refs/changes/92/257192/1

diff --git a/GerritApplication.php b/GerritApplication.php
index 9821376..59a5869 100644
--- a/GerritApplication.php
+++ b/GerritApplication.php
@@ -28,23 +28,23 @@
 [gitweb]
 url = https://git.wikimedia.org
 type = custom
-revision = /r/revision/${project};${commit}
+revision = /r/project/${project}/revision/${commit}
 project = /r/project/${project}
-branch = /r/branch/${project};${branch}
-filehistory = /r/browse/${project};${branch};${file}
+branch = /r/${project}/branch/${branch}
+filehistory = /r/${project}/browse/${branch}/${file}
 linkname = gitblit
 linkDrafts = false
 */
 
 $routes = array(
   // filehistory
-  
'/r/(?P[a-z]+)/(?P[^:]+);(?P[^;]+);(?P[^;]+)',
+  
'/r/(?P[a-z]+)/project/(?P[^:]+)/browse/(?P[^;]+)/(?P[^;]+)',
   // branch
-  '/r/(?P[a-z]+)/(?P[^;]+);(?P[^;]+)',
+  
'/r/(?P[a-z]+)/project/(?P[^;]+)/branch/(?P[^;]+)',
   // commit
-  '/r/(?P[a-z]+)/(?P[^;]+);(?P[0-9a-z]+)',
+  
'/r/(?P[a-z]+)/project/(?P[^;]+)/revision/(?P[0-9a-z]+)',
   // project
-  '/r/(?P[a-z]+)/(?:(?P[^;]+)/)',
+  '/r/(?P[a-z]+)/project/(?:(?P[^;]+)/)',
 );
 
 self::$routes = array_fill_keys($routes, 'GerritProjectController');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38de3c6b5b6c8924f9ec7f12ed94142b1050185f
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] DjVu engine - change (thumbor/djvu-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: DjVu engine
..

DjVu engine

Bug: T120202
Change-Id: I6c250ed28e4a4e838dbe3e1534ee39acb8845e4d
---
A LICENSE
A requirements.txt
A setup.py
A tox.ini
A wikimedia_thumbor_djvu_engine/__init__.py
5 files changed, 152 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/djvu-engine 
refs/changes/83/257183/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..39195db
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..b5047db
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_djvu_engine',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-djvu-engine',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor DjVu engine',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..9e359d2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_djvu_engine/__init__.py 
b/wikimedia_thumbor_djvu_engine/__init__.py
new file mode 100644
index 000..a91a626
--- /dev/null
+++ b/wikimedia_thumbor_djvu_engine/__init__.py
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# thumbor imaging service
+# https://github.com/thumbor/thumbor/wiki
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2011 globo.com timeh...@corp.globo.com
+# Copyright (c) 2015 Wikimedia Foundation
+
+# Ghostscript engine
+
+import os
+import subprocess
+from tempfile import NamedTemporaryFile
+
+from thumbor.engines import BaseEngine
+from thumbor.utils import EXTENSION
+from wikimedia_thumbor_ghostscript_engine import Engine as GhostscriptEngine
+
+
+# Unfortunately there is no elegant way to extend Thumbor to support
+# a new MIME type, which is why this monkey-patching is done here
+EXTENSION['image/vnd.djvu'] = '.djvu'
+
+old_get_mimetype = BaseEngine.get_mimetype
+
+@classmethod
+def new_get_mimetype(cls, buffer):
+if buffer.startswith('FORM', 4, 8):
+if (buffer.startswith('DJVU', 12, 16) or
+buffer.startswith('DJVM', 12, 16) or
+buffer.startswith('PM44', 12, 16) or
+buffer.startswith('BM44', 12, 16)):
+return 'image/vnd.djvu'
+
+return old_get_mimetype(buffer)
+
+BaseEngine.get_mimetype = new_get_mimetype
+
+class Engine(GhostscriptEngine):
+def should_run(self, extension, buffer):
+return (extension == '.djvu')
+
+def create_image(self, buffer):
+destination = NamedTemporaryFile(delete=False)
+source = NamedTemporaryFile(delete=False)
+

[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/xcf-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Initial commit
..

Initial commit

Change-Id: I2740c200e550d7cc5ff9e1f90c5c670bf30e9f32
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/xcf-engine 
refs/changes/84/257184/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..a21938e
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/xcf-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2740c200e550d7cc5ff9e1f90c5c670bf30e9f32
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/xcf-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Make git dependency of thumbor venv explicit - change (mediawiki/vagrant)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Make git dependency of thumbor venv explicit
..

Make git dependency of thumbor venv explicit

Bug: T120483
Change-Id: I7d35eef4c41e8c5b874d45bcfed7b0cab57d03e8
---
M puppet/modules/thumbor/manifests/init.pp
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/75/257175/1

diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index b567146..95819a4 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -28,6 +28,8 @@
 $sentry_dsn_file,
 ) {
 require ::virtualenv
+# Needed by the venv, which clones a few git repos
+require ::git
 
 # jpegtran
 require_package('libjpeg-progs')
@@ -62,6 +64,8 @@
 require  => [
 Package['libjpeg-progs'],
 Package['python-opencv'],
+# Needs to be an explicit dependency, for the packages pointing to 
git repos
+Package['git'],
 ],
 timeout  => 600, # This venv can be particularly long to download and 
setup
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d35eef4c41e8c5b874d45bcfed7b0cab57d03e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] k8s: Roll etcd into master role - change (operations/puppet)

2015-12-06 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: k8s: Roll etcd into master role
..

k8s: Roll etcd into master role

We don't have a separate etcd right now, and if we do we
can just use the general etcd roles

Change-Id: I25c13ad24110750a395701bc25bc2bb0352ebbdd
---
M manifests/role/tools.pp
1 file changed, 6 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/257173/1

diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index 254a49b..cf9c3e9 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -1,19 +1,4 @@
 # Roles for Kubernetes and co on Tool Labs
-class role::toollabs::etcd {
-# To deny access to etcd - atm the kubernetes master
-# and etcd will be on the same host, so ok to just deny
-# access to everyone else
-include base::firewall
-include toollabs::infrastructure
-
-include etcd
-
-ferm::service{'etcd-clients':
-proto  => 'tcp',
-port   => hiera('etcd::client_port', '2379'),
-}
-}
-
 class role::toollabs::docker::registry {
 include ::toollabs::infrastructure
 
@@ -36,7 +21,12 @@
 include base::firewall
 include toollabs::infrastructure
 
-include role::toollabs::etcd
+include ::etcd
+
+ferm::service{'etcd-clients':
+proto  => 'tcp',
+port   => hiera('etcd::client_port', '2379'),
+}
 
 $master_host = hiera('k8s_master', $::fqdn)
 $etcd_url = join(prefix(suffix(hiera('etcd_hosts', [$::fqdn]), ':2379'), 
'https://'), ',')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25c13ad24110750a395701bc25bc2bb0352ebbdd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/tiff-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Initial commit
..

Initial commit

Change-Id: I4ebf7edefad92e0db5ec116e3c05b6ace92f0bb9
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/tiff-engine 
refs/changes/86/257186/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..0de2cb3
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/tiff-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ebf7edefad92e0db5ec116e3c05b6ace92f0bb9
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/tiff-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] XCF engine - change (thumbor/xcf-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: XCF engine
..

XCF engine

Bug: T120201
Change-Id: I6bdb53b9ab8f259a92675fbfe132a9f1f5e4d079
---
A LICENSE
A requirements.txt
A setup.py
A tox.ini
A wikimedia_thumbor_xcf_engine/__init__.py
5 files changed, 147 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/xcf-engine 
refs/changes/85/257185/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..39195db
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..2409166
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_xcf_engine',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-xcf-engine',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor XCF engine',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..9e359d2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_xcf_engine/__init__.py 
b/wikimedia_thumbor_xcf_engine/__init__.py
new file mode 100644
index 000..1cdf2a9
--- /dev/null
+++ b/wikimedia_thumbor_xcf_engine/__init__.py
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# thumbor imaging service
+# https://github.com/thumbor/thumbor/wiki
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2011 globo.com timeh...@corp.globo.com
+# Copyright (c) 2015 Wikimedia Foundation
+
+# Ghostscript engine
+
+import os
+import subprocess
+from tempfile import NamedTemporaryFile
+
+from thumbor.engines import BaseEngine
+from thumbor.engines.pil import Engine as PilEngine
+from thumbor.utils import EXTENSION
+
+
+# Unfortunately there is no elegant way to extend Thumbor to support
+# a new MIME type, which is why this monkey-patching is done here
+EXTENSION['image/xcf'] = '.xcf'
+
+old_get_mimetype = BaseEngine.get_mimetype
+
+@classmethod
+def new_get_mimetype(cls, buffer):
+if buffer.startswith('gimp xcf'):
+return 'image/xcf'
+
+return old_get_mimetype(buffer)
+
+BaseEngine.get_mimetype = new_get_mimetype
+
+class Engine(PilEngine):
+def should_run(self, extension, buffer):
+return (extension == '.xcf')
+
+def create_image(self, buffer):
+destination = NamedTemporaryFile(delete=False)
+source = NamedTemporaryFile(delete=False)
+source.write(buffer)
+source.close()
+
+self.xcf_buffer = buffer
+
+command = [
+self.context.config.XCF2PNG_PATH,
+source.name,
+"-o",
+destination.name
+]
+
+

[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/xcf-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

Change-Id: I2740c200e550d7cc5ff9e1f90c5c670bf30e9f32
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..a21938e
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/xcf-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2740c200e550d7cc5ff9e1f90c5c670bf30e9f32
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/xcf-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gilles 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: db13a4d..8362017 - change (mediawiki/extensions)

2015-12-06 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: db13a4d..8362017
..

Syncronize VisualEditor: db13a4d..8362017

Change-Id: Id7548760d20a91e5d86009afd507d9c927780fa3
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/54/257254/1

diff --git a/VisualEditor b/VisualEditor
index db13a4d..8362017 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit db13a4d43ad2b26b534bbf4de30045168a782f20
+Subproject commit 83620175ca6f7da4703a008cc9afa3aaa8333202

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7548760d20a91e5d86009afd507d9c927780fa3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: db13a4d..8362017 - change (mediawiki/extensions)

2015-12-06 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: db13a4d..8362017
..


Syncronize VisualEditor: db13a4d..8362017

Change-Id: Id7548760d20a91e5d86009afd507d9c927780fa3
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index db13a4d..8362017 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit db13a4d43ad2b26b534bbf4de30045168a782f20
+Subproject commit 83620175ca6f7da4703a008cc9afa3aaa8333202

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7548760d20a91e5d86009afd507d9c927780fa3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/video-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Initial commit
..

Initial commit

Change-Id: Iead1fd96c244e04addfd73f74a222ce2e8a72200
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/video-engine 
refs/changes/57/257257/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..0775cb6
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/video-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iead1fd96c244e04addfd73f74a222ce2e8a72200
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/video-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Initial commit - change (thumbor/video-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

Change-Id: Iead1fd96c244e04addfd73f74a222ce2e8a72200
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..0775cb6
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/video-engine.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iead1fd96c244e04addfd73f74a222ce2e8a72200
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/video-engine
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Gilles 

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


[MediaWiki-commits] [Gerrit] vagrant: Set umask 0002 for wikidev users - change (operations/puppet)

2015-12-06 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: vagrant: Set umask 0002 for wikidev users
..

vagrant: Set umask 0002 for wikidev users

Make shared ownership and management of files in /srv/mediawiki-vagrant
easier by setting the default umask for wikidev users to 0002.

Bug: T120472
Change-Id: I1fec88f5dca2312213b40995ebc7aebf67e22d63
---
A modules/vagrant/files/umask-wikidev-profile-d.sh
M modules/vagrant/manifests/mediawiki.pp
2 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/257263/1

diff --git a/modules/vagrant/files/umask-wikidev-profile-d.sh 
b/modules/vagrant/files/umask-wikidev-profile-d.sh
new file mode 100644
index 000..3d0baab
--- /dev/null
+++ b/modules/vagrant/files/umask-wikidev-profile-d.sh
@@ -0,0 +1,5 @@
+# Set umask to 0002 for wikidev users to make shared management of
+# mediawiki-vagrant files easier
+if groups | grep -w -q wikidev; then
+  umask 0002
+fi
diff --git a/modules/vagrant/manifests/mediawiki.pp 
b/modules/vagrant/manifests/mediawiki.pp
index fbe9260..9294c86 100644
--- a/modules/vagrant/manifests/mediawiki.pp
+++ b/modules/vagrant/manifests/mediawiki.pp
@@ -71,4 +71,14 @@
 mode=> '0555',
 content => template('vagrant/labs-vagrant.erb'),
 }
+
+# Set umask for wikidev users so that newly-created files are g+w.
+# This makes shared ownership of $install_directory easier
+file { '/etc/profile.d/umask-wikidev.sh':
+ensure => present,
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 'puppet:///modules/vagrant/umask-wikidev-profile-d.sh',
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fec88f5dca2312213b40995ebc7aebf67e22d63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Update my .bashrc - change (operations/puppet)

2015-12-06 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Update my .bashrc
..

Update my .bashrc

Change-Id: I0a9062ec1f6049a985d1dd265c5692476ae3828b
---
M modules/admin/files/home/krenair/.bashrc
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/257267/1

diff --git a/modules/admin/files/home/krenair/.bashrc 
b/modules/admin/files/home/krenair/.bashrc
index a810537..cf46fad 100644
--- a/modules/admin/files/home/krenair/.bashrc
+++ b/modules/admin/files/home/krenair/.bashrc
@@ -7,5 +7,5 @@
 
 if [ -f /etc/bash_completion ]; then
 . /etc/bash_completion
-
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$
 '
-fi
\ No newline at end of file
+
PS1='\[\e]0;\u@\h:\w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$
 '
+fi

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a9062ec1f6049a985d1dd265c5692476ae3828b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Remove my non-Yubikey key - change (operations/puppet)

2015-12-06 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Remove my non-Yubikey key
..


Remove my non-Yubikey key

Change-Id: I740c2899295ead11c20398829dcac26203ddd25e
---
M modules/admin/data/data.yaml
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 8d43b20..feb9489 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1227,7 +1227,6 @@
 name: tstarling
 realname: Tim Starling
 ssh_keys:
-  - ssh-dss 
B3NzaC1kc3MAAACBAMa+T44Jat4ZubaZtanOlvq+7vj2Vn2vdOoAeafH3EBiXRc3FWxbL7MUInttfVMAQ+kKpMFrMfyZLCr+xfe2266zL9NuRN+0NK0unHnUJxKFg1xhlwM/miLuVIRPNYjx0hb5bnEqEdaHWhzDAac2Th8t4l3Bkx6irtLkEbG5X7rbFQDPx0nvVb7kjyGUtRpUSQgWqwO8BwAAAIB6ywz35DCRnX1wb6d+rjxR2bzzpI0EBe0XFs+EhWGcphAmc01gVOQj/cgM8X9lWzbzcepN/VLJLNYZDmhT7BCQx1bI+3mYMdHin5aTA1yLo0sNbTu5ECbe4cPywdWkRbUVXFFtxG9+xXd6l7TLUV0ZweFiV3hmeB+hKoisV0L/GQAAAIAF76e/8Nf7K67DM2DlYmjrfJYG0fC8WwbARKIldylkiVrADY8DFdc+dEXbUFlqvSMX0wyWS19zlC0XbkA+6EwIMfbEfukJoo84ygOhcdiqySn3JGxyQpuBQfiHK06oLxqNxpxs2R26/beqzkIzzIx8wXDN+UmjZUDuIVvYlWUWsA==
 home
   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCnLNE9kJNEQcSCkYBBUmgvT4KrThfW7V7g2g2EefR9gzOehHcAlyocQ5IR1RwIwdrNfaX7IR1r9qAQMIpQM93hp7eU9sTKxSWyXSQItbDWGhGQugahuqvZ9JNedW5PdojM2W5bb2FBCjoS9wHIAlbgteB1KLfqBF0STWZKk6QtgFLRdarQ0UIojN3jfeNiiX3WbFj+gV+4elMOQj+OrV0V58+oaSdUulQU102C0jNBXxXdgP+TAqh2oL5I2dTMYeDl3hnIRVyQkBRWZAHLBgVcWPjSYxV2H7aHBKgr2QVVTCc9IxL5bh4tJsBX+Ku1JXBGlTrW+PiegIk1Mxa/NHfx
 tstarling@yubikey
 uid: 501
   ori:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I740c2899295ead11c20398829dcac26203ddd25e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] Use wgNamespaceIds constants instead of hard-coded numbers - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use wgNamespaceIds constants instead of hard-coded numbers
..


Use wgNamespaceIds constants instead of hard-coded numbers

Change-Id: I2d4a75ed877331ff41e0dca6a75feb91eabf
---
M resources/src/mediawiki/page/image-pagination.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki/page/image-pagination.js 
b/resources/src/mediawiki/page/image-pagination.js
index d858b62..77fed2c 100644
--- a/resources/src/mediawiki/page/image-pagination.js
+++ b/resources/src/mediawiki/page/image-pagination.js
@@ -119,7 +119,7 @@
}
 
$( function () {
-   if ( mw.config.get( 'wgNamespaceNumber' ) !== 6 ) {
+   if ( mw.config.get( 'wgNamespaceNumber' ) !== mw.config.get( 
'wgNamespaceIds' ).file ) {
return;
}
$multipageimage = $( 'table.multipageimage' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d4a75ed877331ff41e0dca6a75feb91eabf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CRM-17627 Set transaction date correctly for refunds - change (wikimedia...civicrm)

2015-12-06 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17627 Set transaction date correctly for refunds
..

CRM-17627 Set transaction date correctly for refunds

Upstream PR includes test for CiviCRM core

Bug: T116317

Change-Id: Ida11bb0dbb7febe256881c98afcae6542da2c235
---
M CRM/Contribute/BAO/Contribution.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/71/257271/1

diff --git a/CRM/Contribute/BAO/Contribution.php 
b/CRM/Contribute/BAO/Contribution.php
index 8d32626..320736a 100644
--- a/CRM/Contribute/BAO/Contribution.php
+++ b/CRM/Contribute/BAO/Contribution.php
@@ -2701,6 +2701,7 @@
 
 $additionalParticipantId = array();
 $contributionStatuses = 
CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
+$contributionStatus = 
$contributionStatuses[$params['contribution_status_id']];
 
 if (CRM_Utils_Array::value('contribution_mode', $params) == 'participant') 
{
   $entityId = $params['participant_id'];
@@ -2819,6 +2820,9 @@
 'payment_instrument_id' => 
$params['contribution']->payment_instrument_id,
 'check_number' => CRM_Utils_Array::value('check_number', $params),
   );
+  if ($contributionStatus == 'Refunded') {
+$trxnParams['trxn_date'] = 
!empty($params['contribution']->cancel_date) ? 
$params['contribution']->cancel_date : date('YmdHis');
+  }
 
   if (!empty($params['payment_processor'])) {
 $trxnParams['payment_processor_id'] = $params['payment_processor'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida11bb0dbb7febe256881c98afcae6542da2c235
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Don't reimplement foreachwiki in l10nupdate-1 - change (operations/puppet)

2015-12-06 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Don't reimplement foreachwiki in l10nupdate-1
..

Don't reimplement foreachwiki in l10nupdate-1

Change-Id: I548b751733e12663c2b09962065d0b8912feb708
---
M modules/scap/files/l10nupdate-1
1 file changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/257268/1

diff --git a/modules/scap/files/l10nupdate-1 b/modules/scap/files/l10nupdate-1
index 2b89849..52e48b5 100755
--- a/modules/scap/files/l10nupdate-1
+++ b/modules/scap/files/l10nupdate-1
@@ -119,16 +119,7 @@
 # Clear the ResourceLoader cached messages
 echo "Refreshing ResourceLoader caches"
 BEGAN=$(date +"%s")
-
-if hostname --domain | grep -q wmflabs ; then
-ALLDB="$MEDIAWIKI_STAGING_DIR/dblists/all-labs.dblist"
-else
-ALLDB="$MEDIAWIKI_STAGING_DIR/dblists/all.dblist"
-fi
-
-for wiki in `<"$ALLDB"`; do
-   /usr/local/bin/mwscript 
extensions/WikimediaMaintenance/refreshMessageBlobs.php --wiki="$wiki"
-done
+/usr/local/bin/foreachwiki 
extensions/WikimediaMaintenance/refreshMessageBlobs.php
 echo "All done"
 ENDED=$(date +"%s")
 LENGTH=$(($ENDED-$BEGAN))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I548b751733e12663c2b09962065d0b8912feb708
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] CRM-17675 set date AND time to 'now' when refunding contribu... - change (wikimedia...civicrm)

2015-12-06 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17675 set date AND time to 'now' when refunding 
contributions
..

CRM-17675 set date AND time to 'now' when refunding contributions

This just sets the default cancel_date if not set to include the time as well 
as date

Bug: T116317

Change-Id: Icca2230993e73e9ff10d115d13fc0539b5e8a234
---
M CRM/Contribute/Form/Contribution.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/69/257269/1

diff --git a/CRM/Contribute/Form/Contribution.php 
b/CRM/Contribute/Form/Contribution.php
index a41de6b..110950c 100644
--- a/CRM/Contribute/Form/Contribution.php
+++ b/CRM/Contribute/Form/Contribution.php
@@ -1248,7 +1248,7 @@
 || $params['contribution_status_id'] == 
CRM_Core_OptionGroup::getValue('contribution_status', 'Refunded', 'name')
   ) {
 if (CRM_Utils_System::isNull(CRM_Utils_Array::value('cancel_date', 
$params))) {
-  $params['cancel_date'] = date('Y-m-d');
+  $params['cancel_date'] = date('YmdHis');
 }
   }
   else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icca2230993e73e9ff10d115d13fc0539b5e8a234
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Remove incorrect information from 'visualeditor-dialog-trans... - change (mediawiki...VisualEditor)

2015-12-06 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Remove incorrect information from 
'visualeditor-dialog-transclusion-no-template-description'
..

Remove incorrect information from 
'visualeditor-dialog-transclusion-no-template-description'

The message is always displayed in template transclusion dialog, both
when adding a new one and when editing existing one. I think it's best
to just remove the incorrect part, as the dialog provides sufficient
context for what is happening.

The $2 parameter is no longer used or documented, but is still
supported for compatibility with existing translations.

Bug: T87130
Change-Id: Ibaa06c3bb1e9afbf0005b1605236f4be8cb15251
---
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/70/257270/1

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 7937666..db9a8d3 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -207,7 +207,7 @@
"visualeditor-dialog-transclusion-deprecated-parameter-description": 
"Field is deprecated. $1",
"visualeditor-dialog-transclusion-loading": "Loading...",
"visualeditor-dialog-transclusion-multiple-mode": "Show options",
-   "visualeditor-dialog-transclusion-no-template-description": 
"{{GENDER:$2|You are adding}} the \"$1\" template to this page. It doesn't yet 
have a description, but there might be some information on the 
[[{{ns:template}}:$1|template's page]].",
+   "visualeditor-dialog-transclusion-no-template-description": "The \"$1\" 
template doesn't yet have a description, but there might be some information on 
the [[{{ns:template}}:$1|template's page]].",
"visualeditor-dialog-transclusion-options": "Options",
"visualeditor-dialog-transclusion-param-default": "Default value: $1",
"visualeditor-dialog-transclusion-param-example": "Example value: $1",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 946fa8e..87c4c6f 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -217,7 +217,7 @@
"visualeditor-dialog-transclusion-deprecated-parameter-description": 
"Label describing that a parameter is deprecated.\n\nParameters:\n* $1 - 
Description given in TemplateData for why parameter is deprecated, which may be 
empty.",
"visualeditor-dialog-transclusion-loading": "Title for the transclusion 
dialog while its contents are loading.\n{{Identical|Loading}}",
"visualeditor-dialog-transclusion-multiple-mode": "Label for button 
that shows advanced options in transclusion dialog",
-   "visualeditor-dialog-transclusion-no-template-description": "Message to 
user that no template information is available for the 
template.\n\nParameters:\n* $1 - the title of the template\n* $2 - user object 
for GENDER.",
+   "visualeditor-dialog-transclusion-no-template-description": "Message to 
user that no template information is available for the 
template.\n\nParameters:\n* $1 - the title of the template",
"visualeditor-dialog-transclusion-options": "Label for section with 
options for templates, content or parameters.\n{{Identical|Options}}",
"visualeditor-dialog-transclusion-param-default": "Label for 
parameter's default value in the template dialog. $1 - Parameter's default 
value.",
"visualeditor-dialog-transclusion-param-example": "Label for 
parameter's example value in the template dialog. $1 - Parameter's example 
value.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaa06c3bb1e9afbf0005b1605236f4be8cb15251
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Have "values dependent on" also work for combobox and token ... - change (mediawiki...SemanticForms)

2015-12-06 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Have "values dependent on" also work for combobox and token 
types
..


Have "values dependent on" also work for combobox and token types

Made the code for select2 based types use same way of accessing
baseprop value.

Change-Id: Ibbc98399cd0e7fd764d6768ce9a46d25f0c4f7ed
---
M libs/ext.sf.select2.base.js
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/libs/ext.sf.select2.base.js b/libs/ext.sf.select2.base.js
index 0a9c590..b59243a 100644
--- a/libs/ext.sf.select2.base.js
+++ b/libs/ext.sf.select2.base.js
@@ -195,7 +195,8 @@
base_element = $('[name ="' + dep_on + '" ]');
}
dep_field_opts.base_value = base_element.val();
-   dep_field_opts.base_prop = base_element.attr( 
"autocompletesettings" );
+   dep_field_opts.base_prop = mw.config.get( 
'sfgFieldProperties' )[dep_on] ||
+   base_element.attr( "autocompletesettings" );
dep_field_opts.prop = $(input_id).attr( 
"autocompletesettings" ).split( "," )[0];
 
return dep_field_opts;
@@ -268,4 +269,4 @@
return markup;
},
};
-} )( jQuery, mediaWiki, semanticforms );
\ No newline at end of file
+} )( jQuery, mediaWiki, semanticforms );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbc98399cd0e7fd764d6768ce9a46d25f0c4f7ed
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove my non-Yubikey key - change (operations/puppet)

2015-12-06 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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

Change subject: Remove my non-Yubikey key
..

Remove my non-Yubikey key

Change-Id: I740c2899295ead11c20398829dcac26203ddd25e
---
M modules/admin/data/data.yaml
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/257272/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 8d43b20..feb9489 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1227,7 +1227,6 @@
 name: tstarling
 realname: Tim Starling
 ssh_keys:
-  - ssh-dss 
B3NzaC1kc3MAAACBAMa+T44Jat4ZubaZtanOlvq+7vj2Vn2vdOoAeafH3EBiXRc3FWxbL7MUInttfVMAQ+kKpMFrMfyZLCr+xfe2266zL9NuRN+0NK0unHnUJxKFg1xhlwM/miLuVIRPNYjx0hb5bnEqEdaHWhzDAac2Th8t4l3Bkx6irtLkEbG5X7rbFQDPx0nvVb7kjyGUtRpUSQgWqwO8BwAAAIB6ywz35DCRnX1wb6d+rjxR2bzzpI0EBe0XFs+EhWGcphAmc01gVOQj/cgM8X9lWzbzcepN/VLJLNYZDmhT7BCQx1bI+3mYMdHin5aTA1yLo0sNbTu5ECbe4cPywdWkRbUVXFFtxG9+xXd6l7TLUV0ZweFiV3hmeB+hKoisV0L/GQAAAIAF76e/8Nf7K67DM2DlYmjrfJYG0fC8WwbARKIldylkiVrADY8DFdc+dEXbUFlqvSMX0wyWS19zlC0XbkA+6EwIMfbEfukJoo84ygOhcdiqySn3JGxyQpuBQfiHK06oLxqNxpxs2R26/beqzkIzzIx8wXDN+UmjZUDuIVvYlWUWsA==
 home
   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCnLNE9kJNEQcSCkYBBUmgvT4KrThfW7V7g2g2EefR9gzOehHcAlyocQ5IR1RwIwdrNfaX7IR1r9qAQMIpQM93hp7eU9sTKxSWyXSQItbDWGhGQugahuqvZ9JNedW5PdojM2W5bb2FBCjoS9wHIAlbgteB1KLfqBF0STWZKk6QtgFLRdarQ0UIojN3jfeNiiX3WbFj+gV+4elMOQj+OrV0V58+oaSdUulQU102C0jNBXxXdgP+TAqh2oL5I2dTMYeDl3hnIRVyQkBRWZAHLBgVcWPjSYxV2H7aHBKgr2QVVTCc9IxL5bh4tJsBX+Ku1JXBGlTrW+PiegIk1Mxa/NHfx
 tstarling@yubikey
 uid: 501
   ori:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I740c2899295ead11c20398829dcac26203ddd25e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] Comment out getSubpagesForPrefixSearch of Special:Tags - change (mediawiki/core)

2015-12-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Comment out getSubpagesForPrefixSearch of Special:Tags
..

Comment out getSubpagesForPrefixSearch of Special:Tags

The subpages does not have an own form, which makes listing worse.
Comment out to make clear there are not listed for a reason.
As per comment on I4bd99376bbddbbce1812119a43484f08e2360ff5

Change-Id: I076730dbaa99536cf2c85e3fb2602dc0e6289372
---
M includes/specials/SpecialTags.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/257210/1

diff --git a/includes/specials/SpecialTags.php 
b/includes/specials/SpecialTags.php
index 97f2380..107fc68 100644
--- a/includes/specials/SpecialTags.php
+++ b/includes/specials/SpecialTags.php
@@ -457,11 +457,12 @@
 * @return string[] subpages
 */
public function getSubpagesForPrefixSearch() {
+   // The subpages does not have an own form, so not listing it at 
the moment
return array(
-   'delete',
-   'activate',
-   'deactivate',
-   'create',
+   // 'delete',
+   // 'activate',
+   // 'deactivate',
+   // 'create',
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I076730dbaa99536cf2c85e3fb2602dc0e6289372
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] core.js: Deindent large chunk of the file - change (oojs/ui)

2015-12-06 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: core.js: Deindent large chunk of the file
..

core.js: Deindent large chunk of the file

Several functions were unnecessarily placed in a closure meant to wrap
only the definition of OO.ui.msg.

Change-Id: I888952a4ec033602788d8e3416c7fed0c4f10263
---
M src/core.js
1 file changed, 59 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/14/257214/1

diff --git a/src/core.js b/src/core.js
index 8c8dbb5..7ad4a3a 100644
--- a/src/core.js
+++ b/src/core.js
@@ -355,64 +355,63 @@
}
return message;
};
-
-   /**
-* Package a message and arguments for deferred resolution.
-*
-* Use this when you are statically specifying a message and the 
message may not yet be present.
-*
-* @param {string} key Message key
-* @param {Mixed...} [params] Message parameters
-* @return {Function} Function that returns the resolved message when 
executed
-*/
-   OO.ui.deferMsg = function () {
-   var args = arguments;
-   return function () {
-   return OO.ui.msg.apply( OO.ui, args );
-   };
-   };
-
-   /**
-* Resolve a message.
-*
-* If the message is a function it will be executed, otherwise it will 
pass through directly.
-*
-* @param {Function|string} msg Deferred message, or message text
-* @return {string} Resolved message
-*/
-   OO.ui.resolveMsg = function ( msg ) {
-   if ( $.isFunction( msg ) ) {
-   return msg();
-   }
-   return msg;
-   };
-
-   /**
-* @param {string} url
-* @return {boolean}
-*/
-   OO.ui.isSafeUrl = function ( url ) {
-   var protocol,
-   // Keep in sync with php/Tag.php
-   whitelist = [
-   'bitcoin:', 'ftp:', 'ftps:', 'geo:', 'git:', 
'gopher:', 'http:', 'https:', 'irc:', 'ircs:',
-   'magnet:', 'mailto:', 'mms:', 'news:', 'nntp:', 
'redis:', 'sftp:', 'sip:', 'sips:', 'sms:', 'ssh:',
-   'svn:', 'tel:', 'telnet:', 'urn:', 
'worldwind:', 'xmpp:'
-   ];
-
-   if ( url.indexOf( ':' ) === -1 ) {
-   // No protocol, safe
-   return true;
-   }
-
-   protocol = url.split( ':', 1 )[ 0 ] + ':';
-   if ( !protocol.match( /^([A-za-z0-9\+\.\-])+:/ ) ) {
-   // Not a valid protocol, safe
-   return true;
-   }
-
-   // Safe if in the whitelist
-   return whitelist.indexOf( protocol ) !== -1;
-   };
-
 } )();
+
+/**
+ * Package a message and arguments for deferred resolution.
+ *
+ * Use this when you are statically specifying a message and the message may 
not yet be present.
+ *
+ * @param {string} key Message key
+ * @param {Mixed...} [params] Message parameters
+ * @return {Function} Function that returns the resolved message when executed
+ */
+OO.ui.deferMsg = function () {
+   var args = arguments;
+   return function () {
+   return OO.ui.msg.apply( OO.ui, args );
+   };
+};
+
+/**
+ * Resolve a message.
+ *
+ * If the message is a function it will be executed, otherwise it will pass 
through directly.
+ *
+ * @param {Function|string} msg Deferred message, or message text
+ * @return {string} Resolved message
+ */
+OO.ui.resolveMsg = function ( msg ) {
+   if ( $.isFunction( msg ) ) {
+   return msg();
+   }
+   return msg;
+};
+
+/**
+ * @param {string} url
+ * @return {boolean}
+ */
+OO.ui.isSafeUrl = function ( url ) {
+   var protocol,
+   // Keep in sync with php/Tag.php
+   whitelist = [
+   'bitcoin:', 'ftp:', 'ftps:', 'geo:', 'git:', 'gopher:', 
'http:', 'https:', 'irc:', 'ircs:',
+   'magnet:', 'mailto:', 'mms:', 'news:', 'nntp:', 
'redis:', 'sftp:', 'sip:', 'sips:', 'sms:', 'ssh:',
+   'svn:', 'tel:', 'telnet:', 'urn:', 'worldwind:', 'xmpp:'
+   ];
+
+   if ( url.indexOf( ':' ) === -1 ) {
+   // No protocol, safe
+   return true;
+   }
+
+   protocol = url.split( ':', 1 )[ 0 ] + ':';
+   if ( !protocol.match( /^([A-za-z0-9\+\.\-])+:/ ) ) {
+   // Not a valid protocol, safe
+   return true;
+   }
+
+   // Safe if in the whitelist
+   return whitelist.indexOf( protocol ) !== -1;
+};

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


[MediaWiki-commits] [Gerrit] objectcache: Make protected WANObjectCache::makePurgeValue n... - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: objectcache: Make protected WANObjectCache::makePurgeValue 
non-static
..


objectcache: Make protected WANObjectCache::makePurgeValue non-static

It was already used everywhere as non-static via $this.
This is needed in order to allow MessageBlobStore unit tests
to disable the holdoff via a mock (mocks can't override static methods).

Change-Id: I3aad5b6e780addf1b6ce9de56c81b91f5ab358b2
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index 95bf743..8bdafcf 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -1091,7 +1091,7 @@
 * @param int $holdoff In seconds
 * @return string Wrapped purge value
 */
-   protected static function makePurgeValue( $timestamp, $holdoff ) {
+   protected function makePurgeValue( $timestamp, $holdoff ) {
return self::PURGE_VAL_PREFIX . (float)$timestamp . ':' . 
(int)$holdoff;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aad5b6e780addf1b6ce9de56c81b91f5ab358b2
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add AUTHORS file and update authors for Special:Version - change (mediawiki...ConfirmEdit)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add AUTHORS file and update authors for Special:Version
..


Add AUTHORS file and update authors for Special:Version

The list of authors was generated with:
git log --all --format='%cN <%cE>' | sort -u

I removed duplicate entries (mostly users.mediawiki.org addresses).

Extra points:
 * Added composer.lock to gitignore

Change-Id: If3e5d3e6dada06b7230d1746932dd5bce88993e7
---
M .gitignore
A AUTHORS.txt
M extension.json
3 files changed, 76 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 3463cca..a8cb1a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 .DS_Store
 node_modules/
 vendor/
+composer.lock
diff --git a/AUTHORS.txt b/AUTHORS.txt
new file mode 100644
index 000..30ec505
--- /dev/null
+++ b/AUTHORS.txt
@@ -0,0 +1,73 @@
+Contributors (alphabetically)
+
+Aaron Schulz 
+addshore 
+Ævar Arnfjörð Bjarmason 
+Alexandre Emsenhuber 
+Alex Monk 
+Alex Z. 
+Amir E. Aharoni 
+Anders Wegge Jakobsen 
+Andrew Garrett 
+Antoine Musso 
+Aryeh Gregor 
+Bertrand Grondin 
+Brad Jorsch 
+Brion Vibber 
+Bryan Davis 
+Bryan Tong Minh 
+Chad Horohoe 
+Charles Melbye 
+csteipp 
+Derk-Jan Hartman 
+EBernhardson 
+Erik Bernhardson 
+Federico Leva 
+Florian 
+Gilles Dubuc 
+Greg Sabino Mullane 
+Happy-melon 
+Huji 
+Ivan Lanin 
+Jackmcbarn 
+jdlrobson 
+Jeroen De Dauw 
+Jimmy Collins 
+John Du Hart 
+Juliusz Gonera 
+Legoktm 
+Leon Weber 
+Lewis Cawte 
+Luis Felipe Schenone 
+Marius Hoch 
+Mark A. Hershberger 
+Matthew Flaschen 
+Max Semenik 
+Mukunda Modell 
+Nick Jenkins 
+Nikerabbit 
+Ori.livneh 
+paladox 
+Peter Gehres 
+Platonides 
+Purodha B Blissenbach 
+raymond 
+Reedy 
+River Tarnell 
+Roan Kattouw 
+Rob Church 
+Rotem Liss 
+Shinjiman 
+Siebrand Mazeland 
+Southparkfan 
+S Page 
+Sven Heinemann 
+Timo Tijhof 
+Tim Starling 
+Tobias 
+tonythomas01 <01tonytho...@gmail.com>
+Tyler Cipriani 
+Umherirrender 
+yaron 
+Yuki Shira 
+YuviPanda 
diff --git a/extension.json b/extension.json
index 8082005..e1b8663 100644
--- a/extension.json
+++ b/extension.json
@@ -4,6 +4,8 @@
"version": "1.4.0",
"author": [
"Brion Vibber",
+   "Florian Schmidt",
+   "Sam Reed",
"..."
],
"url": "https://www.mediawiki.org/wiki/Extension:ConfirmEdit;,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3e5d3e6dada06b7230d1746932dd5bce88993e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] Implement OO.ui.alert() and OO.ui.confirm() - change (oojs/ui)

2015-12-06 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Implement OO.ui.alert() and OO.ui.confirm()
..

Implement OO.ui.alert() and OO.ui.confirm()

Two new convenience methods that pop up a MessageDialog with specified
message and appropriate buttons, named after the JavaScript methods
alert() and confirm() (but with a Promise-based interface).

Opening a MessageDialog to show the user a simple message takes a
whole lot of boilterplate code and a pile of promises; these methods
abstract this away. See documentation for details.

Also, tweak MessageDialog styles to better handle the case where no
'title' or no 'message' is given.

Bug: T117076
Change-Id: I5e61538d08de70bfce6c270c09ca04c7da028cc0
---
M src/core.js
M src/dialogs/MessageDialog.js
M src/themes/apex/windows.less
M src/themes/mediawiki/windows.less
4 files changed, 93 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/56/257256/1

diff --git a/src/core.js b/src/core.js
index 7ad4a3a..c3c4755 100644
--- a/src/core.js
+++ b/src/core.js
@@ -415,3 +415,87 @@
// Safe if in the whitelist
return whitelist.indexOf( protocol ) !== -1;
 };
+
+/**
+ * Lazy-initialize and return a global OO.ui.WindowManager instance, used by 
OO.ui.alert and
+ * OO.ui.confirm.
+ *
+ * @private
+ * @return {OO.ui.WindowManager}
+ */
+OO.ui.getWindowManager = function () {
+   if ( !OO.ui.windowManager ) {
+   OO.ui.windowManager = new OO.ui.WindowManager();
+   $( 'body' ).append( OO.ui.windowManager.$element );
+   OO.ui.windowManager.addWindows( {
+   messageDialog: new OO.ui.MessageDialog()
+   } );
+   }
+   return OO.ui.windowManager;
+};
+
+/**
+ * Display a quick modal alert dialog, using a OO.ui.MessageDialog. While the 
dialog is open, the
+ * rest of the page will be dimmed out and the user won't be able to interact 
with it. The dialog
+ * has only one action button, labelled "OK", clicking it will simply close 
the dialog.
+ *
+ * A window manager is created automatically when this function is called for 
the first time.
+ *
+ * @example
+ * OO.ui.alert( 'Something happened!' ).done( function () {
+ * console.log( 'User closed the dialog.' );
+ * } );
+ *
+ * @param {jQuery|string} text Message text to display
+ * @param {Object} [options] Additional options, see 
OO.ui.MessageDialog#getSetupProcess
+ * @return {jQuery.Promise} Promise resolved when the user closes the dialog
+ */
+OO.ui.alert = function ( text, options ) {
+   return OO.ui.getWindowManager().openWindow( 'messageDialog', $.extend( {
+   message: text,
+   verbose: true,
+   actions: [ OO.ui.MessageDialog.static.actions[ 0 ] ]
+   }, options ) ).then( function ( opened ) {
+   return opened.then( function ( closing ) {
+   return closing.then( function () {
+   return $.Deferred().resolve();
+   } );
+   } );
+   } );
+};
+
+/**
+ * Display a quick modal confirmation dialog, using a OO.ui.MessageDialog. 
While the dialog is open,
+ * the rest of the page will be dimmed out and the user won't be able to 
interact with it. The
+ * dialog has two action buttons, one to confirm an operation (labelled "OK") 
and one to cancel it
+ * (labelled "Cancel").
+ *
+ * A window manager is created automatically when this function is called for 
the first time.
+ *
+ * @example
+ * OO.ui.confirm( 'Are you sure?' ).done( function ( confirmed ) {
+ * if ( confirmed ) {
+ * console.log( 'User clicked "OK"!' );
+ * } else {
+ * console.log( 'User clicked "Cancel" or closed the dialog.' );
+ * }
+ * } );
+ *
+ * @param {jQuery|string} text Message text to display
+ * @param {Object} [options] Additional options, see 
OO.ui.MessageDialog#getSetupProcess
+ * @return {jQuery.Promise} Promise resolved when the user closes the dialog. 
If the user chose to
+ *  confirm, the promise will resolve to boolean `true`; otherwise, it will 
resolve to boolean
+ *  `false`.
+ */
+OO.ui.confirm = function ( text, options ) {
+   return OO.ui.getWindowManager().openWindow( 'messageDialog', $.extend( {
+   message: text,
+   verbose: true
+   }, options ) ).then( function ( opened ) {
+   return opened.then( function ( closing ) {
+   return closing.then( function ( data ) {
+   return $.Deferred().resolve( !!( data && 
data.action === 'accept' ) );
+   } );
+   } );
+   } );
+};
diff --git a/src/dialogs/MessageDialog.js b/src/dialogs/MessageDialog.js
index e08f56f..5d8b2ee 100644
--- a/src/dialogs/MessageDialog.js
+++ 

[MediaWiki-commits] [Gerrit] Video engine - change (thumbor/video-engine)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Video engine
..

Video engine

Bug: T120205
Bug: T120206
Change-Id: I5d1a24ed4f7d34fcc686ef7f871e9add9c154d8d
---
A LICENSE
A requirements.txt
A setup.py
A tox.ini
A wikimedia_thumbor_video_engine/__init__.py
5 files changed, 184 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/video-engine 
refs/changes/58/257258/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..39195db
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..11198f8
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_video_engine',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-video-engine',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor video engine',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..9e359d2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_video_engine/__init__.py 
b/wikimedia_thumbor_video_engine/__init__.py
new file mode 100644
index 000..98bffe0
--- /dev/null
+++ b/wikimedia_thumbor_video_engine/__init__.py
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# thumbor imaging service
+# https://github.com/thumbor/thumbor/wiki
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2011 globo.com timeh...@corp.globo.com
+# Copyright (c) 2015 Wikimedia Foundation
+
+# Ghostscript engine
+
+import os
+import subprocess
+from tempfile import NamedTemporaryFile
+
+from thumbor.engines import BaseEngine
+from thumbor.engines.pil import Engine as PilEngine
+from thumbor.utils import EXTENSION
+
+
+# Unfortunately there is no elegant way to extend Thumbor to support
+# a new MIME type, which is why this monkey-patching is done here
+EXTENSION['video/ogg'] = '.ogv'
+EXTENSION['video/webm'] = '.webm'
+
+old_get_mimetype = BaseEngine.get_mimetype
+
+
+@classmethod
+def new_get_mimetype(cls, buffer):
+if buffer.startswith('\x1aE\xdf\xa3'):
+return 'video/webm'
+
+if buffer.startswith('OggS'):
+return 'video/ogg'
+
+return old_get_mimetype(buffer)
+
+BaseEngine.get_mimetype = new_get_mimetype
+
+
+class Engine(PilEngine):
+def should_run(self, extension, buffer):
+return (extension == '.ogv' or extension == '.webm')
+
+def create_image(self, buffer):
+self.video_buffer = buffer
+
+destination = NamedTemporaryFile(delete=False, suffix='.jpg')
+source = NamedTemporaryFile(delete=False)
+source.write(buffer)
+

[MediaWiki-commits] [Gerrit] temp - change (mediawiki...Graph)

2015-12-06 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: temp
..

temp

Change-Id: I4b5b796b4bd15ad63f3f534f68f7f23def1da7c5
---
M Graph.body.php
M extension.json
M modules/graph1.js
M modules/graph2.js
4 files changed, 51 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/64/257264/1

diff --git a/Graph.body.php b/Graph.body.php
index 0de41a7..c5196b8 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -68,9 +68,8 @@
 
if ( $liveSpecs || $interact ) {
// TODO: these 3 js vars should be per domain 
if 'ext.graph' is added, not per page
-   global $wgGraphDataDomains, 
$wgGraphUrlBlacklist, $wgGraphIsTrusted;
+   global $wgGraphDataDomains, $wgGraphIsTrusted;
$output->addJsConfigVars( 'wgGraphDataDomains', 
$wgGraphDataDomains );
-   $output->addJsConfigVars( 
'wgGraphUrlBlacklist', $wgGraphUrlBlacklist );
$output->addJsConfigVars( 'wgGraphIsTrusted', 
$wgGraphIsTrusted );
 
$output->addModuleStyles( 'ext.graph' );
diff --git a/extension.json b/extension.json
index 3682d35..78f15ec 100644
--- a/extension.json
+++ b/extension.json
@@ -116,7 +116,6 @@
"config": {
"GraphDataDomains": [],
"GraphDefaultVegaVer": 1,
-   "GraphUrlBlacklist": false,
"GraphIsTrusted": false,
"GraphImgServiceUrl": false
},
diff --git a/modules/graph1.js b/modules/graph1.js
index 090ba3c..3a9f425 100644
--- a/modules/graph1.js
+++ b/modules/graph1.js
@@ -8,7 +8,6 @@
if ( originalSanitize === false ) {
// Make sure we only initialize graphs once
vg.config.domainWhiteList = mw.config.get( 
'wgGraphDataDomains' );
-   vg.config.urlBlackList = mw.config.get( 
'wgGraphUrlBlacklist' );
if ( !mw.config.get( 'wgGraphIsTrusted' ) ) {
vg.config.dataHeaders = { 'Treat-as-Untrusted': 
1 };
}
@@ -25,21 +24,6 @@
url.path = decodeURIComponent( url.path );
url = url.toString();
if ( !url ) {
-   return false;
-   }
-   if ( !vg.config.urlBlackListRe ) {
-   // Lazy initialize urlBlackListRe
-   if ( vg.config.urlBlackList ) {
-   vg.config.urlBlackListRe = 
vg.config.urlBlackList.map( function ( s ) {
-   return new RegExp( s );
-   } );
-   } else {
-   vg.config.urlBlackListRe = [];
-   }
-   }
-   if ( vg.config.urlBlackListRe.some( function ( 
re ) {
-   return re.test( url );
-   } ) ) {
return false;
}
return url;
diff --git a/modules/graph2.js b/modules/graph2.js
index 3a84cf7..c096da9 100644
--- a/modules/graph2.js
+++ b/modules/graph2.js
@@ -3,40 +3,68 @@
 
// Make sure we only initialize graphs once
vg.config.load.domainWhiteList = mw.config.get( 'wgGraphDataDomains' );
-   vg.config.load.urlBlackList = mw.config.get( 'wgGraphUrlBlacklist' );
if ( !mw.config.get( 'wgGraphIsTrusted' ) ) {
vg.util.load.headers = { 'Treat-as-Untrusted': 1 };
}
 
originalSanitize = vg.util.load.sanitizeUrl.bind( vg.util.load );
vg.util.load.sanitizeUrl = function ( /* opt */ ) {
-   var url = originalSanitize.apply( vg.util.load, arguments );
+   var path = undefined, query = undefined,
+   url = originalSanitize.apply( vg.util.load, arguments );
if ( !url ) {
return false;
}
// Normalize url by parsing and re-encoding it
url = new mw.Uri( url );
-   url.path = decodeURIComponent( url.path );
-   url = url.toString();
-   if ( !url ) {
-   return false;
+   switch (url.protocol) {
+   case 'http':
+   case 'https':
+   // Will disable this as 

[MediaWiki-commits] [Gerrit] [Cargo] Fix T120583: #cargo_query HOLDS check used in multi-... - change (mediawiki...Cargo)

2015-12-06 Thread Ed Hoo (Code Review)
Ed Hoo has uploaded a new change for review.

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

Change subject: [Cargo] Fix T120583: #cargo_query HOLDS check used in 
multi-value fields
..

[Cargo] Fix T120583: #cargo_query HOLDS check used in multi-value fields

Change the HOLDS check to match the field "book", but not the field "bookworm" 
when the field that allows for multiple values is "book".  Makes the match 
case-insensitive since table and column names are usually not case sensitive.

Bug: T120583
Change-Id: I22cffe0ffed72fed72cdf2f83673a0d871313986
---
M CargoSQLQuery.php
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/66/257266/1

diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php
index acc0512..83d5b8e 100644
--- a/CargoSQLQuery.php
+++ b/CargoSQLQuery.php
@@ -556,19 +556,19 @@
$fieldName = $virtualField['fieldName'];
$tableName = $virtualField['tableName'];
 
-   $likePattern1 = "/\b$tableName\.$fieldName(\s*HOLDS 
LIKE\s*)/";
+   $likePattern1 = 
"/\b$tableName\.$fieldName".'[^0-9a-zA-Z$_](\s*HOLDS LIKE\s*)/i';
$foundLikeMatch1 = preg_match( $likePattern1, 
$this->mWhereStr, $matches );
$foundLikeMatch2 = $foundMatch1 = $foundMatch2 = false;
if ( !$foundLikeMatch1 ) {
-   $likePattern2 = "/\b$fieldName(\s*HOLDS 
LIKE\s*)/";
+   $likePattern2 = 
"/\b$fieldName".'[^0-9a-zA-Z$_](\s*HOLDS LIKE\s*)/i';
$foundLikeMatch2 = preg_match( $likePattern2, 
$this->mWhereStr, $matches );
}
 
if ( !$foundLikeMatch1 && !$foundLikeMatch2 ) {
-   $pattern1 = 
"/\b$tableName\.$fieldName(\s*HOLDS\s*)?/";
+   $pattern1 = 
"/\b$tableName\.$fieldName".'[^0-9a-zA-Z$_](\s*HOLDS\s*)?/i';
$foundMatch1 = preg_match( $pattern1, 
$this->mWhereStr, $matches );
if ( !$foundMatch1 ) {
-   $pattern2 = 
"/\b$fieldName(\s*HOLDS\s*)?/";
+   $pattern2 = 
"/\b$fieldName".'[^0-9a-zA-Z$_](\s*HOLDS\s*)?/i';
$foundMatch2 = preg_match( $pattern2, 
$this->mWhereStr, $matches );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22cffe0ffed72fed72cdf2f83673a0d871313986
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Ed Hoo 

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


[MediaWiki-commits] [Gerrit] Actually sort filters - change (wikimedia...dash)

2015-12-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Actually sort filters
..

Actually sort filters

Compare their real properties, not undefined > undefined

Change-Id: I4540bfa3604283d7570b54cb436596b9d3677c21
---
M src/components/filters/filters.js
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/09/257209/1

diff --git a/src/components/filters/filters.js 
b/src/components/filters/filters.js
index ed232d7..cab0a71 100644
--- a/src/components/filters/filters.js
+++ b/src/components/filters/filters.js
@@ -54,16 +54,19 @@
} );
//sort filters by type then display name
filters.sort( function( a, b ) {
-   if ( a.type > b.type ) {
+   var aMeta = a.metadata,
+   bMeta = b.metadata;
+
+   if ( aMeta.type > bMeta.type ) {
return 1;
}
-   if ( a.type < b.type ) {
+   if ( aMeta.type < bMeta.type ) {
return -1;
}
-   if ( a.display > b.display ) {
+   if ( aMeta.display > bMeta.display ) {
return 1;
}
-   if ( a.display < b.display ) {
+   if ( aMeta.display < bMeta.display ) {
return -1;
}
return 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4540bfa3604283d7570b54cb436596b9d3677c21
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Improve claimit.py intro docs - change (pywikibot/core)

2015-12-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Improve claimit.py intro docs
..

Improve claimit.py intro docs

Any pagegenerator can be used, not just categories.

Change-Id: I35fb61b9a4103978a7c0298517fb9552c0769981
---
M scripts/claimit.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/12/257212/1

diff --git a/scripts/claimit.py b/scripts/claimit.py
index cfbb5e6..93a7a4d 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 """
-A script that adds claims to Wikidata items based on categories.
+A script that adds claims to Wikidata items based on a list of pages.
 
 --
 
@@ -9,8 +9,8 @@
 
 python pwb.py claimit [pagegenerators] P1 Q2 P123 Q456
 
-You can use any typical pagegenerator to provide with a list of pages.
-Then list the property-->target pairs to add.
+You can use any typical pagegenerator (like categories) to provide with a
+list of pages. Then list the property-->target pairs to add.
 
 --
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35fb61b9a4103978a7c0298517fb9552c0769981
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] vagrant: Set umask 0002 for wikidev users - change (operations/puppet)

2015-12-06 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: vagrant: Set umask 0002 for wikidev users
..


vagrant: Set umask 0002 for wikidev users

Make shared ownership and management of files in /srv/mediawiki-vagrant
easier by setting the default umask for wikidev users to 0002.

Bug: T120472
Change-Id: I1fec88f5dca2312213b40995ebc7aebf67e22d63
---
A modules/vagrant/files/umask-wikidev-profile-d.sh
M modules/vagrant/manifests/mediawiki.pp
2 files changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/modules/vagrant/files/umask-wikidev-profile-d.sh 
b/modules/vagrant/files/umask-wikidev-profile-d.sh
new file mode 100644
index 000..3d0baab
--- /dev/null
+++ b/modules/vagrant/files/umask-wikidev-profile-d.sh
@@ -0,0 +1,5 @@
+# Set umask to 0002 for wikidev users to make shared management of
+# mediawiki-vagrant files easier
+if groups | grep -w -q wikidev; then
+  umask 0002
+fi
diff --git a/modules/vagrant/manifests/mediawiki.pp 
b/modules/vagrant/manifests/mediawiki.pp
index fbe9260..9294c86 100644
--- a/modules/vagrant/manifests/mediawiki.pp
+++ b/modules/vagrant/manifests/mediawiki.pp
@@ -71,4 +71,14 @@
 mode=> '0555',
 content => template('vagrant/labs-vagrant.erb'),
 }
+
+# Set umask for wikidev users so that newly-created files are g+w.
+# This makes shared ownership of $install_directory easier
+file { '/etc/profile.d/umask-wikidev.sh':
+ensure => present,
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 'puppet:///modules/vagrant/umask-wikidev-profile-d.sh',
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1fec88f5dca2312213b40995ebc7aebf67e22d63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add custom wiki protocols for data access - change (mediawiki...Graph)

2015-12-06 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Add custom wiki protocols for data access
..

Add custom wiki protocols for data access

* wikiapi:///?action=query=allpages
  Call to api.php - ignores the path parameter, and only uses the query

* wikirest:///api/rest_v1/page/...
  Call to RESTbase api - requires the path to start with "/api/"

* wikiraw:///MyPage/data
  Get raw content of a wiki page, where the path is the title
  of the page with an additional leading '/' which gets removed.

*  
wikiupload://upload.wikimedia.org/wikipedia/commons/3/3e/Einstein_1921_by_F_Schmutzer_-_restoration.jpg
   Get an image for the graph, e.g. from commons
   This tag specifies any content from the uploads.* domain, without query 
params

Change-Id: I6be3f3f30a725d7a4c8ce9cf349f341f2bc19dd6
---
M modules/graph2.js
1 file changed, 16 insertions(+), 18 deletions(-)


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

diff --git a/modules/graph2.js b/modules/graph2.js
index c096da9..e6df8be 100644
--- a/modules/graph2.js
+++ b/modules/graph2.js
@@ -8,31 +8,28 @@
}
 
originalSanitize = vg.util.load.sanitizeUrl.bind( vg.util.load );
-   vg.util.load.sanitizeUrl = function ( /* opt */ ) {
-   var path = undefined, query = undefined,
-   url = originalSanitize.apply( vg.util.load, arguments );
-   if ( !url ) {
-   return false;
-   }
+   vg.util.load.sanitizeUrl = function ( opt ) {
+   var path = undefined, query = undefined, url;
+
// Normalize url by parsing and re-encoding it
-   url = new mw.Uri( url );
+   url = new mw.Uri( opt.url );
switch (url.protocol) {
case 'http':
case 'https':
// Will disable this as soon as all graphs have 
been switched to custom protocols
url.path = decodeURIComponent( url.path );
-   url = url.toString();
-   return url ? url : false;
+   opt.url = url.toString();
+   return originalSanitize.call( vg.util.load, opt 
);
 
case 'wikiapi':
-   // Call to api.php
+   // Call to api.php - ignores the path 
parameter, and only uses the query
// wikiapi:///?action=query=allpages
path = '/w/api.php';
query = $.extend( url.query, { format: 'json', 
formatversion: 'latest' } );
break;
 
case 'wikirest':
-   // Call to RESTbase api
+   // Call to RESTbase api - requires the path to 
start with "/api/"
// wikirest:///api/rest_v1/page/...
if ( !( /^\/api\// ).test( url.path ) ) {
return false;
@@ -42,14 +39,16 @@
break;
 
case 'wikiraw':
-   // Get raw content of a wiki page
+   // Get raw content of a wiki page, where the 
path is the title
+   // of the page with an additional leading '/' 
which gets removed.
// wikiraw:///MyPage/data
-   path = '/w/index.php?action=raw=' . 
urlencode( url.path );
+   path = '/w/index.php?action=raw=' + 
encodeURIComponent( url.path.substring( 1 ) );
break;
 
case 'wikiupload':
+   // 
wikiupload://upload.wikimedia.org/wikipedia/commons/3/3e/Einstein_1921_by_F_Schmutzer_-_restoration.jpg
// Get an image for the graph, e.g. from commons
-   // This tag specifie sany content from the 
uploads.* domain, without query params
+   // This tag specifies any content from the 
uploads.* domain, without query params
if ( !( /^upload\./ ).test( url.host ) ) {
return false;
}
@@ -57,14 +56,13 @@
break;
}
 
-   url = new mw.Uri( {
-   protocol: window.location.protocol,
+   opt.url = new mw.Uri( {
host: url.host,
+   port: url.port,
path: path,
query: query
 

[MediaWiki-commits] [Gerrit] Remove dead code about nlinks from Special:Wantedpages - change (mediawiki/core)

2015-12-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Remove dead code about nlinks from Special:Wantedpages
..

Remove dead code about nlinks from Special:Wantedpages

No idea how to resolve the fixme, so remove the dead code and let the
$par only set the limit

Change-Id: I9b29c4ee4ccc5578900e45cb559c5b05e34e679a
---
M includes/specials/SpecialWantedpages.php
1 file changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/257211/1

diff --git a/includes/specials/SpecialWantedpages.php 
b/includes/specials/SpecialWantedpages.php
index 02a1f73..ca26bb4 100644
--- a/includes/specials/SpecialWantedpages.php
+++ b/includes/specials/SpecialWantedpages.php
@@ -40,13 +40,8 @@
$inc = $this->including();
 
if ( $inc ) {
-   $parts = explode( '/', $par, 2 );
-   $this->limit = (int)$parts[0];
-   // @todo FIXME: nlinks is ignored
-   // $nlinks = isset( $parts[1] ) && $parts[1] === 
'nlinks';
+   $this->limit = (int)$par;
$this->offset = 0;
-   } else {
-   // $nlinks = true;
}
$this->setListoutput( $inc );
$this->shownavigation = !$inc;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b29c4ee4ccc5578900e45cb559c5b05e34e679a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Expose host server's name to VM - change (mediawiki/vagrant)

2015-12-06 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Expose host server's name to VM
..

Expose host server's name to VM

Expose the host server's hostname to the VM as the "vmhost" Factor fact.
This fact is used by default in the labs environment to compute vhost
names.

Bug: T119990
Change-Id: I26c12fdd5ff7cf92ab2ccb57c9c299060e5fda82
---
M Vagrantfile
M puppet/hieradata/environment/labs.yaml
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/59/257259/1

diff --git a/Vagrantfile b/Vagrantfile
index 446756a..43e34e5 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -31,6 +31,7 @@
 require_relative 'lib/mediawiki-vagrant/version'
 require 'fileutils'
 require 'ipaddr'
+require 'socket'
 
 # NOTE Use RubyGems over the Vagrant plugin manager as it's more reliable
 gemspec = Gem::Specification.find { |s| s.name == 'mediawiki-vagrant' }
@@ -226,6 +227,7 @@
   'forwarded_https_port' => settings[:https_port],
   'shared_apt_cache' => '/vagrant/cache/apt/',
   'environment'  => ENV['MWV_ENVIRONMENT'] || 'vagrant',
+  'vmhost'   => Socket.gethostname,
 }
 
 if settings[:http_port] != 80
diff --git a/puppet/hieradata/environment/labs.yaml 
b/puppet/hieradata/environment/labs.yaml
index d74c089..8ccba98 100644
--- a/puppet/hieradata/environment/labs.yaml
+++ b/puppet/hieradata/environment/labs.yaml
@@ -1,7 +1,7 @@
 ---
 classes: ['::role::labs_initial_content']
 
-role::mediawiki::hostname: "%{::hostname}.wmflabs.org"
-mediawiki::multiwiki::base_domain: "-%{::hostname}.wmflabs.org"
+role::mediawiki::hostname: "%{::vmhost}.wmflabs.org"
+mediawiki::multiwiki::base_domain: "-%{::vmhost}.wmflabs.org"
 
 hhvm::logroot: /var/log

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26c12fdd5ff7cf92ab2ccb57c9c299060e5fda82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Set up Thumbor to use proxy engine - change (mediawiki/vagrant)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Set up Thumbor to use proxy engine
..

Set up Thumbor to use proxy engine

Change-Id: I8f7ff4d3a791959a2894509f6d7c0576ef959785
---
M puppet/modules/thumbor/manifests/init.pp
M puppet/modules/thumbor/templates/thumbor.conf.erb
2 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/62/257262/1

diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index b567146..fbe4552 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -58,6 +58,7 @@
 'raven',
 'pylibmc', # For memcache original file storage
 'git+https://gerrit.wikimedia.org/r/thumbor/exif-optimizer',
+'git+https://gerrit.wikimedia.org/r/thumbor/proxy-engine',
 ],
 require  => [
 Package['libjpeg-progs'],
diff --git a/puppet/modules/thumbor/templates/thumbor.conf.erb 
b/puppet/modules/thumbor/templates/thumbor.conf.erb
index 7508272..2b9ee7d 100644
--- a/puppet/modules/thumbor/templates/thumbor.conf.erb
+++ b/puppet/modules/thumbor/templates/thumbor.conf.erb
@@ -148,7 +148,7 @@
 ## The imaging engine thumbor should use to perform image operations. This must
 ## be the full name of a python module (python must be able to import it)
 ## Defaults to: thumbor.engines.pil
-#ENGINE = 'thumbor.engines.pil'
+ENGINE = 'wikimedia_thumbor_proxy_engine'
 
 ## The gif engine thumbor should use to perform image operations. This must be
 ## the full name of a python module (python must be able to import it)
@@ -582,9 +582,11 @@
 'tc_purger',
 ]
 
-
-
 EXIFTOOL_PATH = '/usr/bin/exiftool'
 EXIF_FIELDS_TO_KEEP = [ 'Artist', 'Copyright', 'Description', 'icc_profile' ]
 EXIF_TINYRGB_PATH = '/srv/thumbor/tinyrgb.icc'
 EXIF_TINYRGB_ICC_REPLACE = 'IEC 61966-2.1 Default RGB colour space - sRGB'
+
+PROXY_ENGINE_ENGINES = [ 'thumbor.engines.pil' ]
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f7ff4d3a791959a2894509f6d7c0576ef959785
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Make ReferencedEntitiesDataUpdaterTest pass with Items in ma... - change (mediawiki...Wikibase)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make ReferencedEntitiesDataUpdaterTest pass with Items in main 
namespace
..


Make ReferencedEntitiesDataUpdaterTest pass with Items in main namespace

This test fails when running on a repo where Items are in the main
namespace.

Yes, this clearly qualifies as a hack. I'm faking *some* valid JSON
content, but it is disjoint from the actual page name. This is fine for
this test, because all it cares about in the end is if the *page* exists.
The actual content is never checked. Not even the content type.

With this hack the test will succeed in all cases where the main
namespace is either wikitext or contains Items.

Please do not block this patch just because you have a better idea.
Submit your idea as a follow-up please.

Change-Id: I863ee7210d2b1ad3813558323a54ea1ccdcde388
---
M repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Adrian Lang: Looks good to me, approved
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
 
b/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
index 80af7ad..9b3c6b9 100644
--- 
a/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
+++ 
b/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
@@ -31,7 +31,7 @@
parent::setUp();
 
foreach ( array( 'P1', 'Q1', 'Q20', 'Q21', 'Q22' ) as $pageName 
) {
-   $this->insertPage( $pageName );
+   $this->insertPage( $pageName, '{ "type": "item", "id": 
"Q1" }' );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I863ee7210d2b1ad3813558323a54ea1ccdcde388
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Adrian Lang 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Special:Statistics: Change link target for content pages to ... - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:Statistics: Change link target for content pages to 
hide redirects
..


Special:Statistics: Change link target for content pages to hide redirects

Content pages, as visible on Special:Statistics, doesn't include
redirects in the visible counter. But the link target (Special:AllPages)
includes redirects in the default view, which could be confusing, if a
user expects all pages excluding redirects.

Change the link target of Content pages to hide redirects by default and
add a link for "Pages" to the default view of Special:AllPages.

Change-Id: I1c1ada8e3d16d19db8315eccfbea2c753814659e
---
M includes/specials/SpecialStatistics.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/includes/specials/SpecialStatistics.php 
b/includes/specials/SpecialStatistics.php
index e06bae0..a989aac 100644
--- a/includes/specials/SpecialStatistics.php
+++ b/includes/specials/SpecialStatistics.php
@@ -114,16 +114,18 @@
 * @return string
 */
private function getPageStats() {
+   $specialAllPagesTitle = SpecialPage::getTitleFor( 'Allpages' );
$pageStatsHtml = Xml::openElement( 'tr' ) .
Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 
'statistics-header-pages' )
->parse() ) .
Xml::closeElement( 'tr' ) .
-   $this->formatRow( Linker::linkKnown( 
SpecialPage::getTitleFor( 'Allpages' ),
-   $this->msg( 'statistics-articles' 
)->parse() ),
+   $this->formatRow( Linker::linkKnown( 
$specialAllPagesTitle,
+   $this->msg( 'statistics-articles' 
)->parse(), array(), array( 'hideredirects' => 1 ) ),
$this->getLanguage()->formatNum( 
$this->good ),
array( 'class' => 
'mw-statistics-articles' ),
'statistics-articles-desc' ) .
-   $this->formatRow( $this->msg( 
'statistics-pages' )->parse(),
+   $this->formatRow( Linker::linkKnown( 
$specialAllPagesTitle,
+   $this->msg( 'statistics-pages' 
)->parse() ),
$this->getLanguage()->formatNum( 
$this->total ),
array( 'class' => 'mw-statistics-pages' 
),
'statistics-pages-desc' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c1ada8e3d16d19db8315eccfbea2c753814659e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-12-06T10:00:01+0000 - change (mediawiki...Wikidata)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New Wikidata Build - 2015-12-06T10:00:01+
..


New Wikidata Build - 2015-12-06T10:00:01+

Change-Id: I7e1318ec0fd0badd363385cfd0fd3e62a80559a9
---
M composer.lock
M extensions/ExternalValidation/i18n/ca.json
M extensions/Wikibase/client/i18n/as.json
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/prs.json
M extensions/Wikibase/client/i18n/sk.json
M extensions/Wikibase/client/i18n/tt-cyrl.json
M extensions/Wikibase/composer.json
M extensions/Wikibase/repo/i18n/ca.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/he.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/lt.json
M extensions/Wikibase/repo/i18n/mr.json
M extensions/Wikibase/repo/i18n/prs.json
M extensions/Wikibase/repo/i18n/tr.json
M extensions/Wikibase/repo/i18n/tt-cyrl.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/view/tests/phpunit/ClaimHtmlGeneratorTest.php
M extensions/Wikibase/view/tests/phpunit/EmptyEditSectionGeneratorTest.php
M extensions/Wikibase/view/tests/phpunit/EntityTermsViewTest.php
M extensions/Wikibase/view/tests/phpunit/EntityViewFactoryTest.php
M extensions/Wikibase/view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
M extensions/Wikibase/view/tests/phpunit/EntityViewTest.php
M extensions/Wikibase/view/tests/phpunit/ItemViewTest.php
M extensions/Wikibase/view/tests/phpunit/Module/TemplateModuleTest.php
M extensions/Wikibase/view/tests/phpunit/PropertyViewTest.php
M extensions/Wikibase/view/tests/phpunit/SiteLinksViewTest.php
M extensions/Wikibase/view/tests/phpunit/SnakHtmlGeneratorTest.php
M extensions/Wikibase/view/tests/phpunit/StatementGroupListViewTest.php
M extensions/Wikibase/view/tests/phpunit/StatementSectionsViewTest.php
M extensions/Wikibase/view/tests/phpunit/Template/TemplateFactoryTest.php
M extensions/Wikibase/view/tests/phpunit/Template/TemplateRegistryTest.php
M extensions/Wikibase/view/tests/phpunit/Template/TemplateTest.php
M extensions/Wikibase/view/tests/phpunit/TextInjectorTest.php
M extensions/Wikibase/view/tests/phpunit/ToolbarEditSectionGeneratorTest.php
M vendor/composer/autoload_psr4.php
M vendor/composer/installed.json
38 files changed, 99 insertions(+), 47 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index ae45bb6..edf37a4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1194,7 +1194,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityExternalValidation;,
-"reference": "31edf674cecf7fa6bc8ff16f5f45e6dc81ba968c"
+"reference": "0cf923b8db6aff3a334fc30539d50e13412fcf70"
 },
 "require": {
 "php": ">=5.3.0",
@@ -1242,7 +1242,7 @@
 "support": {
 "issues": 
"https://phabricator.wikimedia.org/project/profile/1203/;
 },
-"time": "2015-12-04 22:40:20"
+"time": "2015-12-05 22:16:43"
 },
 {
 "name": "wikibase/internal-serialization",
@@ -1448,12 +1448,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "35d3c1752c38e58644ba1d068504934a4d26e870"
+"reference": "65379a1b64da28411df65169bdc292a9083ac4fa"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/35d3c1752c38e58644ba1d068504934a4d26e870;,
-"reference": "35d3c1752c38e58644ba1d068504934a4d26e870",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/65379a1b64da28411df65169bdc292a9083ac4fa;,
+"reference": "65379a1b64da28411df65169bdc292a9083ac4fa",
 "shasum": ""
 },
 "require": {
@@ -1501,6 +1501,7 @@
 ],
 "psr-4": {
 "Wikibase\\View\\": "view/src",
+"Wikibase\\View\\Tests\\": "view/tests/phpunit",
 "Wikimedia\\Purtle\\": "purtle/src",
 "Wikimedia\\Purtle\\Tests\\": "purtle/tests/phpunit"
 }
@@ -1523,7 +1524,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2015-12-05 00:09:26"
+"time": "2015-12-05 23:33:22"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/ExternalValidation/i18n/ca.json 
b/extensions/ExternalValidation/i18n/ca.json
index e374149..67dabad 100644
--- a/extensions/ExternalValidation/i18n/ca.json
+++ 

[MediaWiki-commits] [Gerrit] [RelatedArticles] Disable for translation due to defaultbran... - change (translatewiki)

2015-12-06 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [RelatedArticles] Disable for translation due to 
defaultbranch=dev
..


[RelatedArticles] Disable for translation due to defaultbranch=dev

Change-Id: I7408baae6c0b864ee23cba712c4c95c06f36005d
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 585fab8..ffca4f2 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1927,7 +1927,7 @@
 Regex Functions
 magicfile = RegexFunctions/RegexFunctions.i18n.magic.php
 
-Related Articles
+# Related Articles // defaultbranch=dev
 
 Related Sites
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7408baae6c0b864ee23cba712c4c95c06f36005d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] [RelatedArticles] Disable for translation due to defaultbran... - change (translatewiki)

2015-12-06 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [RelatedArticles] Disable for translation due to 
defaultbranch=dev
..

[RelatedArticles] Disable for translation due to defaultbranch=dev

Change-Id: I7408baae6c0b864ee23cba712c4c95c06f36005d
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/55/257255/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 585fab8..ffca4f2 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1927,7 +1927,7 @@
 Regex Functions
 magicfile = RegexFunctions/RegexFunctions.i18n.magic.php
 
-Related Articles
+# Related Articles // defaultbranch=dev
 
 Related Sites
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7408baae6c0b864ee23cba712c4c95c06f36005d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] tests: Remove unused TableCleanupTest class - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: tests: Remove unused TableCleanupTest class
..


tests: Remove unused TableCleanupTest class

Follows-up 77086dc2ef (r56862).

Change-Id: I7e8accc35596d134c934a03072c3c3e99fd2aa0a
---
M autoload.php
M maintenance/cleanupTable.inc
2 files changed, 0 insertions(+), 7 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Hashar: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/autoload.php b/autoload.php
index c37cbaa..c13346c 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1235,7 +1235,6 @@
'SwiftVirtualRESTService' => __DIR__ . 
'/includes/libs/virtualrest/SwiftVirtualRESTService.php',
'SyncFileBackend' => __DIR__ . '/maintenance/syncFileBackend.php',
'TableCleanup' => __DIR__ . '/maintenance/cleanupTable.inc',
-   'TableCleanupTest' => __DIR__ . '/maintenance/cleanupTable.inc',
'TableDiffFormatter' => __DIR__ . 
'/includes/diff/TableDiffFormatter.php',
'TablePager' => __DIR__ . '/includes/pager/TablePager.php',
'TagLogFormatter' => __DIR__ . '/includes/logging/TagLogFormatter.php',
diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc
index 84e3aee..8368c84 100644
--- a/maintenance/cleanupTable.inc
+++ b/maintenance/cleanupTable.inc
@@ -173,9 +173,3 @@
}
 }
 
-class TableCleanupTest extends TableCleanup {
-   function processRow( $row ) {
-   $this->progress( mt_rand( 0, 1 ) );
-   }
-}
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e8accc35596d134c934a03072c3c3e99fd2aa0a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] tests: Clean up use of mt_rand() - change (mediawiki/core)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: tests: Clean up use of mt_rand()
..


tests: Clean up use of mt_rand()

* ApiQueryTest: One random is enough.

* FileBackendTest: More consistent and idiomatic via wfRandomString()

* MigrateFileRepoLayoutTest: Use getNewTempDirectory(). Similar to
  what FileBackendTest used already.
* UploadFromUrlTestSuite: Use getNewTempDirectory().

Change-Id: I772de2134be41506d8ed08367be8c18f354bfc72
---
M includes/GlobalFunctions.php
M tests/phpunit/includes/api/query/ApiQueryTest.php
M tests/phpunit/includes/filebackend/FileBackendTest.php
M tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
M tests/phpunit/suites/UploadFromUrlTestSuite.php
5 files changed, 16 insertions(+), 20 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 43b936b..4a3fceb 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -374,20 +374,22 @@
  * not likely to give duplicate values for any realistic
  * number of articles.
  *
+ * @note This is designed for use in relation to Special:RandomPage
+ *   and the page_random database field.
+ *
  * @return string
  */
 function wfRandom() {
-   # The maximum random value is "only" 2^31-1, so get two random
-   # values to reduce the chance of dupes
+   // The maximum random value is "only" 2^31-1, so get two random
+   // values to reduce the chance of dupes
$max = mt_getrandmax() + 1;
$rand = number_format( ( mt_rand() * $max + mt_rand() ) / $max / $max, 
12, '.', '' );
-
return $rand;
 }
 
 /**
- * Get a random string containing a number of pseudo-random hex
- * characters.
+ * Get a random string containing a number of pseudo-random hex characters.
+ *
  * @note This is not secure, if you are trying to generate some sort
  *   of token please use MWCryptRand instead.
  *
diff --git a/tests/phpunit/includes/api/query/ApiQueryTest.php 
b/tests/phpunit/includes/api/query/ApiQueryTest.php
index 61b992b..eb1ad26 100644
--- a/tests/phpunit/includes/api/query/ApiQueryTest.php
+++ b/tests/phpunit/includes/api/query/ApiQueryTest.php
@@ -61,7 +61,7 @@
public function testTitlesAreRejectedIfInvalid() {
$title = false;
while ( !$title || Title::newFromText( $title )->exists() ) {
-   $title = md5( mt_rand( 0, 1 ) + rand( 0, 999000 ) );
+   $title = md5( mt_rand( 0, 10 ) );
}
 
$data = $this->doApiRequest( array(
diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php 
b/tests/phpunit/includes/filebackend/FileBackendTest.php
index 9bef8e0..e115d17 100644
--- a/tests/phpunit/includes/filebackend/FileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendTest.php
@@ -18,7 +18,6 @@
protected function setUp() {
global $wgFileBackends;
parent::setUp();
-   $uniqueId = time() . '-' . mt_rand();
$tmpDir = $this->getNewTempDirectory();
if ( $this->getCliArg( 'use-filebackend' ) ) {
if ( self::$backendToUse ) {
@@ -58,7 +57,7 @@
'name' => 'localtesting',
'lockManager' => LockManagerGroup::singleton()->get( 
'fsLockManager' ),
'parallelize' => 'implicit',
-   'wikiId' => wfWikiId() . $uniqueId,
+   'wikiId' => wfWikiId() . wfRandomString(),
'backends' => array(
array(
'name' => 'localmultitesting1',
diff --git a/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php 
b/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
index c839bc4..ee0cf2d 100644
--- a/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
+++ b/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
@@ -11,7 +11,7 @@
 
$filename = 'Foo.png';
 
-   $this->tmpPrefix = wfTempDir() . '/migratefilelayout-test-' . 
time() . '-' . mt_rand();
+   $this->tmpPrefix = $this->getNewTempDirectory();
 
$backend = new FSFileBackend( array(
'name' => 'local-migratefilerepolayouttest',
diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php 
b/tests/phpunit/suites/UploadFromUrlTestSuite.php
index e867250..80893da 100644
--- a/tests/phpunit/suites/UploadFromUrlTestSuite.php
+++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php
@@ -21,6 +21,7 @@
$wgParserCacheType, $wgNamespaceAliases, 
$wgNamespaceProtection,
$parserMemc;
 
+   $tmpDir = $this->getNewTempDirectory();
$tmpGlobals 

[MediaWiki-commits] [Gerrit] Export a service-runner compatible entry point - change (mediawiki...parsoid)

2015-12-06 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Export a service-runner compatible entry point
..

Export a service-runner compatible entry point

This patch adds a service-runner compatible entry point to Parsoid's public
mudule API. Using this entry point, it is possible to run Parsoid using
service-runner. Among other things, this also allows us to run Parsoid,
RESTBase and other services in a single node process.

Change-Id: Ia057823d0173dcff090c1afef329b4cf64de8d73
---
M lib/config/ParsoidConfig.js
M lib/index.js
2 files changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/13/257213/1

diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 110ccaa..26ee8a3 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -91,6 +91,7 @@
  * @param {Object} options Any options we want to set over the defaults. Will 
not overwrite things set by the localSettings.setup function. See the class 
properties for more information.
  */
 function ParsoidConfig(localSettings, options) {
+   var self = this;
this.mwApiMap = new Map();
this.reverseMwApiMap = new Map();
this.mwApiRegexp = "";
@@ -106,6 +107,12 @@
// This happily overwrites inherited properties.
if (options) {
Object.assign(this, options);
+   // Call setMwApi for each specified API.
+   if (Array.isArray(options.mwApis)) {
+   options.mwApis.forEach(function(api) {
+   self.setMwApi(api);
+   });
+   }
}
 
if (this.loadWMF) {
diff --git a/lib/index.js b/lib/index.js
index 1369874..d580e19 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -4,6 +4,7 @@
 var json = require('../package.json');
 var parseJs = require('../bin/parse.js');
 var ParsoidConfig = require('./config/ParsoidConfig.js').ParsoidConfig;
+var ParsoidService = require("./api/ParsoidService.js");
 var JsApi = require('./jsapi.js');
 
 /**
@@ -136,3 +137,13 @@
 Object.keys(JsApi).forEach(function(k) {
Parsoid[k] = JsApi[k];
 });
+
+/**
+ * Start an API service worker as part of a service-runner service.
+ * @param {object} options
+ * @return {Promise}
+ */
+Parsoid.apiServiceWorker = function apiServiceWorker(options) {
+   var parsoidConfig = new ParsoidConfig(null, options.config);
+   return ParsoidService.init(parsoidConfig, options.logger);
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia057823d0173dcff090c1afef329b4cf64de8d73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] Make git dependency of thumbor venv explicit - change (mediawiki/vagrant)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make git dependency of thumbor venv explicit
..


Make git dependency of thumbor venv explicit

Bug: T120483
Change-Id: I7d35eef4c41e8c5b874d45bcfed7b0cab57d03e8
---
M puppet/modules/thumbor/manifests/init.pp
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index b567146..95819a4 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -28,6 +28,8 @@
 $sentry_dsn_file,
 ) {
 require ::virtualenv
+# Needed by the venv, which clones a few git repos
+require ::git
 
 # jpegtran
 require_package('libjpeg-progs')
@@ -62,6 +64,8 @@
 require  => [
 Package['libjpeg-progs'],
 Package['python-opencv'],
+# Needs to be an explicit dependency, for the packages pointing to 
git repos
+Package['git'],
 ],
 timeout  => 600, # This venv can be particularly long to download and 
setup
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d35eef4c41e8c5b874d45bcfed7b0cab57d03e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add thumbor/video-engine - change (integration/config)

2015-12-06 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Add thumbor/video-engine
..

Add thumbor/video-engine

Change-Id: I69d85660564f7ce4fc8fed9d638f3364c090d0ef
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/60/257260/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 42dde88..af08c18 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2231,6 +2231,10 @@
 template:
   - name: tox-jessie
 
+  - name: thumbor/video-engine
+template:
+  - name: tox-jessie
+
   - name: thumbor/vips-engine
 template:
   - name: tox-jessie

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69d85660564f7ce4fc8fed9d638f3364c090d0ef
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] WIP Allow users to choose math inspector or math dialog - change (mediawiki...Math)

2015-12-06 Thread Tchanders (Code Review)
Tchanders has uploaded a new change for review.

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

Change subject: WIP Allow users to choose math inspector or math dialog
..

WIP Allow users to choose math inspector or math dialog

The context item for math nodes now has two edit buttons,
one for the inspector (edit inline) and one for the dialog
(edit). Creating a new math node automatically opens the
dialog.

Bug: T120382
Change-Id: Icd3ec75262fcc5e0cbc304051c651278b0d8b01c
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A modules/ve-math/ve.ui.MWMathContextItem.js
M modules/ve-math/ve.ui.MWMathDialog.js
A modules/ve-math/ve.ui.MWMathDialogTool.js
A modules/ve-math/ve.ui.MWMathInspector.css
A modules/ve-math/ve.ui.MWMathInspector.js
D modules/ve-math/ve.ui.MWMathInspectorTool.js
9 files changed, 283 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/61/257261/1

diff --git a/extension.json b/extension.json
index 20d87fe..117563e 100644
--- a/extension.json
+++ b/extension.json
@@ -142,19 +142,23 @@
"scripts": [
"ve-math/ve.dm.MWMathNode.js",
"ve-math/ve.ce.MWMathNode.js",
+   "ve-math/ve.ui.MWMathInspector.js",
+   "ve-math/ve.ui.MWMathContextItem.js",
"ve-math/ve.ui.MWMathDialog.js",
"ve-math/ve.ui.MWMathPage.js",
-   "ve-math/ve.ui.MWMathInspectorTool.js"
+   "ve-math/ve.ui.MWMathDialogTool.js"
],
"styles": [
"ve-math/ve.ce.MWMathNode.css",
"ve-math/ve.ui.MWMathIcons.css",
+   "ve-math/ve.ui.MWMathInspector.css",
"ve-math/ve.ui.MWMathDialog.css"
],
"dependencies": [
"ext.visualEditor.mwcore"
],
"messages": [
+   
"math-visualeditor-mwmathcontextitem-editinline",
"math-visualeditor-mwmathdialog-title",
"math-visualeditor-mwmathdialog-card-formula",
"math-visualeditor-mwmathdialog-card-options",
diff --git a/i18n/en.json b/i18n/en.json
index a4e2bc0..b2cf398 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -18,6 +18,7 @@
]
},
"math-desc": "Render mathematical formulas between 
math ... /math tags",
+   "math-visualeditor-mwmathcontextitem-editinline": "Edit inline",
"math-visualeditor-mwmathdialog-title": "Formula",
"math-visualeditor-mwmathdialog-card-formula": "Formula",
"math-visualeditor-mwmathdialog-card-options": "Options",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 46a7294..64434e0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,6 +17,7 @@
]
},
"math-desc": 
"{{desc|name=Math|url=https://www.mediawiki.org/wiki/Extension:Math}};,
+   "math-visualeditor-mwmathcontextitem-editinline": "Label for the edit 
inline button in the math context item",
"math-visualeditor-mwmathdialog-title": "Title for the dialog to edit 
 formula blocks.\n{{Identical|Formula}}",
"math-visualeditor-mwmathdialog-card-formula": "Label for the formula 
card of the math dialog\n{{Identical|Formula}}",
"math-visualeditor-mwmathdialog-card-options": "Label for the options 
card of the math dialog\n{{Identical|Options}}",
diff --git a/modules/ve-math/ve.ui.MWMathContextItem.js 
b/modules/ve-math/ve.ui.MWMathContextItem.js
new file mode 100644
index 000..183575e
--- /dev/null
+++ b/modules/ve-math/ve.ui.MWMathContextItem.js
@@ -0,0 +1,69 @@
+/*!
+ * VisualEditor MWMathContextItem class.
+ *
+ * @copyright 2015 VisualEditor Team and others; see http://ve.mit-license.org
+ */
+
+/**
+ * Context item for a link.
+ *
+ * @class
+ * @extends ve.ui.LinearContextItem
+ *
+ * @param {ve.ui.Context} context Context item is in
+ * @param {ve.dm.Model} model Model item is related to
+ * @param {Object} config Configuration options
+ */
+ve.ui.MWMathContextItem = function VeUiMWMathContextItem() {
+   // Parent constructor
+   ve.ui.MWMathContextItem.super.apply( this, arguments );
+
+   this.editInlineButton = new OO.ui.ButtonWidget( {
+   label: ve.msg( 'math-visualeditor-mwmathcontextitem-editinline' 
),
+   flags: [ 'progressive' ]
+   } );
+
+   this.actionButtons.addItems( [ this.editInlineButton ], 0 );
+
+   this.editInlineButton.connect( this, { click: 'onInlineEditButtonClick' 
} );
+
+   // Initialization
+   this.$element.addClass( 

[MediaWiki-commits] [Gerrit] v2.12.1.1 - change (xowa)

2015-12-06 Thread Gnosygnu (Code Review)
Gnosygnu has uploaded a new change for review.

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

Change subject: v2.12.1.1
..

v2.12.1.1

Change-Id: I0bd6a1c48c6d8bf879be045ec4d766198e749401
---
M 100_core/.classpath
M 100_core/src/gplx/Bry_.java
M 100_core/src/gplx/Bry_bfr.java
M 100_core/src/gplx/Byte_ascii.java
R 100_core/src/gplx/Cancelable.java
R 100_core/src/gplx/Cancelable_.java
R 100_core/src/gplx/CompareAble.java
R 100_core/src/gplx/CompareAble_.java
R 100_core/src/gplx/CompareAble_tst.java
M 100_core/src/gplx/DateAdp_.java
M 100_core/src/gplx/DateAdp__tst.java
M 100_core/src/gplx/Io_url.java
M 100_core/src/gplx/List_adp_.java
R 100_core/src/gplx/Rls_able.java
R 100_core/src/gplx/Rls_able_.java
M 100_core/src/gplx/TimeSpanAdp_.java
R 100_core/src/gplx/To_str_able.java
R 100_core/src/gplx/To_str_able_.java
R 100_core/src/gplx/core/bits/Bitmask_.java
M 100_core/src/gplx/core/btries/Btrie_slim_mgr.java
A 100_core/src/gplx/core/encoders/B85_fp_.java
C 100_core/src/gplx/core/encoders/B85_fp__tst.java
M 100_core/src/gplx/core/envs/Process_adp.java
M 100_core/src/gplx/core/gfo_regys/GfoRegy.java
R 100_core/src/gplx/core/interfaces/InjectAble.java
R 100_core/src/gplx/core/interfaces/ParseAble.java
R 100_core/src/gplx/core/interfaces/SrlAble.java
R 100_core/src/gplx/core/interfaces/SrlAble_.java
R 100_core/src/gplx/core/interfaces/SrlAble__tst.java
R 100_core/src/gplx/core/ios/IoEngineFxt.java
M 100_core/src/gplx/core/ios/IoEngine_system.java
M 100_core/src/gplx/core/ios/IoStream.java
M 100_core/src/gplx/core/ios/Io_stream_rdr.java
M 100_core/src/gplx/core/ios/Io_stream_wtr.java
R 100_core/src/gplx/core/primitives/EnmMgr.java
R 100_core/src/gplx/core/primitives/EnmParser_tst.java
M 100_core/src/gplx/core/stores/DataRdr.java
R 100_core/src/gplx/core/times/DateAdp_parser.java
R 100_core/src/gplx/core/times/DateAdp_parser_tst.java
R 100_core/src/gplx/core/times/TimeSpanAdp__basic_tst.java
R 100_core/src/gplx/core/times/TimeSpanAdp__parse_tst.java
R 100_core/src/gplx/core/times/TimeSpanAdp__to_str_tst.java
C 100_core/src/gplx/langs/htmls/Url_encoder_interface.java
R 100_core/src/gplx/langs/htmls/Url_encoder_interface_same.java
D 100_core/src_100_interface/gplx/ParseAble_.java
M 100_core/src_311_gfoObj/gplx/GfoMsg.java
M 100_core/src_311_gfoObj/gplx/GfoMsg_.java
M 140_dbs/src/gplx/dbs/Db_conn.java
M 140_dbs/src/gplx/dbs/Db_stmt.java
M 140_dbs/src/gplx/dbs/Db_tbl.java
M 140_dbs/tst/gplx/dbs/Db_conn_fxt.java
M 150_gfui/src_100_basic/gplx/gfui/GfuiAlign_.java
M 150_gfui/src_100_basic/gplx/gfui/GfuiBorderEdge.java
M 150_gfui/src_100_basic/gplx/gfui/SizeAdpF.java
M 150_gfui/src_110_draw_core/gplx/gfui/ColorAdp_.java
M 150_gfui/src_110_draw_core/gplx/gfui/FontStyleAdp_.java
M 150_gfui/src_120_draw_objs/gplx/gfui/GfxAdp.java
M 150_gfui/src_200_ipt/gplx/gfui/IptBnd.java
M 150_gfui/src_200_ipt/gplx/gfui/IptBndMgr.java
M 150_gfui/src_200_ipt/gplx/gfui/IptBnd_chkBox.java
M 150_gfui/src_200_ipt/gplx/gfui/IptBnd_txt_cmd.java
M 150_gfui/src_200_ipt/gplx/gfui/IptBnd_txt_range.java
M 150_gfui/src_200_ipt/gplx/gfui/IptBnd_upDownRange.java
M 150_gfui/src_200_ipt/gplx/gfui/IptEventType_.java
M 150_gfui/src_200_ipt/gplx/gfui/IptKey.java
M 150_gfui/src_200_ipt/gplx/gfui/IptKey_.java
M 150_gfui/src_400_win/gplx/gfui/GfuiCmdForm.java
M 150_gfui/src_400_win/gplx/gfui/GfuiFocusXferBnd.java
M 150_gfui/src_400_win/gplx/gfui/GfuiWinKeyCmdMgr.java
M 150_gfui/src_410_box_core/gplx/gfui/GfuiElem.java
M 150_gfui/src_410_box_core/gplx/gfui/GfuiElemBase.java
M 150_gfui/src_420_box_basic/gplx/gfui/GfuiBtnClickBnd.java
M 150_gfui/src_430_box_custom/gplx/gfui/DataBndr_whenEvt_execCmd.java
M 150_gfui/src_430_box_custom/gplx/gfui/GfuiMoveElemBnd.java
M 150_gfui/src_430_box_custom/gplx/gfui/GfuiStatusBarBnd.java
M 150_gfui/src_500_tab/gplx/gfui/TabBnd.java
M 150_gfui/src_600_adp/gplx/gfui/ImageAdp.java
M 150_gfui/src_600_adp/gplx/gfui/ImageAdp_base.java
M 150_gfui/src_600_adp/gplx/gfui/TimerAdp.java
M 150_gfui/src_700_env/gplx/gfui/GfuiInvkCmd.java
M 150_gfui/src_700_env/gplx/gfui/Gfui_clipboard.java
M 150_gfui/xtn/gplx/gfui/Swt_core_lnrs.java
A 400_xowa/src/gplx/core/brys/Bry_diff_.java
A 400_xowa/src/gplx/core/brys/Bry_diff_tst.java
A 400_xowa/src/gplx/core/brys/Bry_err_wkr.java
M 400_xowa/src/gplx/core/brys/Bry_rdr.java
M 400_xowa/src/gplx/core/brys/Int_flag_bldr.java
M 400_xowa/src/gplx/core/caches/GfoCacheMgr_tst.java
M 400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java
M 400_xowa/src/gplx/core/ios/Io_buffer_rdr.java
M 400_xowa/src/gplx/core/net/Gfo_url_parser.java
M 400_xowa/src/gplx/core/threads/poolables/Gfo_poolable_itm.java
M 400_xowa/src/gplx/core/threads/poolables/Gfo_poolable_mgr.java
M 400_xowa/src/gplx/core/threads/poolables/Gfo_poolable_mgr_.java
M 400_xowa/src/gplx/core/threads/poolables/Gfo_poolable_mgr_tst.java
M 400_xowa/src/gplx/dbs/cfgs/Db_cfg_tbl.java
M 400_xowa/src/gplx/fsdb/data/Fsd_bin_tbl.java
M 400_xowa/src/gplx/fsdb/data/Fsd_dir_tbl.java
M 

[MediaWiki-commits] [Gerrit] Register factory callbacks for value types as well as data t... - change (mediawiki...Wikibase)

2015-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Register factory callbacks for value types as well as data 
types.
..


Register factory callbacks for value types as well as data types.

This allows all kinds of factory callbacks to be registered by
value type instead of per property data type. This avoids redundant
declaration, and provides a fallback mechanism for new/unknown
data types.

In addition, this allows extensions to add handling for new value
types, not just data types.

Note that teh fallback my be applies by DataTypeDefinitions (when
using the default RESOLVED_MODE) or by factory classes that are
aware of the VT and PT prefixes (using PREFIXED_MODE).

Bug: T118499
Change-Id: I0666f1ea97a3a3caf7233f28c880452e891a21b6
---
M client/WikibaseClient.datatypes.php
M client/includes/WikibaseClient.php
M docs/datatypes.wiki
M lib/WikibaseLib.datatypes.php
M lib/includes/DataTypeDefinitions.php
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M lib/tests/phpunit/DataTypeDefinitionsTest.php
M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
M repo/Wikibase.php
M repo/WikibaseRepo.datatypes.php
M repo/includes/WikibaseRepo.php
11 files changed, 292 insertions(+), 419 deletions(-)

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



diff --git a/client/WikibaseClient.datatypes.php 
b/client/WikibaseClient.datatypes.php
index e62c5ea..ac41d79 100644
--- a/client/WikibaseClient.datatypes.php
+++ b/client/WikibaseClient.datatypes.php
@@ -23,7 +23,10 @@
  */
 
 use ValueFormatters\FormatterOptions;
+use ValueFormatters\StringFormatter;
 use Wikibase\Client\WikibaseClient;
+use Wikibase\Lib\SnakFormatter;
+use Wikibase\Lib\UnDeserializableValueFormatter;
 
 return call_user_func( function() {
// NOTE: 'formatter-factory-callback' callbacks act as glue between the 
high level interface
@@ -32,55 +35,57 @@
// WikibaseValueFormatterBuilders should be used *only* here, program 
logic should use a
// OutputFormatValueFormatterFactory as returned by 
WikibaseClient::getValueFormatterFactory().
 
+   // NOTE: Factory callbacks are registered below by value type (using 
the prefix "VT:") or by
+   // property data type (prefix "PT:").
+
return array(
-   'commonsMedia' => array(
+   'VT:bad' => array(
'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
-   $factory = 
WikibaseClient::getDefaultFormatterBuilders();
-   return $factory->newCommonsMediaFormatter( 
$format, $options );
-   },
+   return $format === SnakFormatter::FORMAT_PLAIN 
? new UnDeserializableValueFormatter( $options ) : null;
+   }
),
-   'globe-coordinate' => array(
+   'VT:globecoordinate' => array(
'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
$factory = 
WikibaseClient::getDefaultFormatterBuilders();
return $factory->newGlobeCoordinateFormatter( 
$format, $options );
},
),
-   'monolingualtext' => array(
+   'VT:monolingualtext' => array(
'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
$factory = 
WikibaseClient::getDefaultFormatterBuilders();
return $factory->newMonolingualFormatter( 
$format, $options );
},
),
-   'quantity' => array(
+   'VT:quantity' => array(
'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
$factory = 
WikibaseClient::getDefaultFormatterBuilders();
return $factory->newQuantityFormatter( $format, 
$options );
},
),
-   'string' => array(
+   'VT:string' => array(
'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
-   return null; // rely on formatter for string 
value type
+   return $format === SnakFormatter::FORMAT_PLAIN 
? new StringFormatter( $options ) : null;
},
),
-   'time' => array(
-   'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
-   $factory = 
WikibaseClient::getDefaultFormatterBuilders();
-   return $factory->newTimeFormatter( $format, 
$options );
-  

  1   2   >