[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: apache2: hard restart to release old ports

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400207 )

Change subject: apache2: hard restart to release old ports
..


apache2: hard restart to release old ports

A `service apache2 restart` does not release any TCP ports which were
already bound by a running apache2 process. Forcing a hard restart via
`service apache2 stop && service apache2 start` will release the ports
and make them for use by other programs (e.g. nginx).

Bug: T183692
Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72
---
M puppet/modules/apache/manifests/init.pp
1 file changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/apache/manifests/init.pp 
b/puppet/modules/apache/manifests/init.pp
index bcbb314..3095d5b 100644
--- a/puppet/modules/apache/manifests/init.pp
+++ b/puppet/modules/apache/manifests/init.pp
@@ -20,7 +20,19 @@
 file { '/etc/apache2/ports.conf':
 content => template('apache/ports.conf.erb'),
 require => Package['apache2'],
-notify  => Service['apache2'],
+notify  => [
+Exec['apache2 release ports'],
+Service['apache2'],
+],
+}
+
+# T183692: A normal restart of Apache2 will not release bound ports. We
+# need to trigger a hard restart to fix that.
+exec { 'apache2 release ports':
+command => '/usr/sbin/service apache2 stop',
+onlyif  => '/usr/sbin/service apache2 status',
+refreshonly => true,
+notify  => Service['apache2'],
 }
 
 # Set EnableSendfile to 'Off' to work around a bug with Vagrant.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: apache2: hard restart to release old ports

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400207 )

Change subject: apache2: hard restart to release old ports
..

apache2: hard restart to release old ports

A `service apache2 restart` does not release any TCP ports which were
already bound by a running apache2 process. Forcing a hard restart via
`service apache2 stop && service apache2 start` will release the ports
and make them for use by other programs (e.g. nginx).

Bug: T183692
Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72
---
M puppet/modules/apache/manifests/init.pp
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/07/400207/1

diff --git a/puppet/modules/apache/manifests/init.pp 
b/puppet/modules/apache/manifests/init.pp
index bcbb314..2856915 100644
--- a/puppet/modules/apache/manifests/init.pp
+++ b/puppet/modules/apache/manifests/init.pp
@@ -20,7 +20,16 @@
 file { '/etc/apache2/ports.conf':
 content => template('apache/ports.conf.erb'),
 require => Package['apache2'],
-notify  => Service['apache2'],
+notify  => Exec['apache2 release ports'],
+}
+
+# T183692: A normal restart of Apache2 will not release bound ports. We
+# need to trigger a hard restart to fix that.
+exec { 'apache2 release ports':
+command => '/usr/sbin/service apache2 stop',
+onlyif  => '/usr/sbin/service apache2 status',
+refreshonly => true,
+notify  => Service['apache2'],
 }
 
 # Set EnableSendfile to 'Off' to work around a bug with Vagrant.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff25b359f4d5317b6762bad2ca9fe073e0edfa72
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: https: Add port number to reverse proxy

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400206 )

Change subject: https: Add port number to reverse proxy
..


https: Add port number to reverse proxy

Bug: T183304
Change-Id: I464fd73c8183500f875364384b3deba15d3e1116
---
M puppet/modules/role/manifests/https.pp
R puppet/modules/role/templates/https/nginx.conf.erb
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Smalyshev: Looks good to me, but someone else must approve
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/puppet/modules/role/manifests/https.pp 
b/puppet/modules/role/manifests/https.pp
index a2fa2c7..551f580 100644
--- a/puppet/modules/role/manifests/https.pp
+++ b/puppet/modules/role/manifests/https.pp
@@ -11,8 +11,8 @@
 }
 
 nginx::site { 'devwiki':
-source => 'puppet:///modules/role/https/nginx.conf',
-notify => Service['nginx'],
+content => template('role/https/nginx.conf.erb'),
+notify  => Service['nginx'],
 }
 
 mediawiki::settings { 'SSL-related settings':
diff --git a/puppet/modules/role/files/https/nginx.conf 
b/puppet/modules/role/templates/https/nginx.conf.erb
similarity index 87%
rename from puppet/modules/role/files/https/nginx.conf
rename to puppet/modules/role/templates/https/nginx.conf.erb
index bdbfd32..44aa994 100644
--- a/puppet/modules/role/files/https/nginx.conf
+++ b/puppet/modules/role/templates/https/nginx.conf.erb
@@ -14,6 +14,6 @@
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 180s;
-   proxy_pass http://127.0.0.1;
+   proxy_pass http://127.0.0.1:<%= scope['::forwarded_port'] %>;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I464fd73c8183500f875364384b3deba15d3e1116
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: https: Add port number to reverse proxy

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400206 )

Change subject: https: Add port number to reverse proxy
..

https: Add port number to reverse proxy

Bug: T183304
Change-Id: I464fd73c8183500f875364384b3deba15d3e1116
---
M puppet/modules/role/manifests/https.pp
R puppet/modules/role/templates/https/nginx.conf.erb
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/06/400206/1

diff --git a/puppet/modules/role/manifests/https.pp 
b/puppet/modules/role/manifests/https.pp
index a2fa2c7..551f580 100644
--- a/puppet/modules/role/manifests/https.pp
+++ b/puppet/modules/role/manifests/https.pp
@@ -11,8 +11,8 @@
 }
 
 nginx::site { 'devwiki':
-source => 'puppet:///modules/role/https/nginx.conf',
-notify => Service['nginx'],
+content => template('role/https/nginx.conf.erb'),
+notify  => Service['nginx'],
 }
 
 mediawiki::settings { 'SSL-related settings':
diff --git a/puppet/modules/role/files/https/nginx.conf 
b/puppet/modules/role/templates/https/nginx.conf.erb
similarity index 87%
rename from puppet/modules/role/files/https/nginx.conf
rename to puppet/modules/role/templates/https/nginx.conf.erb
index bdbfd32..44aa994 100644
--- a/puppet/modules/role/files/https/nginx.conf
+++ b/puppet/modules/role/templates/https/nginx.conf.erb
@@ -14,6 +14,6 @@
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 180s;
-   proxy_pass http://127.0.0.1;
+   proxy_pass http://127.0.0.1:<%= scope['::forwarded_port'] %>;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I464fd73c8183500f875364384b3deba15d3e1116
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: download_dump: Use response.iter_content

2017-12-25 Thread Rafidaslam (Code Review)
Rafidaslam has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400205 )

Change subject: download_dump: Use response.iter_content
..

download_dump: Use response.iter_content

Use `response.iter_content` instead of `response.raw`
and add `stream=True` when fetching the dump file.\

Bug: T183666
Change-Id: I92ae2cef5b6f43b0be689e498f1c0b530d197b4a
---
M scripts/maintenance/download_dump.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/400205/1

diff --git a/scripts/maintenance/download_dump.py 
b/scripts/maintenance/download_dump.py
index 9793255..d8c8d00 100644
--- a/scripts/maintenance/download_dump.py
+++ b/scripts/maintenance/download_dump.py
@@ -18,11 +18,10 @@
 #
 from __future__ import absolute_import, division, unicode_literals
 
-import io
 import os.path
 import sys
 
-from shutil import copyfile, copyfileobj
+from shutil import copyfile
 
 import pywikibot
 
@@ -78,11 +77,12 @@
 os.path.join(self.getOption('wikiname'),
  'latest', download_filename)
 pywikibot.output('Downloading file from ' + url)
-response = fetch(url)
+response = fetch(url, stream=True)
 if response.status == 200:
 try:
 with open(file_storepath, 'wb') as result_file:
-copyfileobj(io.BytesIO(response.raw), result_file)
+for chunk in response.data.iter_content(100 * 1024):
+result_file.write(chunk)
 except IOError:
 pywikibot.exception()
 return False

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: Mutate $wgServer after applying local settings

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400204 )

Change subject: Mutate $wgServer after applying local settings
..

Mutate $wgServer after applying local settings

Move the block introduced in 8c7bf33 and updated in 990f03a which sets
$wgServer relative to current request headers and trims the protocol if
the deployment supports HTTP and HTTPS *after* the user and Puppet
managed local settings files are processed.

Bug: T183302
Change-Id: I381b9b1ea910c8b96cc4c4186e5f91ae64a5372c
---
M puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
1 file changed, 10 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/04/400204/1

diff --git 
a/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb 
b/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
index 6eaaa3c..3b61f12 100644
--- a/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
+++ b/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
@@ -54,15 +54,6 @@
),
 );
 
-if ( PHP_SAPI !== 'cli' ) {
-   // T68399: set wgServer from inbound request
-   $wgServer = WebRequest::detectServer();
-   if ( isset( $mwvSupportsHttps ) && $mwvSupportsHttps ) {
-   // Create protocol-relative URL when the HTTPS role is active
-   $wgServer = preg_replace( '#^https?:#', '', $wgServer );
-   }
-}
-
 /**
  * @var array $wmvActiveExtensions List of extensions enabled for the wiki
  * Populated by settings.d files generated by ::mediawiki::extension and
@@ -82,3 +73,13 @@
 ) {
include_once $conffile;
 }
+
+// T183302: Mutate $wgServer *after* local settings changes
+if ( PHP_SAPI !== 'cli' ) {
+   // T68399: set wgServer from inbound request
+   $wgServer = WebRequest::detectServer();
+   if ( isset( $mwvSupportsHttps ) && $mwvSupportsHttps ) {
+   // Create protocol-relative URL when the HTTPS role is active
+   $wgServer = preg_replace( '#^https?:#', '', $wgServer );
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I381b9b1ea910c8b96cc4c4186e5f91ae64a5372c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Fix mobile talk page editor fail when the talk page is a red...

2017-12-25 Thread Eflyjason (Code Review)
Eflyjason has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400203 )

Change subject: Fix mobile talk page editor fail when the talk page is a 
redirect
..

Fix mobile talk page editor fail when the talk page is a redirect

Bug: T100404
Change-Id: Ie99da42e3441998432341178afcc5f416a756191
---
M resources/mobile.talk.overlays/TalkSectionOverlay.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/03/400203/1

diff --git a/resources/mobile.talk.overlays/TalkSectionOverlay.js 
b/resources/mobile.talk.overlays/TalkSectionOverlay.js
index a8af395..0af2395 100644
--- a/resources/mobile.talk.overlays/TalkSectionOverlay.js
+++ b/resources/mobile.talk.overlays/TalkSectionOverlay.js
@@ -113,7 +113,8 @@
action: 'edit',
title: this.options.title,
section: this.options.id,
-   appendtext: val
+   appendtext: val,
+   redirect: true
} ).done( function () {
popup.show( mw.msg( 
'mobile-frontend-talk-reply-success' ) );
// invalidate the cache

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie99da42e3441998432341178afcc5f416a756191
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Eflyjason 

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add DOM Structure to Scores

2017-12-25 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400202 )

Change subject: Add DOM Structure to Scores
..

Add DOM Structure to Scores

This change encapsulates the two components of the `$1\". Currently recognized languages are 
lang=\"lilypond\" (the default) and lang=\"ABC\".",
"score-invalidoggoverride": "The file \"$1\" you 
specified with override_ogg is invalid. Please specify the file name only, omit 
[[…]] and the \"{{ns:file}}:\" prefix.",
+   "score-mididownload": "MIDI File",
"score-midioverridenotfound": "The file \"$1\" you 
specified with override_midi could not be found. Please specify the file name 
only, omit [[…]] and the \"{{ns:file}}:\" prefix.",
"score-noabcinput": "ABC source file $1 could not be created.",
"score-noimages": "No score images were generated. Please check your 
score code.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c87c392..4129be1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,6 +20,7 @@
"score-getcwderr": "Displayed if the extension cannot obtain the 
current working directory.",
"score-invalidlang": "Displayed if the lang=\"…\" attribute contains an 
unrecognized score language. $1 is the unrecognized language.",
"score-invalidoggoverride": "Displayed if the file specified with the 
override_ogg=\"…\" attribute is invalid. $1 is the value of the override_ogg 
attribute.",
+   "score-mididownload": "Link text to download generated MIDI file",
"score-midioverridenotfound": "Displayed if the file specified with the 
override_midi=\"…\" attribute could not be found. $1 is the value of the 
override_midi attribute.",
"score-noabcinput": "Displayed if an ABC source file could not be 
created for lang=\"ABC\". $1 is the path to the file that could not be 
created.",
"score-noimages": "Displayed if no score images were rendered.",
diff --git a/includes/Score.php b/includes/Score.php
index e6df438..58f64cd 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -422,17 +422,31 @@
}
}
 
-   /* return output link(s) */
+   /* Create output */
+   $midiLink = '';
+   if ( $options['link_midi'] ) {
+   if ( $options['override_midi'] ) {
+   $url = $options['midi_file']->getUrl();
+   } else {
+   $url = 
"{$options['dest_url']}/{$options['file_name_prefix']}.midi";
+   }
+   $midiLink .= Html::OpenElement( 'a',
+   [ 'href' => $url, 'class' => 
'mwe-score-mididownload' ] );
+   }
+
+   $output = Html::OpenElement( 'div', ['class' => 
'mwe-score-block'] )
+   . Html::OpenElement( 'div', ['class' => 
'mwe-score-images'] )
+   . $midiLink;
+
if ( isset( $existingFiles[$imageFileName] ) ) {
list( $width, $height ) = 
$metaData[$imageFileName]['size'];
-   $link = Html::rawElement( 'img', [
+   $output .= Html::rawElement( 'img', [
'src' => 
"{$options['dest_url']}/$imageFileName",
'width' => $width,
'height' => $height,
'alt' => $code,
] );
} elseif ( isset( $existingFiles[$multi1FileName] ) ) {
-   $link = '';
for ( $i = 1; ; ++$i ) {
$fileName = 
"{$options['file_name_prefix']}-page$i.png";
if ( !isset( $existingFiles[$fileName] 
) ) {
@@ -443,7 +457,7 @@
->numParams( $i )
->plain();
list( $width, $height ) = 
$metaData[$fileName]['size'];
-   $link .= Html::rawElement( 'img', [
+   $output .= Html::rawElement( 'img', [
'src' => 
"{$options['dest_url']}/$fileName",
'width' => $width,
'height' => $height,
@@ -455,14 +469,9 @@
/* No images; this may happen in raw mode or 
when the user omits the score code */
throw new ScoreException( wfMessage( 
'score-noimages' ) );
   

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [doc] Update package info

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400189 )

Change subject: [doc] Update package info
..


[doc] Update package info

- add code of conduct
- place image buttons on top
- add code coverage link
- fix travis image link

Change-Id: I88cc85111ddbc1e2e0178bf940a86798abfbd080
---
M README.rst
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/README.rst b/README.rst
index ae83ef9..b06ae49 100644
--- a/README.rst
+++ b/README.rst
@@ -1,3 +1,12 @@
+.. image:: https://secure.travis-ci.org/wikimedia/pywikibot.png?branch=master
+   :alt: Build Status
+   :target: https://travis-ci.org/wikimedia/pywikibot
+.. image:: 
https://codecov.io/gh/wikimedia/pywikibot/branch/master/graphs/badge.svg?branch=master
+   :alt: Code coverage
+   :target: http://codecov.io/github/wikimedia/pywikibot?branch=master
+.. image:: https://img.shields.io/pypi/v/pywikibot.svg
+   :alt: Pywikibot release
+   :target: https://pypi.python.org/pypi/pywikibot
 
 Pywikibot
 =
@@ -66,9 +75,4 @@
 `learn `_ 
how to get
 started.
 
-.. image:: 
https://secure.travis-ci.org/wikimedia/pywikibot-core.png?branch=master
-   :alt: Build Status
-   :target: https://travis-ci.org/wikimedia/pywikibot
-.. image:: https://img.shields.io/pypi/v/pywikibot.svg
-   :alt: Pywikibot release
-   :target: https://pypi.python.org/pypi/pywikibot
\ No newline at end of file
+.. include:: CODE_OF_CONDUCT.rst

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88cc85111ddbc1e2e0178bf940a86798abfbd080
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [doc] wikimania family will be shipped with next release

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/399383 )

Change subject: [doc] wikimania family will be shipped with next release
..


[doc] wikimania family will be shipped with next release

Change-Id: I91e7a591a9b6d75bf164d4b37cd26c3f5d05ce56
---
M HISTORY.rst
M docs/api_ref/pywikibot.families.rst
2 files changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/HISTORY.rst b/HISTORY.rst
index af33cac..ab4bc4d 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,7 @@
 Current release
 ---
 
+* Ship wikimania family file
 * Drop battlestarwiki family file
 * Bugfixes and improvements
 * Localisation updates
diff --git a/docs/api_ref/pywikibot.families.rst 
b/docs/api_ref/pywikibot.families.rst
index 68c2dca..d77d28b 100644
--- a/docs/api_ref/pywikibot.families.rst
+++ b/docs/api_ref/pywikibot.families.rst
@@ -137,6 +137,14 @@
 :undoc-members:
 :show-inheritance:
 
+pywikibot.families.wikimania_family module
+--
+
+.. automodule:: pywikibot.families.wikimania_family
+:members:
+:undoc-members:
+:show-inheritance:
+
 pywikibot.families.wikimediachapter_family module
 -
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91e7a591a9b6d75bf164d4b37cd26c3f5d05ce56
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Dvorapa 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: rake: Make `rake test` reentrant

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400200 )

Change subject: rake: Make `rake test` reentrant
..


rake: Make `rake test` reentrant

`rake test` leaves a bunch of files behind in tmp/testenv. If these
files are not removed before the next run of `rake test` the linter will
fail with a long list of duplication messages. Adding a :clean step to
the start of the test run will take care of this by ensuring that the
prior test run's files are removed. This should have no effect on CI
tests, but will make local testing easier.

Change-Id: Iaeb2df655f92943b91f8e2410ae82034d46c53de
---
M Rakefile
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/Rakefile b/Rakefile
index 95c90bb..f7c978f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -13,9 +13,13 @@
 require 'puppet-lint/tasks/puppet-lint'
 require 'puppet-syntax/tasks/puppet-syntax'
 require 'puppet-strings/tasks/generate'
+require 'rake/clean'
 require 'rspec/core/rake_task'
 require 'rubocop/rake_task'
 require 'yard'
+
+# Tell `rake clean` to get rid of generated test files
+CLEAN.include('tmp/testenv')
 
 # Work around bug in puppet-lint configuration
 # https://github.com/rodjek/puppet-lint/issues/331
@@ -37,7 +41,7 @@
 task default: [:test]
 
 desc 'Run all build/tests commands (CI entry point)'
-task test: [:syntax, :spec, :rubocop, :cucumber, :lint, :doc]
+task test: [:clean, :syntax, :spec, :rubocop, :cucumber, :lint, :doc]
 
 desc 'Generate all documentations'
 task :doc do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaeb2df655f92943b91f8e2410ae82034d46c53de
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: rake: move gemspec to dotfile

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400199 )

Change subject: rake: move gemspec to dotfile
..


rake: move gemspec to dotfile

Move the gemspec file used for testing the local Vagrant plugin to
a dotfile. This is merely a cosmetic change for directory listings.

Change-Id: I169c606906ea003c773a47e2eace69eeacba64c0
---
R .gemspec
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/mediawiki-vagrant.gemspec b/.gemspec
similarity index 100%
rename from mediawiki-vagrant.gemspec
rename to .gemspec

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I169c606906ea003c773a47e2eace69eeacba64c0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: README: update minimum Vagrant version

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400197 )

Change subject: README: update minimum Vagrant version
..


README: update minimum Vagrant version

We have been requiring Vagrant 1.7.0+ for quite a while. Minor
formatting updates are also made to the file (line wrapping, heading
style used).

Change-Id: I93d74f9bea4f76c9f407fc3b73eff56edb732c33
---
M README.md
1 file changed, 20 insertions(+), 11 deletions(-)

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



diff --git a/README.md b/README.md
index 1989196..36e5926 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-## MediaWiki-Vagrant
+MediaWiki-Vagrant
+=
 
 https://www.mediawiki.org/wiki/Mediawiki-vagrant
 
@@ -13,7 +14,8 @@
 and an interactive interpreter. Best of all, because the configuration is
 automated and contained in a virtual environment, mistakes are easy to undo.
 
-## Install
+Install
+---
 
 You'll need to install recent versions of Vagrant and VirtualBox.
 
@@ -23,8 +25,8 @@
 `support/README-parallels.md` for details on the former three.)
 
  * VirtualBox: https://www.virtualbox.org/wiki/Downloads
- * Vagrant: https://www.vagrantup.com/downloads-archive.html (the version must 
be
-   1.4.0 or higher). For NFS, use 1.5.4 or higher.
+ * Vagrant: https://www.vagrantup.com/downloads-archive.html (the version must
+   be 1.7.0 or higher).
 
To check your Vagrant version, run
 
@@ -77,7 +79,8 @@
 see the main page of your MediaWiki instance.
 
 
-## Use
+Use
+---
 
 To access a command shell on your virtual environment, run `vagrant ssh` from
 the root mediawiki-vagrant directory or any of its subdirectories.
@@ -89,7 +92,8 @@
 The admin account on MediaWiki is `admin` / `vagrant`.
 
 
-## Update
+Update
+--
 
 When the vagrant Virtual Machine is running, it will periodically run Puppet
 (an open source configuration management tool) to update its configuration,
@@ -102,7 +106,8 @@
 The latter will restart the VM.
 
 
-## Extend
+Extend
+--
 
 You can add roles to MediaWiki-Vagrant! A 'role' represents a set of software
 configurations required for giving this machine some special function.
@@ -115,11 +120,13 @@
 patch to the Mediawiki-Vagrant project.
 
 
-## Settings
+Settings
+
 
 For information about settings, see settings.d/README.
 
-## Testing
+Testing
+---
 
 Install dependencies:
 
@@ -130,7 +137,8 @@
 
 bundle exec rake
 
-## Troubleshoot
+Troubleshoot
+
 
 Stuck? Here's where to get help.
 
@@ -141,4 +149,5 @@
  * 
https://phabricator.wikimedia.org/maniphest/task/create/?projects=MediaWiki-Vagrant
 
 Patches and contributions are welcome!
-See  for 
details.
+See  for
+details.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93d74f9bea4f76c9f407fc3b73eff56edb732c33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: rake: move gemspec to dotfile

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400199 )

Change subject: rake: move gemspec to dotfile
..

rake: move gemspec to dotfile

Move the gemspec file used for testing the local Vagrant plugin to
a dotfile. This is merely a cosmetic change for directory listings.

Change-Id: I169c606906ea003c773a47e2eace69eeacba64c0
---
R .gemspec
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/99/400199/1

diff --git a/mediawiki-vagrant.gemspec b/.gemspec
similarity index 100%
rename from mediawiki-vagrant.gemspec
rename to .gemspec

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I169c606906ea003c773a47e2eace69eeacba64c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: README: update minimum Vagrant version

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400197 )

Change subject: README: update minimum Vagrant version
..

README: update minimum Vagrant version

We have been requiring Vagrant 1.7.0+ for quite a while. Minor
formatting updates are also made to the file (line wrapping, heading
style used).

Change-Id: I93d74f9bea4f76c9f407fc3b73eff56edb732c33
---
M README.md
1 file changed, 20 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/97/400197/1

diff --git a/README.md b/README.md
index 1989196..36e5926 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-## MediaWiki-Vagrant
+MediaWiki-Vagrant
+=
 
 https://www.mediawiki.org/wiki/Mediawiki-vagrant
 
@@ -13,7 +14,8 @@
 and an interactive interpreter. Best of all, because the configuration is
 automated and contained in a virtual environment, mistakes are easy to undo.
 
-## Install
+Install
+---
 
 You'll need to install recent versions of Vagrant and VirtualBox.
 
@@ -23,8 +25,8 @@
 `support/README-parallels.md` for details on the former three.)
 
  * VirtualBox: https://www.virtualbox.org/wiki/Downloads
- * Vagrant: https://www.vagrantup.com/downloads-archive.html (the version must 
be
-   1.4.0 or higher). For NFS, use 1.5.4 or higher.
+ * Vagrant: https://www.vagrantup.com/downloads-archive.html (the version must
+   be 1.7.0 or higher).
 
To check your Vagrant version, run
 
@@ -77,7 +79,8 @@
 see the main page of your MediaWiki instance.
 
 
-## Use
+Use
+---
 
 To access a command shell on your virtual environment, run `vagrant ssh` from
 the root mediawiki-vagrant directory or any of its subdirectories.
@@ -89,7 +92,8 @@
 The admin account on MediaWiki is `admin` / `vagrant`.
 
 
-## Update
+Update
+--
 
 When the vagrant Virtual Machine is running, it will periodically run Puppet
 (an open source configuration management tool) to update its configuration,
@@ -102,7 +106,8 @@
 The latter will restart the VM.
 
 
-## Extend
+Extend
+--
 
 You can add roles to MediaWiki-Vagrant! A 'role' represents a set of software
 configurations required for giving this machine some special function.
@@ -115,11 +120,13 @@
 patch to the Mediawiki-Vagrant project.
 
 
-## Settings
+Settings
+
 
 For information about settings, see settings.d/README.
 
-## Testing
+Testing
+---
 
 Install dependencies:
 
@@ -130,7 +137,8 @@
 
 bundle exec rake
 
-## Troubleshoot
+Troubleshoot
+
 
 Stuck? Here's where to get help.
 
@@ -141,4 +149,5 @@
  * 
https://phabricator.wikimedia.org/maniphest/task/create/?projects=MediaWiki-Vagrant
 
 Patches and contributions are welcome!
-See  for 
details.
+See  for
+details.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93d74f9bea4f76c9f407fc3b73eff56edb732c33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: rake: move test definitions to tests directory

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400201 )

Change subject: rake: move test definitions to tests directory
..

rake: move test definitions to tests directory

Clean up the root directly slightly by moving the Cucumber and RSpec
test files into a 'tests' directory.

Change-Id: I5847f5e122ea8497aeb7bbb33b8d024972ff6211
---
M Rakefile
R tests/features/config.feature
R tests/features/role_settings.feature
R tests/features/roles.feature
R tests/features/step_definitions/common_steps.rb
R tests/features/step_definitions/roles_steps.rb
R tests/features/step_definitions/settings_steps.rb
R tests/features/support/env.rb
R tests/features/support/hooks.rb
R tests/features/support/output_helper.rb
R tests/spec/mediawiki_vagrant/environment_spec.rb
R tests/spec/mediawiki_vagrant/setting_spec.rb
R tests/spec/mediawiki_vagrant/settings/definitions_spec.rb
R tests/spec/mediawiki_vagrant/settings_definer_spec.rb
R tests/spec/mediawiki_vagrant/settings_spec.rb
R tests/spec/spec_helper.rb
R tests/spec/support/mock_environment.rb
R tests/spec/support/string.rb
18 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/01/400201/1

diff --git a/Rakefile b/Rakefile
index f7c978f..37e3391 100644
--- a/Rakefile
+++ b/Rakefile
@@ -33,9 +33,12 @@
   config.log_format = '%{path}:%{line} %{KIND}: %{message}'
 end
 Cucumber::Rake::Task.new(:cucumber) do |t|
+  t.cucumber_opts = '-r tests/features tests/features'
   t.fork = false
 end
-RSpec::Core::RakeTask.new(:spec)
+RSpec::Core::RakeTask.new(:spec) do |t|
+  t.pattern = 'tests/spec/**{,/*/**}/*_spec.rb'
+end
 RuboCop::RakeTask.new(:rubocop)
 
 task default: [:test]
diff --git a/features/config.feature b/tests/features/config.feature
similarity index 100%
rename from features/config.feature
rename to tests/features/config.feature
diff --git a/features/role_settings.feature 
b/tests/features/role_settings.feature
similarity index 100%
rename from features/role_settings.feature
rename to tests/features/role_settings.feature
diff --git a/features/roles.feature b/tests/features/roles.feature
similarity index 100%
rename from features/roles.feature
rename to tests/features/roles.feature
diff --git a/features/step_definitions/common_steps.rb 
b/tests/features/step_definitions/common_steps.rb
similarity index 100%
rename from features/step_definitions/common_steps.rb
rename to tests/features/step_definitions/common_steps.rb
diff --git a/features/step_definitions/roles_steps.rb 
b/tests/features/step_definitions/roles_steps.rb
similarity index 100%
rename from features/step_definitions/roles_steps.rb
rename to tests/features/step_definitions/roles_steps.rb
diff --git a/features/step_definitions/settings_steps.rb 
b/tests/features/step_definitions/settings_steps.rb
similarity index 100%
rename from features/step_definitions/settings_steps.rb
rename to tests/features/step_definitions/settings_steps.rb
diff --git a/features/support/env.rb b/tests/features/support/env.rb
similarity index 100%
rename from features/support/env.rb
rename to tests/features/support/env.rb
diff --git a/features/support/hooks.rb b/tests/features/support/hooks.rb
similarity index 100%
rename from features/support/hooks.rb
rename to tests/features/support/hooks.rb
diff --git a/features/support/output_helper.rb 
b/tests/features/support/output_helper.rb
similarity index 100%
rename from features/support/output_helper.rb
rename to tests/features/support/output_helper.rb
diff --git a/spec/mediawiki_vagrant/environment_spec.rb 
b/tests/spec/mediawiki_vagrant/environment_spec.rb
similarity index 99%
rename from spec/mediawiki_vagrant/environment_spec.rb
rename to tests/spec/mediawiki_vagrant/environment_spec.rb
index f48d922..555aa70 100644
--- a/spec/mediawiki_vagrant/environment_spec.rb
+++ b/tests/spec/mediawiki_vagrant/environment_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require_relative '../spec_helper'
 require 'mediawiki-vagrant/environment'
 
 module MediaWikiVagrant
@@ -473,7 +473,7 @@
   subject { environment.valid? }
 
   context 'when the environment directory is the project directory' do
-let(:environment) { Environment.new(File.expand_path('../../../', 
__FILE__)) }
+let(:environment) { Environment.new(File.expand_path('../../../../', 
__FILE__)) }
 
 it { is_expected.to be(true) }
   end
diff --git a/spec/mediawiki_vagrant/setting_spec.rb 
b/tests/spec/mediawiki_vagrant/setting_spec.rb
similarity index 98%
rename from spec/mediawiki_vagrant/setting_spec.rb
rename to tests/spec/mediawiki_vagrant/setting_spec.rb
index dd00602..f5ac90f 100644
--- a/spec/mediawiki_vagrant/setting_spec.rb
+++ b/tests/spec/mediawiki_vagrant/setting_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require_relative '../spec_helper'
 require 'mediawiki-vagrant/setting'
 
 module MediaWikiVagrant
diff --git a/sp

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: rake: Make `rake test` reentrant

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400200 )

Change subject: rake: Make `rake test` reentrant
..

rake: Make `rake test` reentrant

`rake test` leaves a bunch of files behind in tmp/testenv. If these
files are not removed before the next run of `rake test` the linter will
fail with a long list of duplication messages. Adding a :clean step to
the start of the test run will take care of this by ensuring that the
prior test run's files are removed. This should have no effect on CI
tests, but will make local testing easier.

Change-Id: Iaeb2df655f92943b91f8e2410ae82034d46c53de
---
M Rakefile
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/00/400200/1

diff --git a/Rakefile b/Rakefile
index 95c90bb..f7c978f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -13,9 +13,13 @@
 require 'puppet-lint/tasks/puppet-lint'
 require 'puppet-syntax/tasks/puppet-syntax'
 require 'puppet-strings/tasks/generate'
+require 'rake/clean'
 require 'rspec/core/rake_task'
 require 'rubocop/rake_task'
 require 'yard'
+
+# Tell `rake clean` to get rid of generated test files
+CLEAN.include('tmp/testenv')
 
 # Work around bug in puppet-lint configuration
 # https://github.com/rodjek/puppet-lint/issues/331
@@ -37,7 +41,7 @@
 task default: [:test]
 
 desc 'Run all build/tests commands (CI entry point)'
-task test: [:syntax, :spec, :rubocop, :cucumber, :lint, :doc]
+task test: [:clean, :syntax, :spec, :rubocop, :cucumber, :lint, :doc]
 
 desc 'Generate all documentations'
 task :doc do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaeb2df655f92943b91f8e2410ae82034d46c53de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: vagrant: Add plugin to set host file permissions

2017-12-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400198 )

Change subject: vagrant: Add plugin to set host file permissions
..

vagrant: Add plugin to set host file permissions

Git does not have a means to version permissions on files other than the
execute bit. The MediaWikiVagrant.FilePerms provisioner plugin lets us
add manipulation of local file system permissions to a `vagrant
{provision, up}` run. The initial use of this feature is making the
cache/apt/partial directory world writable so that Stretch's _apt user
can write downloaded files there.

Bug: T183150
Change-Id: I8d0c7ed9f1d055fb5dbcebfb62cf72eac722f7e1
---
M Vagrantfile
M lib/mediawiki-vagrant.rb
A lib/mediawiki-vagrant/file_perms.rb
3 files changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/98/400198/1

diff --git a/Vagrantfile b/Vagrantfile
index b26a372..76881d4 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -214,6 +214,8 @@
 
   config.vm.provision :mediawiki_reload if mwv.reload?
 
+  config.vm.provision :file_perms
+
   # Ensure that the VM has Puppet installed
   config.vm.provision :shell, path: 'support/puppet-bootstrap.sh'
 
diff --git a/lib/mediawiki-vagrant.rb b/lib/mediawiki-vagrant.rb
index 0efaf69..ae1ebf2 100644
--- a/lib/mediawiki-vagrant.rb
+++ b/lib/mediawiki-vagrant.rb
@@ -109,5 +109,10 @@
   LsbCheck::Provisioner
 end
 
+provisioner :file_perms do
+  require 'mediawiki-vagrant/file_perms'
+  FilePerms
+end
+
   end
 end
diff --git a/lib/mediawiki-vagrant/file_perms.rb 
b/lib/mediawiki-vagrant/file_perms.rb
new file mode 100644
index 000..5a1c4c4
--- /dev/null
+++ b/lib/mediawiki-vagrant/file_perms.rb
@@ -0,0 +1,14 @@
+require 'fileutils'
+
+require 'mediawiki-vagrant/plugin_environment'
+
+module MediaWikiVagrant
+  class FilePerms < Vagrant.plugin('2', :provisioner)
+include PluginEnvironment
+
+def configure(_root_config)
+  # T183150: Make cache/apt/partial world writable
+  FileUtils.chmod 'a=wrx', @mwv.path('cache/apt/partial')
+end
+  end
+end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d0c7ed9f1d055fb5dbcebfb62cf72eac722f7e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Configure ORES logging

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/393831 )

Change subject: Configure ORES logging
..


Configure ORES logging

Bug: T181850
Bug: T182614
Change-Id: I5042b25a17accbfb5ec430d4c3a7b92ea45336fb
---
M puppet/modules/ores/manifests/init.pp
A puppet/modules/ores/templates/logging.yaml.erb
M puppet/modules/ores/templates/systemd/ores-celery.erb
M puppet/modules/ores/templates/systemd/ores-wsgi.erb
4 files changed, 54 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/puppet/modules/ores/manifests/init.pp 
b/puppet/modules/ores/manifests/init.pp
index 0e2c053..7412885 100644
--- a/puppet/modules/ores/manifests/init.pp
+++ b/puppet/modules/ores/manifests/init.pp
@@ -89,6 +89,13 @@
 require => Git::Clone['ores'],
 }
 
+$logging_config = "${ores_root}/logging_config.yaml"
+file { $logging_config:
+ensure  => present,
+content => template('ores/logging.yaml.erb'),
+require => Virtualenv::Package['ores'],
+}
+
 systemd::service { 'ores-wsgi':
 ensure => present,
 service_params => {
@@ -99,6 +106,7 @@
 ],
 subscribe => [
 File[$cfg_file],
+File[$logging_config],
 ],
 },
 }
@@ -112,6 +120,7 @@
 ],
 subscribe => [
 File[$cfg_file],
+File[$logging_config],
 ],
 },
 }
diff --git a/puppet/modules/ores/templates/logging.yaml.erb 
b/puppet/modules/ores/templates/logging.yaml.erb
new file mode 100644
index 000..96c4642
--- /dev/null
+++ b/puppet/modules/ores/templates/logging.yaml.erb
@@ -0,0 +1,43 @@
+version: 1
+
+root:
+  handlers: [file]
+
+loggers:
+
+  revscoring:
+level: DEBUG
+  ores:
+level: DEBUG
+  ores.metrics_collectors.logger:
+level: DEBUG
+  celery:
+level: DEBUG
+  requests:
+level: INFO
+  revscoring.dependencies.dependent:
+level: INFO
+  stopit:
+level: ERROR
+
+handlers:
+  stdout:
+class: logging.StreamHandler
+formatter: basic_human
+stream: ext://sys.stdout
+  file:
+class: logging.FileHandler
+formatter: basic_human
+filename: /vagrant/logs/ores.log
+  syslog:
+class: logging.handlers.SysLogHandler
+formatter: basic_human
+address: /dev/log
+
+formatters:
+  basic_human:
+format: "%(asctime)s %(levelname)s %(name)s: %(message)s"
+
+  # Extra verbosity for untangling threads:
+  threaded:
+format: "s%(asctime)s %(levelname)s %(name)s [P%(process)d T%(thread)d]: 
%(message)s"
diff --git a/puppet/modules/ores/templates/systemd/ores-celery.erb 
b/puppet/modules/ores/templates/systemd/ores-celery.erb
index 7c51e06..21493e8 100644
--- a/puppet/modules/ores/templates/systemd/ores-celery.erb
+++ b/puppet/modules/ores/templates/systemd/ores-celery.erb
@@ -12,7 +12,7 @@
 Group=www-data
 SyslogIdentifier=ores-celery
 WorkingDirectory=<%= @ores_root %>
-ExecStart=<%= @venv_dir %>/bin/ores applications.celery
+ExecStart=<%= @venv_dir %>/bin/ores applications.celery --logging-config <%= 
@logging_config %>
 Restart=always
 
 [Install]
diff --git a/puppet/modules/ores/templates/systemd/ores-wsgi.erb 
b/puppet/modules/ores/templates/systemd/ores-wsgi.erb
index 4503085..afeb81b 100644
--- a/puppet/modules/ores/templates/systemd/ores-wsgi.erb
+++ b/puppet/modules/ores/templates/systemd/ores-wsgi.erb
@@ -12,7 +12,7 @@
 Group=www-data
 SyslogIdentifier=ores-wsgi
 WorkingDirectory=<%= @ores_root %>
-ExecStart=<%= @venv_dir %>/bin/ores applications.wsgi --port=<%= @port %> 
--processes=1
+ExecStart=<%= @venv_dir %>/bin/ores applications.wsgi --port=<%= @port %> 
--processes=1 --logging-config <%= @logging_config %>
 Restart=always
 
 [Install]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5042b25a17accbfb5ec430d4c3a7b92ea45336fb
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurityCheckPlugin[master]: Add Hooks::runWithoutAbort support

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400194 )

Change subject: Add Hooks::runWithoutAbort support
..


Add Hooks::runWithoutAbort support

Bug: T183194
Change-Id: Icec627f2d549ce617757479e60ccee486769ed45
---
M src/MWVisitor.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/MWVisitor.php b/src/MWVisitor.php
index 8c4b1b0..41df90e 100644
--- a/src/MWVisitor.php
+++ b/src/MWVisitor.php
@@ -94,6 +94,7 @@
$this->handleNormalHookRegistration( 
$node );
break;
case '\Hooks::run':
+   case '\Hooks::runWithoutAbort':
$this->triggerHook( $node );
break;
default:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icec627f2d549ce617757479e60ccee486769ed45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/phan/SecurityCheckPlugin
Gerrit-Branch: master
Gerrit-Owner: Phantom42 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Clean up ThresholdLookup, make the cache key use model version

2017-12-25 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400196 )

Change subject: Clean up ThresholdLookup, make the cache key use model version
..

Clean up ThresholdLookup, make the cache key use model version

Bug: T182111
Change-Id: I9be0f460596520a9f6bd9fe0b7c0914d3e339dd3
---
M includes/ThresholdLookup.php
M includes/ThresholdParser.php
M tests/phpunit/includes/ThresholdLookupTest.php
3 files changed, 171 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/96/400196/1

diff --git a/includes/ThresholdLookup.php b/includes/ThresholdLookup.php
index 626c291..dc3de31 100644
--- a/includes/ThresholdLookup.php
+++ b/includes/ThresholdLookup.php
@@ -17,7 +17,9 @@
 namespace ORES;
 
 use MediaWiki\MediaWikiServices;
+use ORES\Storage\ModelLookup;
 use Psr\Log\LoggerInterface;
+use RuntimeException;
 use WANObjectCache;
 
 class ThresholdLookup {
@@ -38,6 +40,11 @@
private $logger;
 
/**
+* @var ModelLookup
+*/
+   private $modelLookup;
+
+   /**
 * @var ThresholdParser
 */
private $thresholdParser;
@@ -46,21 +53,26 @@
 * @param Api $api
 * @param WANObjectCache $cache
 * @param LoggerInterface $logger
+* @param ModelLookup $modelLookup
 */
-   public function __construct( Api $api, WANObjectCache $cache, 
LoggerInterface $logger ) {
+   public function __construct(
+   Api $api,
+   WANObjectCache $cache,
+   LoggerInterface $logger,
+   ModelLookup $modelLookup
+   ) {
$this->api = $api;
$this->cache = $cache;
$this->logger = $logger;
+   $this->modelLookup = $modelLookup;
// TODO: Inject
$this->thresholdParser = new ThresholdParser( $logger );
}
 
public function getThresholds( $model, $fromCache = true ) {
$config = $this->thresholdParser->getFiltersConfig( $model );
-   // Skip if the model is unconfigured or set to false.
if ( $config ) {
-   $stats = $this->fetchStats( $model, $fromCache );
-   // Skip if stats are empty.
+   $stats = $this->fetchThresholds( $model, $fromCache );
if ( $stats !== false ) {
return $this->thresholdParser->parseThresholds( 
$stats, $model );
}
@@ -68,50 +80,48 @@
return [];
}
 
-   private function fetchStats( $model, $fromCache ) {
-   global $wgOresCacheVersion;
+   private function fetchThresholds( $model, $fromCache ) {
if ( $fromCache ) {
-   $key = $this->cache->makeKey( 'ORES', 
'threshold_statistics', $model, $wgOresCacheVersion );
-   $result = $this->cache->getWithSetCallback(
-   $key,
-   WANObjectCache::TTL_DAY,
-   function ( $oldValue, &$ttl, &$setOpts, $opts ) 
use ( $model ) {
-   $statsdDataFactory = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
-   // @deprecated Only catching exceptions 
to allow the
-   // failure to be cached, remove once 
transition is
-   // complete.
-   try {
-   $result = 
$this->fetchStatsFromApi( $model );
-   $statsdDataFactory->increment( 
'ores.api.stats.ok' );
-
-   return $result;
-   } catch ( \RuntimeException $ex ) {
-   // TODO: We can also check the 
service *before* the
-   // cached value expires, and 
therefore reuse the old
-   // value until the service 
recovers in case of failure.
-   $statsdDataFactory->increment( 
'ores.api.stats.failed' );
-   $this->logger->error( 'Failed 
to fetch ORES stats.' );
-
-   // Retry again soon.
-   $ttl = 
WANObjectCache::TTL_MINUTE;
-   return [];
-   }
-   },
-   [
-   // Try to only let one datacenter 
thread manage cache updates at a time
- 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Use symlink instead of copyfile in download_dump.py

2017-12-25 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400195 )

Change subject: Use symlink instead of copyfile in download_dump.py
..

Use symlink instead of copyfile in download_dump.py

Bug: T183668
Change-Id: I6491aed72e292260e0c464d3e7eb87e739402878
---
M scripts/maintenance/download_dump.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/95/400195/1

diff --git a/scripts/maintenance/download_dump.py 
b/scripts/maintenance/download_dump.py
index 9793255..20b0d7e 100644
--- a/scripts/maintenance/download_dump.py
+++ b/scripts/maintenance/download_dump.py
@@ -22,7 +22,8 @@
 import os.path
 import sys
 
-from shutil import copyfile, copyfileobj
+from shutil import copyfileobj
+from os import symlink
 
 import pywikibot
 
@@ -72,7 +73,7 @@
 self.getOption('wikiname'), self.getOption('filename'))
 if toolforge_dump_filepath:
 pywikibot.output('Copying file from ' + toolforge_dump_filepath)
-copyfile(toolforge_dump_filepath, file_storepath)
+symlink(toolforge_dump_filepath, file_storepath)
 else:
 url = 'https://dumps.wikimedia.org/' + \
 os.path.join(self.getOption('wikiname'),

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurityCheckPlugin[master]: Add Hooks::runWithoutAbort support

2017-12-25 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400194 )

Change subject: Add Hooks::runWithoutAbort support
..

Add Hooks::runWithoutAbort support

Bug: T183194
Change-Id: Icec627f2d549ce617757479e60ccee486769ed45
---
M src/MWVisitor.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/tools/phan/SecurityCheckPlugin 
refs/changes/94/400194/1

diff --git a/src/MWVisitor.php b/src/MWVisitor.php
index 8c4b1b0..41df90e 100644
--- a/src/MWVisitor.php
+++ b/src/MWVisitor.php
@@ -94,6 +94,7 @@
$this->handleNormalHookRegistration( 
$node );
break;
case '\Hooks::run':
+   case '\Hooks::runWithoutAbort':
$this->triggerHook( $node );
break;
default:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icec627f2d549ce617757479e60ccee486769ed45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/phan/SecurityCheckPlugin
Gerrit-Branch: master
Gerrit-Owner: Phantom42 

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Use newer DBUpdater function for LoadExtensionSchemaUpdates ...

2017-12-25 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400193 )

Change subject: Use newer DBUpdater function for LoadExtensionSchemaUpdates hook
..

Use newer DBUpdater function for LoadExtensionSchemaUpdates hook

Change-Id: I79f8e59341d3bb8016e25d71a5cb87317e830181
---
M SocialProfileHooks.php
1 file changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/93/400193/1

diff --git a/SocialProfileHooks.php b/SocialProfileHooks.php
index 324e938..8bf6cfd 100644
--- a/SocialProfileHooks.php
+++ b/SocialProfileHooks.php
@@ -51,20 +51,20 @@
$dbExt = '.postgres';
}
 
-   $updater->addExtensionUpdate( array( 'addTable', 'user_board', 
"$dir/UserBoard/user_board$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_fields_privacy', "$dir/UserProfile/user_fields_privacy$dbExt.sql", true ) 
);
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_profile', "$dir/UserProfile/user_profile$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'user_stats', 
"$dir/UserStats/user_stats$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_relationship', "$dir/UserRelationship/user_relationship$dbExt.sql", true 
) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_relationship_request', 
"$dir/UserRelationship/user_relationship$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_system_gift', "$dir/SystemGifts/systemgifts$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'system_gift', 
"$dir/SystemGifts/systemgifts$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'user_gift', 
"$dir/UserGifts/usergifts$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'gift', 
"$dir/UserGifts/usergifts$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_system_messages', 
"$dir/UserSystemMessages/user_system_messages$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_points_weekly', "$dir/UserStats/user_points_weekly$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_points_monthly', "$dir/UserStats/user_points_monthly$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_points_archive', "$dir/UserStats/user_points_archive$dbExt.sql", true ) );
+   $updater->addExtensionTable( 'user_board', 
"$dir/UserBoard/user_board$dbExt.sql" );
+   $updater->addExtensionTable( 'user_fields_privacy', 
"$dir/UserProfile/user_fields_privacy$dbExt.sql" );
+   $updater->addExtensionTable( 'user_profile', 
"$dir/UserProfile/user_profile$dbExt.sql" );
+   $updater->addExtensionTable( 'user_stats', 
"$dir/UserStats/user_stats$dbExt.sql" );
+   $updater->addExtensionTable( 'user_relationship', 
"$dir/UserRelationship/user_relationship$dbExt.sql" );
+   $updater->addExtensionTable( 'user_relationship_request', 
"$dir/UserRelationship/user_relationship$dbExt.sql" );
+   $updater->addExtensionTable( 'user_system_gift', 
"$dir/SystemGifts/systemgifts$dbExt.sql" );
+   $updater->addExtensionTable( 'system_gift', 
"$dir/SystemGifts/systemgifts$dbExt.sql" );
+   $updater->addExtensionTable( 'user_gift', 
"$dir/UserGifts/usergifts$dbExt.sql" );
+   $updater->addExtensionTable( 'gift', 
"$dir/UserGifts/usergifts$dbExt.sql" );
+   $updater->addExtensionTable( 'user_system_messages', 
"$dir/UserSystemMessages/user_system_messages$dbExt.sql" );
+   $updater->addExtensionTable( 'user_points_weekly', 
"$dir/UserStats/user_points_weekly$dbExt.sql" );
+   $updater->addExtensionTable( 'user_points_monthly', 
"$dir/UserStats/user_points_monthly$dbExt.sql" );
+   $updater->addExtensionTable( 'user_points_archive', 
"$dir/UserStats/user_points_archive$dbExt.sql" );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79f8e59341d3bb8016e25d71a5cb87317e830181
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: keystone: remove python-setuptools

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400115 )

Change subject: keystone: remove python-setuptools
..


keystone: remove python-setuptools

The package python-setuptools is included from mwv::packages and is thus
defined via site.pp. That causes duplicate definition errors in
role::keystone.

Follow up 88bff2f33 which added python-setuptools to mwv::packages.

Bug: T183095
Change-Id: If7f49130eff0c0e45b7a4fdca6c2f61c58462c1e
---
M puppet/modules/role/manifests/keystone.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/role/manifests/keystone.pp 
b/puppet/modules/role/manifests/keystone.pp
index 0bc0ff2..aeaa81e 100644
--- a/puppet/modules/role/manifests/keystone.pp
+++ b/puppet/modules/role/manifests/keystone.pp
@@ -61,7 +61,6 @@
 'python-pyparsing',
 'python-pysaml2',
 'python-routes',
-'python-setuptools',
 'python-sqlalchemy',
 'python-unicodecsv',
 'python-warlock',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7f49130eff0c0e45b7a4fdca6c2f61c58462c1e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Hashar 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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] mediawiki/vagrant[stretch-migration]: swift: remove unused list of packages

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400184 )

Change subject: swift: remove unused list of packages
..


swift: remove unused list of packages

For swift we needed to install a few python modules from
jessie-backports and had them pinned.  c28a117be removed that logic but
left behind the list of packages.

Drop the list since it is no more used.
Note: setuptools is now part of mwv::packages

Change-Id: I289ade46546ca885a3e386cdba9dc10f3ee9c5b0
---
M puppet/modules/swift/manifests/init.pp
1 file changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/puppet/modules/swift/manifests/init.pp 
b/puppet/modules/swift/manifests/init.pp
index 00d792b..35e7115 100644
--- a/puppet/modules/swift/manifests/init.pp
+++ b/puppet/modules/swift/manifests/init.pp
@@ -33,19 +33,6 @@
 include ::apache::mod::proxy
 include ::apache::mod::proxy_http
 
-$packages = [
-'python-cryptography',
-'python-openssl',
-'python-dnspython',
-'python-eventlet',
-'python-pkg-resources',
-'python-pyasn1',
-'python-setuptools',
-'python-swift*',
-'python-webob',
-'swift*'
-]
-
 package { ['swift', 'swift-account', 'swift-container', 'swift-object', 
'swift-proxy', 'python-webob', 'python-swiftclient']:
 ensure  => 'present',
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I289ade46546ca885a3e386cdba9dc10f3ee9c5b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Hashar 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: tests: Use checkPHPExtension() instead of re-implementing it

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400140 )

Change subject: tests: Use checkPHPExtension() instead of re-implementing it
..


tests: Use checkPHPExtension() instead of re-implementing it

Change-Id: I7f5e8684d556befc0aefa302187c573e7a3cff62
---
M tests/phpunit/includes/collation/CollationFaTest.php
M tests/phpunit/includes/http/HttpTest.php
2 files changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/tests/phpunit/includes/collation/CollationFaTest.php 
b/tests/phpunit/includes/collation/CollationFaTest.php
index 178a51c..f745541 100644
--- a/tests/phpunit/includes/collation/CollationFaTest.php
+++ b/tests/phpunit/includes/collation/CollationFaTest.php
@@ -13,9 +13,7 @@
 
public function setUp() {
parent::setUp();
-   if ( !extension_loaded( 'intl' ) ) {
-   $this->markTestSkipped( "PHP extension 'intl' is not 
loaded, skipping." );
-   }
+   $this->checkPHPExtension( 'intl' );
}
 
/**
diff --git a/tests/phpunit/includes/http/HttpTest.php 
b/tests/phpunit/includes/http/HttpTest.php
index 3790e3a..2d73bac 100644
--- a/tests/phpunit/includes/http/HttpTest.php
+++ b/tests/phpunit/includes/http/HttpTest.php
@@ -497,9 +497,7 @@
 * @dataProvider provideCurlConstants
 */
public function testCurlConstants( $value ) {
-   if ( !extension_loaded( 'curl' ) ) {
-   $this->markTestSkipped( "PHP extension 'curl' is not 
loaded, skipping." );
-   }
+   $this->checkPHPExtension( 'curl' );
 
$this->assertTrue( defined( $value ), $value . ' not defined' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f5e8684d556befc0aefa302187c573e7a3cff62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add @covers tags for Collation tests

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400139 )

Change subject: Add @covers tags for Collation tests
..


Add @covers tags for Collation tests

Change-Id: I8b0623a6b716acdc9d369349fd4e306dbdc91d18
---
M tests/phpunit/includes/collation/CollationFaTest.php
M tests/phpunit/includes/collation/CustomUppercaseCollationTest.php
2 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/collation/CollationFaTest.php 
b/tests/phpunit/includes/collation/CollationFaTest.php
index 53a4f7b..178a51c 100644
--- a/tests/phpunit/includes/collation/CollationFaTest.php
+++ b/tests/phpunit/includes/collation/CollationFaTest.php
@@ -1,4 +1,8 @@
 https://gerrit.wikimedia.org/r/400139
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b0623a6b716acdc9d369349fd4e306dbdc91d18
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add a unit test to check that the main page must be unique p...

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400192 )

Change subject: Add a unit test to check that the main page must be unique per 
newsletter
..


Add a unit test to check that the main page must be unique per newsletter

Bug: T183632
Bug: T183637
Change-Id: I82ae49441212793ffb58b74c94be85983670
---
M tests/specials/SpecialNewsletterCreateTest.php
1 file changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/tests/specials/SpecialNewsletterCreateTest.php 
b/tests/specials/SpecialNewsletterCreateTest.php
index 057796c..d69a5ce 100644
--- a/tests/specials/SpecialNewsletterCreateTest.php
+++ b/tests/specials/SpecialNewsletterCreateTest.php
@@ -41,4 +41,31 @@
$store->getNewsletterFromName( 'Test Newsletter' )
);
}
+   public function testCreateNewsletterMainPageAlreadyUsed() {
+   // Create 1st newsletter with conflicting main page
+   $mainpage = Title::newFromText( 'UTPage' );
+   $firstNewsletterTitle = Title::makeTitleSafe( NS_NEWSLETTER, 
'First Newsletter' );
+   $store = NewsletterStore::getDefaultInstance();
+   $firstNewsletter = new Newsletter( 0,
+   $firstNewsletterTitle->getText(),
+   'This newsletter uses the main page, preventing a 
second newsletter from using it',
+   $mainpage->getArticleID()
+   );
+   $newsletterCreated = $store->addNewsletter( $firstNewsletter );
+   $this->assertTrue( $newsletterCreated );
+
+   // Creation of 2nd newsletter with same main page has to fail
+   $input = [
+   'name' => 'Second Newsletter',
+   'description' => 'The main page of this newsletter is 
already in use',
+   'mainpage' => $mainpage->getBaseText()
+   ];
+   $res = $this->newSpecialPage()->onSubmit( $input );
+   $this->assertEquals( $res->getMessage()->getKey(), 
'newsletter-mainpage-in-use' );
+
+   // The newsletter was not created
+   $this->assertNull(
+   $store->getNewsletterFromName( 'Second Newsletter' )
+   );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82ae49441212793ffb58b74c94be85983670
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Pppery 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Phantom42 
Gerrit-Reviewer: Pppery 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add a unit test to check that the main page must be unique p...

2017-12-25 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400192 )

Change subject: Add a unit test to check that the main page must be unique per 
newsletter
..

Add a unit test to check that the main page must be unique per newsletter

Bug: T183632
Bug: T182637
Change-Id: I82ae49441212793ffb58b74c94be85983670
---
M tests/specials/SpecialNewsletterCreateTest.php
1 file changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/92/400192/1

diff --git a/tests/specials/SpecialNewsletterCreateTest.php 
b/tests/specials/SpecialNewsletterCreateTest.php
index 057796c..69522cf 100644
--- a/tests/specials/SpecialNewsletterCreateTest.php
+++ b/tests/specials/SpecialNewsletterCreateTest.php
@@ -41,4 +41,30 @@
$store->getNewsletterFromName( 'Test Newsletter' )
);
}
+   public function testCreateNewsletterMainPageAlreadyUsed() {
+   // Manually insert 1st newsletter with main page into database
+   $mainpage = Title::newFromText( 'UTPage' );
+   $rowData = [
+   'nl_name' => 'First Newsletter',
+   'nl_desc' => 'This is a newsletter',
+   'nl_main_page_id' => $mainpage->getArticleId()
+   ];
+   $dbw = wfGetDb( DB_MASTER );
+   $dbw->insert( 'nl_newsletters', $rowData, __METHOD__ );
+
+   // Creation of 2nd newsletter with same main page has to fail
+   $input = [
+   'name' => 'Second Newsletter',
+   'description' => 'This is a test newsletter that should 
return an error for a duplicate main page.',
+   'mainpage' => $mainpage->getBaseText()
+   ];
+   $res = $this->newSpecialPage()->onSubmit( $input );
+   $this->assertEquals( $res->getMessage()->getKey(), 
'newsletter-mainpage-in-use' );
+
+   // The newsletter was not created
+   $store = NewsletterStore::getDefaultInstance();
+   $this->assertNull(
+   $store->getNewsletterFromName( 'Second Newsletter' )
+   );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82ae49441212793ffb58b74c94be85983670
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Pppery 

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


[MediaWiki-commits] [Gerrit] mediawiki...SyntaxHighlight_GeSHi[master]: Add phan configuration for static analysis and fix phan warn...

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400079 )

Change subject: Add phan configuration for static analysis and fix phan warnings
..


Add phan configuration for static analysis and fix phan warnings

Add phan configuration for static analysis, and fix phan warnings.
`PhanDeprecatedClass` and `PhanDeprecatedFunction` rules are supressed.

Bug: T179554
Change-Id: I7cbb410ed88ba58198d0557cafd9e6df968ed885
---
M .gitignore
M GeSHi.php
M SyntaxHighlight.php
M maintenance/updateCSS.php
M maintenance/updateLexerList.php
A tests/phan/config.php
6 files changed, 313 insertions(+), 4 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 3fac7c4..4f542f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
 node_modules
 /vendor
 composer.lock
+/tests/phan/issues
diff --git a/GeSHi.php b/GeSHi.php
index b66ecad..516de12 100644
--- a/GeSHi.php
+++ b/GeSHi.php
@@ -21,6 +21,9 @@
  * that have not been updated for version 2.0 of SyntaxHighlight_GeSHi.
  */
 class GeSHi {
+
+   private $html;
+
public function __construct( $html ) {
$this->html = $html;
}
diff --git a/SyntaxHighlight.php b/SyntaxHighlight.php
index df1a8b6..3961c33 100644
--- a/SyntaxHighlight.php
+++ b/SyntaxHighlight.php
@@ -84,7 +84,7 @@
 */
public static function onParserFirstCallInit( Parser &$parser ) {
foreach ( [ 'source', 'syntaxhighlight' ] as $tag ) {
-   $parser->setHook( $tag, [ 'SyntaxHighlight_GeSHi', 
'parserHook' ] );
+   $parser->setHook( $tag, [ 'SyntaxHighlight', 
'parserHook' ] );
}
}
 
@@ -97,7 +97,7 @@
 * @return string
 * @throws MWException
 */
-   public static function parserHook( $text, $args = [], $parser ) {
+   public static function parserHook( $text, $args, $parser ) {
global $wgUseTidy;
 
// Replace strip markers (For e.g. 
{{#tag:syntaxhighlight|...}})
diff --git a/maintenance/updateCSS.php b/maintenance/updateCSS.php
index ce953cb..0bc86de 100644
--- a/maintenance/updateCSS.php
+++ b/maintenance/updateCSS.php
@@ -40,7 +40,7 @@
$css = "/* Stylesheet generated by updateCSS.php */\n";
 
$builder = new ProcessBuilder();
-   $builder->setPrefix( SyntaxHighlight_GeSHi::getPygmentizePath() 
);
+   $builder->setPrefix( SyntaxHighlight::getPygmentizePath() );
 
$process = $builder
->add( '-f' )->add( 'html' )
diff --git a/maintenance/updateLexerList.php b/maintenance/updateLexerList.php
index 114d8cb..41a9347 100644
--- a/maintenance/updateLexerList.php
+++ b/maintenance/updateLexerList.php
@@ -44,7 +44,7 @@
$lexers = [];
 
$builder = new ProcessBuilder();
-   $builder->setPrefix( SyntaxHighlight_GeSHi::getPygmentizePath() 
);
+   $builder->setPrefix( SyntaxHighlight::getPygmentizePath() );
 
$process = $builder->add( '-L' )->add( 'lexer' )->getProcess();
$process->run();
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..251de79
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,305 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   '.'
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   './vendor',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version

[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Add phan configuration for static analysis

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400185 )

Change subject: Add phan configuration for static analysis
..


Add phan configuration for static analysis

Bug: T179554
Change-Id: I9f099e07e5873c1125b4b75839f0089f59b4fa8b
---
M .gitignore
M SpecialCiteThisPage.php
A tests/phan/config.php
3 files changed, 309 insertions(+), 3 deletions(-)

Approvals:
  D3r1ck01: Looks good to me, but someone else must approve
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
index 4489bce..e9de19d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 /node_modules/
 /vendor/
+/tests/phan/issues
 /composer.lock
 
 # Editors
diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php
index 9a17686..6633380 100644
--- a/SpecialCiteThisPage.php
+++ b/SpecialCiteThisPage.php
@@ -55,6 +55,7 @@
if ( strlen( $data['page'] ) ) {
$this->title = Title::newFromText( $data['page'] );
}
+   return true;
}
 
/**
@@ -72,9 +73,10 @@
return [];
}
// Autocomplete subpage the same as a normal search
-   $prefixSearcher = new StringPrefixSearch;
-   $result = $prefixSearcher->search( $search, $limit, [], $offset 
);
-   return $result;
+   $result = SearchEngine::completionSearch( $search );
+   return array_map( function ( $sub ) {
+   return $sub->getSuggestedTitle();
+   }, $result->getSuggestions() );
}
 
protected function getGroupName() {
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..2264c5d
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,303 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   '.',
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had more issues
+* to fix in your code base.
+*
+* In quick-mode the scanner doesn't rescan a function
+* or a method's code block every time a call is seen.
+* This means that the problem here won't be detected:
+*
+* ```php
+*  false,
+
+   /**
+* By default, Phan will not analyze all node types
+* in order to save time. If this config is set to true,
+* Phan will dig deeper into the AST tree and do an
+* analysis on all nodes, possibly finding more issues.
+*
+* See \Phan\Analysis::shouldVisit for the set of skipped
+* nodes.
+*/
+   'should_visit_all_nodes' => true,
+
+   /**
+* If enabled, check all methods that override a
+* parent method to make sure its signature is
+* compatible with the parent's. This check
+* can add quit

[MediaWiki-commits] [Gerrit] mediawiki...TitleBlacklist[master]: Add phan configuration for static analysis

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400081 )

Change subject: Add phan configuration for static analysis
..


Add phan configuration for static analysis

Bug: T179554
Depends-On: I25beea963444b715bed7b2890475c0c812949520 
Change-Id: I83f9374b2f3236097860f4aecc694326b891905b
---
M .gitignore
M TitleBlacklist.list.php
M TitleBlacklistPreAuthenticationProvider.php
A tests/phan/config.php
4 files changed, 315 insertions(+), 1 deletion(-)

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



diff --git a/.gitignore b/.gitignore
index 2217456..4b4432a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
 ## Sublime
 sublime-*
 sftp-config.json
+/tests/phan/issues
diff --git a/TitleBlacklist.list.php b/TitleBlacklist.list.php
index ee902c5..2e1b03f 100644
--- a/TitleBlacklist.list.php
+++ b/TitleBlacklist.list.php
@@ -109,7 +109,7 @@
/**
 * Get the text of a blacklist from a specified source
 *
-* @param string $source A blacklist source from 
$wgTitleBlacklistSources
+* @param array $source A blacklist source from $wgTitleBlacklistSources
 * @return string The content of the blacklist source as a string
 */
private static function getBlacklistText( $source ) {
@@ -311,6 +311,7 @@
/**
 * Validate a new blacklist
 *
+* @suppress PhanParamSuspiciousOrder The preg_match() params are in 
the correct order
 * @param array $blacklist
 * @return Array of bad entries; empty array means blacklist is valid
 */
diff --git a/TitleBlacklistPreAuthenticationProvider.php 
b/TitleBlacklistPreAuthenticationProvider.php
index b2371ca..aaea018 100644
--- a/TitleBlacklistPreAuthenticationProvider.php
+++ b/TitleBlacklistPreAuthenticationProvider.php
@@ -33,6 +33,9 @@
/** @var TitleBlacklistAuthenticationRequest $req */
$req = AuthenticationRequest::getRequestByClass( $reqs,
TitleBlacklistAuthenticationRequest::class );
+   // For phan check, to ensure that $req is instance of 
\TitleBlacklistAuthenticationRequest
+   assert( $req instanceof TitleBlacklistAuthenticationRequest );
+
$override = $req && $req->ignoreTitleBlacklist;
return TitleBlacklistHooks::testUserName( $user->getName(), 
$creator, $override, true );
}
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..b2958fa
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,309 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   './../Scribunto',
+   './../AntiSpoof',
+   './vendor',
+   '.',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   './../Scribunto',
+   './../AntiSpoof',
+   'vendor/',
+   'tests/',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had 

[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Add phan configuration for static analysis

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400083 )

Change subject: Add phan configuration for static analysis
..


Add phan configuration for static analysis

Bug: T179554
Change-Id: Id8d4def828976c1ecbaf83e23d9eb445bdb28cd8
---
M .gitignore
M WikiEditorHooks.php
A tests/phan/config.php
3 files changed, 309 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 9f2da68..29645e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
 ## Sublime
 sublime-*
 sftp-config.json
+tests/phan/issues
diff --git a/WikiEditorHooks.php b/WikiEditorHooks.php
index 8bf742b..6e53660 100644
--- a/WikiEditorHooks.php
+++ b/WikiEditorHooks.php
@@ -364,6 +364,7 @@
$magicWords[$name] = MagicWord::get( $name 
)->getSynonym( 0 );
}
$vars['wgWikiEditorMagicWords'] = $magicWords;
+   return true;
}
 
/**
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..f1a3204
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,307 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   './../EventLogging',
+   '.',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   './../EventLogging',
+   'vendor/',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had more issues
+* to fix in your code base.
+*
+* In quick-mode the scanner doesn't rescan a function
+* or a method's code block every time a call is seen.
+* This means that the problem here won't be detected:
+*
+* ```php
+*  false,
+
+   /**
+* By default, Phan will not analyze all node types
+* in order to save time. If this config is set to true,
+* Phan will dig deeper into the AST tree and do an
+* analysis on all nodes, possibly finding more issues.
+*
+* See \Phan\Analysis::shouldVisit for the set of skipped
+* nodes.
+*/
+   'should_visit_all_nodes' => true,
+
+   /**
+* If enabled, check all methods that override a
+* parent method to make sure its signature is
+* compatible with the parent's. This check
+* can add quite a bit of time to the analysis.
+*/
+   'analyze_signature_compatibility' => true,
+
+   // Emit all issues. They are then suppressed via
+   // suppress_issue_types, rather than a minimum
+   // severity.
+   "minimum_severity" => 0,
+
+   /**
+* If true, missing properties will be created when
+* they are first seen. If false, we'll report an
+* error message if there is an attempt to write
+* to a class property that wasn't explicitly
+* defined.
+*/
+   'allow_missing_properties' => false,
+
+   /**
+* Allow null to be cast as a

[MediaWiki-commits] [Gerrit] integration/config[master]: Run phan for mediawiki/extensions/Cite

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400186 )

Change subject: Run phan for mediawiki/extensions/Cite
..


Run phan for mediawiki/extensions/Cite

Bug: T179554
Change-Id: I4cc1fab386c09f7068ab417ce50b52c3371e52cf
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  D3r1ck01: Looks good to me, but someone else must approve
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 43dd53d..0d8dcfe 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2986,6 +2986,7 @@
 template:
   - name: extension-gate
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/CiteThisPage
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cc1fab386c09f7068ab417ce50b52c3371e52cf
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Phantom42 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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] integration/config[master]: Run phan for mediawiki/extensions/SyntaxHighlight_GeSHi

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400080 )

Change subject: Run phan for mediawiki/extensions/SyntaxHighlight_GeSHi
..


Run phan for mediawiki/extensions/SyntaxHighlight_GeSHi

Bug: T179554
Change-Id: I53905b0b23c753464e16289f02bc08c2b994527a
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 6e93550..c1a5f0b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -6998,6 +6998,7 @@
 template:
   - name: extension-unittests-generic
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/TemplateData
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53905b0b23c753464e16289f02bc08c2b994527a
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Rafidaslam 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Run phan for mediawiki/extensions/WikiEditor

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400084 )

Change subject: Run phan for mediawiki/extensions/WikiEditor
..


Run phan for mediawiki/extensions/WikiEditor

Bug: T179554
Change-Id: Ifd2c683a1d29197fad36e6c9c640775683f18f01
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 0d8dcfe..7a19c3e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7174,6 +7174,7 @@
   - name: extension-qunit-generic
   - name: extension-unittests-generic
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/Wikibase
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd2c683a1d29197fad36e6c9c640775683f18f01
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Rafidaslam 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Run phan for mediawiki/extensions/TitleBlackList

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400082 )

Change subject: Run phan for mediawiki/extensions/TitleBlackList
..


Run phan for mediawiki/extensions/TitleBlackList

Bug: T179554
Change-Id: Ifd8491051935c4d6eae2527a07fcbcce8f842a90
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 7a19c3e..6e93550 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7027,6 +7027,7 @@
 template:
   - name: extension-unittests-generic
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/TitleKey
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd8491051935c4d6eae2527a07fcbcce8f842a90
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Rafidaslam 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Run phan for mediawiki/extensions/CiteThisPage

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400187 )

Change subject: Run phan for mediawiki/extensions/CiteThisPage
..


Run phan for mediawiki/extensions/CiteThisPage

Bug: T179554
Change-Id: Id205ade2bc44e244c3905b984c94ae47f0542827
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  D3r1ck01: Looks good to me, but someone else must approve
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d25eb60..43dd53d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2991,6 +2991,7 @@
 template:
   - name: extension-unittests-generic
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/Citoid
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id205ade2bc44e244c3905b984c94ae47f0542827
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Phantom42 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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] integration/config[master]: WikiEditor depends upon EventLogging for phan checks

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400173 )

Change subject: WikiEditor depends upon EventLogging for phan checks
..


WikiEditor depends upon EventLogging for phan checks

EventLogging is used in the WikiEditor extension,
precisely in `WikiEditorHooks.php`. It needed for Phan
check.

Change-Id: I667d9d712cdae27db3da68961583cc01584bd319
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 40ba720..3837239 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -280,6 +280,7 @@
 'WikibaseQualityExternalValidation': ['Wikibase', 'WikibaseQuality'],
 'Wikidata.org': ['Wikibase'],
 'WikidataPageBanner': ['Wikibase'],
+'WikiEditor': ['EventLogging'],
 'WikimediaBadges': ['Wikibase'],
 'WikimediaEvents': ['EventLogging'],
 'wikihiero': ['VisualEditor'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I667d9d712cdae27db3da68961583cc01584bd319
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: TitleBlacklist depends upon Scribunto for phan checks

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400191 )

Change subject: TitleBlacklist depends upon Scribunto for phan checks
..


TitleBlacklist depends upon Scribunto for phan checks

Change-Id: I56c16111b76f97702c9c990211f254700578e08a
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 89cd4b0..40ba720 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -245,7 +245,7 @@
 'SportsTeams': ['SocialProfile', 'UserStatus'],
 'Spreadsheet': ['PHPExcel'],
 'SyntaxHighlight_GeSHi': ['VisualEditor'],
-'TitleBlacklist': ['AntiSpoof'],
+'TitleBlacklist': ['AntiSpoof', 'Scribunto'],
 'TheWikipediaLibrary': ['Echo'],
 'Translate': ['UniversalLanguageSelector', 'EventLogging', 'cldr'],
 'TranslateSvg': ['Translate'],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Fix the return type of Scribunto_LuaLibraryBase::register()

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400169 )

Change subject: Fix the return type of Scribunto_LuaLibraryBase::register()
..


Fix the return type of Scribunto_LuaLibraryBase::register()

Before this, tools like Phan and others read
`Scribunto_LuaLibraryBase::register()` returns `\Lua` type
from the document comment,
but it actually returns `array` type since the implementation
of this function should returns the value of
`Scribunto_LuaEngine::registerInterface()` which returns
`array` type.

Change-Id: I25beea963444b715bed7b2890475c0c812949520
---
M engines/LuaCommon/LibraryBase.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/engines/LuaCommon/LibraryBase.php 
b/engines/LuaCommon/LibraryBase.php
index b929281..fdd3d66 100644
--- a/engines/LuaCommon/LibraryBase.php
+++ b/engines/LuaCommon/LibraryBase.php
@@ -46,7 +46,7 @@
 * The value returned by that call should be returned from this 
function,
 * and must be for 'deferLoad' libraries to work right.
 *
-* @return Lua package
+* @return array Lua package
 */
abstract function register();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25beea963444b715bed7b2890475c0c812949520
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: TitleBlacklist depends upon Scribunto for phan checks

2017-12-25 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400191 )

Change subject: TitleBlacklist depends upon Scribunto for phan checks
..

TitleBlacklist depends upon Scribunto for phan checks

Change-Id: I56c16111b76f97702c9c990211f254700578e08a
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/91/400191/1

diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 89cd4b0..40ba720 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -245,7 +245,7 @@
 'SportsTeams': ['SocialProfile', 'UserStatus'],
 'Spreadsheet': ['PHPExcel'],
 'SyntaxHighlight_GeSHi': ['VisualEditor'],
-'TitleBlacklist': ['AntiSpoof'],
+'TitleBlacklist': ['AntiSpoof', 'Scribunto'],
 'TheWikipediaLibrary': ['Echo'],
 'Translate': ['UniversalLanguageSelector', 'EventLogging', 'cldr'],
 'TranslateSvg': ['Translate'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56c16111b76f97702c9c990211f254700578e08a
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] pywikibot/core[master]: [doc] Show new features in HIYSTORY.rst

2017-12-25 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400190 )

Change subject: [doc] Show new features in HIYSTORY.rst
..

[doc] Show new features in HIYSTORY.rst

Change-Id: Idb525810ce7b17bd4e7615dc8e17d8f5dae8e121
---
M HISTORY.rst
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/90/400190/1

diff --git a/HISTORY.rst b/HISTORY.rst
index ab4bc4d..71052a5 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,8 @@
 Current release
 ---
 
+* Maintenance script to download Wikimedia database dump
+* Option to auto-create accounts when logging in
 * Ship wikimania family file
 * Drop battlestarwiki family file
 * Bugfixes and improvements

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [doc] Update package info

2017-12-25 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400189 )

Change subject: [doc] Update package info
..

[doc] Update package info

- add code of conduct
- place image buttons on top
- add code coverage link

Change-Id: I88cc85111ddbc1e2e0178bf940a86798abfbd080
---
M README.rst
1 file changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/89/400189/1

diff --git a/README.rst b/README.rst
index ae83ef9..5b223be 100644
--- a/README.rst
+++ b/README.rst
@@ -1,3 +1,12 @@
+.. image:: 
https://secure.travis-ci.org/wikimedia/pywikibot-core.png?branch=master
+   :alt: Build Status
+   :target: https://travis-ci.org/wikimedia/pywikibot
+.. image:: 
https://codecov.io/gh/wikimedia/pywikibot/branch/master/graphs/badge.svg?branch=master
+   :alt: Code coverage
+   :target: http://codecov.io/github/wikimedia/pywikibot?branch=master
+.. image:: https://img.shields.io/pypi/v/pywikibot.svg
+   :alt: Pywikibot release
+   :target: https://pypi.python.org/pypi/pywikibot
 
 Pywikibot
 =
@@ -66,9 +75,4 @@
 `learn `_ 
how to get
 started.
 
-.. image:: 
https://secure.travis-ci.org/wikimedia/pywikibot-core.png?branch=master
-   :alt: Build Status
-   :target: https://travis-ci.org/wikimedia/pywikibot
-.. image:: https://img.shields.io/pypi/v/pywikibot.svg
-   :alt: Pywikibot release
-   :target: https://pypi.python.org/pypi/pywikibot
\ No newline at end of file
+.. include:: CODE_OF_CONDUCT.rst

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: [WIP] Split ThresholdLookup into two class

2017-12-25 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400188 )

Change subject: [WIP] Split ThresholdLookup into two class
..

[WIP] Split ThresholdLookup into two class

Todo: Write tests

Bug: T181892
Change-Id: I23e18d7b56a5184474ee0ec3dea703bd15a54db2
---
M includes/ThresholdLookup.php
A includes/ThresholdParser.php
2 files changed, 151 insertions(+), 119 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/88/400188/1

diff --git a/includes/ThresholdLookup.php b/includes/ThresholdLookup.php
index 87a0603..626c291 100644
--- a/includes/ThresholdLookup.php
+++ b/includes/ThresholdLookup.php
@@ -38,6 +38,11 @@
private $logger;
 
/**
+* @var ThresholdParser
+*/
+   private $thresholdParser;
+
+   /**
 * @param Api $api
 * @param WANObjectCache $cache
 * @param LoggerInterface $logger
@@ -46,42 +51,21 @@
$this->api = $api;
$this->cache = $cache;
$this->logger = $logger;
+   // TODO: Inject
+   $this->thresholdParser = new ThresholdParser( $logger );
}
 
public function getThresholds( $model, $fromCache = true ) {
-   $config = $this->getFiltersConfig( $model );
+   $config = $this->thresholdParser->getFiltersConfig( $model );
// Skip if the model is unconfigured or set to false.
if ( $config ) {
$stats = $this->fetchStats( $model, $fromCache );
// Skip if stats are empty.
if ( $stats !== false ) {
-   return $this->parseThresholds( $stats, $model );
+   return $this->thresholdParser->parseThresholds( 
$stats, $model );
}
}
return [];
-   }
-
-   private function getFiltersConfig( $model ) {
-   global $wgOresFiltersThresholds;
-   if ( !isset( $wgOresFiltersThresholds[$model] ) ) {
-   return false;
-   }
-   $config = $wgOresFiltersThresholds[$model];
-
-   // Convert old config to new grammar.
-   // @deprecated Remove once all config is migrated.
-   foreach ( $config as $levelName => &$levelConfig ) {
-   if ( $levelConfig === false ) {
-   continue;
-   }
-   foreach ( $levelConfig as $bound => &$formula ) {
-   if ( false !== strpos( $formula, '(' ) ) {
-   // Old-style formula, convert it to 
new-style.
-   $formula = $this->mungeV1Forumula( 
$formula );
-   }
-   }
-   }
-   return $config;
}
 
private function fetchStats( $model, $fromCache ) {
@@ -131,7 +115,7 @@
$trueFormulas = [];
$falseFormulas = [];
$calculatedThresholds = [];
-   foreach ( $this->getFiltersConfig( $model ) as $levelName => 
$config ) {
+   foreach ( $this->thresholdParser->getFiltersConfig( $model ) as 
$levelName => $config ) {
if ( $config === false ) {
continue;
}
@@ -193,32 +177,6 @@
return $resultMap;
}
 
-   /**
-* Converts an old-style configuration to new-style.
-* @deprecated Can be removed once all threshold config is written in 
the new grammar.
-*/
-   protected function mungeV1Forumula( $v1Formula ) {
-   if ( false !== strpos( $v1Formula, '@' ) ) {
-   // This is new-style already, pass through.
-   return $v1Formula;
-   } elseif ( preg_match(
-   '/recall_at_precision\(min_precision=(0\.\d+)\)/',
-   $v1Formula, $matches )
-   ) {
-   $min_precision = floatval( $matches[1] );
-   return "maximum recall @ precision >= {$min_precision}";
-   } elseif ( preg_match(
-   '/filter_rate_at_recall\(min_recall=(0\.\d+)\)/',
-   $v1Formula, $matches )
-   ) {
-   $min_recall = floatval( $matches[1] );
-   return "maximum filter_rate @ recall >= {$min_recall}";
-   } else {
-   // We ran out of guesses.
-   throw new \RuntimeException( "Failed to parse threshold 
formula [{$v1Formula}]" );
-   }
-   }
-
protected function extractKeyPath( $data, $keyPath ) {
$current 

[MediaWiki-commits] [Gerrit] integration/config[master]: Run phan for mediawiki/extensions/CiteThisPage

2017-12-25 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400187 )

Change subject: Run phan for mediawiki/extensions/CiteThisPage
..

Run phan for mediawiki/extensions/CiteThisPage

Bug: T179554
Change-Id: Id205ade2bc44e244c3905b984c94ae47f0542827
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/87/400187/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d25eb60..43dd53d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2991,6 +2991,7 @@
 template:
   - name: extension-unittests-generic
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/Citoid
 template:

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Run phan for mediawiki/extensions/Cite

2017-12-25 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400186 )

Change subject: Run phan for mediawiki/extensions/Cite
..

Run phan for mediawiki/extensions/Cite

Bug: T179554
Change-Id: I4cc1fab386c09f7068ab417ce50b52c3371e52cf
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/86/400186/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d25eb60..15b797e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2986,6 +2986,7 @@
 template:
   - name: extension-gate
   - name: mwgate-npm
+  - name: extension-phan-generic
 
   - name: mediawiki/extensions/CiteThisPage
 template:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Add phan configuration for static analysis

2017-12-25 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400185 )

Change subject: Add phan configuration for static analysis
..

Add phan configuration for static analysis

Bug: T179554
Change-Id: I9f099e07e5873c1125b4b75839f0089f59b4fa8b
---
M .gitignore
M SpecialCiteThisPage.php
A tests/phan/config.php
3 files changed, 310 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CiteThisPage 
refs/changes/85/400185/1

diff --git a/.gitignore b/.gitignore
index 4489bce..e9de19d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 /node_modules/
 /vendor/
+/tests/phan/issues
 /composer.lock
 
 # Editors
diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php
index 9a17686..3e770e8 100644
--- a/SpecialCiteThisPage.php
+++ b/SpecialCiteThisPage.php
@@ -55,6 +55,7 @@
if ( strlen( $data['page'] ) ) {
$this->title = Title::newFromText( $data['page'] );
}
+   return true;
}
 
/**
@@ -71,10 +72,12 @@
// No prefix suggestion in special and media namespace
return [];
}
+
// Autocomplete subpage the same as a normal search
-   $prefixSearcher = new StringPrefixSearch;
-   $result = $prefixSearcher->search( $search, $limit, [], $offset 
);
-   return $result;
+   $result = SearchEngine::completionSearch( $search );
+   return array_map( function ( $sub ) {
+   return $sub->getSuggestedTitle();
+   }, $result->getSuggestions() );
}
 
protected function getGroupName() {
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..2264c5d
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,303 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   '.',
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   './../../includes',
+   './../../languages',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had more issues
+* to fix in your code base.
+*
+* In quick-mode the scanner doesn't rescan a function
+* or a method's code block every time a call is seen.
+* This means that the problem here won't be detected:
+*
+* ```php
+*  false,
+
+   /**
+* By default, Phan will not analyze all node types
+* in order to save time. If this config is set to true,
+* Phan will dig deeper into the AST tree and do an
+* analysis on all nodes, possibly finding more issues.
+*
+* See \Phan\Analysis::shouldVisit for the set of skipped
+* nodes.
+*/
+   'should_visit_all_nodes' => true,
+
+   /**
+* If enabled, check all methods that override a
+* parent method to make sure its signature is
+* compatible with the parent's. This check
+* can add quite a bit of time to the analysi

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: swift: remove unused list of packages

2017-12-25 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400184 )

Change subject: swift: remove unused list of packages
..

swift: remove unused list of packages

For swift we needed to install a few python modules from
jessie-backports and had them pinned.  c28a117be removed that logic but
left behind the list of packages.

Drop the list since it is no more used.
Note: setuptools is now part of mwv::packages

Change-Id: I289ade46546ca885a3e386cdba9dc10f3ee9c5b0
---
M puppet/modules/swift/manifests/init.pp
1 file changed, 0 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/84/400184/1

diff --git a/puppet/modules/swift/manifests/init.pp 
b/puppet/modules/swift/manifests/init.pp
index 00d792b..35e7115 100644
--- a/puppet/modules/swift/manifests/init.pp
+++ b/puppet/modules/swift/manifests/init.pp
@@ -33,19 +33,6 @@
 include ::apache::mod::proxy
 include ::apache::mod::proxy_http
 
-$packages = [
-'python-cryptography',
-'python-openssl',
-'python-dnspython',
-'python-eventlet',
-'python-pkg-resources',
-'python-pyasn1',
-'python-setuptools',
-'python-swift*',
-'python-webob',
-'swift*'
-]
-
 package { ['swift', 'swift-account', 'swift-container', 'swift-object', 
'swift-proxy', 'python-webob', 'python-swiftclient']:
 ensure  => 'present',
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I289ade46546ca885a3e386cdba9dc10f3ee9c5b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Update model version when it's different in ScoreParser

2017-12-25 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400183 )

Change subject: Update model version when it's different in ScoreParser
..

Update model version when it's different in ScoreParser

Bug: T183468
Change-Id: I6a61da7845b2a1685daac5461bc83b1cba38ceb3
---
M includes/Parser/ScoreParser.php
M tests/phpunit/includes/Parser/ScoreParserTest.php
2 files changed, 97 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/83/400183/1

diff --git a/includes/Parser/ScoreParser.php b/includes/Parser/ScoreParser.php
index 58c6079..1e062fa 100644
--- a/includes/Parser/ScoreParser.php
+++ b/includes/Parser/ScoreParser.php
@@ -72,6 +72,10 @@
private function processRevisionPerModel( $revision, $model, 
$modelOutputs ) {
$processedData = [];
$prediction = $modelOutputs['score']['prediction'];
+   $responseModelVersion = $this->checkModelVersion( $model, 
$modelOutputs );
+   if ( $responseModelVersion !== null ) {
+   $this->updateModelVersion( $model, 
$responseModelVersion );
+   }
// Kludge out booleans so we can match prediction against class 
name.
if ( $prediction === false ) {
$prediction = 'false';
@@ -106,4 +110,66 @@
return $processedData;
}
 
+   /**
+* @param string $model
+* @param array $modelOutputs
+* @return null|string
+*/
+   public function checkModelVersion( $model, $modelOutputs ) {
+   if ( !array_key_exists( 'models', $modelOutputs ) ) {
+   return null;
+   }
+
+   if ( !array_key_exists( $model, $modelOutputs['models'] ) ) {
+   return null;
+   }
+
+   if ( !array_key_exists( 'version', 
$modelOutputs['models'][$model] ) ) {
+   return null;
+   }
+
+   $storageVersion = $this->modelLookup->getModelVersion( $model );
+   $responseVersion = $modelOutputs['models'][$model]['version'];
+
+   if ( $storageVersion === $responseVersion ) {
+   return null;
+   }
+
+   return $responseVersion;
+   }
+
+   /**
+* @param string $model
+* @param string $responseVersion
+*/
+   private function updateModelVersion( $model, $responseVersion ) {
+   // TODO: Move to ModelStorage service
+   $dbw = \wfGetDB( DB_MASTER );
+   $dbw->update( 'ores_model',
+   [
+   'oresm_is_current' => 0,
+   ],
+   [
+   'oresm_name' => $model,
+   'oresm_version != ' . $dbw->addQuotes( 
$responseVersion ),
+   ],
+   __METHOD__
+   );
+
+   $dbw->upsert( 'ores_model',
+   [
+   'oresm_name' => $model,
+   'oresm_version' => $responseVersion,
+   'oresm_is_current' => 1,
+   ],
+   [ 'oresm_name', 'oresm_version' ],
+   [
+   'oresm_name' => $model,
+   'oresm_version' => $responseVersion,
+   'oresm_is_current' => 1,
+   ],
+   __METHOD__
+   );
+   }
+
 }
diff --git a/tests/phpunit/includes/Parser/ScoreParserTest.php 
b/tests/phpunit/includes/Parser/ScoreParserTest.php
index 7f2d1c8..8ac2505 100644
--- a/tests/phpunit/includes/Parser/ScoreParserTest.php
+++ b/tests/phpunit/includes/Parser/ScoreParserTest.php
@@ -161,4 +161,35 @@
$scoreParser->processRevision( $revId, $revisionData );
}
 
+   public function provideTestCheckModelVersion() {
+   return [
+   [ null, 'damaging', [] ],
+   [ null, 'damaging', [ 'models' => [ 'goodfaith' => [ 
'version' => '0.0.4' ] ] ] ],
+   [ null, 'damaging', [ 'models' => [ 'damaging' => [ 
'info' => 'foo' ] ] ] ],
+   [ '0.0.4', 'damaging', [ 'models' => [ 'damaging' => [ 
'version' => '0.0.4' ] ] ] ],
+   [ null, 'goodfaith', [ 'models' => [ 'goodfaith' => [ 
'version' => '0.0.3' ] ] ] ],
+   [ '0.0.4', 'goodfaith', [ 'models' => [ 'goodfaith' => 
[ 'version' => '0.0.4' ] ] ] ],
+   ];
+   }
+
+   /**
+* @dataProvider provideTestCheckModelVersion
+*/
+   public function testCheckModelVersion( $expected, $model, array 
$response ) {
+ 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Remove font-size now it is set by editfont

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/399616 )

Change subject: Remove font-size now it is set by editfont
..


Remove font-size now it is set by editfont

Bug: T180678
Change-Id: Ic9e8bdb3b34dbb2f2c5748d6bb57e9da90112118
---
M resources/modules/ve-cm/ve.ui.CodeMirror.init.less
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/resources/modules/ve-cm/ve.ui.CodeMirror.init.less 
b/resources/modules/ve-cm/ve.ui.CodeMirror.init.less
index 6db9a8d..4da2457 100644
--- a/resources/modules/ve-cm/ve.ui.CodeMirror.init.less
+++ b/resources/modules/ve-cm/ve.ui.CodeMirror.init.less
@@ -5,7 +5,6 @@
position: absolute;
top: 0;
left: 0;
-   font-size: 1.17216em;
line-height: 1.5em;
width: 100%;
-webkit-box-sizing: border-box;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9e8bdb3b34dbb2f2c5748d6bb57e9da90112118
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix $.fn.hover deprecation error

2017-12-25 Thread Albert221 (Code Review)
Albert221 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400175 )

Change subject: Fix $.fn.hover deprecation error
..

Fix $.fn.hover deprecation error

Bug: T182758
Change-Id: I05cf001c7097f6bbf45108530c36d1099ffb861f
---
M modules/translation/ext.cx.translation.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/75/400175/1

diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 1d2823d..4275db7 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -358,7 +358,8 @@
function getPlaceholder( sourceSectionId ) {
return $( '' )
.addClass( 'placeholder' )
-   .hover( sectionMouseEnterHandler, 
sectionMouseLeaveHandler )
+   .on( 'mouseenter', sectionMouseEnterHandler )
+   .on( 'mouseleave', sectionMouseLeaveHandler )
.on( 'click', sectionClick )
.attr( {
id: 'cx' + sourceSectionId,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05cf001c7097f6bbf45108530c36d1099ffb861f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Albert221 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Add phan configuration for static analysis

2017-12-25 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400174 )

Change subject: Add phan configuration for static analysis
..

Add phan configuration for static analysis

Bug: T179554
Change-Id: I2bfd52c08aac1aa8f34e0664e6314835f79a0324
---
M .gitignore
M includes/ApiQueryReferences.php
M includes/Cite.php
M includes/CiteHooks.php
A tests/phan/config.php
5 files changed, 326 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/74/400174/1

diff --git a/.gitignore b/.gitignore
index 4489bce..e9de19d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 /node_modules/
 /vendor/
+/tests/phan/issues
 /composer.lock
 
 # Editors
diff --git a/includes/ApiQueryReferences.php b/includes/ApiQueryReferences.php
index 75b314c..100b742 100644
--- a/includes/ApiQueryReferences.php
+++ b/includes/ApiQueryReferences.php
@@ -21,6 +21,8 @@
  * @see https://www.mediawiki.org/wiki/Extension:Cite#API
  */
 
+use MediaWiki\MediaWikiServices;
+
 class ApiQueryReferences extends ApiQueryBase {
 
public function __construct( $query, $moduleName ) {
@@ -36,12 +38,15 @@
}
 
public function execute() {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'cite' );
+   $config = 
MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'cite' );
if ( !$config->get( 'CiteStoreReferencesData' ) ) {
if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError( 
'apierror-citestoragedisabled' );
} else {
-   $this->dieUsage( 'Cite extension reference 
storage is not enabled', 'citestoragedisabled' );
+   $this->dieWithError(
+   new RawMessage( '$1', [ 'Cite extension 
reference storage is not enabled' ] ),
+   'citestoragedisabled'
+   );
}
}
$params = $this->extractRequestParams();
diff --git a/includes/Cite.php b/includes/Cite.php
index 02b93c5..63283e0 100644
--- a/includes/Cite.php
+++ b/includes/Cite.php
@@ -22,6 +22,7 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\IDatabase;
 
 /**
@@ -454,7 +455,7 @@
 * @throws Exception
 * @return string
 */
-   private function stack( $str, $key = null, $group, $follow, array $call 
) {
+   private function stack( $str, $key, $group, $follow, array $call ) {
if ( !isset( $this->mRefs[$group] ) ) {
$this->mRefs[$group] = [];
}
@@ -760,15 +761,18 @@
global $wgCiteCacheReferences, $wgMemc;
$data = false;
if ( $wgCiteCacheReferences ) {
-   $cacheKey = wfMemcKey(
+   $cacheKey = 
ObjectCache::getLocalClusterInstance()->makeKey(
'citeref',
md5( $parserInput ),
$this->mParser->Title()->getArticleID()
);
$data = $wgMemc->get( $cacheKey );
+   if ( !$this->mParser->isValidHalfParsedText( $data ) ) {
+   $data = false;
+   }
}
 
-   if ( !$data || !$this->mParser->isValidHalfParsedText( $data ) 
) {
+   if ( !$data ) {
// Live hack: parse() adds two newlines on WM, can't 
reproduce it locally -ævar
$ret = rtrim( $this->mParser->recursiveTagParse( 
$parserInput ), "\n" );
 
@@ -1335,7 +1339,7 @@
 * Return an error message based on an error ID
 *
 * @param string $key   Message name for the error
-* @param string|null $param Parameter to pass to the message
+* @param mixed $param Parameter to pass to the message
 * @param string $parse Whether to parse the message ('parse') or not 
('noparse')
 * @return string XHTML or wikitext ready for output
 */
@@ -1429,7 +1433,7 @@
if ( !$wgCiteStoreReferencesData ) {
return false;
}
-   $cache = ObjectCache::getMainWANInstance();
+   $cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
$key = $cache->makeKey( self::EXT_DATA_KEY, 
$title->getArticleID() );
return $cache->getWithSetCallback(
$key,
diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php
index bcf65fd..4bdeab6 100644
--- a/includes/CiteHooks.php
+++ b/includes/CiteHooks.php

[MediaWiki-commits] [Gerrit] mediawiki...TweetANew[master]: Add phpcs&phpcbf to composer test and fix

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400128 )

Change subject: Add phpcs&phpcbf to composer test and fix
..


Add phpcs&phpcbf to composer test and fix

Change-Id: I1a646b3b73d6cc46f60113a64595bd819226d9ad
---
A .phpcs.xml
M TweetANew.body.php
M TweetANew.php
M composer.json
4 files changed, 40 insertions(+), 7 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  D3r1ck01: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/.phpcs.xml b/.phpcs.xml
new file mode 100644
index 000..8240861
--- /dev/null
+++ b/.phpcs.xml
@@ -0,0 +1,35 @@
+
+
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   .
+   
+   
+   ./lib/*
+
diff --git a/TweetANew.body.php b/TweetANew.body.php
index 5f1f4d0..3e00b2f 100644
--- a/TweetANew.body.php
+++ b/TweetANew.body.php
@@ -25,7 +25,6 @@
 
# Check if $wgTweetANewTweet['New'] is enabled or the Tweet 
checkbox was selected on the edit page
if ( $wgRequest->getCheck( 'wpTweetANew' ) || 
$wgTweetANewTweet['New'] ) {
-
# Check if page is in content namespace or if the Tweet 
checkbox was selected on the edit page
if ( !MWNamespace::isContent( 
$wikiPage->getTitle()->getNamespace() )
&& !$wgRequest->getCheck( 'wpTweetANew' )
@@ -107,7 +106,6 @@
 
# Check if $wgTweetANewTweet['Edit'] is enabled or the Tweet 
checkbox was selected on the edit page
if ( $wgRequest->getCheck( 'wpTweetANewEdit' ) || 
$wgTweetANewTweet['Edit'] ) {
-
# Unless the tweet checkbox is selected, only proceeds 
if page is outside content namespace
#   and if a minor edit, checks 
$wgTweetANewTweet['SkipMinor']
# Also prevents new articles from processing as 
TweetANewNewArticle function is used instead
@@ -121,7 +119,7 @@
 
# Determine the time and date of last modification - 
exit if newer than $wgTweetANewTweet['LessMinutesOld']
# ToDo - there must be a cleaner way of doing this
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select(
'revision',
array( 'rev_timestamp' ),
@@ -227,7 +225,6 @@
 
# Check setting to enable/disable use of bitly
if ( $wgTweetANewBitly['Enable'] ) {
-
# Generate url for bitly
$shortened = 
"https://api-ssl.bitly.com/v3/shorten?longUrl=";
. urlencode( $longurl ) . "&login=" . 
$wgTweetANewBitly['Login']
@@ -237,7 +234,6 @@
$response = Http::get( $shortened );
} # Check setting to enable/disable use of goo.gl
elseif ( $wgTweetANewGoogl['Enable'] ) {
-
# Setup goo.gl
$url = new GoogleURL( $wgTweetANewGoogl['API'] );
 
diff --git a/TweetANew.php b/TweetANew.php
index 8f5eeed..3cacdd3 100644
--- a/TweetANew.php
+++ b/TweetANew.php
@@ -220,7 +220,6 @@
 function efTweetANewEditCheckBox( $editpage, &$checkboxes, &$tabindex = null ) 
{
global $wgTweetANewEditpage, $wgTweetANewTweet;
 
-
$options = array(
'label-message' => null,
'id' => null,
diff --git a/composer.json b/composer.json
index 7d306d5..ef56f9e 100644
--- a/composer.json
+++ b/composer.json
@@ -2,14 +2,17 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/minus-x": "0.2.1"
+   "mediawiki/minus-x": "0.2.1",
+   "mediawiki/mediawiki-codesniffer": "14.1.0"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor --exclude 
node_modules",
+   "phpcs -s -p",
"minus-x check ."
],
"fix": [
+   "phpcbf",
"minus-x fix ."
]
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a646b3b73d6cc46f60113a64595bd819226

[MediaWiki-commits] [Gerrit] mediawiki...Cognate[master]: Remove invalid @covers tag

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400144 )

Change subject: Remove invalid @covers tag
..


Remove invalid @covers tag

PHPUnit does not support using @covers on an entire file.

Bug: T183604
Change-Id: I597d8fe90f56cb256b29ac1f9c68960779d437fc
---
M tests/phpunit/ServiceWiringTest.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/ServiceWiringTest.php 
b/tests/phpunit/ServiceWiringTest.php
index 6f6fe33..a9a261d 100644
--- a/tests/phpunit/ServiceWiringTest.php
+++ b/tests/phpunit/ServiceWiringTest.php
@@ -10,8 +10,6 @@
 use Wikimedia\Rdbms\ConnectionManager;
 
 /**
- * @covers ServiceWiring.php
- *
  * @license GNU GPL v2+
  * @author Addshore
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I597d8fe90f56cb256b29ac1f9c68960779d437fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cognate
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Remove invalid @covers tag

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400143 )

Change subject: Remove invalid @covers tag
..


Remove invalid @covers tag

PHPUnit does not support using @covers on an entire file.

Bug: T183604
Change-Id: I597d8fe90f56cb256b29ac1f9c68960779d437fc
---
M tests/phpunit/includes/ServiceWiringTest.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/includes/ServiceWiringTest.php 
b/tests/phpunit/includes/ServiceWiringTest.php
index 7f25b78..c90047f 100644
--- a/tests/phpunit/includes/ServiceWiringTest.php
+++ b/tests/phpunit/includes/ServiceWiringTest.php
@@ -7,8 +7,6 @@
 use ORES\ThresholdLookup;
 
 /**
- * @covers ORES\ServiceWiring.php
- *
  * @license GNU GPL v2+
  * @author Addshore
  * @author Amir Sarabadani

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I597d8fe90f56cb256b29ac1f9c68960779d437fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseMediaInfo[master]: Remove invalid @covers tag

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400142 )

Change subject: Remove invalid @covers tag
..


Remove invalid @covers tag

PHPUnit does not support using @covers on an entire file.

Bug: T183604
Change-Id: I597d8fe90f56cb256b29ac1f9c68960779d437fc
---
M tests/phpunit/mediawiki/EntityTypesTest.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/mediawiki/EntityTypesTest.php 
b/tests/phpunit/mediawiki/EntityTypesTest.php
index dcab28d..015e067 100644
--- a/tests/phpunit/mediawiki/EntityTypesTest.php
+++ b/tests/phpunit/mediawiki/EntityTypesTest.php
@@ -18,8 +18,6 @@
 use Wikibase\View\EntityTermsView;
 
 /**
- * @covers WikibaseMediaInfo.entitytypes.php
- *
  * @group WikibaseMediaInfo
  *
  * @license GPL-2.0+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I597d8fe90f56cb256b29ac1f9c68960779d437fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: parameter_functions: Add EventLogging to WikiEditor dependency

2017-12-25 Thread Rafidaslam (Code Review)
Rafidaslam has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400173 )

Change subject: parameter_functions: Add EventLogging to WikiEditor dependency
..

parameter_functions: Add EventLogging to WikiEditor dependency

EventLogging is used in the WikiEditor extension,
precisely in `WikiEditorHooks.php`. It needed for Phan
check.

Change-Id: I667d9d712cdae27db3da68961583cc01584bd319
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/73/400173/1

diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 89cd4b0..441eded 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -280,6 +280,7 @@
 'WikibaseQualityExternalValidation': ['Wikibase', 'WikibaseQuality'],
 'Wikidata.org': ['Wikibase'],
 'WikidataPageBanner': ['Wikibase'],
+'WikiEditor': ['EventLogging'],
 'WikimediaBadges': ['Wikibase'],
 'WikimediaEvents': ['EventLogging'],
 'wikihiero': ['VisualEditor'],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MsInsert[master]: Added Minus-X Support

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400106 )

Change subject: Added Minus-X Support
..


Added Minus-X Support

Bug: T175794
Change-Id: Ib511f11638aab8e0591955ce3829a31c34ecac2f
---
M MsInsert.js
M README.md
M composer.json
3 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/MsInsert.js b/MsInsert.js
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
diff --git a/composer.json b/composer.json
index aebd773..7d306d5 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,16 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
+   ],
+   "fix": [
+   "minus-x fix ."
]
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib511f11638aab8e0591955ce3829a31c34ecac2f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MsInsert
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 
Gerrit-Reviewer: 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] mediawiki...MsLinks[master]: Added Minus-X Support

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400107 )

Change subject: Added Minus-X Support
..


Added Minus-X Support

Bug: T175794
Change-Id: Ic79361972b7e3df5c574315ad921c3cd7d3d58d2
---
M MsLinks.body.php
M MsLinks.php
M README.md
M composer.json
M images/dwg_icon.gif
M images/exe_icon.gif
M images/film_icon.png
M images/mslink_icon_oldschool.gif
8 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/MsLinks.body.php b/MsLinks.body.php
old mode 100755
new mode 100644
diff --git a/MsLinks.php b/MsLinks.php
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
diff --git a/composer.json b/composer.json
index aebd773..7d306d5 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,16 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
+   ],
+   "fix": [
+   "minus-x fix ."
]
}
 }
diff --git a/images/dwg_icon.gif b/images/dwg_icon.gif
old mode 100755
new mode 100644
Binary files differ
diff --git a/images/exe_icon.gif b/images/exe_icon.gif
old mode 100755
new mode 100644
Binary files differ
diff --git a/images/film_icon.png b/images/film_icon.png
old mode 100755
new mode 100644
Binary files differ
diff --git a/images/mslink_icon_oldschool.gif b/images/mslink_icon_oldschool.gif
old mode 100755
new mode 100644
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic79361972b7e3df5c574315ad921c3cd7d3d58d2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MsLinks
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 
Gerrit-Reviewer: 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] mediawiki...Newsletter[master]: Added a unit test to check that the main page exists

2017-12-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400137 )

Change subject: Added a unit test to check that the main page exists
..


Added a unit test to check that the main page exists

Bug: T183632
Change-Id: If424bfd9b820fa93b71b1d6f892fa5941d6d086c
---
M tests/specials/SpecialNewsletterCreateTest.php
1 file changed, 22 insertions(+), 0 deletions(-)

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



diff --git a/tests/specials/SpecialNewsletterCreateTest.php 
b/tests/specials/SpecialNewsletterCreateTest.php
index a928437..057796c 100644
--- a/tests/specials/SpecialNewsletterCreateTest.php
+++ b/tests/specials/SpecialNewsletterCreateTest.php
@@ -19,4 +19,26 @@
$this->executeSpecialPage( '', null, null, $user->getUser() );
$this->assertTrue( true );
}
+
+   public function testCreateNewsletterMainPageExists() {
+   $input = [
+   'name' => 'Test Newsletter',
+   'description' => 'This is a test newsletter that should 
return an error for a bad main page.',
+   'mainpage' => Title::newFromText( 'BdaMianPage' 
)->getBaseText()
+   ];
+
+   // Mock submission of bad main page
+   $res = $this->newSpecialPage()->onSubmit( $input );
+
+   // The main page is nonexistent
+   $this->assertEquals(
+   $res->getMessage()->getKey(), 
'newsletter-mainpage-non-existent'
+   );
+
+   // The newsletter was not created
+   $store = NewsletterStore::getDefaultInstance();
+   $this->assertNull(
+   $store->getNewsletterFromName( 'Test Newsletter' )
+   );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If424bfd9b820fa93b71b1d6f892fa5941d6d086c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Assets build - 2017-12-25 09:24:01+00:00

2017-12-25 Thread PortalsBuilder (Code Review)
PortalsBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400172 )

Change subject: Assets build - 2017-12-25 09:24:01+00:00
..

Assets build - 2017-12-25 09:24:01+00:00

Change-Id: Ia3c730989925ac28ab02f29cf63dc64ccba8a8c9
---
M data/site-stats.json
M dev/wikipedia.org/assets/img/sprite-6e35f464.png
M prod/wikipedia.org/assets/img/sprite-6e35f464.png
A prod/wikipedia.org/assets/l10n/ab-51bea75e.json
D prod/wikipedia.org/assets/l10n/ab-f85a9633.json
A prod/wikipedia.org/assets/l10n/ace-51bea75e.json
D prod/wikipedia.org/assets/l10n/ace-f85a9633.json
A prod/wikipedia.org/assets/l10n/af-51bea75e.json
D prod/wikipedia.org/assets/l10n/af-f85a9633.json
A prod/wikipedia.org/assets/l10n/ak-51bea75e.json
D prod/wikipedia.org/assets/l10n/ak-f85a9633.json
A prod/wikipedia.org/assets/l10n/als-51bea75e.json
D prod/wikipedia.org/assets/l10n/als-f85a9633.json
A prod/wikipedia.org/assets/l10n/am-51bea75e.json
D prod/wikipedia.org/assets/l10n/am-f85a9633.json
A prod/wikipedia.org/assets/l10n/an-51bea75e.json
D prod/wikipedia.org/assets/l10n/an-f85a9633.json
A prod/wikipedia.org/assets/l10n/ang-51bea75e.json
D prod/wikipedia.org/assets/l10n/ang-f85a9633.json
A prod/wikipedia.org/assets/l10n/ar-51bea75e.json
D prod/wikipedia.org/assets/l10n/ar-f85a9633.json
A prod/wikipedia.org/assets/l10n/arc-51bea75e.json
D prod/wikipedia.org/assets/l10n/arc-f85a9633.json
A prod/wikipedia.org/assets/l10n/arz-51bea75e.json
D prod/wikipedia.org/assets/l10n/arz-f85a9633.json
A prod/wikipedia.org/assets/l10n/as-51bea75e.json
D prod/wikipedia.org/assets/l10n/as-f85a9633.json
A prod/wikipedia.org/assets/l10n/ast-51bea75e.json
D prod/wikipedia.org/assets/l10n/ast-f85a9633.json
A prod/wikipedia.org/assets/l10n/av-51bea75e.json
D prod/wikipedia.org/assets/l10n/av-f85a9633.json
A prod/wikipedia.org/assets/l10n/ay-51bea75e.json
D prod/wikipedia.org/assets/l10n/ay-f85a9633.json
A prod/wikipedia.org/assets/l10n/az-51bea75e.json
D prod/wikipedia.org/assets/l10n/az-f85a9633.json
A prod/wikipedia.org/assets/l10n/azb-51bea75e.json
D prod/wikipedia.org/assets/l10n/azb-f85a9633.json
A prod/wikipedia.org/assets/l10n/ba-51bea75e.json
D prod/wikipedia.org/assets/l10n/ba-f85a9633.json
A prod/wikipedia.org/assets/l10n/bar-51bea75e.json
D prod/wikipedia.org/assets/l10n/bar-f85a9633.json
A prod/wikipedia.org/assets/l10n/bat-smg-51bea75e.json
D prod/wikipedia.org/assets/l10n/bat-smg-f85a9633.json
A prod/wikipedia.org/assets/l10n/bcl-51bea75e.json
D prod/wikipedia.org/assets/l10n/bcl-f85a9633.json
A prod/wikipedia.org/assets/l10n/be-51bea75e.json
D prod/wikipedia.org/assets/l10n/be-f85a9633.json
A prod/wikipedia.org/assets/l10n/bg-51bea75e.json
D prod/wikipedia.org/assets/l10n/bg-f85a9633.json
A prod/wikipedia.org/assets/l10n/bh-51bea75e.json
D prod/wikipedia.org/assets/l10n/bh-f85a9633.json
A prod/wikipedia.org/assets/l10n/bi-51bea75e.json
D prod/wikipedia.org/assets/l10n/bi-f85a9633.json
A prod/wikipedia.org/assets/l10n/bjn-51bea75e.json
D prod/wikipedia.org/assets/l10n/bjn-f85a9633.json
A prod/wikipedia.org/assets/l10n/bm-51bea75e.json
D prod/wikipedia.org/assets/l10n/bm-f85a9633.json
A prod/wikipedia.org/assets/l10n/bn-51bea75e.json
D prod/wikipedia.org/assets/l10n/bn-f85a9633.json
A prod/wikipedia.org/assets/l10n/bo-51bea75e.json
D prod/wikipedia.org/assets/l10n/bo-f85a9633.json
A prod/wikipedia.org/assets/l10n/bpy-51bea75e.json
D prod/wikipedia.org/assets/l10n/bpy-f85a9633.json
A prod/wikipedia.org/assets/l10n/br-51bea75e.json
D prod/wikipedia.org/assets/l10n/br-f85a9633.json
A prod/wikipedia.org/assets/l10n/bs-51bea75e.json
D prod/wikipedia.org/assets/l10n/bs-f85a9633.json
A prod/wikipedia.org/assets/l10n/bug-51bea75e.json
D prod/wikipedia.org/assets/l10n/bug-f85a9633.json
A prod/wikipedia.org/assets/l10n/bxr-51bea75e.json
D prod/wikipedia.org/assets/l10n/bxr-f85a9633.json
A prod/wikipedia.org/assets/l10n/ca-51bea75e.json
D prod/wikipedia.org/assets/l10n/ca-f85a9633.json
A prod/wikipedia.org/assets/l10n/cbk-zam-51bea75e.json
D prod/wikipedia.org/assets/l10n/cbk-zam-f85a9633.json
A prod/wikipedia.org/assets/l10n/cdo-51bea75e.json
D prod/wikipedia.org/assets/l10n/cdo-f85a9633.json
A prod/wikipedia.org/assets/l10n/ce-51bea75e.json
D prod/wikipedia.org/assets/l10n/ce-f85a9633.json
A prod/wikipedia.org/assets/l10n/ceb-51bea75e.json
D prod/wikipedia.org/assets/l10n/ceb-f85a9633.json
A prod/wikipedia.org/assets/l10n/ch-51bea75e.json
D prod/wikipedia.org/assets/l10n/ch-f85a9633.json
A prod/wikipedia.org/assets/l10n/chr-51bea75e.json
D prod/wikipedia.org/assets/l10n/chr-f85a9633.json
A prod/wikipedia.org/assets/l10n/chy-51bea75e.json
D prod/wikipedia.org/assets/l10n/chy-f85a9633.json
A prod/wikipedia.org/assets/l10n/ckb-51bea75e.json
D prod/wikipedia.org/assets/l10n/ckb-f85a9633.json
A prod/wikipedia.org/assets/l10n/co-51bea75e.json
D prod/wikipedia.org/assets/l10n/co-f85a9633.json
A prod/wikipedia.org/assets/l10n/cr-51bea75e.json
D prod/wikipedia.org/assets/l10n/cr-f85a96

[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Fix the return type of Scribunto_LuaLibraryBase::register()

2017-12-25 Thread Rafidaslam (Code Review)
Rafidaslam has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400169 )

Change subject: Fix the return type of Scribunto_LuaLibraryBase::register()
..

Fix the return type of Scribunto_LuaLibraryBase::register()

Before this, tools like Phan and others read
`Scribunto_LuaLibraryBase::register()` returns `\Lua` type
from the document comment,
but it actually returns `array` type since the implementation
of this function should returns the value of
`Scribunto_LuaEngine::registerInterface()` which returns
`array` type.

Change-Id: I25beea963444b715bed7b2890475c0c812949520
---
M engines/LuaCommon/LibraryBase.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/69/400169/1

diff --git a/engines/LuaCommon/LibraryBase.php 
b/engines/LuaCommon/LibraryBase.php
index b929281..fdd3d66 100644
--- a/engines/LuaCommon/LibraryBase.php
+++ b/engines/LuaCommon/LibraryBase.php
@@ -46,7 +46,7 @@
 * The value returned by that call should be returned from this 
function,
 * and must be for 'deferLoad' libraries to work right.
 *
-* @return Lua package
+* @return array Lua package
 */
abstract function register();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25beea963444b715bed7b2890475c0c812949520
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 

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