[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Various small cleanups to DatabasePostgres

2016-10-28 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Various small cleanups to DatabasePostgres
..

Various small cleanups to DatabasePostgres

* Add missing method visibilites
* Removed redundant doc blocks
* Use empty string for mSchema for consistency with
  the base class

Change-Id: I2a067ca89a03f9ebf3f70a4f36ddae92e5b1e468
---
M includes/libs/rdbms/database/DatabasePostgres.php
M includes/libs/rdbms/database/IDatabase.php
2 files changed, 74 insertions(+), 177 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/318664/1

diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index 7e40495..c0d92aa 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -48,19 +48,19 @@
parent::__construct( $params );
}
 
-   function getType() {
+   public function getType() {
return 'postgres';
}
 
-   function implicitGroupby() {
+   public function implicitGroupby() {
return false;
}
 
-   function implicitOrderby() {
+   public function implicitOrderby() {
return false;
}
 
-   function hasConstraint( $name ) {
+   public function hasConstraint( $name ) {
$conn = $this->getBindingHandle();
 
$sql = "SELECT 1 FROM pg_catalog.pg_constraint c, 
pg_catalog.pg_namespace n " .
@@ -72,16 +72,7 @@
return $this->numRows( $res );
}
 
-   /**
-* Usually aborts on failure
-* @param string $server
-* @param string $user
-* @param string $password
-* @param string $dbName
-* @throws DBConnectionError|Exception
-* @return resource|bool|null
-*/
-   function open( $server, $user, $password, $dbName ) {
+   public function open( $server, $user, $password, $dbName ) {
# Test for Postgres support, to avoid suppressed fatal error
if ( !function_exists( 'pg_connect' ) ) {
throw new DBConnectionError(
@@ -153,7 +144,7 @@
 
$this->determineCoreSchema( $this->mSchema );
// The schema to be used is now in the search path; no need for 
explicit qualification
-   $this->mSchema = null;
+   $this->mSchema = '';
 
return $this->mConn;
}
@@ -164,7 +155,7 @@
 * @param string $db
 * @return bool
 */
-   function selectDB( $db ) {
+   public function selectDB( $db ) {
if ( $this->mDBname !== $db ) {
return (bool)$this->open( $this->mServer, $this->mUser, 
$this->mPassword, $db );
} else {
@@ -172,7 +163,11 @@
}
}
 
-   function makeConnectionString( $vars ) {
+   /**
+* @param string[] $vars
+* @return string
+*/
+   private function makeConnectionString( $vars ) {
$s = '';
foreach ( $vars as $name => $value ) {
$s .= "$name='" . str_replace( "'", "\\'", $value ) . 
"' ";
@@ -181,11 +176,6 @@
return $s;
}
 
-   /**
-* Closes a database connection, if it is open
-* Returns success, true if already closed
-* @return bool
-*/
protected function closeConnection() {
return $this->mConn ? pg_close( $this->mConn ) : true;
}
@@ -231,7 +221,7 @@
}
}
 
-   function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = 
false ) {
+   public function reportQueryError( $error, $errno, $sql, $fname, 
$tempIgnore = false ) {
if ( $tempIgnore ) {
/* Check for constraint violation */
if ( $errno === '23505' ) {
@@ -249,15 +239,7 @@
parent::reportQueryError( $error, $errno, $sql, $fname, false );
}
 
-   function queryIgnore( $sql, $fname = __METHOD__ ) {
-   return $this->query( $sql, $fname, true );
-   }
-
-   /**
-* @param stdClass|ResultWrapper $res
-* @throws DBUnexpectedError
-*/
-   function freeResult( $res ) {
+   public function freeResult( $res ) {
if ( $res instanceof ResultWrapper ) {
$res = $res->result;
}
@@ -269,12 +251,7 @@
}
}
 
-   /**
-* @param ResultWrapper|stdClass $res
-* @return stdClass
-* @throws DBUnexpectedError
-*/
-   function fetchObject( $res ) {
+   public function fetchObject( $res ) {
if ( $res instanceof ResultWrapper ) {

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: WIP: Add language switcher

2016-10-28 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: WIP: Add language switcher
..

WIP: Add language switcher

Change-Id: Ib026d5068af017cd725ac658d11eeca540b31463
---
M includes/JCDataContent.php
M includes/JCTabularContent.php
2 files changed, 52 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig 
refs/changes/63/318663/1

diff --git a/includes/JCDataContent.php b/includes/JCDataContent.php
index 8850277..206b8f4 100644
--- a/includes/JCDataContent.php
+++ b/includes/JCDataContent.php
@@ -103,4 +103,27 @@
 
return $html;
}
+
+   /**
+* Get a list of language codes declared in any of the localizable data
+* @return string[]|null
+*/
+   public function getSupportedLanguages() {
+   if ( !$this->isValid() ) {
+   return null;
+   }
+   $result = [];
+   $this->addSupportedLanguages( $result );
+   $result = array_keys( $result );
+   ksort( $result );
+   return $result;
+   }
+
+   /**
+* Add any language codes declared by any localizable data as keys to 
the result array
+* @param array $result
+*/
+   protected function addSupportedLanguages( & $result ) {
+   $result += $this->getData()->info;
+   }
 }
diff --git a/includes/JCTabularContent.php b/includes/JCTabularContent.php
index bcddf3a..8122386 100644
--- a/includes/JCTabularContent.php
+++ b/includes/JCTabularContent.php
@@ -122,17 +122,11 @@
$result->headers = $data->headers;
$result->types = $data->types;
$result->titles = array_map( $localize, $data->titles );
-   if ( !in_array( 'localized', $data->types ) ) {
+   $isLocalized = $this->getLocalizedColumns();
+   if ( !$isLocalized ) {
// There are no localized strings in the data, optimize
$result->rows = $data->rows;
} else {
-   // Make a list of all columns that need to be localized
-   $isLocalized = [];
-   foreach ( $data->types as $ind => $type ) {
-   if ( $type === 'localized' ) {
-   $isLocalized[] = $ind;
-   }
-   }
$result->rows = array_map( function ( $row ) use ( 
$localize, $isLocalized ) {
foreach ( $isLocalized as $ind ) {
$row[$ind] = $localize( $row[$ind] );
@@ -141,4 +135,31 @@
}, $data->rows );
}
}
+
+   /**
+* Make a list of indexes of all localized columns
+*/
+   private function getLocalizedColumns() {
+   $data = $this->getData();
+   $isLocalized = [];
+   foreach ( $data->types as $ind => $type ) {
+   if ( $type === 'localized' ) {
+   $isLocalized[] = $ind;
+   }
+   }
+   return $isLocalized;
+   }
+
+   protected function addSupportedLanguages( & $result ) {
+   $data = $this->getData();
+   $result += $data->titles;
+   $isLocalized = $this->getLocalizedColumns();
+   if ( $isLocalized ) {
+   foreach ( $data->rows as $row ) {
+   foreach ( $isLocalized as $idx ) {
+   $result += $row[$idx];
+   }
+   }
+   }
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Postgres updater fixes to make update.php able to run

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Postgres updater fixes to make update.php able to run
..


Postgres updater fixes to make update.php able to run

* Remove redundant schema prefix from relname=x query. The
  schema filtering is already done via the JOIN. The relname
  portion is just the table name not ..
* Avoid explicit table schema qualification and rely on the
  search path, as MW 1.27 did. Previously it only used the
  global $wgDBschema var to pass to determineCoreSchema()
  instead of keeping it in mSchema.
* Clean up some code duplication in Database::tableName() and
  make the code comments clearer.
* Make DatabasePostgres::tableName() use parent::tableName()
  instead of a method that just wraps this method. The intent
  seems clearer this way.
* Remove unused return value in
  PostgresUpdater::rebuildTextSearch().

Bug: T148628
Change-Id: Id11d9576b7c2fdad22ff7f90727c12997217a632
(cherry picked from commit eef8fc45f3d03596579abb2519185ace38cf6832)
---
M includes/installer/PostgresUpdater.php
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabasePostgres.php
M includes/libs/rdbms/field/PostgresField.php
4 files changed, 54 insertions(+), 33 deletions(-)

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



diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index f3d2860..790fbe7 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -975,7 +975,7 @@
protected function rebuildTextSearch() {
if ( $this->updateRowExists( 'patch-textsearch_bug66650.sql' ) 
) {
$this->output( "...bug 66650 already fixed or not 
applicable.\n" );
-   return true;
+   return;
};
$this->applyPatch( 'patch-textsearch_bug66650.sql', false,
'Rebuilding text search for bug 66650' );
diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index ba63432..ee4524f 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1721,9 +1721,9 @@
} elseif ( count( $dbDetails ) == 2 ) {
list( $database, $table ) = $dbDetails;
# We don't want any prefix added in this case
+   $prefix = '';
# In dbs that support it, $database may actually be the 
schema
# but that doesn't affect any of the functionality here
-   $prefix = '';
$schema = '';
} else {
list( $table ) = $dbDetails;
@@ -1745,31 +1745,37 @@
# Quote $table and apply the prefix if not quoted.
# $tableName might be empty if this is called from 
Database::replaceVars()
$tableName = "{$prefix}{$table}";
-   if ( $format == 'quoted'
-   && !$this->isQuotedIdentifier( $tableName ) && 
$tableName !== ''
+   if ( $format === 'quoted'
+   && !$this->isQuotedIdentifier( $tableName )
+   && $tableName !== ''
) {
$tableName = $this->addIdentifierQuotes( $tableName );
}
 
-   # Quote $schema and merge it with the table name if needed
-   if ( strlen( $schema ) ) {
-   if ( $format == 'quoted' && !$this->isQuotedIdentifier( 
$schema ) ) {
-   $schema = $this->addIdentifierQuotes( $schema );
-   }
-   $tableName = $schema . '.' . $tableName;
-   }
-
-   # Quote $database and merge it with the table name if needed
-   if ( $database !== '' ) {
-   if ( $format == 'quoted' && !$this->isQuotedIdentifier( 
$database ) ) {
-   $database = $this->addIdentifierQuotes( 
$database );
-   }
-   $tableName = $database . '.' . $tableName;
-   }
+   # Quote $schema and $database and merge them with the table 
name if needed
+   $tableName = $this->prependDatabaseOrSchema( $schema, 
$tableName, $format );
+   $tableName = $this->prependDatabaseOrSchema( $database, 
$tableName, $format );
 
return $tableName;
}
 
+   /**
+* @param string|null $namespace Database or schema
+* @param string $relation Name of table, view, sequence, etc...
+* @param string $format One of (raw, quoted)
+* @return string Relation name with quoted and merged $namespace as 
needed
+*/
+   private function 

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Add single line string validation

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add single line string validation
..


Add single line string validation

Tabular data should only have single line strings
without new lines, tabs, or trailing spaces

This is similar to Wikidata limitations

Change-Id: Ib229c04a624a423d7073fdf13b52bca741510f4e
---
M i18n/en.json
M i18n/qqq.json
M includes/JCDataContent.php
M includes/JCUtils.php
M includes/JCValidators.php
5 files changed, 43 insertions(+), 20 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 6671ed0..92d7c34 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,12 +15,13 @@
"jsonconfig-err-bool": "Parameter \"$1\" must be either set to true or 
false",
"jsonconfig-err-integer": "Parameter \"$1\" must be an integer",
"jsonconfig-err-license": "Parameter \"$1\" must be one of the valid 
license codes, for example $2",
-   "jsonconfig-err-localized": "Parameter \"$1\" must be an object that 
maps valid language codes to strings, e.g. { \"en\":\"String in English\", ... 
}",
+   "jsonconfig-err-localized": "Parameter \"$1\" must be an object that 
maps valid language codes to single line strings without tabs or trailing 
spaces, e.g. { \"en\":\"String in English\", ... }",
"jsonconfig-err-number": "Parameter \"$1\" must be a number",
"jsonconfig-err-object-expected": "The value at \"$1\" was expected to 
be an object surrounded by the {...} braces",
"jsonconfig-err-root-array-expected": "JSON data should be a list, 
surrounded by the [...] brackets",
"jsonconfig-err-root-object-expected": "JSON data should be an object, 
surrounded by the {...} braces",
"jsonconfig-err-string": "Parameter \"$1\" must be a string",
+   "jsonconfig-err-stringline": "Parameter \"$1\" must be a single line 
string no longer than $2 characters, with no tabs, and must not begin or end 
with a space",
"jsonconfig-err-unique-strings": "Parameter \"$1\" must be a list of 
unique non-empty strings",
"jsonconfig-err-url": "Parameter \"$1\" must be a valid URL",
"jsonconfig-move-aborted-model": "this page's JSON config model \"$1\" 
would not match the new title's model \"$2\"",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 62decbb..7f52ec4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -29,6 +29,7 @@
"jsonconfig-err-root-array-expected": "Entire JSON data was not a list 
surrounded by the [...] brackets",
"jsonconfig-err-root-object-expected": "Entire JSON data was not an 
object, surrounded by the {...} braces",
"jsonconfig-err-string": "A field named \"$1\" is not a valid string. 
Parameters:\n* $1 - field name",
+   "jsonconfig-err-stringline": "A field named \"$1\" is not a valid 
single line string. Parameters:\n* $1 - field name\n* $2 - maximum allowed 
string length",
"jsonconfig-err-unique-strings": "A list named \"$1\" must only contain 
non-empty strings that do not repeat. Parameters:\n* $1 - field name",
"jsonconfig-err-url": "A field named \"$1\" is not a valid URL. 
Parameters:\n* $1 - field name",
"jsonconfig-move-aborted-model": "JSON configuration page is being 
renamed to a new title, and that title (namespace) contains configurations of a 
different type (model).\n\nParameters:\n* $1 - current model\n* $2 - default 
model for the new title",
diff --git a/includes/JCDataContent.php b/includes/JCDataContent.php
index 25839e0..8850277 100644
--- a/includes/JCDataContent.php
+++ b/includes/JCDataContent.php
@@ -22,7 +22,7 @@
return;
}
 
-   $this->test( 'license', JCValidators::isString(), 
self::isValidLicense() );
+   $this->test( 'license', JCValidators::isStringLine(), 
self::isValidLicense() );
$this->testOptional( 'info', [ 'en' => '' ], 
JCValidators::isLocalizedString() );
}
 
diff --git a/includes/JCUtils.php b/includes/JCUtils.php
index f63e950..eb7f7fd 100644
--- a/includes/JCUtils.php
+++ b/includes/JCUtils.php
@@ -155,6 +155,17 @@
return is_array( $array ) && count( array_filter( $array, 
'is_string' ) ) === count( $array );
}
 
+   /** Helper function to check if the given value is a valid string no 
longer than maxlength,
+* that it has no tabs or new line chars, and that it does not begin or 
end with spaces
+* @param $str
+* @param int $maxlength
+* @return bool
+*/
+   public static function isValidLineString( $str, $maxlength ) {
+   return is_string( $str ) && mb_strlen( $str ) <= $maxlength &&
+  !preg_match( '/^\s|[\r\n\t]|\s$/', $str );
+   }
+
/**
 * Converts an array representing path to a field into a string in 
'a/b/c[0]/d' format

[MediaWiki-commits] [Gerrit] operations/puppet[production]: move config for git-ssh(phabricator) to hiera

2016-10-28 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

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

Change subject: move config for git-ssh(phabricator) to hiera
..

move config for git-ssh(phabricator) to hiera

IP addresses were hard-coded in role::phabricator::main so that
overriding them in hieradata/role/codfw/phabricator/main.yaml had
no affect.

I'm not entirely happy with the duplication of data between
ssh::server::listen_address, phabricator::vcs::address::v6 and
phabricator::vcs::listen_addresses. I'd welcome suggestions of
how to improve this.

I'm also not happy with the embedded iteration in
`ferm_rule-ssh_public.erb`.  puppet-stdlib has a function called
enclose_ipv6 [1] which would go a long way towards fixing this,
unfortunately, our version of puppet-stdlib predates it's
introduction.

[1] 
https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/enclose_ipv6.rb

Change-Id: Ida0fadc0dbc433b7a3a76c1dcbfd10700be515c3
---
M hieradata/role/codfw/phabricator/main.yaml
M hieradata/role/eqiad/phabricator/main.yaml
M modules/phabricator/manifests/vcs.pp
A modules/phabricator/templates/ferm_rule-ssh_public.erb
M modules/role/manifests/phabricator/main.pp
5 files changed, 32 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/318662/1

diff --git a/hieradata/role/codfw/phabricator/main.yaml 
b/hieradata/role/codfw/phabricator/main.yaml
index 70a50a0..bcf7864 100644
--- a/hieradata/role/codfw/phabricator/main.yaml
+++ b/hieradata/role/codfw/phabricator/main.yaml
@@ -1,3 +1,8 @@
+ssh::server::listen_address: 10.192.32.147
+
+phabricator::vcs::address::v4: "10.192.32.149"
+phabricator::vcs::address::v6: "2620:0:860:103:10:192:32:149"
+
 phabricator::vcs::listen_addresses:
   - "10.192.32.149"
   - "[2620:0:860:103:10:192:32:149]"
diff --git a/hieradata/role/eqiad/phabricator/main.yaml 
b/hieradata/role/eqiad/phabricator/main.yaml
index c604c2d..fe11da0 100644
--- a/hieradata/role/eqiad/phabricator/main.yaml
+++ b/hieradata/role/eqiad/phabricator/main.yaml
@@ -1,11 +1,19 @@
+# this provides the listen_address for sshd_config, used for admin logins
+# all other IPs are used by phabricator::vcs (aka git-ssh.wikimedia.org)
 ssh::server::listen_address: "10.64.32.150"
 
 lvs::realserver::realserver_ips:
   - "208.80.154.250"
   - "2620:0:861:ed1a::3:16"
 
+# phabricator's git backend uses a separate sshd with separate IPs on both
+# the public and private networks.
+# This is used in modules/phabricator/templates/sshd_config.phabricator.erb
 phabricator::vcs::listen_addresses:
   - "208.80.154.250"
   - "10.64.32.186"
   - "[2620:0:861:ed1a::3:16]"
   - "[2620:0:861:103:10:64:32:186]"
+
+phabricator::vcs::address::v4: "10.64.32.186"
+phabricator::vcs::address::v6: "2620:0:861:103:10:64:32:186"
diff --git a/modules/phabricator/manifests/vcs.pp 
b/modules/phabricator/manifests/vcs.pp
index 9cee668..4922c10 100644
--- a/modules/phabricator/manifests/vcs.pp
+++ b/modules/phabricator/manifests/vcs.pp
@@ -61,6 +61,11 @@
 group   => 'root',
 }
 
+# allow ssh connection to IPs in hiera phabricator::vcs::listen_addresses:
+ferm::rule { 'ssh_public':
+rule => template('phabricator/ferm_rule-ssh_public.erb'),
+}
+
 file { $sshd_config:
 content => template('phabricator/sshd_config.phabricator.erb'),
 mode=> '0644',
diff --git a/modules/phabricator/templates/ferm_rule-ssh_public.erb 
b/modules/phabricator/templates/ferm_rule-ssh_public.erb
new file mode 100644
index 000..c13be50
--- /dev/null
+++ b/modules/phabricator/templates/ferm_rule-ssh_public.erb
@@ -0,0 +1,12 @@
+<%
+ addresses = []
+ @listen_addresses.each do |addr|
+if addr.include? ":" then
+  addr.sub!('[','').sub!(']','')
+  addresses << addr + '/128'
+else
+  addresses << addr + '/32'
+end
+ end
+-%>
+saddr (0.0.0.0/0 ::/0) daddr (<%= addresses.join(' ') %>) proto tcp dport (22) 
ACCEPT;
diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index ab52781..560c4e7 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -77,12 +77,12 @@
 # This exists to offer git services
 interface::ip { 'role::phabricator::main::ipv4':
 interface => 'eth0',
-address   => '10.64.32.186',
+address   => hiera('phabricator::vcs::address::v4'),
 prefixlen => '21',
 }
 interface::ip { 'role::phabricator::main::ipv6':
 interface => 'eth0',
-address   => '2620:0:861:103:10:64:32:186',
+address   => hiera('phabricator::vcs::address::v6'),
 prefixlen => '128',
 # mark as deprecated = never pick this address unless explicitly asked
 options   => 'preferred_lft 0',
@@ -170,10 +170,6 @@
 port   => '25',
 proto  => 'tcp',
 srange => 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Postgres updater fixes to make update.php able to run

2016-10-28 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Postgres updater fixes to make update.php able to run
..

Postgres updater fixes to make update.php able to run

* Remove redundant schema prefix from relname=x query. The
  schema filtering is already done via the JOIN. The relname
  portion is just the table name not ..
* Avoid explicit table schema qualification and rely on the
  search path, as MW 1.27 did. Previously it only used the
  global $wgDBschema var to pass to determineCoreSchema()
  instead of keeping it in mSchema.
* Clean up some code duplication in Database::tableName() and
  make the code comments clearer.
* Make DatabasePostgres::tableName() use parent::tableName()
  instead of a method that just wraps this method. The intent
  seems clearer this way.
* Remove unused return value in
  PostgresUpdater::rebuildTextSearch().

Bug: T148628
Change-Id: Id11d9576b7c2fdad22ff7f90727c12997217a632
(cherry picked from commit eef8fc45f3d03596579abb2519185ace38cf6832)
---
M includes/installer/PostgresUpdater.php
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabasePostgres.php
M includes/libs/rdbms/field/PostgresField.php
4 files changed, 54 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/318661/1

diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index f3d2860..790fbe7 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -975,7 +975,7 @@
protected function rebuildTextSearch() {
if ( $this->updateRowExists( 'patch-textsearch_bug66650.sql' ) 
) {
$this->output( "...bug 66650 already fixed or not 
applicable.\n" );
-   return true;
+   return;
};
$this->applyPatch( 'patch-textsearch_bug66650.sql', false,
'Rebuilding text search for bug 66650' );
diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index ba63432..ee4524f 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1721,9 +1721,9 @@
} elseif ( count( $dbDetails ) == 2 ) {
list( $database, $table ) = $dbDetails;
# We don't want any prefix added in this case
+   $prefix = '';
# In dbs that support it, $database may actually be the 
schema
# but that doesn't affect any of the functionality here
-   $prefix = '';
$schema = '';
} else {
list( $table ) = $dbDetails;
@@ -1745,31 +1745,37 @@
# Quote $table and apply the prefix if not quoted.
# $tableName might be empty if this is called from 
Database::replaceVars()
$tableName = "{$prefix}{$table}";
-   if ( $format == 'quoted'
-   && !$this->isQuotedIdentifier( $tableName ) && 
$tableName !== ''
+   if ( $format === 'quoted'
+   && !$this->isQuotedIdentifier( $tableName )
+   && $tableName !== ''
) {
$tableName = $this->addIdentifierQuotes( $tableName );
}
 
-   # Quote $schema and merge it with the table name if needed
-   if ( strlen( $schema ) ) {
-   if ( $format == 'quoted' && !$this->isQuotedIdentifier( 
$schema ) ) {
-   $schema = $this->addIdentifierQuotes( $schema );
-   }
-   $tableName = $schema . '.' . $tableName;
-   }
-
-   # Quote $database and merge it with the table name if needed
-   if ( $database !== '' ) {
-   if ( $format == 'quoted' && !$this->isQuotedIdentifier( 
$database ) ) {
-   $database = $this->addIdentifierQuotes( 
$database );
-   }
-   $tableName = $database . '.' . $tableName;
-   }
+   # Quote $schema and $database and merge them with the table 
name if needed
+   $tableName = $this->prependDatabaseOrSchema( $schema, 
$tableName, $format );
+   $tableName = $this->prependDatabaseOrSchema( $database, 
$tableName, $format );
 
return $tableName;
}
 
+   /**
+* @param string|null $namespace Database or schema
+* @param string $relation Name of table, view, sequence, etc...
+* @param string $format One of (raw, quoted)
+* @return string Relation name with quoted and merged $namespace as 
needed
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Postgres updater fixes to make update.php able to run

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Postgres updater fixes to make update.php able to run
..


Postgres updater fixes to make update.php able to run

* Remove redundant schema prefix from relname=x query. The
  schema filtering is already done via the JOIN. The relname
  portion is just the table name not ..
* Avoid explicit table schema qualification and rely on the
  search path, as MW 1.27 did. Previously it only used the
  global $wgDBschema var to pass to determineCoreSchema()
  instead of keeping it in mSchema.
* Clean up some code duplication in Database::tableName() and
  make the code comments clearer.
* Make DatabasePostgres::tableName() use parent::tableName()
  instead of a method that just wraps this method. The intent
  seems clearer this way.
* Remove unused return value in
  PostgresUpdater::rebuildTextSearch().

Bug: T148628
Change-Id: Id11d9576b7c2fdad22ff7f90727c12997217a632
---
M includes/installer/PostgresUpdater.php
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabasePostgres.php
M includes/libs/rdbms/field/PostgresField.php
4 files changed, 54 insertions(+), 33 deletions(-)

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



diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index f3d2860..790fbe7 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -975,7 +975,7 @@
protected function rebuildTextSearch() {
if ( $this->updateRowExists( 'patch-textsearch_bug66650.sql' ) 
) {
$this->output( "...bug 66650 already fixed or not 
applicable.\n" );
-   return true;
+   return;
};
$this->applyPatch( 'patch-textsearch_bug66650.sql', false,
'Rebuilding text search for bug 66650' );
diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index ba63432..ee4524f 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1721,9 +1721,9 @@
} elseif ( count( $dbDetails ) == 2 ) {
list( $database, $table ) = $dbDetails;
# We don't want any prefix added in this case
+   $prefix = '';
# In dbs that support it, $database may actually be the 
schema
# but that doesn't affect any of the functionality here
-   $prefix = '';
$schema = '';
} else {
list( $table ) = $dbDetails;
@@ -1745,31 +1745,37 @@
# Quote $table and apply the prefix if not quoted.
# $tableName might be empty if this is called from 
Database::replaceVars()
$tableName = "{$prefix}{$table}";
-   if ( $format == 'quoted'
-   && !$this->isQuotedIdentifier( $tableName ) && 
$tableName !== ''
+   if ( $format === 'quoted'
+   && !$this->isQuotedIdentifier( $tableName )
+   && $tableName !== ''
) {
$tableName = $this->addIdentifierQuotes( $tableName );
}
 
-   # Quote $schema and merge it with the table name if needed
-   if ( strlen( $schema ) ) {
-   if ( $format == 'quoted' && !$this->isQuotedIdentifier( 
$schema ) ) {
-   $schema = $this->addIdentifierQuotes( $schema );
-   }
-   $tableName = $schema . '.' . $tableName;
-   }
-
-   # Quote $database and merge it with the table name if needed
-   if ( $database !== '' ) {
-   if ( $format == 'quoted' && !$this->isQuotedIdentifier( 
$database ) ) {
-   $database = $this->addIdentifierQuotes( 
$database );
-   }
-   $tableName = $database . '.' . $tableName;
-   }
+   # Quote $schema and $database and merge them with the table 
name if needed
+   $tableName = $this->prependDatabaseOrSchema( $schema, 
$tableName, $format );
+   $tableName = $this->prependDatabaseOrSchema( $database, 
$tableName, $format );
 
return $tableName;
}
 
+   /**
+* @param string|null $namespace Database or schema
+* @param string $relation Name of table, view, sequence, etc...
+* @param string $format One of (raw, quoted)
+* @return string Relation name with quoted and merged $namespace as 
needed
+*/
+   private function prependDatabaseOrSchema( $namespace, $relation, 
$format ) {
+  

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Store linter_cat names in a separate table

2016-10-28 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Store linter_cat names in a separate table
..

Store linter_cat names in a separate table

linter_cat is now an int ID that points to a row in the new
lint_categories table.

The mapping between category names and ids is all handled in PHP, and
cached in APC.

Note that you will need to drop the `linter` table manually and re-run
update.php for this to take effect.

Change-Id: I369d9b4d8d08289b4a20d1cd29a2e327bad28ef8
---
M extension.json
M includes/ApiQueryLintErrors.php
A includes/CategoryManager.php
M includes/Database.php
M includes/Hooks.php
M includes/LintErrorsPager.php
M includes/SpecialLintErrors.php
A lint_categories.sql
M linter.sql
9 files changed, 227 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter 
refs/changes/60/318660/1

diff --git a/extension.json b/extension.json
index fbd0a03..ae8745d 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"descriptionmsg": "linter-desc",
"type": "specialpage",
"AutoloadClasses": {
+   "MediaWiki\\Linter\\CategoryManager": 
"includes/CategoryManager.php",
"MediaWiki\\Linter\\Hooks": "includes/Hooks.php",
"MediaWiki\\Linter\\Database": "includes/Database.php",
"MediaWiki\\Linter\\LintError": "includes/LintError.php",
diff --git a/includes/ApiQueryLintErrors.php b/includes/ApiQueryLintErrors.php
index b86cb99..d211dbf 100644
--- a/includes/ApiQueryLintErrors.php
+++ b/includes/ApiQueryLintErrors.php
@@ -33,13 +33,16 @@
 
public function execute() {
$params = $this->extractRequestParams();
+   $categoryMgr = CategoryManager::getInstance();
 
$this->addTables( 'linter' );
if ( $params['category'] !== null ) {
-   $this->addWhereFld( 'linter_cat', $params['category'] );
+   $this->addWhereFld( 'linter_cat', 
$categoryMgr->getCategoryId( $params['category'] ) );
} else {
// Limit only to enabled categories (there might be 
others in the DB)
-   $this->addWhereFld( 'linter_cat', 
$this->getCategories() );
+   $this->addWhereFld( 'linter_cat', array_values( 
$categoryMgr->getCategoryIds(
+   $categoryMgr->getCategories()
+   ) ) );
}
$db = $this->getDB();
if ( $params['from'] !== null ) {
@@ -90,15 +93,10 @@
}
}
 
-   private function getCategories() {
-   global $wgLinterCategories;
-   return array_keys( array_filter( $wgLinterCategories ) );
-   }
-
public function getAllowedParams() {
return [
'category' => [
-   ApiBase::PARAM_TYPE => $this->getCategories(),
+   ApiBase::PARAM_TYPE => 
CategoryManager::getInstance()->getCategories(),
ApiBase::PARAM_ISMULTI => true,
],
'limit' => [
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
new file mode 100644
index 000..dc0a28f
--- /dev/null
+++ b/includes/CategoryManager.php
@@ -0,0 +1,183 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Linter;
+
+use MediaWiki\MediaWikiServices;
+
+/**
+ * Functions for lint error categories
+ */
+class CategoryManager {
+
+   /**
+* @var array|bool
+*/
+   private $map;
+   /**
+* @var \BagOStuff
+*/
+   private $cache;
+   /**
+* @var string
+*/
+   private $cacheKey;
+
+   private function __construct() {
+   $this->cache = 
MediaWikiServices::getInstance()->getLocalServerObjectCache();
+   $this->cacheKey = $this->cache->makeKey( 'linter', 'categories' 
);
+   }
+
+   public static function getInstance() {
+   static $self;
+   if ( !$self ) {
+   $self = new self();
+   }
+
+   return $self;
+   }
+
+   public function getCategories() {
+   global $wgLinterCategories;
+   return array_keys( array_filter( $wgLinterCategories ) );
+   }
+
+   /**
+* @see getCategoryId
+* @param string $name
+* @return bool|int
+*/
+   public function getAndMaybeCreateCategoryId( $name ) {
+   return $this->getCategoryId( $name, true );
+   }
+
+   /**
+* @param string $id
+* @throws \RuntimeException
+* @return int
+*/
+   public function getCategoryName( $id ) {
+   if ( !$this->map ) {

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T149241: Whitelist content model fallbacks

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: T149241: Whitelist content model fallbacks
..


T149241: Whitelist content model fallbacks

 * And, warn instead of err on mismatch.

Change-Id: I6755f6f6795511a7465e1013155dfdb4e78fa823
---
M lib/config/MWParserEnvironment.js
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 4f0d650..c30d3d7 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -774,6 +774,15 @@
 };
 
 /**
+ * Content model whitelist
+ *
+ * Suppress warnings for these fallbacks to wikitext.
+ */
+var whitelist = new Set([
+   'wikibase-item',
+]);
+
+/**
  * @method
  *
  * Get an appropriate content handler, given a contentmodel.
@@ -788,7 +797,9 @@
this.page.meta.revision.contentmodel ||
'wikitext';
if (!this.conf.wiki.extContentModel.has(contentmodel)) {
-   this.log('error', 'Unknown contentmodel', contentmodel);
+   if (!whitelist.has(contentmodel)) {
+   this.log('warning', 'Unknown contentmodel', 
contentmodel);
+   }
contentmodel = 'wikitext';
}
return this.conf.wiki.extContentModel.get(contentmodel);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6755f6f6795511a7465e1013155dfdb4e78fa823
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
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...parsoid[master]: WIP: Add tool to fetch wt, html, data-parsoid for a title / ...

2016-10-28 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: WIP: Add tool to fetch wt, html, data-parsoid for a title / 
revision
..

WIP: Add tool to fetch wt, html, data-parsoid for a title / revision

* Needed for debugging selser when we get bug reports
* This fetches wikitext from M/W api and matching HTML and data-parsoid
  from RESTBase.
* The HTML can then be modified to simulate edits.
* You can than test serialization by using the edited html, old html,
  old wikitext, and the data-parsoid json blob.

Change-Id: I07ebf34e3eb30f66ebfe8995b08f19cdc865b772
TODO: Test options thoroughly.
---
A tools/fetch-revision-data.js
1 file changed, 146 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/59/318659/1

diff --git a/tools/fetch-revision-data.js b/tools/fetch-revision-data.js
new file mode 100755
index 000..97fee67
--- /dev/null
+++ b/tools/fetch-revision-data.js
@@ -0,0 +1,146 @@
+#!/usr/bin/env node
+'use strict';
+require('../core-upgrade.js');
+
+/*
+ * Given a title or revision id, fetch:
+ * 1. the wikitext for a page from the MW API
+ * 2. latest matching HTML and data-parsoid for the revision from RESTBase
+ */
+
+var fs = require('fs');
+var path = require('path');
+var yargs = require('yargs');
+var yaml = require('js-yaml');
+
+var TemplateRequest = require('../lib/mw/ApiRequest.js').TemplateRequest;
+var ParsoidConfig = require('../lib/config/ParsoidConfig.js').ParsoidConfig;
+var MWParserEnvironment = 
require('../lib/config/MWParserEnvironment.js').MWParserEnvironment;
+var Util = require('../lib/utils/Util.js').Util;
+
+
+var fetch = function(page, revid, opts) {
+   var prefix = opts.prefix || null;
+   var domain = opts.domain || null;
+   if (!prefix && !domain) {
+   domain = "en.wikipedia.org";
+   }
+
+   var config = null;
+   if (Util.booleanOption(opts.config)) {
+   var p = (typeof (opts.config) === 'string') ?
+   path.resolve('.', opts.config) :
+   path.resolve(__dirname, '../config.yaml');
+   // Assuming Parsoid is the first service in the list
+   config = yaml.load(fs.readFileSync(p, 'utf8')).services[0].conf;
+   }
+
+   var setup = function(parsoidConfig) {
+   if (config && config.localsettings) {
+   var local = require(path.resolve(__dirname, 
config.localsettings));
+   local.setup(parsoidConfig);
+   }
+   Util.setTemplatingAndProcessingFlags(parsoidConfig, opts);
+   Util.setDebuggingFlags(parsoidConfig, opts);
+   };
+
+   var parsoidConfig = new ParsoidConfig({ setup: setup }, config);
+   if (!prefix) {
+   // domain has been provided
+   prefix = parsoidConfig.reverseMwApiMap.get(domain);
+   } else if (!domain) {
+   // prefix has been set
+   domain = parsoidConfig.getAPIProxy(prefix).domain;
+   }
+
+   parsoidConfig.defaultWiki = prefix;
+
+   var env;
+   var outputPrefix = prefix + "." + page;
+   var rbOpts = {
+   uri: null,
+   method: 'GET',
+   headers: {
+   'User-Agent': parsoidConfig.userAgent,
+   },
+   };
+   MWParserEnvironment.getParserEnv(parsoidConfig, {
+   prefix: prefix,
+   domain: domain,
+   pageName: page,
+   }).then(function(_env) {
+   // Fetch wikitext from mediawiki API
+   env = _env;
+   var target = page ?
+   env.normalizeAndResolvePageTitle() : null;
+   return TemplateRequest.setPageSrcInfo(env, target, revid);
+   }).then(function() {
+   fs.writeFileSync(outputPrefix + ".wt", env.page.src, 'utf8');
+   }).then(function() {
+   // Fetch HTML from RESTBase
+   rbOpts.uri = "https://; + domain + "/api/rest_v1/page/html/" + 
page + (revid ? "/" + revid : "");
+   return Util.retryingHTTPRequest(2, rbOpts);
+   }).then(function(resp) {
+   fs.writeFileSync(outputPrefix + ".html", resp[1], 'utf8');
+   return resp[0].headers['etag'].replace(/"/g, '');
+   }).then(function(etag) {
+   // Fetch matching data-parsoid form RESTBase
+   rbOpts.uri = "https://; + domain + 
"/api/rest_v1/page/data-parsoid/" + page + "/" + etag;
+   return Util.retryingHTTPRequest(2, rbOpts);
+   }).then(function(resp) {
+   fs.writeFileSync(outputPrefix + ".dp.json", resp[1], 'utf8');
+   }).done();
+};
+
+var usage = 'Usage: $0 [options]  \n';
+var opts = yargs.usage(usage, {
+   'config': {
+   description: "Path to a config.yaml 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clean up http classes a bit

2016-10-28 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Clean up http classes a bit
..

Clean up http classes a bit

* made ::$status, ::proxySetup() and ::read() protected;
  they were not referenced in any gerrit-hosted extension
  and they provide no useful functionality to external callers
* removed inheritance abuse in ::execute()
* documented ::execute() as returning a StatusValue (but
  keep returning a Status for now)
* replaced MWException

Change-Id: I5852fc75badc5d475ae30ec2c9376bde7024bd95
---
M RELEASE-NOTES-1.29
M includes/http/CurlHttpRequest.php
M includes/http/Http.php
M includes/http/MWHttpRequest.php
M includes/http/PhpHttpRequest.php
5 files changed, 34 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/318658/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 6c53809..f5c3186 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -30,6 +30,8 @@
 changes to languages because of Phabricator reports.
 
 === Other changes in 1.29 ===
+* MWHttpRequest::execute() should be considered to return a StatusValue; the
+  Status return type is deprecated.
 
 == Compatibility ==
 
diff --git a/includes/http/CurlHttpRequest.php 
b/includes/http/CurlHttpRequest.php
index f58c3a9..7fd3e83 100644
--- a/includes/http/CurlHttpRequest.php
+++ b/includes/http/CurlHttpRequest.php
@@ -38,11 +38,10 @@
}
 
public function execute() {
-
-   parent::execute();
+   $this->prepare();
 
if ( !$this->status->isOK() ) {
-   return $this->status;
+   return Status::wrap( $this->status ); // TODO B/C; move 
this to callers
}
 
$this->curlOptions[CURLOPT_PROXY] = $this->proxy;
@@ -102,7 +101,7 @@
$curlHandle = curl_init( $this->url );
 
if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
-   throw new MWException( "Error setting curl options." );
+   throw new InvalidArgumentException( "Error setting curl 
options." );
}
 
if ( $this->followRedirects && $this->canFollowRedirects() ) {
@@ -140,7 +139,7 @@
$this->parseHeader();
$this->setStatus();
 
-   return $this->status;
+   return Status::wrap( $this->status );  // TODO B/C; move this 
to callers
}
 
/**
diff --git a/includes/http/Http.php b/includes/http/Http.php
index 43ae2d0..a68a63b 100644
--- a/includes/http/Http.php
+++ b/includes/http/Http.php
@@ -74,7 +74,7 @@
} else {
$errors = $status->getErrorsByType( 'error' );
$logger = LoggerFactory::getInstance( 'http' );
-   $logger->warning( $status->getWikiText( false, false, 
'en' ),
+   $logger->warning( Status::wrap( $status )->getWikiText( 
false, false, 'en' ),
[ 'error' => $errors, 'caller' => $caller, 
'content' => $req->getContent() ] );
return false;
}
diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php
index 458854a..1c36e54 100644
--- a/includes/http/MWHttpRequest.php
+++ b/includes/http/MWHttpRequest.php
@@ -46,6 +46,7 @@
protected $reqHeaders = [];
protected $url;
protected $parsedUrl;
+   /** @var callable  */
protected $callback;
protected $maxRedirects = 5;
protected $followRedirects = false;
@@ -60,7 +61,8 @@
protected $respStatus = "200 Ok";
protected $respHeaders = [];
 
-   public $status;
+   /** @var StatusValue */
+   protected $status;
 
/**
 * @var Profiler
@@ -98,9 +100,9 @@
}
 
if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) {
-   $this->status = Status::newFatal( 'http-invalid-url', 
$url );
+   $this->status = StatusValue::newFatal( 
'http-invalid-url', $url );
} else {
-   $this->status = Status::newGood( 100 ); // continue
+   $this->status = StatusValue::newGood( 100 ); // continue
}
 
if ( isset( $options['timeout'] ) && $options['timeout'] != 
'default' ) {
@@ -161,7 +163,7 @@
 * @param string $url Url to use
 * @param array $options (optional) extra params to pass (see 
Http::request())
 * @param string $caller The method making this request, for profiling
-* @throws MWException
+* @throws DomainException
 * @return CurlHttpRequest|PhpHttpRequest
 * @see MWHttpRequest::__construct
 */
@@ -169,7 +171,7 @@
if ( !Http::$httpEngine ) {
   

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix ve.test.utils.createSurfaceFromHtml

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix ve.test.utils.createSurfaceFromHtml
..


Fix ve.test.utils.createSurfaceFromHtml

Was passing an HTMLDocument instead of a DM document.
This wasn't failing because the UI surface constructor accepts
HTMLDocuments.

Change-Id: Ibb9a32de4d86295dddc5a677c180ea9c706a1983
---
M tests/ve.test.utils.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js
index 4812066..0a5006c 100644
--- a/tests/ve.test.utils.js
+++ b/tests/ve.test.utils.js
@@ -243,7 +243,9 @@
 * @return {ve.ui.Surface} UI surface
 */
ve.test.utils.createSurfaceFromHtml = function ( html ) {
-   return this.createSurfaceFromDocument( 
ve.createDocumentFromHtml( html ) );
+   return this.createSurfaceFromDocument(
+   ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( html ) )
+   );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb9a32de4d86295dddc5a677c180ea9c706a1983
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Tchanders 
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...deploy[master]: Add alternative comment type to wikidata description.

2016-10-28 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review.

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

Change subject: Add alternative comment type to wikidata description.
..

Add alternative comment type to wikidata description.

Bug: T149456
Change-Id: Ibce1a68c57304cf17d5e881919b8cd105b775bde
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/57/318657/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a7f5ef9..146932c 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -560,7 +560,7 @@
   domain: www.wikidata.org
 page_namespace: 0
 # It's impossible to modify a comment in wikidata 
while editing the entity.
-comment: '/wbeditentity/'
+comment: '/(?:wbeditentity)|(?:wbsetdescription)/'
   exec:
 method: post
 uri: '/sys/links/wikidata_descriptions'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibce1a68c57304cf17d5e881919b8cd105b775bde
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Offboarding Rob Lanphier

2016-10-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Offboarding Rob Lanphier
..


Offboarding Rob Lanphier

Change-Id: I650f2add0ee40b4d8614ab7ea228edc2630fcd93
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 996b611..1f80ec5 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -5,7 +5,7 @@
   handrade, howief, jdouglas, jgonera, jsahleen, mah, maryana, 
mglaser, mvolz,
   mwalker, nimishg, rainman, ssmith, swalling, sumanah, werdna, 
rmoen,
   johnflewis, marc, jkrauska, akumar, mnoushad, spage, tnegrin, 
msyed, kleduc,
-  manybubbles, haithams, jzerebecki, ashwinpp, ironholds]
+  manybubbles, haithams, jzerebecki, ashwinpp, ironholds, robla]
   wikidev:
 gid: 500
 description: container group for primary user groups.
@@ -51,7 +51,7 @@
   brion, cscott, csteipp, demon, ebernhardson, esanders, gilles,
   gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, 
krinkle,
   maxsem, mattflaschen, marktraceur, milimetric, mlitn, andyrussg,
-  nikerabbit, reedy, robla, ssastry, tomasz, yurik,
+  nikerabbit, reedy, ssastry, tomasz, yurik,
   tgr, phuedx, ejegg, twentyafterfour, legoktm, catrope, krenair,
   mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, 
dcausse,
   bsitzmann, mholloway-shell, dduvall, gehel, dereckson,
@@ -1031,12 +1031,11 @@
 ssh_keys: []
 uid: 2099
   robla:
-ensure: present
+ensure: absent
 gid: 500
 name: robla
 realname: Rob Lanphier
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EBIwAAAQEAu53QXIYXig1FTP4ve0MOMSXZXtMORld4y+f9cqmKA7OAStnT1VYw6F0eBSPJH0WUo541iMKcsigENytdn/kuSu8zmh1+nyHvhndB3LvP467IBo82LRBaZ6X0+0y5X+w1w56oX5H+t2zixWPHTQu0f9XQBPCsZzfV8DkVbJjwoHk9wcHI/lJSa7r5dI0xWPWYXXHM6BeAHbET1kcUAe3km1jWDsh2gBgKfwis7iIZx6ROSBOfHdYs9MU6miFq/9kk2/Z1vKOY6bj3adVe+wbd6JFF0UZdQzstIW3/15NfWJjJ8X6gx5U7wchtuPjnIyydUTU5u4UiS6uUS4e+MFsoOw==
-ro...@wikimedia.org]
+ssh_keys: []
 uid: 1233
   spage:
 ensure: absent

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I650f2add0ee40b4d8614ab7ea228edc2630fcd93
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Mark Bergsma 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Offboarding Rob Lanphier

2016-10-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: Offboarding Rob Lanphier
..

Offboarding Rob Lanphier

Change-Id: I650f2add0ee40b4d8614ab7ea228edc2630fcd93
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/318656/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 996b611..1f80ec5 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -5,7 +5,7 @@
   handrade, howief, jdouglas, jgonera, jsahleen, mah, maryana, 
mglaser, mvolz,
   mwalker, nimishg, rainman, ssmith, swalling, sumanah, werdna, 
rmoen,
   johnflewis, marc, jkrauska, akumar, mnoushad, spage, tnegrin, 
msyed, kleduc,
-  manybubbles, haithams, jzerebecki, ashwinpp, ironholds]
+  manybubbles, haithams, jzerebecki, ashwinpp, ironholds, robla]
   wikidev:
 gid: 500
 description: container group for primary user groups.
@@ -51,7 +51,7 @@
   brion, cscott, csteipp, demon, ebernhardson, esanders, gilles,
   gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, 
krinkle,
   maxsem, mattflaschen, marktraceur, milimetric, mlitn, andyrussg,
-  nikerabbit, reedy, robla, ssastry, tomasz, yurik,
+  nikerabbit, reedy, ssastry, tomasz, yurik,
   tgr, phuedx, ejegg, twentyafterfour, legoktm, catrope, krenair,
   mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, 
dcausse,
   bsitzmann, mholloway-shell, dduvall, gehel, dereckson,
@@ -1031,12 +1031,11 @@
 ssh_keys: []
 uid: 2099
   robla:
-ensure: present
+ensure: absent
 gid: 500
 name: robla
 realname: Rob Lanphier
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EBIwAAAQEAu53QXIYXig1FTP4ve0MOMSXZXtMORld4y+f9cqmKA7OAStnT1VYw6F0eBSPJH0WUo541iMKcsigENytdn/kuSu8zmh1+nyHvhndB3LvP467IBo82LRBaZ6X0+0y5X+w1w56oX5H+t2zixWPHTQu0f9XQBPCsZzfV8DkVbJjwoHk9wcHI/lJSa7r5dI0xWPWYXXHM6BeAHbET1kcUAe3km1jWDsh2gBgKfwis7iIZx6ROSBOfHdYs9MU6miFq/9kk2/Z1vKOY6bj3adVe+wbd6JFF0UZdQzstIW3/15NfWJjJ8X6gx5U7wchtuPjnIyydUTU5u4UiS6uUS4e+MFsoOw==
-ro...@wikimedia.org]
+ssh_keys: []
 uid: 1233
   spage:
 ensure: absent

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I650f2add0ee40b4d8614ab7ea228edc2630fcd93
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Optimise startup by merging regexes

2016-10-28 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Optimise startup by merging regexes
..

resourceloader: Optimise startup by merging regexes

Merge webOS, misc and Google Glass regexes.

* Add various test cases for PlayStation.
* Add tests for unrelated user agent matching "Glass".

Change-Id: Ifb0944d190f230bb36197b22cf3099c187dad091
---
M resources/src/startup.js
M tests/qunit/suites/resources/startup.test.js
2 files changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/318655/1

diff --git a/resources/src/startup.js b/resources/src/startup.js
index d026cb0..61d06b6 100644
--- a/resources/src/startup.js
+++ b/resources/src/startup.js
@@ -64,10 +64,8 @@
// Hardcoded exceptions for browsers that pass the requirement 
but we don't want to
// support in the modern run-time.
&& !(
-   ua.match( /webOS\/1\.[0-4]/ ) ||
-   ua.match( /PlayStation/i ) ||
-   ua.match( /SymbianOS|Series60|NetFront|Opera 
Mini|S40OviBrowser|MeeGo/ ) ||
-   ( ua.match( /Glass/ ) && ua.match( /Android/ ) )
+   ua.match( 
/webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera 
Mini|S40OviBrowser|MeeGo|Android.+Glass/ ) ||
+   ua.match( /PlayStation/i )
)
);
 }
diff --git a/tests/qunit/suites/resources/startup.test.js 
b/tests/qunit/suites/resources/startup.test.js
index 2934b39..2d996ae 100644
--- a/tests/qunit/suites/resources/startup.test.js
+++ b/tests/qunit/suites/resources/startup.test.js
@@ -99,12 +99,18 @@
'Wget/1.10.1 (Red Hat modified)',
// Unknown
'I\'m an unknown browser',
+   'I\'m an unknown Glass browser',
// Empty
''
],
blacklisted: [
/* Grade C */
 
+   // PlayStation
+   'Mozilla/5.0 (PLAYSTATION 3; 1.10)',
+   'Mozilla/5.0 (PLAYSTATION 3; 3.55)',
+   'Mozilla/5.0 (PLAYSTATION 3 4.21) AppleWebKit/531.22.8 
(KHTML, like Gecko)',
+   'Mozilla/5.0 (PlayStation 4 1.70) AppleWebKit/536.26 
(KHTML, like Gecko)',
// Open WebOS < 1.5 (Palm Pre, Palm Pixi)
'Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 
(KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0',
'Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 
(KHTML, like Gecko) Version/1.0 Safari/532.2 Pixi/1.1 ',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: let datacenter-ops run script to change mgmt passwords

2016-10-28 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: admin: let datacenter-ops run script to change mgmt passwords
..

admin: let datacenter-ops run script to change mgmt passwords

Change-Id: I0a609f504dc7b882e836741dfaecbd3f9050ba63
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/318654/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 996b611..9931563 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -430,6 +430,7 @@
  'ALL = NOPASSWD: /usr/bin/salt-key *',
  'ALL = NOPASSWD: /usr/bin/puppet cert *',
  'ALL = NOPASSWD: /usr/bin/puppet agent -t -v',
+ 'ALL = NOPASSWD: /usr/local/bin/changepw',
  'ALL = (syslog) NOPASSWD: ALL']
   perf-roots:
 gid: 766

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: add vcs::listen_addresses for codfw

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: phabricator: add vcs::listen_addresses for codfw
..


phabricator: add vcs::listen_addresses for codfw

Add the phabricator VCS listen address for codfw,
added to DNS in I2e1d2114a6c048e50.

This will be the equivalent to iridium-vcs.eqiad.wmnet
(renamed to phab1001-vcs.eqiad.wmnet) = 10.64.32.186
but for codfw.

We need to adjust puppet manifests to use the right IP
for the right datacenter and not the same IP on both,
leading to problems like T143363.

There are more changes needed but this is a start of it,
compare to existing hieradata/role/eqiad/phabricator/main.yaml.

Bug: T143363
Change-Id: I4c5709a2561f3af24364c76df97032fde4b19c65
---
A hieradata/role/codfw/phabricator/main.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  20after4: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/hieradata/role/codfw/phabricator/main.yaml 
b/hieradata/role/codfw/phabricator/main.yaml
new file mode 100644
index 000..70a50a0
--- /dev/null
+++ b/hieradata/role/codfw/phabricator/main.yaml
@@ -0,0 +1,3 @@
+phabricator::vcs::listen_addresses:
+  - "10.192.32.149"
+  - "[2620:0:860:103:10:192:32:149]"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c5709a2561f3af24364c76df97032fde4b19c65
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix ve.test.utils.createSurfaceFromHtml

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Fix ve.test.utils.createSurfaceFromHtml
..

Fix ve.test.utils.createSurfaceFromHtml

Was passing an HTMLDocument instead of a DM document.
This wasn't failing because the UI surface constructor accepts
HTMLDocuments.

Change-Id: Ibb9a32de4d86295dddc5a677c180ea9c706a1983
---
M tests/ve.test.utils.js
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/53/318653/1

diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js
index 4812066..0a5006c 100644
--- a/tests/ve.test.utils.js
+++ b/tests/ve.test.utils.js
@@ -243,7 +243,9 @@
 * @return {ve.ui.Surface} UI surface
 */
ve.test.utils.createSurfaceFromHtml = function ( html ) {
-   return this.createSurfaceFromDocument( 
ve.createDocumentFromHtml( html ) );
+   return this.createSurfaceFromDocument(
+   ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( html ) )
+   );
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb9a32de4d86295dddc5a677c180ea9c706a1983
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mgmt: add missing # in changepw script and some spaces

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mgmt: add missing # in changepw script and some spaces
..


mgmt: add missing # in changepw script and some spaces

Change-Id: I53f91162fc55896247f4dc7c0f872ed5829f4d60
---
M modules/mgmt/files/changepw
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/modules/mgmt/files/changepw b/modules/mgmt/files/changepw
index 2a4c315..66a1cc1 100644
--- a/modules/mgmt/files/changepw
+++ b/modules/mgmt/files/changepw
@@ -1,7 +1,7 @@
-!/bin/bash
+#!/bin/bash
 # change the password of a DRAC mgmt interface
 # (c) Papaul Tshibamba, Wikimedia Foundation Inc. 2016
-#sshpass needs to be installed on the host from where this script will run
+# sshpass needs to be installed on the host from where this script will run
 echo -n "Enter iDRAC root password (password will not be displayed):"
 read -s DRACPASS
 echo
@@ -9,11 +9,11 @@
 read -s DRAC_NEW_PASS
 echo
 
-#Host ip list file location
+# Host ip list file location
 host_list=ip_list.txt
-#Dell Racadm command
-#sshpass -p "$DRACPASS" ssh -o StrictHostKeyChecking=no root@$host_ip racadm 
config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "$DRAC_NEW_PASS"
-#Logfile to keep the logs of the execution
+# Dell Racadm command
+# sshpass -p "$DRACPASS" ssh -o StrictHostKeyChecking=no root@$host_ip racadm 
config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "$DRAC_NEW_PASS"
+# Logfile to keep the logs of the execution
 logfile=config.log
 
 #get a list of IPs for the servers
@@ -21,11 +21,11 @@
 cat $host_list
 }
 
-#check if the file with the hosts IPs exist
+# check if the file with the hosts IPs exists
 if [ ! -r $host_list ]; then
 echo "IP address file $host_list not found or cannot be read"
 exit
-#Make a log file. The logfile gets overwritten at each exection
+# Make a log file. The logfile gets overwritten at each execution
 else echo "Starting Bash configuration of Dell Drac for file 
$host_list" >$logfile
 fi
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53f91162fc55896247f4dc7c0f872ed5829f4d60
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Papaul 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mgmt: add missing # in changepw script and some spaces

2016-10-28 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mgmt: add missing # in changepw script and some spaces
..

mgmt: add missing # in changepw script and some spaces

Change-Id: I53f91162fc55896247f4dc7c0f872ed5829f4d60
---
M modules/mgmt/files/changepw
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/318652/1

diff --git a/modules/mgmt/files/changepw b/modules/mgmt/files/changepw
index 2a4c315..66a1cc1 100644
--- a/modules/mgmt/files/changepw
+++ b/modules/mgmt/files/changepw
@@ -1,7 +1,7 @@
-!/bin/bash
+#!/bin/bash
 # change the password of a DRAC mgmt interface
 # (c) Papaul Tshibamba, Wikimedia Foundation Inc. 2016
-#sshpass needs to be installed on the host from where this script will run
+# sshpass needs to be installed on the host from where this script will run
 echo -n "Enter iDRAC root password (password will not be displayed):"
 read -s DRACPASS
 echo
@@ -9,11 +9,11 @@
 read -s DRAC_NEW_PASS
 echo
 
-#Host ip list file location
+# Host ip list file location
 host_list=ip_list.txt
-#Dell Racadm command
-#sshpass -p "$DRACPASS" ssh -o StrictHostKeyChecking=no root@$host_ip racadm 
config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "$DRAC_NEW_PASS"
-#Logfile to keep the logs of the execution
+# Dell Racadm command
+# sshpass -p "$DRACPASS" ssh -o StrictHostKeyChecking=no root@$host_ip racadm 
config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "$DRAC_NEW_PASS"
+# Logfile to keep the logs of the execution
 logfile=config.log
 
 #get a list of IPs for the servers
@@ -21,11 +21,11 @@
 cat $host_list
 }
 
-#check if the file with the hosts IPs exist
+# check if the file with the hosts IPs exists
 if [ ! -r $host_list ]; then
 echo "IP address file $host_list not found or cannot be read"
 exit
-#Make a log file. The logfile gets overwritten at each exection
+# Make a log file. The logfile gets overwritten at each execution
 else echo "Starting Bash configuration of Dell Drac for file 
$host_list" >$logfile
 fi
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Test: Do not merge

2016-10-28 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Test: Do not merge
..

Test: Do not merge

Change-Id: Iec9221c75376f95266a5e61bdc4651beb5e17532
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/318651/1


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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: build: Remove obsolete csscomb rules

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Remove obsolete csscomb rules
..


build: Remove obsolete csscomb rules

Removing obsolete csscomb rules as stylelint has taken its place.

Change-Id: Icf476b1bcaf3ed227cffcfc07874494009c38d08
---
M .csscomb.json
1 file changed, 0 insertions(+), 21 deletions(-)

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



diff --git a/.csscomb.json b/.csscomb.json
index b6635a3..c913d61 100644
--- a/.csscomb.json
+++ b/.csscomb.json
@@ -1,24 +1,3 @@
 {
-   "remove-empty-rulesets": true,
-   "always-semicolon": true,
-   "color-case": "lower",
-   "block-indent": "\t",
-   "color-shorthand": true,
-   "element-case": "lower",
-   "eof-newline": true,
-   "leading-zero": true,
-   "quotes": "single",
-   "space-before-colon": "",
-   "space-after-colon": " ",
-   "space-before-combinator": " ",
-   "space-after-combinator": " ",
-   "space-between-declarations": "\n",
-   "space-before-opening-brace": " ",
-   "space-after-opening-brace": "\n",
-   "space-after-selector-delimiter": "\n",
-   "space-before-selector-delimiter": "",
-   "space-before-closing-brace": "\n",
-   "strip-spaces": true,
-   "unitless-zero": true,
"vendor-prefix-align": true
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf476b1bcaf3ed227cffcfc07874494009c38d08
Gerrit-PatchSet: 3
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: script to change mgmt password

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: script to change mgmt password
..


script to change mgmt password

Change-Id: Iae0ca122cc471a1623d821ed72046fab6d40e942
---
A modules/mgmt/files/changepw
M modules/mgmt/manifests/init.pp
2 files changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/modules/mgmt/files/changepw b/modules/mgmt/files/changepw
new file mode 100644
index 000..2a4c315
--- /dev/null
+++ b/modules/mgmt/files/changepw
@@ -0,0 +1,46 @@
+!/bin/bash
+# change the password of a DRAC mgmt interface
+# (c) Papaul Tshibamba, Wikimedia Foundation Inc. 2016
+#sshpass needs to be installed on the host from where this script will run
+echo -n "Enter iDRAC root password (password will not be displayed):"
+read -s DRACPASS
+echo
+echo -n "Enter IDRAC root new password (password will not be displayed):"
+read -s DRAC_NEW_PASS
+echo
+
+#Host ip list file location
+host_list=ip_list.txt
+#Dell Racadm command
+#sshpass -p "$DRACPASS" ssh -o StrictHostKeyChecking=no root@$host_ip racadm 
config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "$DRAC_NEW_PASS"
+#Logfile to keep the logs of the execution
+logfile=config.log
+
+#get a list of IPs for the servers
+function getServers () {
+cat $host_list
+}
+
+#check if the file with the hosts IPs exist
+if [ ! -r $host_list ]; then
+echo "IP address file $host_list not found or cannot be read"
+exit
+#Make a log file. The logfile gets overwritten at each exection
+else echo "Starting Bash configuration of Dell Drac for file 
$host_list" >$logfile
+fi
+
+
+for host_ip in $(getServers); do
+echo "" >> $logfile
+echo "Changing DRAC password for  $host_ip " >>$logfile
+
+sshpass -p "$DRACPASS" ssh -o StrictHostKeyChecking=no root@$host_ip 
racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "$DRAC_NEW_PASS" 
>>$logfile 2>&1
+
+if [ $? -ne 0 ]; then
+echo "Failed. See logfile for details"
+else
+echo "DRAC configured successfully on $host_ip"
+fi
+done <$host_list
+echo " complete"
+
diff --git a/modules/mgmt/manifests/init.pp b/modules/mgmt/manifests/init.pp
index e7a8bc8..0a7a896 100644
--- a/modules/mgmt/manifests/init.pp
+++ b/modules/mgmt/manifests/init.pp
@@ -6,5 +6,11 @@
 package { 'sshpass':
 ensure => present,
 }
+file { '/usr/local/bin/changepw':
+mode   => '0500',
+owner  => 'root',
+group  => 'root',
+source => 'puppet:///modules/mgmt/changepw',
 
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae0ca122cc471a1623d821ed72046fab6d40e942
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Cmjohnson 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobH 
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...CategoryTree[master]: Replace array( ... ) by [ ... ] in PHP

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace array( ... ) by [ ... ] in PHP
..


Replace array( ... ) by [ ... ] in PHP

Change-Id: Ib41735975aa242709846a5f3acd04e540dd2cfd4
---
M ApiCategoryTree.php
M CategoryPageSubclass.php
M CategoryTree.alias.php
M CategoryTree.hooks.php
M CategoryTree.i18n.magic.php
M CategoryTree.i18n.php
M CategoryTreeFunctions.php
M CategoryTreePage.php
8 files changed, 498 insertions(+), 498 deletions(-)

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



diff --git a/ApiCategoryTree.php b/ApiCategoryTree.php
index 4a417cf..3be6dc9 100644
--- a/ApiCategoryTree.php
+++ b/ApiCategoryTree.php
@@ -3,7 +3,7 @@
 class ApiCategoryTree extends ApiBase {
public function execute() {
$params = $this->extractRequestParams();
-   $options = array();
+   $options = [];
if ( isset( $params['options'] ) ) {
$options = FormatJson::decode( $params['options'] );
if ( !is_object( $options ) ) {
@@ -46,10 +46,10 @@
$params = $this->extractRequestParams();
$title = CategoryTree::makeTitle( $params['category'] );
return wfGetDB( DB_SLAVE )->selectField( 'page', 
'page_touched',
-   array(
+   [
'page_namespace' => NS_CATEGORY,
'page_title' => $title->getDBkey(),
-   ),
+   ],
__METHOD__
);
}
@@ -89,10 +89,10 @@
 
$wgMemc->set(
$mckey,
-   array(
+   [
'timestamp' => wfTimestampNow(),
'value' => $html
-   ),
+   ],
86400
);
}
@@ -100,15 +100,15 @@
}
 
public function getAllowedParams() {
-   return array(
-   'category' => array(
+   return [
+   'category' => [
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true,
-   ),
-   'options' => array(
+   ],
+   'options' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   );
+   ],
+   ];
}
 
public function isInternal() {
diff --git a/CategoryPageSubclass.php b/CategoryPageSubclass.php
index a37c602..f71f261 100644
--- a/CategoryPageSubclass.php
+++ b/CategoryPageSubclass.php
@@ -53,7 +53,7 @@
}
 
function clearCategoryState() {
-   $this->child_cats = array();
+   $this->child_cats = [];
parent::clearCategoryState();
}
 
diff --git a/CategoryTree.alias.php b/CategoryTree.alias.php
index e92d626..043be2a 100644
--- a/CategoryTree.alias.php
+++ b/CategoryTree.alias.php
@@ -10,494 +10,494 @@
  */
 // @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'CategoryTree' => array( 'CategoryTree' ),
-);
+$specialPageAliases['en'] = [
+   'CategoryTree' => [ 'CategoryTree' ],
+];
 
 /** Afrikaans (Afrikaans) */
-$specialPageAliases['af'] = array(
-   'CategoryTree' => array( 'KategorieBoom' ),
-);
+$specialPageAliases['af'] = [
+   'CategoryTree' => [ 'KategorieBoom' ],
+];
 
 /** Aragonese (aragonés) */
-$specialPageAliases['an'] = array(
-   'CategoryTree' => array( 'Árbol_de_categorías' ),
-);
+$specialPageAliases['an'] = [
+   'CategoryTree' => [ 'Árbol_de_categorías' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'CategoryTree' => array( 'شجرة_تصنيف' ),
-);
+$specialPageAliases['ar'] = [
+   'CategoryTree' => [ 'شجرة_تصنيف' ],
+];
 
 /** Aramaic (ܐܪܡܝܐ) */
-$specialPageAliases['arc'] = array(
-   'CategoryTree' => array( 'ܐܝܠܢܐ_ܕܣܕܪܐ' ),
-);
+$specialPageAliases['arc'] = [
+   'CategoryTree' => [ 'ܐܝܠܢܐ_ܕܣܕܪܐ' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'CategoryTree' => array( 'شجرة_تصنيف' ),
-);
+$specialPageAliases['arz'] = [
+   'CategoryTree' => [ 'شجرة_تصنيف' ],
+];
 
 /** Assamese (অসমীয়া) */
-$specialPageAliases['as'] = array(
-   'CategoryTree' => array( 'শ্ৰেণীবৃক্ষ' ),
-);
+$specialPageAliases['as'] = [
+   'CategoryTree' => [ 'শ্ৰেণীবৃক্ষ' ],

[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Use [] instead of array() syntax for PHP

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use [] instead of array() syntax for PHP
..


Use [] instead of array() syntax for PHP

Change-Id: I5b89aacb9c0d0640e3045a642421633ad3646961
---
M TocTree.hooks.php
M TocTree.i18n.php
M TocTree.php
3 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/TocTree.hooks.php b/TocTree.hooks.php
index 6edc22f..cd477ca 100644
--- a/TocTree.hooks.php
+++ b/TocTree.hooks.php
@@ -24,17 +24,17 @@
 * @return bool
 */
public static function onTocPreferences( User $user, array 
&$preferences ) {
-   $preferences['toc-expand'] = array(
+   $preferences['toc-expand'] = [
'type' => 'toggle',
'label-message' => 'toctree-tog-expand',
'section' => 'misc/toctree',
-   );
+   ];
 
-   $preferences['toc-floated'] = array(
+   $preferences['toc-floated'] = [
'type' => 'toggle',
'label-message' => 'toctree-tog-floated',
'section' => 'misc/toctree',
-   );
+   ];
 
return true;
}
diff --git a/TocTree.i18n.php b/TocTree.i18n.php
index 6e7aa26..d5d53cd 100644
--- a/TocTree.i18n.php
+++ b/TocTree.i18n.php
@@ -10,10 +10,10 @@
  *
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
-$messages = array();
+$messages = [];
 if ( !function_exists( 'wfJsonI18nShimbe1c9ea43bd38a62' ) ) {
function wfJsonI18nShimbe1c9ea43bd38a62( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
$fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
diff --git a/TocTree.php b/TocTree.php
index 7fc2605..3d9a2af 100644
--- a/TocTree.php
+++ b/TocTree.php
@@ -30,20 +30,20 @@
 $wgDefaultUserOptions['toc-expand'] = false;
 
 // resources
-$wgResourceModules['ext.toctree'] = array(
+$wgResourceModules['ext.toctree'] = [
'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'TocTree/modules',
'styles' => 'ext.toctree.css',
'scripts' => 'ext.toctree.js',
-);
+];
 
 // credits
-$wgExtensionCredits['parserhook'][] = array(
+$wgExtensionCredits['parserhook'][] = [
'path' => __FILE__,
'name' => 'TocTree',
'url' => '//www.mediawiki.org/wiki/Extension:TocTree',
'descriptionmsg' => 'toctree-desc',
-   'author' => array( 'Roland Unger', 'Matthias Mullie' ),
+   'author' => [ 'Roland Unger', 'Matthias Mullie' ],
'version' => '1.12.0',
'license-name' => 'GPL-2.0+'
-);
+];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b89aacb9c0d0640e3045a642421633ad3646961
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: script to change mgmt password

2016-10-28 Thread Papaul (Code Review)
Papaul has uploaded a new change for review.

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

Change subject: script to change mgmt password
..

script to change mgmt password

Change-Id: Iae0ca122cc471a1623d821ed72046fab6d40e942
---
M modules/mgmt/manifests/init.pp
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/318650/1

diff --git a/modules/mgmt/manifests/init.pp b/modules/mgmt/manifests/init.pp
index e7a8bc8..5fcae34 100644
--- a/modules/mgmt/manifests/init.pp
+++ b/modules/mgmt/manifests/init.pp
@@ -6,5 +6,11 @@
 package { 'sshpass':
 ensure => present,
 }
-
+file { '/usr/local/bin/changepw':
+mode   => '0500',
+owner  => 'root',
+group  => 'root',
+source => 'puppet:///modules/mgmt/changepw',
+ 
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove rules which have been moved upstream

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove rules which have been moved upstream
..


Remove rules which have been moved upstream

Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4
---
M .eslintrc.json
M Gruntfile.js
2 files changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index 10222e1..d9b251f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,8 +15,6 @@
},
"rules": {
"dot-notation": 0,
-   "wrap-iife": 0,
-   "no-console": "error",
-   "spaced-comment": ["error", "always", { "exceptions": ["*", 
"!"] }]
+   "wrap-iife": 0
}
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index aec1229..4e5e86b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -5,6 +5,7 @@
  */
 
 /* eslint-env node */
+
 module.exports = function ( grunt ) {
var modules = grunt.file.readJSON( 'build/modules.json' ),
moduleUtils = require( './build/moduleUtils' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
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...CentralAuth[master]: Retry failed centrallogin checks from master

2016-10-28 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Retry failed centrallogin checks from master
..

Retry failed centrallogin checks from master

Bug: T149356
Change-Id: I4bcfcc0f0f04ec2977d504a3934c44602dc16a21
---
M includes/specials/SpecialCentralLogin.php
1 file changed, 42 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/49/318649/1

diff --git a/includes/specials/SpecialCentralLogin.php 
b/includes/specials/SpecialCentralLogin.php
index e5c9a88..eaeaa70 100644
--- a/includes/specials/SpecialCentralLogin.php
+++ b/includes/specials/SpecialCentralLogin.php
@@ -74,14 +74,29 @@
return;
}
 
+   $getException = function( CentralAuthUser $centralUser, User 
$user, array $info ) {
+   if ( !$centralUser->exists() ) { // sanity
+   return new Exception( "Global user 
'{$info['name']}' does not exist." );
+   } elseif ( $centralUser->getId() !== $info['guid'] ) { 
// sanity
+   return new Exception( "Global user does not 
have ID '{$info['guid']}'." );
+   } elseif ( !$centralUser->isAttached() && 
!$user->isAnon() ) { // sanity
+   return new Exception( "User '{$info['name']}' 
exists locally but is not attached." );
+   }
+   return null;
+   };
+
$user = User::newFromName( $info['name'] );
$centralUser = CentralAuthUser::getInstance( $user );
-   if ( !$centralUser->exists() ) { // sanity
-   throw new Exception( "Global user '{$info['name']}' 
does not exist." );
-   } elseif ( $centralUser->getId() !== $info['guid'] ) { // sanity
-   throw new Exception( "Global user does not have ID 
'{$info['guid']}'." );
-   } elseif ( !$centralUser->isAttached() && !$user->isAnon() ) { 
// sanity
-   throw new Exception( "User '{$info['name']}' exists 
locally but is not attached." );
+   if ( $getException( $centralUser, $user, $info ) ) {
+   // Retry from master. Central login is done right after 
user creation so lag problems
+   // are common.
+   $user = User::newFromName( $info['name'] );
+   $user->load( User::READ_LATEST );
+   $centralUser = CentralAuthUser::getMasterInstance( 
$user );
+   $e = $getException( $centralUser, $user, $info );
+   if ( $e ) {
+   throw $e;
+   }
}
 
$session = CentralAuthUtils::getCentralSession();
@@ -198,16 +213,29 @@
return;
}
 
+   $getException = function ( CentralAuthUser $centralUser, User 
$user ) {
+   if ( !$user || !$user->getId() ) { // sanity
+   return new Exception( "The user account logged 
into does not exist." );
+   }
+   if ( !$centralUser->getId() ) { // sanity
+   return new Exception( "The central user account 
does not exist." );
+   }
+   if ( !$centralUser->isAttached() ) { // sanity
+   return new Exception( "The user account is not 
attached." );
+   }
+   return null;
+   };
+
$user = User::newFromName( $request->getSessionData( 
'wsUserName' ) );
-   if ( !$user || !$user->getId() ) { // sanity
-   throw new Exception( "The user account logged into does 
not exist." );
-   }
$centralUser = CentralAuthUser::getInstance( $user );
-   if ( !$centralUser->getId() ) { // sanity
-   throw new Exception( "The central user account does not 
exist." );
-   }
-   if ( !$centralUser->isAttached() ) { // sanity
-   throw new Exception( "The user account is not 
attached." );
+   if ( $getException( $centralUser, $user ) ) {
+   $user = User::newFromName( $request->getSessionData( 
'wsUserName' ) );
+   $user->load( User::READ_LATEST );
+   $centralUser = CentralAuthUser::getMasterInstance( 
$user );
+   $e = $getException( $centralUser, $user );
+   if ( $e ) {
+   throw $e;
+   }
}
 
// Delete the temporary token

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] operations/dns[master]: add git-ssh.codfw.wikimedia.org service IP

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: add git-ssh.codfw.wikimedia.org service IP
..


add git-ssh.codfw.wikimedia.org service IP

We will need git-ssh.codfw.wikimedia.org. equivalent
to the existing git-ssh.eqiad.wikimedia.org. to fix
the puppetization of phab2001.

See hieradata/role/eqiad/phabricator/main.yaml
for the realserver_ips and listen_addresses. These currently
don't exist for codfw and are hardcoded to the eqiad addreses
in modules/role/manifests/phabricator/main.pp.

To make that flexible we have to add this first.

Bug: T143363
Change-Id: I8a439c3e70d90685f9028f18a0b0768d82555a5f
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  20after4: Looks good to me, but someone else must approve
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 3cc4534..07e0d3d 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -199,6 +199,7 @@
 $ORIGIN 3.0.0.0.0.0.0.0.0.0.0.0.a.1.d.e.{{ zonename }}.
 
 d.0.0.0 1H IN PTR  misc-web-lb.codfw.wikimedia.org.
+a.f.0.0 1H IN PTR  git-ssh.codfw.wikimedia.org.
 e.f.0.0 1H IN PTR  dns-rec-lb.codfw.wikimedia.org.
 
 ; Neighbor blocks
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index 1f623db..fc79040 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -146,4 +146,6 @@
 
 248  1H  IN PTR misc-web-lb.codfw.wikimedia.org.
 
+250  1H  IN PTR git-ssh.codfw.wikimedia.org.
+
 254  1H  IN PTR dns-rec-lb.codfw.wikimedia.org. ; not actually public!
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index b716bc3..b20c957 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -234,9 +234,9 @@
 ores600 IN DYNA geoip!misc-addrs
 
 git-ssh.eqiad   1H  IN A208.80.154.250
-1H  IN  2620:0:861:ed1a::3:16
+git-ssh.eqiad   1H  IN  2620:0:861:ed1a::3:16
 git-ssh 1H  IN A208.80.154.250
-1H  IN  2620:0:861:ed1a::3:16
+git-ssh 1H  IN  2620:0:861:ed1a::3:16
 
 ;;; ulsfo
 text-lb.ulsfo   600 IN DYNA geoip!text-addrs/ulsfo
@@ -256,6 +256,9 @@
 misc-web-lb.codfw   600 IN DYNA geoip!misc-addrs/codfw
 donate-lb.codfw 600 IN DYNA geoip!text-addrs/codfw
 
+git-ssh.codfw   1H  IN A208.80.153.250
+git-ssh.codfw   1H  IN  2620:0:860:ed1a::3:fa
+
 ;;; esams
 text-lb.esams   600 IN DYNA geoip!text-addrs/esams
 upload-lb.esams 600 IN DYNA geoip!upload-addrs/esams

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a439c3e70d90685f9028f18a0b0768d82555a5f
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: jsduck: Move UnicodeJS and OOUI into Upstream

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: jsduck: Move UnicodeJS and OOUI into Upstream
..


jsduck: Move UnicodeJS and OOUI into Upstream

Change-Id: I570a47eac1719ce65a26a6ede1c78205030301e2
---
M .jsduck/categories.json
1 file changed, 28 insertions(+), 38 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 53fbe89..a0281cd 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -225,8 +225,19 @@
]
},
{
-   "name": "UnicodeJS",
+   "name": "Upstream",
"groups": [
+   {
+   "name": "OOjs",
+   "classes": [
+   "OO",
+   "OO.EmitterList",
+   "OO.EventEmitter",
+   "OO.Factory",
+   "OO.Registry",
+   "OO.SortedEmitterList"
+   ]
+   },
{
"name": "UnicodeJS",
"classes": [
@@ -236,14 +247,9 @@
"unicodeJS.graphemebreak",
"unicodeJS.characterclass"
]
-   }
-   ]
-   },
-   {
-   "name": "OOjs UI",
-   "groups": [
+   },
{
-   "name": "General",
+   "name": "OOjs UI General",
"classes": [
"OO.ui",
"OO.ui.Element",
@@ -258,52 +264,36 @@
]
},
{
-   "name": "Factories",
-   "classes": ["OO.ui.*Factory"]
-   },
-   {
-   "name": "Tools",
-   "classes": ["OO.ui.*Tool"]
-   },
-   {
-   "name": "Mixins",
+   "name": "OOjs UI Mixins",
"classes": ["OO.ui.mixin", "OO.ui.mixin.*"]
},
{
-   "name": "Layouts",
+   "name": "OOjs UI Factories",
+   "classes": ["OO.ui.*Factory"]
+   },
+   {
+   "name": "OOjs UI Layouts",
"classes": ["OO.ui.*Layout"]
},
{
-   "name": "Tool groups",
+   "name": "OOjs UI Tool groups",
"classes": ["OO.ui.*ToolGroup"]
},
{
-   "name": "Widgets",
+   "name": "OOjs UI Tools",
+   "classes": ["OO.ui.*Tool"]
+   },
+   {
+   "name": "OOjs UI Widgets",
"classes": ["OO.ui.*Widget"]
},
{
-   "name": "Dialogs",
+   "name": "OOjs UI Dialogs",
"classes": ["OO.ui.*Dialog"]
},
{
-   "name": "Themes",
+   "name": "OOjs UI Themes",
"classes": ["OO.ui.*Theme"]
-   }
-   ]
-   },
-   {
-   "name": "Upstream",
-   "groups": [
-   {
-   "name": "OOjs",
-   "classes": [
-   "OO",
-   "OO.EmitterList",
-   "OO.EventEmitter",
-   "OO.Factory",
-   "OO.Registry",
-   "OO.SortedEmitterList"
-   ]
},
{
"name": "jQuery",

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add LICENCE.txt for classList lib

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add LICENCE.txt for classList lib
..


Add LICENCE.txt for classList lib

Change-Id: I9ef57ace5ba439bdd92f808fb2d5ac5df1cfaa0d
---
A lib/classList/LICENCE.txt
1 file changed, 24 insertions(+), 0 deletions(-)

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



diff --git a/lib/classList/LICENCE.txt b/lib/classList/LICENCE.txt
new file mode 100644
index 000..68a49da
--- /dev/null
+++ b/lib/classList/LICENCE.txt
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ef57ace5ba439bdd92f808fb2d5ac5df1cfaa0d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: add swift.svc CNAME for codfw/eqiad

2016-10-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: add swift.svc CNAME for codfw/eqiad
..


add swift.svc CNAME for codfw/eqiad

Convenience CNAME to avoid hardcoding ms-fe which is specific to media-storage.

Bug: T149098
Change-Id: I8483e97ec1639004767cce75faa7d5b653db2928
---
M templates/wmnet
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/wmnet b/templates/wmnet
index 4135333..509d97f 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -4058,6 +4058,7 @@
 prometheus  1H  IN A10.2.2.25
 
 ms-fe   1H  IN A10.2.2.27
+swift   1H  IN CNAMEms-fe.svc.eqiad.wmnet.
 ms-fe-thumbs 1H IN A10.2.2.27
 parsoid 1H  IN A10.2.2.28
 search  1H  IN A10.2.2.30
@@ -4105,6 +4106,7 @@
 prometheus  1H  IN A10.2.1.25
 
 ms-fe   1H  IN A10.2.1.27
+swift   1H  IN CNAMEms-fe.svc.codfw.wmnet.
 ms-fe-thumbs1H  IN A10.2.1.27
 parsoid 1H  IN A10.2.1.28
 search  1H  IN A10.2.1.30

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8483e97ec1639004767cce75faa7d5b653db2928
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: add phab2001-vcs.codfw.wmnet

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: add phab2001-vcs.codfw.wmnet
..


add phab2001-vcs.codfw.wmnet

Add the missing phab2001-vcs.codfw.wmnet for phab2001,
just like phab1001/iridium has iridium/phab1001-vcs.

Bug: T143363
Change-Id: I2e1d2114a6c048e50beaaf77a160aadac425a6a9
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/10.in-addr.arpa
M templates/wmnet
3 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 1470b45..3cc4534 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -105,6 +105,7 @@
 7.1.1.0.2.3.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2018.codfw.wmnet.
 
 7.4.1.0.2.3.0.0.2.9.1.0.0.1.0.0 1H IN PTR   phab2001.codfw.wmnet.
+9.4.1.0.2.3.0.0.2.9.1.0.0.1.0.0 1H IN PTR   phab2001-vcs.codfw.wmnet.
 
 ; private1-d-codfw (2620:0:860:104::/64)
 $ORIGIN 4.0.1.0.{{ zonename }}.
diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 250ca14..f1b6769 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2951,6 +2951,7 @@
 146 1H IN PTR   maps2003.codfw.wmnet.
 147 1H IN PTR   phab2001.codfw.wmnet.
 148 1H IN PTR   wdqs2001.codfw.wmnet.
+149 1H IN PTR   phab2001-vcs.codfw.wmnet.
 
 $ORIGIN 33.192.{{ zonename }}.
 1   1H IN PTR   vl2019-eth2.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index fdf1b79..4135333 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2584,6 +2584,8 @@
 pc2006  1H  IN A10.192.48.39
 phab20011H  IN A10.192.32.147
 phab20011H  IN  2620:0:860:103:10:192:32:147
+phab2001-vcs1H  IN A10.192.32.149
+phab2001-vcs1H  IN  2620:0:860:103:10:192:32:149
 prometheus2001  1H  IN A10.192.16.181 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 1H  IN  2620:0:860:102:10:192:16:181
 prometheus2002  1H  IN A10.192.16.182 ; VM on the ganeti01.svc.codfw.wmnet 
cluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e1d2114a6c048e50beaaf77a160aadac425a6a9
Gerrit-PatchSet: 3
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add LICENCE.txt for classList lib

2016-10-28 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Add LICENCE.txt for classList lib
..

Add LICENCE.txt for classList lib

Change-Id: I9ef57ace5ba439bdd92f808fb2d5ac5df1cfaa0d
---
A lib/classList/LICENCE.txt
1 file changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/47/318647/1

diff --git a/lib/classList/LICENCE.txt b/lib/classList/LICENCE.txt
new file mode 100644
index 000..68a49da
--- /dev/null
+++ b/lib/classList/LICENCE.txt
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ef57ace5ba439bdd92f808fb2d5ac5df1cfaa0d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: add swift.svc CNAME for codfw/eqiad

2016-10-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: add swift.svc CNAME for codfw/eqiad
..

add swift.svc CNAME for codfw/eqiad

Convenience CNAME to avoid hardcoding ms-fe which is specific to media-storage.

Bug: T149098
Change-Id: I8483e97ec1639004767cce75faa7d5b653db2928
---
M templates/wmnet
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/46/318646/1

diff --git a/templates/wmnet b/templates/wmnet
index fdf1b79..8551ed0 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -4056,6 +4056,7 @@
 prometheus  1H  IN A10.2.2.25
 
 ms-fe   1H  IN A10.2.2.27
+swift   1H  IN CNAMEms-fe.svc.eqiad.wmnet.
 ms-fe-thumbs 1H IN A10.2.2.27
 parsoid 1H  IN A10.2.2.28
 search  1H  IN A10.2.2.30
@@ -4103,6 +4104,7 @@
 prometheus  1H  IN A10.2.1.25
 
 ms-fe   1H  IN A10.2.1.27
+swift   1H  IN CNAMEms-fe.svc.codfw.wmnet.
 ms-fe-thumbs1H  IN A10.2.1.27
 parsoid 1H  IN A10.2.1.28
 search  1H  IN A10.2.1.30

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8483e97ec1639004767cce75faa7d5b653db2928
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: jsduck: Move UnicodeJS and OOUI into Upstream

2016-10-28 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: jsduck: Move UnicodeJS and OOUI into Upstream
..

jsduck: Move UnicodeJS and OOUI into Upstream

Change-Id: I570a47eac1719ce65a26a6ede1c78205030301e2
---
M .jsduck/categories.json
1 file changed, 28 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/48/318648/1

diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 53fbe89..a0281cd 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -225,8 +225,19 @@
]
},
{
-   "name": "UnicodeJS",
+   "name": "Upstream",
"groups": [
+   {
+   "name": "OOjs",
+   "classes": [
+   "OO",
+   "OO.EmitterList",
+   "OO.EventEmitter",
+   "OO.Factory",
+   "OO.Registry",
+   "OO.SortedEmitterList"
+   ]
+   },
{
"name": "UnicodeJS",
"classes": [
@@ -236,14 +247,9 @@
"unicodeJS.graphemebreak",
"unicodeJS.characterclass"
]
-   }
-   ]
-   },
-   {
-   "name": "OOjs UI",
-   "groups": [
+   },
{
-   "name": "General",
+   "name": "OOjs UI General",
"classes": [
"OO.ui",
"OO.ui.Element",
@@ -258,52 +264,36 @@
]
},
{
-   "name": "Factories",
-   "classes": ["OO.ui.*Factory"]
-   },
-   {
-   "name": "Tools",
-   "classes": ["OO.ui.*Tool"]
-   },
-   {
-   "name": "Mixins",
+   "name": "OOjs UI Mixins",
"classes": ["OO.ui.mixin", "OO.ui.mixin.*"]
},
{
-   "name": "Layouts",
+   "name": "OOjs UI Factories",
+   "classes": ["OO.ui.*Factory"]
+   },
+   {
+   "name": "OOjs UI Layouts",
"classes": ["OO.ui.*Layout"]
},
{
-   "name": "Tool groups",
+   "name": "OOjs UI Tool groups",
"classes": ["OO.ui.*ToolGroup"]
},
{
-   "name": "Widgets",
+   "name": "OOjs UI Tools",
+   "classes": ["OO.ui.*Tool"]
+   },
+   {
+   "name": "OOjs UI Widgets",
"classes": ["OO.ui.*Widget"]
},
{
-   "name": "Dialogs",
+   "name": "OOjs UI Dialogs",
"classes": ["OO.ui.*Dialog"]
},
{
-   "name": "Themes",
+   "name": "OOjs UI Themes",
"classes": ["OO.ui.*Theme"]
-   }
-   ]
-   },
-   {
-   "name": "Upstream",
-   "groups": [
-   {
-   "name": "OOjs",
-   "classes": [
-   "OO",
-   "OO.EmitterList",
-   "OO.EventEmitter",
-   "OO.Factory",
-   "OO.Registry",
-   "OO.SortedEmitterList"
-   ]
},
{
"name": "jQuery",

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

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Account creation throttle exemption for WMCL editathon

2016-10-28 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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

Change subject: Account creation throttle exemption for WMCL editathon
..

Account creation throttle exemption for WMCL editathon

This patch adds an exemption to the account creation throttle
for use at a Wikipedia edit-a-thon to be organised on 2016-11-20
at the Working Class Movement Library in Salford, Manchester.

Bug: T149443
Change-Id: I1bafe3a7550ae12d8036889bc28909db413b8c5b
---
M wmf-config/throttle.php
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/45/318645/1

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 52b104a..d086fd5 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -54,6 +54,14 @@
'value' => 30 //25 expected
 ];
 
+$wmgThrottlingExceptions[] = [ // T149443
+   'from' => '2016-11-20T09:00 -0:00',
+   'to' => '2016-11-20T17:00 -0:00',
+   'range' => '146.87.210.102',
+   'dbname' => [ 'enwiki', 'commonswiki' ],
+   'value' => 30
+];
+
 ## Add throttling definitions above.
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bafe3a7550ae12d8036889bc28909db413b8c5b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make updateCategoryCounts() have better lag checks

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make updateCategoryCounts() have better lag checks
..


Make updateCategoryCounts() have better lag checks

* Add the lag checks to LinksUpdate. Previously, only
  LinksDeletionUpdate had any such checks.
* Remove the transaction hook usage, since the only two callers are
  already lag/contention aware. Deferring them just makes the wait
  checks pointless and they might end up happening all at once.
* Also set the visibility on some neigboring methods.
* Clean up LinksUpdate $existing variables in passing. Instead of
  overriding the same variable, use a differently named variable
  to avoid mistakes.

Bug: T95501
Change-Id: I43e3af17399417cbf0ab4e5e7d1f2bd518fa7e90
---
M includes/deferred/LinksUpdate.php
M includes/page/WikiPage.php
2 files changed, 160 insertions(+), 129 deletions(-)

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



diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index c7d378e..229a9a2 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -205,63 +205,84 @@
 
protected function doIncrementalUpdate() {
# Page links
-   $existing = $this->getExistingLinks();
-   $this->linkDeletions = $this->getLinkDeletions( $existing );
-   $this->linkInsertions = $this->getLinkInsertions( $existing );
+   $existingPL = $this->getExistingLinks();
+   $this->linkDeletions = $this->getLinkDeletions( $existingPL );
+   $this->linkInsertions = $this->getLinkInsertions( $existingPL );
$this->incrTableUpdate( 'pagelinks', 'pl', 
$this->linkDeletions, $this->linkInsertions );
 
# Image links
-   $existing = $this->getExistingImages();
-   $imageDeletes = $this->getImageDeletions( $existing );
-   $this->incrTableUpdate( 'imagelinks', 'il', $imageDeletes,
-   $this->getImageInsertions( $existing ) );
+   $existingIL = $this->getExistingImages();
+   $imageDeletes = $this->getImageDeletions( $existingIL );
+   $this->incrTableUpdate(
+   'imagelinks',
+   'il',
+   $imageDeletes,
+   $this->getImageInsertions( $existingIL ) );
 
# Invalidate all image description pages which had links added 
or removed
-   $imageUpdates = $imageDeletes + array_diff_key( $this->mImages, 
$existing );
+   $imageUpdates = $imageDeletes + array_diff_key( $this->mImages, 
$existingIL );
$this->invalidateImageDescriptions( $imageUpdates );
 
# External links
-   $existing = $this->getExistingExternals();
-   $this->incrTableUpdate( 'externallinks', 'el', 
$this->getExternalDeletions( $existing ),
-   $this->getExternalInsertions( $existing ) );
+   $existingEL = $this->getExistingExternals();
+   $this->incrTableUpdate(
+   'externallinks',
+   'el',
+   $this->getExternalDeletions( $existingEL ),
+   $this->getExternalInsertions( $existingEL ) );
 
# Language links
-   $existing = $this->getExistingInterlangs();
-   $this->incrTableUpdate( 'langlinks', 'll', 
$this->getInterlangDeletions( $existing ),
-   $this->getInterlangInsertions( $existing ) );
+   $existingLL = $this->getExistingInterlangs();
+   $this->incrTableUpdate(
+   'langlinks',
+   'll',
+   $this->getInterlangDeletions( $existingLL ),
+   $this->getInterlangInsertions( $existingLL ) );
 
# Inline interwiki links
-   $existing = $this->getExistingInterwikis();
-   $this->incrTableUpdate( 'iwlinks', 'iwl', 
$this->getInterwikiDeletions( $existing ),
-   $this->getInterwikiInsertions( $existing ) );
+   $existingIW = $this->getExistingInterwikis();
+   $this->incrTableUpdate(
+   'iwlinks',
+   'iwl',
+   $this->getInterwikiDeletions( $existingIW ),
+   $this->getInterwikiInsertions( $existingIW ) );
 
# Template links
-   $existing = $this->getExistingTemplates();
-   $this->incrTableUpdate( 'templatelinks', 'tl', 
$this->getTemplateDeletions( $existing ),
-   $this->getTemplateInsertions( $existing ) );
+   $existingTL = $this->getExistingTemplates();
+   $this->incrTableUpdate(
+   

[MediaWiki-commits] [Gerrit] operations/dns[master]: Add service name "people" for rutherfordium

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Add service name "people" for rutherfordium
..


Add service name "people" for rutherfordium

Seriously, who can remember the name rutherfordium for something that
gets used very infrequently?

Change-Id: Id9c5b79f61ca640875b2acb60373b355281c9379
---
M templates/wmnet
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/templates/wmnet b/templates/wmnet
index 7612a1c..fdf1b79 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -34,6 +34,7 @@
 eventlogging1H  IN CNAMEeventlog1001.eqiad.wmnet.
 udplog  1H  IN CNAMEfluorine.eqiad.wmnet.
 deployment  1H  IN CNAMEtin.eqiad.wmnet.
+people  1H  IN CNAMErutherfordium.eqiad.wmnet.
 s1-master   5M  IN CNAMEdb1057.eqiad.wmnet.
 s2-master   5M  IN CNAMEdb1018.eqiad.wmnet.
 s3-master   5M  IN CNAMEdb1075.eqiad.wmnet.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9c5b79f61ca640875b2acb60373b355281c9379
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Add service name "people" for rutherfordium

2016-10-28 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Add service name "people" for rutherfordium
..

Add service name "people" for rutherfordium

Seriously, who can remember the name rutherfordium for something that
gets used very infrequently?

Change-Id: Id9c5b79f61ca640875b2acb60373b355281c9379
---
M templates/wmnet
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/43/318643/1

diff --git a/templates/wmnet b/templates/wmnet
index 7612a1c..fdf1b79 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -34,6 +34,7 @@
 eventlogging1H  IN CNAMEeventlog1001.eqiad.wmnet.
 udplog  1H  IN CNAMEfluorine.eqiad.wmnet.
 deployment  1H  IN CNAMEtin.eqiad.wmnet.
+people  1H  IN CNAMErutherfordium.eqiad.wmnet.
 s1-master   5M  IN CNAMEdb1057.eqiad.wmnet.
 s2-master   5M  IN CNAMEdb1018.eqiad.wmnet.
 s3-master   5M  IN CNAMEdb1075.eqiad.wmnet.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9c5b79f61ca640875b2acb60373b355281c9379
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Fix puppet-doc base dir for operations-puppet

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix puppet-doc base dir for operations-puppet
..


Fix puppet-doc base dir for operations-puppet

Change-Id: Ic3edee68d37a55cb866a25d4a1f4b5273fba24e8
---
M jjb/macro.yaml
M jjb/operations-puppet.yaml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 05c89e5..ef3eaf4 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -554,7 +554,7 @@
 # Destination dir must not exist or 'puppet doc' complains
 rm -fR "$WORKSPACE/doc"
 
-cd "$WORKSPACE/src"
+cd "{puppet}"
 
 # Delete unwanted bin dir
 # https://tickets.puppetlabs.com/browse/PUP-3261
diff --git a/jjb/operations-puppet.yaml b/jjb/operations-puppet.yaml
index 8684e69..cb2da82 100644
--- a/jjb/operations-puppet.yaml
+++ b/jjb/operations-puppet.yaml
@@ -22,7 +22,7 @@
  recursive: true
 builders:
  - puppet-doc:
-puppet: "$WORKSPACE"
+puppet: "$WORKSPACE/src"
  - doc-publish:
 docsrc: 'doc'
 docdest: 'puppet'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3edee68d37a55cb866a25d4a1f4b5273fba24e8
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
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]: Puppet doc now deletes bin directories

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Puppet doc now deletes bin directories
..


Puppet doc now deletes bin directories

The puppet doc command pass all files to the command line but rdoc
eventually stops when processing a file under /bin with:

 (Errno::ENOENT) No such file or directory - dummy.rb

Upstream bug:
https://tickets.puppetlabs.com/browse/PUP-3261

While at it pass to puppet --trace to get some kind of clue as to why it
sometime fails to process a manifest.

Bug: T143233
Change-Id: I81bc534d6564c8ba6363479ae1b95e74c279a316
---
M jjb/macro.yaml
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, but someone else must approve
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 86bcd17..05c89e5 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -555,7 +555,14 @@
 rm -fR "$WORKSPACE/doc"
 
 cd "$WORKSPACE/src"
+
+# Delete unwanted bin dir
+# https://tickets.puppetlabs.com/browse/PUP-3261
+rm -v -fR modules/*/bin
+
+/usr/bin/puppet --version
 /usr/bin/puppet doc \
+--trace \
 --mode rdoc \
 --outputdir "$WORKSPACE/doc" \
 --modulepath "{puppet}/modules" \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I81bc534d6564c8ba6363479ae1b95e74c279a316
Gerrit-PatchSet: 6
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Andrew Bogott 
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] apps...wikipedia[master]: Fix bug in Namespace to legacy string conversion

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix bug in Namespace to legacy string conversion
..


Fix bug in Namespace to legacy string conversion

Fix capitalization bug in Namespace to legacy string conversion and add
test. When converting a non-main Namespace to a legacy string, the
expected result is sentence case with underscores. For example, "Talk"
or "Gadget_definition". Fix a state bug causing the result to be fully
capitalized like "TALK" or "GADGET_DEFINITION".

Change-Id: I383f5728cfb551181d0ba9e41657863ce7cda9f4
---
M app/src/main/java/org/wikipedia/page/Namespace.java
A app/src/test/java/org/wikipedia/page/NamespaceTest.java
2 files changed, 94 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/Namespace.java 
b/app/src/main/java/org/wikipedia/page/Namespace.java
index c8eacec..21ee1ba 100644
--- a/app/src/main/java/org/wikipedia/page/Namespace.java
+++ b/app/src/main/java/org/wikipedia/page/Namespace.java
@@ -78,7 +78,7 @@
 public String toLegacyString() {
 String string = this == MAIN ? null : this.name();
 if (string != null) {
-StringUtil.capitalizeFirstChar(string.toLowerCase());
+string = StringUtil.capitalizeFirstChar(string.toLowerCase());
 }
 return string;
 }
diff --git a/app/src/test/java/org/wikipedia/page/NamespaceTest.java 
b/app/src/test/java/org/wikipedia/page/NamespaceTest.java
new file mode 100644
index 000..733cf1d
--- /dev/null
+++ b/app/src/test/java/org/wikipedia/page/NamespaceTest.java
@@ -0,0 +1,93 @@
+package org.wikipedia.page;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.wikipedia.dataclient.WikiSite;
+import org.wikipedia.test.TestRunner;
+
+import java.util.Locale;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+import static org.wikipedia.page.Namespace.FILE;
+import static org.wikipedia.page.Namespace.MAIN;
+import static org.wikipedia.page.Namespace.MEDIA;
+import static org.wikipedia.page.Namespace.SPECIAL;
+import static org.wikipedia.page.Namespace.TALK;
+
+@RunWith(TestRunner.class) public class NamespaceTest {
+private static Locale PREV_DEFAULT_LOCALE;
+
+@BeforeClass public static void setUp() {
+PREV_DEFAULT_LOCALE = Locale.getDefault();
+Locale.setDefault(Locale.ENGLISH);
+}
+
+@AfterClass public static void tearDown() {
+Locale.setDefault(PREV_DEFAULT_LOCALE);
+}
+
+@Test public void testOf() {
+assertThat(Namespace.of(SPECIAL.code()), is(SPECIAL));
+}
+
+@Test public void testFromLegacyStringMain() {
+
assertThat(Namespace.fromLegacyString(WikiSite.forLanguageCode("test"), null), 
is(MAIN));
+}
+
+@Test public void testFromLegacyStringFile() {
+assertThat(Namespace.fromLegacyString(WikiSite.forLanguageCode("he"), 
"קובץ"), is(FILE));
+}
+
+@Test public void testFromLegacyStringSpecial() {
+assertThat(Namespace.fromLegacyString(WikiSite.forLanguageCode("lez"), 
"Служебная"), is(SPECIAL));
+}
+
+@Test public void testFromLegacyStringTalk() {
+assertThat(Namespace.fromLegacyString(WikiSite.forLanguageCode("en"), 
"stringTalk"), is(TALK));
+}
+
+@Test public void testCode() {
+assertThat(MAIN.code(), is(0));
+assertThat(TALK.code(), is(1));
+}
+
+@Test public void testSpecial() {
+assertThat(SPECIAL.special(), is(true));
+assertThat(MAIN.special(), is(false));
+}
+
+@Test public void testMain() {
+assertThat(MAIN.main(), is(true));
+assertThat(TALK.main(), is(false));
+}
+
+@Test public void testFile() {
+assertThat(FILE.file(), is(true));
+assertThat(MAIN.file(), is(false));
+}
+
+@Test public void testTalkNegative() {
+assertThat(MEDIA.talk(), is(false));
+assertThat(SPECIAL.talk(), is(false));
+}
+
+@Test public void testTalkZero() {
+assertThat(MAIN.talk(), is(false));
+}
+
+@Test public void testTalkOdd() {
+assertThat(TALK.talk(), is(true));
+}
+
+@Test public void testToLegacyStringMain() {
+assertThat(MAIN.toLegacyString(), nullValue());
+}
+
+@Test public void testToLegacyStringNonMain() {
+assertThat(TALK.toLegacyString(), is("Talk"));
+}
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I383f5728cfb551181d0ba9e41657863ce7cda9f4
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Move CI scripts into version control

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Move CI scripts into version control
..


Move CI scripts into version control

Copy over the shell commands from CI[0,1,2] to the Android repo. This
will allow us to version the scripts, easily change them without much CI
knowledge, and easily reference them without a Jenkins login. A
subsequent patch in the integration config repo will update the Jenkins
console commands to reference these scripts.

[0] 
https://integration.wikimedia.org/ci/job/apps-android-wikipedia-test/configure
[1] 
https://integration.wikimedia.org/ci/job/apps-android-wikipedia-periodic-test/configure
[2] 
https://integration.wikimedia.org/ci/job/apps-android-wikipedia-lint/configure

Change-Id: Id365caf945087f1a73107c36f95762881cea57fe
---
A scripts/apps-android-wikipedia-lint
A scripts/apps-android-wikipedia-periodic-test
A scripts/apps-android-wikipedia-test
3 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/scripts/apps-android-wikipedia-lint 
b/scripts/apps-android-wikipedia-lint
new file mode 100755
index 000..58b4ca6
--- /dev/null
+++ b/scripts/apps-android-wikipedia-lint
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+./gradlew -q clean lintAlphaDebug
\ No newline at end of file
diff --git a/scripts/apps-android-wikipedia-periodic-test 
b/scripts/apps-android-wikipedia-periodic-test
new file mode 100755
index 000..e5d378e
--- /dev/null
+++ b/scripts/apps-android-wikipedia-periodic-test
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+./gradlew clean testAllAlphaRelease 
-Pandroid.testInstrumentationRunnerArguments.size=small
+scripts/diff-screenshots
\ No newline at end of file
diff --git a/scripts/apps-android-wikipedia-test 
b/scripts/apps-android-wikipedia-test
new file mode 100755
index 000..347e525
--- /dev/null
+++ b/scripts/apps-android-wikipedia-test
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+scripts/missing-qq.py
+./gradlew clean checkstyle assembleAlphaRelease testAlphaRelease 
compileAlphaReleaseAndroidTestSources
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id365caf945087f1a73107c36f95762881cea57fe
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
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]: Fix puppet-doc base dir for operations-puppet

2016-10-28 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Fix puppet-doc base dir for operations-puppet
..

Fix puppet-doc base dir for operations-puppet

Change-Id: Ic3edee68d37a55cb866a25d4a1f4b5273fba24e8
---
M jjb/macro.yaml
M jjb/operations-puppet.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/42/318642/1

diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 05c89e5..ef3eaf4 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -554,7 +554,7 @@
 # Destination dir must not exist or 'puppet doc' complains
 rm -fR "$WORKSPACE/doc"
 
-cd "$WORKSPACE/src"
+cd "{puppet}"
 
 # Delete unwanted bin dir
 # https://tickets.puppetlabs.com/browse/PUP-3261
diff --git a/jjb/operations-puppet.yaml b/jjb/operations-puppet.yaml
index 8684e69..cb2da82 100644
--- a/jjb/operations-puppet.yaml
+++ b/jjb/operations-puppet.yaml
@@ -22,7 +22,7 @@
  recursive: true
 builders:
  - puppet-doc:
-puppet: "$WORKSPACE"
+puppet: "$WORKSPACE/src"
  - doc-publish:
 docsrc: 'doc'
 docdest: 'puppet'

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add BecauseYouReadCardViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add BecauseYouReadCardViewTest
..


Add BecauseYouReadCardViewTest

Bug: T140019
Change-Id: I33ad951833a51e85e6ee59cc880083a1eaa1e9ac
---
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-long_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-long_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-long_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-null_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-null_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-null_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-short_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-short_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-long_title-short_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-long_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-long_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-long_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-null_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-null_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-null_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-short_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-short_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_title-short_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-short_title-long_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-short_title-long_subtitle-1_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-short_title-long_subtitle-5_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-short_title-null_subtitle-0_suggestions.png
A 
app/screenshots-ref/org.wikipedia.feed.becauseyouread.BecauseYouReadCardViewTest.testWidth-320dp-en-ltr-font1.0x-light-short_title-null_subtitle-1_suggestions.png
A 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add PageTitleListCardItemViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add PageTitleListCardItemViewTest
..


Add PageTitleListCardItemViewTest

Bug: T144399
Change-Id: I29ea5621f6e0e175ea4b1bd32c6ea4ac5f1126b0
---
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-long_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-long_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-long_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-null_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-null_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-null_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-short_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-short_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-nonnull_image-short_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-long_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-long_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-long_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-null_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-null_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-null_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-short_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-short_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.0x-light-null_image-short_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-long_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-long_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-long_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-null_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-null_title-null_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-null_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.PageTitleListCardItemViewTest.testWidth-320dp-en-ltr-font1.5x-light-nonnull_image-short_title-long_subtitle.png
A 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: add TestStr to String helper in ViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: add TestStr to String helper in ViewTest
..


Hygiene: add TestStr to String helper in ViewTest

Change-Id: Id55360e1911aa3d6ac412c03726ee9b397193cdf
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
3 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
index 37836ce..4c03afd 100644
--- a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
@@ -152,7 +152,7 @@
 subject = new CardHeaderView(ctx())
 .setImage(image.id())
 .setImageCircleColor(circleColor)
-.setTitle(str(title.id()))
-.setSubtitle(str(subtitle.id()));
+.setTitle(str(title))
+.setSubtitle(str(subtitle));
 }
 }
\ No newline at end of file
diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
index 0bd1b6e..75cc747 100644
--- 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
@@ -90,6 +90,6 @@
 
 subject = new CardLargeHeaderView(ctx())
 .setImage(frescoUri(image.id()))
-.setTitle(str(title.id()));
+.setTitle(str(title));
 }
 }
\ No newline at end of file
diff --git a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
index 45e6240..3373afc 100644
--- a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
@@ -117,6 +117,10 @@
 .build();
 }
 
+protected String str(@NonNull TestStr str, Object... formatArgs) {
+return str(str.id(), formatArgs);
+}
+
 protected String str(@StringRes int id, Object... formatArgs) {
 return id == 0 ? null : ctx().getString(id, formatArgs);
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id55360e1911aa3d6ac412c03726ee9b397193cdf
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: update ViewTest packaging

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: update ViewTest packaging
..


Hygiene: update ViewTest packaging

Move ViewTest into org.wikipedia.test.view. This wasn't done in the
previous commit to minimize deltas.

Change-Id: I4f3603d5048555e17686b4cc2aef4e5b7068aa6b
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
M app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java
M app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
R app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
6 files changed, 15 insertions(+), 25 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
index 4bcda7f..37836ce 100644
--- a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
@@ -11,7 +11,6 @@
 import org.junit.experimental.theories.suppliers.TestedOn;
 import org.wikipedia.R;
 import org.wikipedia.feed.model.Card;
-import org.wikipedia.test.ViewTest;
 import org.wikipedia.test.view.FontScale;
 import org.wikipedia.test.view.LayoutDirection;
 import org.wikipedia.test.view.PrimaryTestImg;
@@ -20,6 +19,7 @@
 import org.wikipedia.test.view.SecondaryTestStr;
 import org.wikipedia.test.view.TestImg;
 import org.wikipedia.test.view.TestStr;
+import org.wikipedia.test.view.ViewTest;
 import org.wikipedia.theme.Theme;
 
 import static butterknife.ButterKnife.findById;
@@ -34,10 +34,8 @@
 private CardHeaderView subject;
 
 @Theory public void testWidth(@TestedOn(ints = {WIDTH_DP_L, WIDTH_DP_M}) 
int widthDp,
-  @NonNull FontScale fontScale,
-  @NonNull PrimaryTestImg image,
-  @NonNull PrimaryTestStr title,
-  @NonNull SecondaryTestStr subtitle) {
+  @NonNull FontScale fontScale, @NonNull 
PrimaryTestImg image,
+  @NonNull PrimaryTestStr title, @NonNull 
SecondaryTestStr subtitle) {
 setUp(widthDp, LayoutDirection.LOCALE, fontScale, Theme.LIGHT, image, 
title, subtitle,
 BLUE);
 snap(subject, image + "_image", title + "_title", subtitle + 
"_subtitle");
@@ -137,13 +135,13 @@
 assertText(subject, R.id.view_card_header_subtitle, text);
 }
 
-private void clickMenu() {
-runOnMainSync(new Runnable() {
-@Override public void run() {
-subject.onMenuClick(findById(subject, 
R.id.view_list_card_header_menu));
-}
-});
-}
+//private void clickMenu() {
+//runOnMainSync(new Runnable() {
+//@Override public void run() {
+//subject.onMenuClick(findById(subject, 
R.id.view_list_card_header_menu));
+//}
+//});
+//}
 
 @SuppressWarnings("checkstyle:parameternumber")
 private void setUp(int widthDp, @NonNull LayoutDirection layoutDirection,
diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
index 5ca2ac7..0bd1b6e 100644
--- 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
@@ -7,7 +7,6 @@
 import org.junit.experimental.theories.Theory;
 import org.junit.experimental.theories.suppliers.TestedOn;
 import org.wikipedia.R;
-import org.wikipedia.test.ViewTest;
 import org.wikipedia.test.view.FontScale;
 import org.wikipedia.test.view.LayoutDirection;
 import org.wikipedia.test.view.NullValue;
@@ -16,6 +15,7 @@
 import org.wikipedia.test.view.SecondaryTestImg;
 import org.wikipedia.test.view.TestImg;
 import org.wikipedia.test.view.TestStr;
+import org.wikipedia.test.view.ViewTest;
 import org.wikipedia.theme.Theme;
 
 import static android.view.View.OnClickListener;
diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
index fea6449..f9c9bea 100644
--- 
a/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
@@ -8,10 +8,10 @@
 import org.junit.experimental.theories.Theory;
 import org.wikipedia.feed.model.Card;
 import org.wikipedia.feed.view.FeedAdapter.Callback;
-import org.wikipedia.test.ViewTest;
 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (f31a1f8)

2016-10-28 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update VE core submodule to master (f31a1f8)
..

Update VE core submodule to master (f31a1f8)

New changes:
f564149 ve.dm.Transaction: add 'author' field
4032768 Remove jshint comment, no rule required
3705e38 Remove comment about jscs empty blocks rule
09c48db Remove comment about jscs binary space rule
1f2fcde Allow shallow clone of whole document
b8c3673 build: Update eslint-config-wikimedia to 0.2.0 and make a pass
f31a1f8 Re-use eslint.main for eslint.fix

Change-Id: I82da0beb9bdb05f482ddfa76b4f95563d2499f1e
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/ve b/lib/ve
index e4c8003..f31a1f8 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit e4c8003349ae01ba19215a3fa059a5dede9964b2
+Subproject commit f31a1f844d83081031bd781ee95737dc3bd6c96b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82da0beb9bdb05f482ddfa76b4f95563d2499f1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: collapse PageTitleListCardItemView

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: collapse PageTitleListCardItemView
..


Hygiene: collapse PageTitleListCardItemView

Merge ListCardItemView into PageTitleListCardItemView and remove dead
code.

Change-Id: I2abab7182bee35026fe3e95acbf596a5e2c6f57b
---
D app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java
D app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java
M app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java
3 files changed, 26 insertions(+), 106 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java
deleted file mode 100644
index 1c42f86..000
--- a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.wikipedia.feed.view;
-
-import android.net.Uri;
-
-import org.junit.Before;
-import org.junit.experimental.theories.Theory;
-import org.junit.experimental.theories.suppliers.TestedOn;
-import org.wikipedia.test.ViewTest;
-import org.wikipedia.theme.Theme;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.notNullValue;
-import static org.hamcrest.Matchers.nullValue;
-import static org.mockito.Mockito.mock;
-import static org.wikipedia.test.ViewTest.LayoutDirection.LOCALE;
-import static org.wikipedia.util.StringUtil.emptyIfNull;
-
-public class ListCardItemViewTest extends ViewTest {
-private ListCardItemView subject;
-
-@Before public void setUp() {
-setUp(WIDTH_DP_S, LOCALE, FONT_SCALES[0], Theme.LIGHT);
-subject = new ListCardItemView(ctx());
-}
-
-@Theory public void testSetImage(@TestedOn(ints = {0, 1}) int nonnull) {
-Uri uri = nonnull == 0 ? null : mock(Uri.class);
-assertThat(subject.imageView.getController(), nullValue());
-subject.setImage(uri);
-assertThat(subject.imageView.getController(), notNullValue());
-}
-
-@Theory public void testSetTitle(@TestedOn(ints = {0, 1}) int nonnull) {
-CharSequence title = nonnull == 0 ? null : "subtitle";
-subject.setTitle(title);
-assertThat(subject.titleView.getText(), is(emptyIfNull(title)));
-}
-
-@Theory public void testSetSubtitle(@TestedOn(ints = {0, 1}) int nonnull) {
-CharSequence subtitle = nonnull == 0 ? null : "subtitle";
-subject.setSubtitle(subtitle);
-assertThat(subject.subtitleView.getText(), is(emptyIfNull(subtitle)));
-}
-}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java 
b/app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java
deleted file mode 100644
index 739d6ac..000
--- a/app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.wikipedia.feed.view;
-
-import android.content.Context;
-import android.net.Uri;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.FrameLayout;
-import android.widget.TextView;
-
-import com.facebook.drawee.view.SimpleDraweeView;
-
-import org.wikipedia.R;
-import org.wikipedia.views.GoneIfEmptyTextView;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-
-public class ListCardItemView extends FrameLayout {
-@BindView(R.id.view_list_card_item_image) SimpleDraweeView imageView;
-@BindView(R.id.view_list_card_item_title) TextView titleView;
-@BindView(R.id.view_list_card_item_subtitle) GoneIfEmptyTextView 
subtitleView;
-@BindView(R.id.view_list_card_item_menu) View menuView;
-
-public ListCardItemView(Context context) {
-super(context);
-
-setLayoutParams(new 
ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
-ViewGroup.LayoutParams.WRAP_CONTENT));
-setClickable(true);
-
-inflate(getContext(), R.layout.view_list_card_item, this);
-ButterKnife.bind(this);
-}
-
-@NonNull public ListCardItemView setImage(@Nullable Uri uri) {
-imageView.setImageURI(uri);
-return this;
-}
-
-@NonNull public ListCardItemView setTitle(@Nullable CharSequence title) {
-titleView.setText(title);
-return this;
-}
-
-@NonNull public ListCardItemView setSubtitle(@Nullable CharSequence 
subtitle) {
-subtitleView.setText((String) subtitle);
-return this;
-}
-}
\ No newline at end of file
diff --git 
a/app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java 
b/app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java
index ca7fc79..63f2821 100644
--- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: increse k8s apiserver open files limit

2016-10-28 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: increse k8s apiserver open files limit
..


tools: increse k8s apiserver open files limit

Current limit seems to be 1024 and that is exhausted quickly

Change-Id: I5f04f24aaf50007ba71904cf741677d2b735bbd2
---
M modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb 
b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
index 3060be1..530c87b 100644
--- a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
@@ -18,6 +18,9 @@
 --host-paths-allowed=<%= @host_paths_allowed_string %> \
 --host-path-prefixes-allowed=<%= @host_path_prefixes_allowed_string %>
 Restart=on-failure
+# Really large limit - defaults to 1024 otherwise for some reason?
+# That runs out pretty quickly, so we do 1024 * 1024
+LimitNOFILE=1048576
 
 [Install]
 WantedBy=multi-user.target

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: increse k8s apiserver open files limit

2016-10-28 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: increse k8s apiserver open files limit
..

tools: increse k8s apiserver open files limit

Current limit seems to be 1024 and that is exhausted quickly

Change-Id: I5f04f24aaf50007ba71904cf741677d2b735bbd2
---
M modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/318584/1

diff --git a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb 
b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
index 3060be1..530c87b 100644
--- a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
@@ -18,6 +18,9 @@
 --host-paths-allowed=<%= @host_paths_allowed_string %> \
 --host-path-prefixes-allowed=<%= @host_path_prefixes_allowed_string %>
 Restart=on-failure
+# Really large limit - defaults to 1024 otherwise for some reason?
+# That runs out pretty quickly, so we do 1024 * 1024
+LimitNOFILE=1048576
 
 [Install]
 WantedBy=multi-user.target

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add IF EXISTS to dropTable function in Database

2016-10-28 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Add IF EXISTS to dropTable function in Database
..

Add IF EXISTS to dropTable function in Database

This is so that this wont fail if the table does not exist.

Change-Id: Ia103c5e35b2da8a29273071d8a8f3e2539253a33
---
M includes/libs/rdbms/database/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/318581/1

diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index ba63432..e3c100a 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -,7 +,7 @@
if ( !$this->tableExists( $tableName, $fName ) ) {
return false;
}
-   $sql = "DROP TABLE " . $this->tableName( $tableName ) . " 
CASCADE";
+   $sql = "DROP TABLE IF EXISTS " . $this->tableName( $tableName ) 
. " CASCADE";
 
return $this->query( $sql, $fName );
}

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

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

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


[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: python: Add python3-venv package

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: python: Add python3-venv package
..


python: Add python3-venv package

Bug: T149441
Change-Id: I28334f905b169416bdb5705fe42f18b069a41fe9
---
M python/base/Dockerfile.template
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/python/base/Dockerfile.template b/python/base/Dockerfile.template
index 76d97f5..a1955a9 100644
--- a/python/base/Dockerfile.template
+++ b/python/base/Dockerfile.template
@@ -6,7 +6,8 @@
 python3 \
 python3-dev \
 build-essential \
-python3-virtualenv
+python3-virtualenv \
+python3-venv
 
 # -dev packages needed for installing popular python packages,
 # until they ship with manylinux wheels. Needs a ticket filed

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28334f905b169416bdb5705fe42f18b069a41fe9
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/toollabs-images
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
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...ContentTranslation[master]: Update ContentTranslationRESTBase config

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update ContentTranslationRESTBase config
..


Update ContentTranslationRESTBase config

Bug: T149164
Change-Id: I00aba5c97520a715cacad3a7527a761b7ea7ee45
---
M extension.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 66b839a..a76174d 100644
--- a/extension.json
+++ b/extension.json
@@ -111,9 +111,9 @@
"yue": "zh-yue"
},
"ContentTranslationRESTBase": {
-   "url": "https://rest.wikimedia.org;,
+   "url": "https://en.wikipedia.org/api/rest_#version#;,
+   "fixedUrl": true,
"timeout": 10,
-   "domain": "en.wikipedia.org",
"HTTPProxy": false,
"forwardCookies": false
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00aba5c97520a715cacad3a7527a761b7ea7ee45
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: python: Add python3-venv package

2016-10-28 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: python: Add python3-venv package
..

python: Add python3-venv package

Bug: T149441
Change-Id: I28334f905b169416bdb5705fe42f18b069a41fe9
---
M python/base/Dockerfile.template
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/docker-images/toollabs-images 
refs/changes/80/318580/1

diff --git a/python/base/Dockerfile.template b/python/base/Dockerfile.template
index 76d97f5..a1955a9 100644
--- a/python/base/Dockerfile.template
+++ b/python/base/Dockerfile.template
@@ -6,7 +6,8 @@
 python3 \
 python3-dev \
 build-essential \
-python3-virtualenv
+python3-virtualenv \
+python3-venv
 
 # -dev packages needed for installing popular python packages,
 # until they ship with manylinux wheels. Needs a ticket filed

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28334f905b169416bdb5705fe42f18b069a41fe9
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/toollabs-images
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: k8s: install bridge-utils with docker::engine

2016-10-28 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: k8s: install bridge-utils with docker::engine
..


k8s: install bridge-utils with docker::engine

This package contains utilities for configuring,
inspecting and debugging the  Linux Ethernet bridge.

Notably comes with `brctl` for debugging such as `brctl show`:

bridge namebridge idSTP enabledinterfaces
docker08000.024251e804d6noveth0d74a21
  veth18940d3

Change-Id: I73729b6bfca065a051773ba4242251dafc7a53cd
---
M modules/docker/manifests/engine.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/docker/manifests/engine.pp 
b/modules/docker/manifests/engine.pp
index 0351462..ac3e07b 100644
--- a/modules/docker/manifests/engine.pp
+++ b/modules/docker/manifests/engine.pp
@@ -2,6 +2,11 @@
 $version = '1.11.2-0~jessie',
 $declare_service = true,
 ) {
+
+package { 'bridge-utils':
+ensure => present,
+}
+
 apt::repository { 'docker':
 uri=> 'https://apt.dockerproject.org/repo',
 dist   => 'debian-jessie',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: build: Update eslint-config-wikimedia to v0.2.0

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Update eslint-config-wikimedia to v0.2.0
..


build: Update eslint-config-wikimedia to v0.2.0

Change-Id: I5e23210d81d4d376a383789a009693668a335070
---
M .eslintrc.json
M modules/box/Map.js
M modules/box/scale_control.js
M modules/dialog/closefullscreen_control.js
M modules/dialog/dialog.js
M modules/maplink/maplink.js
M modules/ve-maps/ve.ce.MWMapsNode.js
M modules/ve-maps/ve.ui.MWMapsDialog.js
M modules/wikivoyage/ControlLayers.js
M modules/wikivoyage/ControlNearby.js
M package.json
11 files changed, 8 insertions(+), 18 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index 1ae4a09..6f3befe 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,9 +14,6 @@
},
"rules": {
"dot-notation": 0,
-   "wrap-iife": 0,
-   "no-console": "error",
-   "spaced-comment": ["error", "always", { "exceptions": ["*", 
"!"] }],
-   "vars-on-top": "error"
+   "wrap-iife": 0
}
 }
diff --git a/modules/box/Map.js b/modules/box/Map.js
index 07949ec..1fa5c9b 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -164,9 +164,8 @@
this.$container = $( this._container );
 
this.on( 'kartographerisready', function () {
-   /* jscs:disable 
requireCamelCaseOrUpperCaseIdentifiers*/
+   // eslint-disable-next-line camelcase
map._kartographer_ready = true;
-   /* jscs:enable 
requireCamelCaseOrUpperCaseIdentifiers*/
} );
 
/**
@@ -322,13 +321,11 @@
 * @chainable
 */
doWhenReady: function ( callback, context ) {
-   /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers*/
if ( this._kartographer_ready ) {
callback.call( context || this, this );
} else {
this.on( 'kartographerisready', callback, 
context );
}
-   /* jscs:enable requireCamelCaseOrUpperCaseIdentifiers*/
return this;
},
 
@@ -598,7 +595,6 @@
hash += '/' + newHash;
}
 
-   /* jscs:enable requireVarDeclFirst*/
return hash;
},
 
diff --git a/modules/box/scale_control.js b/modules/box/scale_control.js
index ffb2c97..4a402bf 100644
--- a/modules/box/scale_control.js
+++ b/modules/box/scale_control.js
@@ -1,6 +1,5 @@
 /* globals module */
 /* eslint-disable no-underscore-dangle */
-/* jscs:disable requireVarDeclFirst */
 /**
  * # Control to display the scale.
  *
diff --git a/modules/dialog/closefullscreen_control.js 
b/modules/dialog/closefullscreen_control.js
index de18be5..529fc41 100644
--- a/modules/dialog/closefullscreen_control.js
+++ b/modules/dialog/closefullscreen_control.js
@@ -62,4 +62,4 @@
 
return createControl;
 
-} )( );
+} )();
diff --git a/modules/dialog/dialog.js b/modules/dialog/dialog.js
index e5bff90..6178061 100644
--- a/modules/dialog/dialog.js
+++ b/modules/dialog/dialog.js
@@ -195,7 +195,7 @@
if ( !this.map ) {
return;
}
-   this.map.doWhenReady( function ( ) {
+   this.map.doWhenReady( function () {
mw.hook( 'wikipage.maps' ).fire( 
this.map, true /* isFullScreen */ );
}, this );
}, this );
diff --git a/modules/maplink/maplink.js b/modules/maplink/maplink.js
index e31bdbb..2e7a3b3 100644
--- a/modules/maplink/maplink.js
+++ b/modules/maplink/maplink.js
@@ -57,7 +57,7 @@
 *
 * @ignore
 */
-   mw.hook( 'wikipage.content' ).add( function ( ) {
+   mw.hook( 'wikipage.content' ).add( function () {
 
// `wikipage.content` may be fired more than once.
$.each( maplinks, function () {
diff --git a/modules/ve-maps/ve.ce.MWMapsNode.js 
b/modules/ve-maps/ve.ce.MWMapsNode.js
index 1ce753a..39d4ab3 100644
--- a/modules/ve-maps/ve.ce.MWMapsNode.js
+++ b/modules/ve-maps/ve.ce.MWMapsNode.js
@@ -148,7 +148,7 @@
// TODO: Support style editing
} );
this.map.on( 'layeradd', this.updateMapPosition, this );
-   this.map.doWhenReady( function ( ) {
+   this.map.doWhenReady( function () {
node.updateGeoJson();
 
// Disable interaction
diff --git 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: hieradata: add swift user for docker_registry

2016-10-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: hieradata: add swift user for docker_registry
..


hieradata: add swift user for docker_registry

Bug: T149098
Change-Id: I88d76f18e6069554a020ef2eec1d949107a97b61
---
M hieradata/codfw/swift/params.yaml
M hieradata/eqiad/swift/params.yaml
M hieradata/esams/swift/params.yaml
3 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, approved
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/codfw/swift/params.yaml 
b/hieradata/codfw/swift/params.yaml
index c48bbe5..2cde8a7 100644
--- a/hieradata/codfw/swift/params.yaml
+++ b/hieradata/codfw/swift/params.yaml
@@ -26,6 +26,11 @@
 account_name: 'AUTH_search'
 auth: 'http://ms-fe.svc.codfw.wmnet'
 user: 'search:backup'
+docker_registry:
+access:   '.admin'
+account_name: 'AUTH_docker'
+auth: 'http://swift.svc.codfw.wmnet'
+user: 'docker:registry'
 # keys are to be defined in private repo, e.g.:
 #swift::params::account_keys:
 #super_admin: 
diff --git a/hieradata/eqiad/swift/params.yaml 
b/hieradata/eqiad/swift/params.yaml
index 7e14022..ed76582 100644
--- a/hieradata/eqiad/swift/params.yaml
+++ b/hieradata/eqiad/swift/params.yaml
@@ -26,6 +26,11 @@
 account_name: 'AUTH_search'
 auth: 'http://ms-fe.svc.eqiad.wmnet'
 user: 'search:backup'
+docker_registry:
+access:   '.admin'
+account_name: 'AUTH_docker'
+auth: 'http://swift.svc.eqiad.wmnet'
+user: 'docker:registry'
 # keys are to be defined in private repo, e.g.:
 #swift::params::account_keys:
 #super_admin: 
diff --git a/hieradata/esams/swift/params.yaml 
b/hieradata/esams/swift/params.yaml
index e70fee4..5d4b3ac 100644
--- a/hieradata/esams/swift/params.yaml
+++ b/hieradata/esams/swift/params.yaml
@@ -21,6 +21,12 @@
 account_name: 'AUTH_dispersion'
 auth: 'http://ms-fe.svc.esams.wmnet'
 user: 'swift:dispersion'
+docker_registry:
+access:   '.admin'
+account_name: 'AUTH_docker'
+auth: 'http://swift.svc.esams.wmnet'
+user: 'docker:registry'
+
 # keys are to be defined in private repo, e.g.:
 #swift::params::account_keys:
 #super_admin: 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88d76f18e6069554a020ef2eec1d949107a97b61
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add ListCardItemViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add ListCardItemViewTest
..


Add ListCardItemViewTest

Bug: T144399
Change-Id: Ie3cc50516d783a6174d90490d6fa8f8b927a09ec
---
A app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java
1 file changed, 45 insertions(+), 0 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java
new file mode 100644
index 000..1c42f86
--- /dev/null
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java
@@ -0,0 +1,45 @@
+package org.wikipedia.feed.view;
+
+import android.net.Uri;
+
+import org.junit.Before;
+import org.junit.experimental.theories.Theory;
+import org.junit.experimental.theories.suppliers.TestedOn;
+import org.wikipedia.test.ViewTest;
+import org.wikipedia.theme.Theme;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.hamcrest.Matchers.nullValue;
+import static org.mockito.Mockito.mock;
+import static org.wikipedia.test.ViewTest.LayoutDirection.LOCALE;
+import static org.wikipedia.util.StringUtil.emptyIfNull;
+
+public class ListCardItemViewTest extends ViewTest {
+private ListCardItemView subject;
+
+@Before public void setUp() {
+setUp(WIDTH_DP_S, LOCALE, FONT_SCALES[0], Theme.LIGHT);
+subject = new ListCardItemView(ctx());
+}
+
+@Theory public void testSetImage(@TestedOn(ints = {0, 1}) int nonnull) {
+Uri uri = nonnull == 0 ? null : mock(Uri.class);
+assertThat(subject.imageView.getController(), nullValue());
+subject.setImage(uri);
+assertThat(subject.imageView.getController(), notNullValue());
+}
+
+@Theory public void testSetTitle(@TestedOn(ints = {0, 1}) int nonnull) {
+CharSequence title = nonnull == 0 ? null : "subtitle";
+subject.setTitle(title);
+assertThat(subject.titleView.getText(), is(emptyIfNull(title)));
+}
+
+@Theory public void testSetSubtitle(@TestedOn(ints = {0, 1}) int nonnull) {
+CharSequence subtitle = nonnull == 0 ? null : "subtitle";
+subject.setSubtitle(subtitle);
+assertThat(subject.subtitleView.getText(), is(emptyIfNull(subtitle)));
+}
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3cc50516d783a6174d90490d6fa8f8b927a09ec
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
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...VisualEditor[master]: eslint: Remove unused exception and fix documentation errors

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: eslint: Remove unused exception and fix documentation errors
..


eslint: Remove unused exception and fix documentation errors

Don't enable valid-jsdoc yet though, due to @chainable bug.

Change-Id: I4d2a6de19c72c6e4c20733446616d8046419d431
---
M .eslintrc.json
M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
M modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
M modules/ve-mw/ui/inspectors/ve.ui.MWAlienExtensionInspector.js
M modules/ve-mw/ui/inspectors/ve.ui.MWMagicLinkNodeInspector.js
M modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
14 files changed, 38 insertions(+), 10 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index 58ac2b1..be3fe6f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -17,7 +17,6 @@
"rules": {
"dot-notation": 0,
"wrap-iife": 0,
-   "no-use-before-define": ["error", { "functions": true, 
"classes": true }],
"valid-jsdoc": 0
}
 }
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
index dda1c9a..ea966ee 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
@@ -232,6 +232,7 @@
  *
  * @param {string} type 'none' or 'default'
  * @param {string} alignment 'left', 'right', 'center', 'none' or 'default'
+ * @return {string} CSS class
  */
 ve.ce.MWBlockImageNode.prototype.getCssClass = function ( type, alignment ) {
// TODO use this.model.getAttribute( 'type' ) etc., see bug 52065
@@ -312,7 +313,9 @@
}
 };
 
-/** */
+/**
+ * @param {Object} dimensions New dimensions
+ */
 ve.ce.MWBlockImageNode.prototype.onResizableResizing = function ( dimensions ) 
{
if ( !this.outline ) {
ve.ce.ResizableNode.prototype.onResizableResizing.call( this, 
dimensions );
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
index 398854e..0904123 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
@@ -48,7 +48,9 @@
 
 /* Methods */
 
-/** */
+/**
+ * @inheritdoc ve.ce.GeneratedContentNode
+ */
 ve.ce.MWExtensionNode.prototype.generateContents = function ( config ) {
var xhr, attr, wikitext,
deferred = $.Deferred(),
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
index 9296dab..b5e0ab9 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
@@ -80,7 +80,9 @@
  */
 ve.ce.MWImageNode.prototype.onAttributeChange = function () {};
 
-/** */
+/**
+ * @inheritdoc ve.ce.GeneratedContentNode
+ */
 ve.ce.MWImageNode.prototype.generateContents = function () {
var xhr,
width = this.getModel().getAttribute( 'width' ),
@@ -126,7 +128,9 @@
}
 };
 
-/** */
+/**
+ * @inheritdoc ve.ce.GeneratedContentNode
+ */
 ve.ce.MWImageNode.prototype.render = function ( generatedContents ) {
this.$image.attr( 'src', generatedContents );
// As we only re-render when the image is larger than last rendered size
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
index 9654097..9488dec 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
@@ -170,7 +170,7 @@
  *
  * Check if the final result of the imported template is empty.
  *
- * @see ve.ce.GeneratedContentNode#render
+ * @inheritdoc ve.ce.GeneratedContentNode
  */
 ve.ce.MWTransclusionNode.prototype.render = function ( generatedContents ) {
// Call parent mixin
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
index 779de66..9d1c256 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
@@ -324,6 +324,8 @@
 
 /**
  * Set original data, to be used as a base for serialization.
+ *
+ * @param {Object} data Original data
  */
 ve.dm.MWTemplateModel.prototype.setOriginalData = function ( data ) {
this.originalData = data;
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove rules which have been moved upstream

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Remove rules which have been moved upstream
..

Remove rules which have been moved upstream

Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4
---
M .eslintrc.json
M Gruntfile.js
2 files changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/78/318578/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 10222e1..d9b251f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,8 +15,6 @@
},
"rules": {
"dot-notation": 0,
-   "wrap-iife": 0,
-   "no-console": "error",
-   "spaced-comment": ["error", "always", { "exceptions": ["*", 
"!"] }]
+   "wrap-iife": 0
}
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index aec1229..4e5e86b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -5,6 +5,7 @@
  */
 
 /* eslint-env node */
+
 module.exports = function ( grunt ) {
var modules = grunt.file.readJSON( 'build/modules.json' ),
moduleUtils = require( './build/moduleUtils' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1be848230c90eb9d2cc71078add26a0ea7003bd4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: build: Update eslint-config-wikimedia to v0.2.0

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: build: Update eslint-config-wikimedia to v0.2.0
..

build: Update eslint-config-wikimedia to v0.2.0

Change-Id: I5e23210d81d4d376a383789a009693668a335070
---
M .eslintrc.json
M modules/box/Map.js
M modules/box/scale_control.js
M modules/dialog/closefullscreen_control.js
M modules/dialog/dialog.js
M modules/maplink/maplink.js
M modules/ve-maps/ve.ce.MWMapsNode.js
M modules/ve-maps/ve.ui.MWMapsDialog.js
M modules/wikivoyage/ControlLayers.js
M modules/wikivoyage/ControlNearby.js
M package.json
11 files changed, 8 insertions(+), 18 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
index 1ae4a09..6f3befe 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,9 +14,6 @@
},
"rules": {
"dot-notation": 0,
-   "wrap-iife": 0,
-   "no-console": "error",
-   "spaced-comment": ["error", "always", { "exceptions": ["*", 
"!"] }],
-   "vars-on-top": "error"
+   "wrap-iife": 0
}
 }
diff --git a/modules/box/Map.js b/modules/box/Map.js
index 07949ec..1fa5c9b 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -164,9 +164,8 @@
this.$container = $( this._container );
 
this.on( 'kartographerisready', function () {
-   /* jscs:disable 
requireCamelCaseOrUpperCaseIdentifiers*/
+   // eslint-disable-next-line camelcase
map._kartographer_ready = true;
-   /* jscs:enable 
requireCamelCaseOrUpperCaseIdentifiers*/
} );
 
/**
@@ -322,13 +321,11 @@
 * @chainable
 */
doWhenReady: function ( callback, context ) {
-   /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers*/
if ( this._kartographer_ready ) {
callback.call( context || this, this );
} else {
this.on( 'kartographerisready', callback, 
context );
}
-   /* jscs:enable requireCamelCaseOrUpperCaseIdentifiers*/
return this;
},
 
@@ -598,7 +595,6 @@
hash += '/' + newHash;
}
 
-   /* jscs:enable requireVarDeclFirst*/
return hash;
},
 
diff --git a/modules/box/scale_control.js b/modules/box/scale_control.js
index ffb2c97..4a402bf 100644
--- a/modules/box/scale_control.js
+++ b/modules/box/scale_control.js
@@ -1,6 +1,5 @@
 /* globals module */
 /* eslint-disable no-underscore-dangle */
-/* jscs:disable requireVarDeclFirst */
 /**
  * # Control to display the scale.
  *
diff --git a/modules/dialog/closefullscreen_control.js 
b/modules/dialog/closefullscreen_control.js
index de18be5..529fc41 100644
--- a/modules/dialog/closefullscreen_control.js
+++ b/modules/dialog/closefullscreen_control.js
@@ -62,4 +62,4 @@
 
return createControl;
 
-} )( );
+} )();
diff --git a/modules/dialog/dialog.js b/modules/dialog/dialog.js
index e5bff90..6178061 100644
--- a/modules/dialog/dialog.js
+++ b/modules/dialog/dialog.js
@@ -195,7 +195,7 @@
if ( !this.map ) {
return;
}
-   this.map.doWhenReady( function ( ) {
+   this.map.doWhenReady( function () {
mw.hook( 'wikipage.maps' ).fire( 
this.map, true /* isFullScreen */ );
}, this );
}, this );
diff --git a/modules/maplink/maplink.js b/modules/maplink/maplink.js
index e31bdbb..2e7a3b3 100644
--- a/modules/maplink/maplink.js
+++ b/modules/maplink/maplink.js
@@ -57,7 +57,7 @@
 *
 * @ignore
 */
-   mw.hook( 'wikipage.content' ).add( function ( ) {
+   mw.hook( 'wikipage.content' ).add( function () {
 
// `wikipage.content` may be fired more than once.
$.each( maplinks, function () {
diff --git a/modules/ve-maps/ve.ce.MWMapsNode.js 
b/modules/ve-maps/ve.ce.MWMapsNode.js
index 1ce753a..39d4ab3 100644
--- a/modules/ve-maps/ve.ce.MWMapsNode.js
+++ b/modules/ve-maps/ve.ce.MWMapsNode.js
@@ -148,7 +148,7 @@
// TODO: Support style editing
} );
this.map.on( 'layeradd', this.updateMapPosition, this );
-   this.map.doWhenReady( function ( ) {
+   this.map.doWhenReady( function () {
node.updateGeoJson();
 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: eslint: Remove upstreamed rules and fix documentation

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: eslint: Remove upstreamed rules and fix documentation
..


eslint: Remove upstreamed rules and fix documentation

Don't enable valid-jsdoc yet though, due to @chainable bug.

Change-Id: I8665a6ab60d5319661d299832db9cae703440835
---
M .eslintrc.json
M build/tasks/colorize-svg.js
M demos/pages/widgets.js
M src/Process.js
M src/Theme.js
M src/WindowManager.js
M src/layouts/ActionFieldLayout.js
M src/mixins/DraggableElement.js
M src/toolgroups/PopupToolGroup.js
M src/widgets/CapsuleItemWidget.js
M tests/QUnit.assert.equalDomElement.js
11 files changed, 25 insertions(+), 8 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index 867ba3c..bb22a9a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,8 +15,6 @@
 "rules": {
 "dot-notation": 0,
"valid-jsdoc": 0,
-   "wrap-iife": 0,
-   "spaced-comment": ["error", "always", { "exceptions": ["*", 
"!"] }],
-   "no-use-before-define": ["error", { "functions": false, 
"classes": true }]
+   "wrap-iife": 0
 }
 }
diff --git a/build/tasks/colorize-svg.js b/build/tasks/colorize-svg.js
index 35b5c5d..952af2b 100644
--- a/build/tasks/colorize-svg.js
+++ b/build/tasks/colorize-svg.js
@@ -5,6 +5,8 @@
  * An option to do it may be added in the future.
  */
 
+/* eslint-disable no-use-before-define */
+
 var Q = require( 'q' ),
path = require( 'path' ),
asyncTask = require( 'grunt-promise-q' );
diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 7329105..e5efd51 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -95,8 +95,12 @@
/**
 * Demo for LookupElement.
 *
+* @class
 * @extends OO.ui.TextInputWidget
 * @mixins OO.ui.mixin.LookupElement
+*
+* @constructor
+* @param {Object} config Configuration options
 */
function NumberLookupTextInputWidget( config ) {
// Parent constructor
diff --git a/src/Process.js b/src/Process.js
index 649ffb9..49212f8 100644
--- a/src/Process.js
+++ b/src/Process.js
@@ -20,7 +20,6 @@
  *  that must be resolved before proceeding, or a function to execute. See 
#createStep for more information. see #createStep for more information
  * @param {Object} [context=null] Execution context of the function. The 
context is ignored if the step is
  *  a number or promise.
- * @return {Object} Step object, with `callback` and `context` properties
  */
 OO.ui.Process = function ( step, context ) {
// Properties
diff --git a/src/Theme.js b/src/Theme.js
index a4f0b06..e0a6d82 100644
--- a/src/Theme.js
+++ b/src/Theme.js
@@ -33,7 +33,6 @@
  * For elements with theme logic hooks, this should be called any time there's 
a state change.
  *
  * @param {OO.ui.Element} element Element for which to update classes
- * @return {Object.} Categorized class names with `on` and 
`off` lists
  */
 OO.ui.Theme.prototype.updateElementClasses = function ( element ) {
var $elements = $( [] ),
diff --git a/src/WindowManager.js b/src/WindowManager.js
index 77e8cc0..ad366f2 100644
--- a/src/WindowManager.js
+++ b/src/WindowManager.js
@@ -192,6 +192,7 @@
 /**
  * Check if window is opening.
  *
+ * @param {OO.ui.Window} win Window to check
  * @return {boolean} Window is opening
  */
 OO.ui.WindowManager.prototype.isOpening = function ( win ) {
@@ -201,6 +202,7 @@
 /**
  * Check if window is closing.
  *
+ * @param {OO.ui.Window} win Window to check
  * @return {boolean} Window is closing
  */
 OO.ui.WindowManager.prototype.isClosing = function ( win ) {
@@ -210,6 +212,7 @@
 /**
  * Check if window is opened.
  *
+ * @param {OO.ui.Window} win Window to check
  * @return {boolean} Window is opened
  */
 OO.ui.WindowManager.prototype.isOpened = function ( win ) {
@@ -568,6 +571,7 @@
  *
  * Fullscreen mode will be used if the dialog is too wide to fit in the screen.
  *
+ * @param {OO.ui.Window} win Window to update, should be the current window
  * @chainable
  */
 OO.ui.WindowManager.prototype.updateWindowSize = function ( win ) {
diff --git a/src/layouts/ActionFieldLayout.js b/src/layouts/ActionFieldLayout.js
index b3c8229..1744d35 100644
--- a/src/layouts/ActionFieldLayout.js
+++ b/src/layouts/ActionFieldLayout.js
@@ -42,6 +42,7 @@
  * @constructor
  * @param {OO.ui.Widget} fieldWidget Field widget
  * @param {OO.ui.ButtonWidget} buttonWidget Button widget
+ * @param {Object} config
  */
 OO.ui.ActionFieldLayout = function OoUiActionFieldLayout( fieldWidget, 
buttonWidget, config ) {
// Allow passing positional parameters inside the config object
diff --git a/src/mixins/DraggableElement.js b/src/mixins/DraggableElement.js
index 5bd3399..b442f0c 100644
--- a/src/mixins/DraggableElement.js

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: eslint: Remove unused exception and fix documentation errors

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: eslint: Remove unused exception and fix documentation errors
..

eslint: Remove unused exception and fix documentation errors

Don't enable valid-jsdoc yet though, due to @chainable bug.

Change-Id: I4d2a6de19c72c6e4c20733446616d8046419d431
---
M .eslintrc.json
M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
M modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
M modules/ve-mw/ui/inspectors/ve.ui.MWAlienExtensionInspector.js
M modules/ve-mw/ui/inspectors/ve.ui.MWMagicLinkNodeInspector.js
M modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
14 files changed, 38 insertions(+), 10 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
index 58ac2b1..be3fe6f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -17,7 +17,6 @@
"rules": {
"dot-notation": 0,
"wrap-iife": 0,
-   "no-use-before-define": ["error", { "functions": true, 
"classes": true }],
"valid-jsdoc": 0
}
 }
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
index dda1c9a..ea966ee 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
@@ -232,6 +232,7 @@
  *
  * @param {string} type 'none' or 'default'
  * @param {string} alignment 'left', 'right', 'center', 'none' or 'default'
+ * @return {string} CSS class
  */
 ve.ce.MWBlockImageNode.prototype.getCssClass = function ( type, alignment ) {
// TODO use this.model.getAttribute( 'type' ) etc., see bug 52065
@@ -312,7 +313,9 @@
}
 };
 
-/** */
+/**
+ * @param {Object} dimensions New dimensions
+ */
 ve.ce.MWBlockImageNode.prototype.onResizableResizing = function ( dimensions ) 
{
if ( !this.outline ) {
ve.ce.ResizableNode.prototype.onResizableResizing.call( this, 
dimensions );
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
index 398854e..0904123 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
@@ -48,7 +48,9 @@
 
 /* Methods */
 
-/** */
+/**
+ * @inheritdoc ve.ce.GeneratedContentNode
+ */
 ve.ce.MWExtensionNode.prototype.generateContents = function ( config ) {
var xhr, attr, wikitext,
deferred = $.Deferred(),
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
index 9296dab..b5e0ab9 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWImageNode.js
@@ -80,7 +80,9 @@
  */
 ve.ce.MWImageNode.prototype.onAttributeChange = function () {};
 
-/** */
+/**
+ * @inheritdoc ve.ce.GeneratedContentNode
+ */
 ve.ce.MWImageNode.prototype.generateContents = function () {
var xhr,
width = this.getModel().getAttribute( 'width' ),
@@ -126,7 +128,9 @@
}
 };
 
-/** */
+/**
+ * @inheritdoc ve.ce.GeneratedContentNode
+ */
 ve.ce.MWImageNode.prototype.render = function ( generatedContents ) {
this.$image.attr( 'src', generatedContents );
// As we only re-render when the image is larger than last rendered size
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
index 9654097..9488dec 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
@@ -170,7 +170,7 @@
  *
  * Check if the final result of the imported template is empty.
  *
- * @see ve.ce.GeneratedContentNode#render
+ * @inheritdoc ve.ce.GeneratedContentNode
  */
 ve.ce.MWTransclusionNode.prototype.render = function ( generatedContents ) {
// Call parent mixin
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
index 779de66..9d1c256 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js
@@ -324,6 +324,8 @@
 
 /**
  * Set original data, to be used as a base for serialization.
+ *
+ * @param {Object} data Original data
  */
 ve.dm.MWTemplateModel.prototype.setOriginalData = function ( data ) {
this.originalData = data;
diff --git 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Re-use eslint.main for eslint.fix

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Re-use eslint.main for eslint.fix
..


Re-use eslint.main for eslint.fix

Change-Id: I6dd1f2e15a4dab441f1135385fbf4dab3597b7c2
---
M Gruntfile.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index d00027b..aec1229 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -253,8 +253,7 @@
fix: true
},
src: [
-   '*.js',
-   '{bin,build,demos,src,tests}/**/*.js'
+   '<%= eslint.main %>'
]
},
main: [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6dd1f2e15a4dab441f1135385fbf4dab3597b7c2
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
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...VisualEditor[master]: build: Replace jscs and jshint with eslint

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Replace jscs and jshint with eslint
..


build: Replace jscs and jshint with eslint

It's new, it's fresh, it's amazing, it's here.

Change-Id: I5dc784411f704685ed5cc763a2b2b1c5d3e5a610
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M build/screenshots.js
M build/tasks/jsduckcatconfig.js
M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
M modules/ve-mw/dm/metaitems/ve.dm.MWCategoryMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWHiddenCategoryMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWIndexDisableMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWIndexForceMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWNewSectionEditDisableMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWNewSectionEditForceMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWNoGalleryMetaItem.js
M modules/ve-mw/dm/metaitems/ve.dm.MWStaticRedirectMetaItem.js
M modules/ve-mw/dm/models/ve.dm.MWImageModel.js
M modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
M modules/ve-mw/init/ve.init.mw.LinkCache.js
M modules/ve-mw/init/ve.init.mw.Platform.init.js
M modules/ve-mw/tests/dm/nodes/ve.dm.MWTransclusionNode.test.js
M modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js
M 
modules/ve-mw/tests/ui/datatransferhandlers/ve.ui.UrlStringTransferHandler.test.js
M modules/ve-mw/tests/ve.test.utils.js
M modules/ve-mw/ui/actions/ve.ui.MWWikitextWindowAction.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
M modules/ve-mw/ui/ve.ui.MWSequenceRegistry.js
M modules/ve-mw/ui/widgets/ve.ui.MWMediaInfoFieldWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
M package.json
40 files changed, 219 insertions(+), 268 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..58ac2b1
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,23 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "ve": true,
+   "VisualEditorSupportCheck": false,
+   "OO": false,
+   "unicodeJS": false,
+   "RangeFix": false,
+   "Papa": false,
+   "mw": false
+   },
+   "rules": {
+   "dot-notation": 0,
+   "wrap-iife": 0,
+   "no-use-before-define": ["error", { "functions": true, 
"classes": true }],
+   "valid-jsdoc": 0
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 6473d3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "jsDoc": {
-   "checkAnnotations": {
-   "preset": "jsduck5",
-   "extra": {
-   "this": "some",
-   "source": "some",
-   "see": "some"
-   }
-   },
-   "checkTypes": "strictNativeCase",
-   "checkParamNames": true,
-   "checkRedundantAccess": true,
-   "checkRedundantReturns": true,
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-   },
-
-   "excludeFiles": [
-   "modules/ve-mw/init/classListSkipFunction.js"
-   ]
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 74ae9a1..000
--- a/.jshintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-docs
-lib
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index fa174f6..000
--- a/.jshintrc
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": "nofunc",
-   "futurehostile": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-
-   "strict": false,
-
-   // Relaxing
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mw": false,
-   "OO": false,
-   "QUnit": false,
-   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: k8s: install bridge-utils with docker::engine

2016-10-28 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: k8s: install bridge-utils with docker::engine
..

k8s: install bridge-utils with docker::engine

This package contains utilities for configuring,
inspecting and debugging the  Linux Ethernet bridge.

Notably comes with `brctl` for debugging such as `brctl show`:

bridge namebridge idSTP enabledinterfaces
docker08000.024251e804d6noveth0d74a21
  veth18940d3

Change-Id: I73729b6bfca065a051773ba4242251dafc7a53cd
---
M modules/docker/manifests/engine.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/318574/1

diff --git a/modules/docker/manifests/engine.pp 
b/modules/docker/manifests/engine.pp
index 0351462..ac3e07b 100644
--- a/modules/docker/manifests/engine.pp
+++ b/modules/docker/manifests/engine.pp
@@ -2,6 +2,11 @@
 $version = '1.11.2-0~jessie',
 $declare_service = true,
 ) {
+
+package { 'bridge-utils':
+ensure => present,
+}
+
 apt::repository { 'docker':
 uri=> 'https://apt.dockerproject.org/repo',
 dist   => 'debian-jessie',

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Allow shallow clone of whole document

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow shallow clone of whole document
..


Allow shallow clone of whole document

Change-Id: Ic35a724bceb9de69ffe81b5d61d4d9ec5b99189e
---
M src/dm/ve.dm.Document.js
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 901f951..6c07899 100644
--- a/src/dm/ve.dm.Document.js
+++ b/src/dm/ve.dm.Document.js
@@ -448,11 +448,11 @@
  *
  * The new document's elements, internal list and store will only contain 
references to data within the slice.
  *
- * @param {ve.Range} range Range of data to slice
+ * @param {ve.Range} [range] Range of data to slice; defaults to whole document
  * @return {ve.dm.DocumentSlice} New document
  */
 ve.dm.Document.prototype.shallowCloneFromRange = function ( range ) {
-   var i, first, last, firstNode, lastNode,
+   var listRange, i, first, last, firstNode, lastNode,
linearData, slice, originalRange, balancedRange,
balancedNodes, needsContext, contextElement, isContent,
startNode = this.getBranchNodeFromOffset( range.start ),
@@ -462,6 +462,10 @@
balanceClosings = [],
contextOpenings = [],
contextClosings = [];
+
+   listRange = this.getInternalList().getListNode().getOuterRange();
+   // Default to the whole document (but excluding the internal list)
+   range = range || new ve.Range( 0, listRange.start );
 
// Fix up selection to remove empty items in unwrapped nodes
// TODO: fix this is selectNodes
@@ -582,7 +586,7 @@
// Copy over the internal list
ve.batchSplice(
linearData.data, linearData.getLength(), 0,
-   this.getData( 
this.getInternalList().getListNode().getOuterRange(), true )
+   this.getData( listRange, true )
);
 
// The internalList is rebuilt by the document constructor

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic35a724bceb9de69ffe81b5d61d4d9ec5b99189e
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec 
Gerrit-Reviewer: Divec 
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...Math[master]: build: Replace jscs and jshint with eslint

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Replace jscs and jshint with eslint
..


build: Replace jscs and jshint with eslint

Change-Id: I95f59d9bef6bb8fec69b454dc8efe4b4c7e40805
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M modules/ext.math.js
M modules/ve-math/tools/makeSvgsAndCss.js
M modules/ve-math/ve.ce.MWMathNode.js
M modules/ve-math/ve.dm.MWMathNode.js
M modules/ve-math/ve.ui.MWMathDialogTool.js
M modules/ve-math/ve.ui.MWMathInspector.js
M modules/ve-math/ve.ui.MWMathPage.js
M package.json
13 files changed, 41 insertions(+), 89 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..955cabc
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,19 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "ve": true,
+   "mw": true,
+   "mediaWiki": false,
+   "OO": false
+   },
+   "rules": {
+   "dot-notation": 0,
+   "wrap-iife": 0,
+   "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }]
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 1959eea..000
--- a/.jscsrc
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "jsDoc": {
-   "checkAnnotations": {
-   "preset": "jsduck5",
-   "extra": {
-   "this": true,
-   "source": true,
-   "see": true
-   }
-   },
-   "checkTypes": "strictNativeCase",
-   "checkParamNames": true,
-   "checkRedundantAccess": true,
-   "checkRedundantReturns": true,
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-   }
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index b646851..000
--- a/.jshintignore
+++ /dev/null
@@ -1,6 +0,0 @@
-# third-party lib
-modules/MathJax
-
-# browser code in the middle of node code
-mathoid/main.js
-mathoid/engine.js
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 8d16fd4..000
--- a/.jshintrc
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": "nofunc",
-   "futurehostile": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false,
-   "ve": false,
-   "mw": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 393ae65..122395a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,10 +1,9 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
@@ -34,37 +33,31 @@
]
}
},
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   all: [
-   '*.js',
-   'modules/**/*.js'
-   ]
-   },
watch: {
files: [
-   '.{stylelintrc,jscsrc,jshintignore,jshintrc}',
-   '<%= jshint.all %>',
+   '.{stylelintrc,.eslintrc.json}',
+   '<%= eslint.main %>',
'<%= stylelint.core.src %>',
'<%= stylelint[ "ve-math" ].src %>'
],
tasks: 'test'
},
-   jscs: {
+   eslint: {
fix: {
options: {
fix: true
},
-   src: '<%= jshint.all %>'
+   src: '<%= eslint.main %>'
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Update clush classifier prefix for static nodes

2016-10-28 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Update clush classifier prefix for static nodes
..


tools: Update clush classifier prefix for static nodes

Change-Id: I47e86b141fc18a9f967eae36db8fcf9e8abac917
---
M modules/role/files/toollabs/clush/tools-clush-generator
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/files/toollabs/clush/tools-clush-generator 
b/modules/role/files/toollabs/clush/tools-clush-generator
index 243c5d4..175379e 100644
--- a/modules/role/files/toollabs/clush/tools-clush-generator
+++ b/modules/role/files/toollabs/clush/tools-clush-generator
@@ -33,7 +33,7 @@
 'grid-master': 'grid-master',
 'grid-shadow': 'grid-shadow',
 'mail': 'mail',
-'web-static-': 'static',
+'static-': 'static',
 'worker': 'k8s-worker',
 'k8s-master': 'k8s-master',
 'flannel-etcd': 'flannel-etcd',

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: eslint: Remove upstreamed rules and fix documentation

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: eslint: Remove upstreamed rules and fix documentation
..

eslint: Remove upstreamed rules and fix documentation

Don't enable valid-jsdoc yet though, due to @chainable bug.

Change-Id: I8665a6ab60d5319661d299832db9cae703440835
---
M .eslintrc.json
M build/tasks/colorize-svg.js
M demos/pages/widgets.js
M src/Process.js
M src/Theme.js
M src/WindowManager.js
M src/layouts/ActionFieldLayout.js
M src/mixins/DraggableElement.js
M src/toolgroups/PopupToolGroup.js
M src/widgets/CapsuleItemWidget.js
M tests/QUnit.assert.equalDomElement.js
11 files changed, 25 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/73/318573/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 867ba3c..bb22a9a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,8 +15,6 @@
 "rules": {
 "dot-notation": 0,
"valid-jsdoc": 0,
-   "wrap-iife": 0,
-   "spaced-comment": ["error", "always", { "exceptions": ["*", 
"!"] }],
-   "no-use-before-define": ["error", { "functions": false, 
"classes": true }]
+   "wrap-iife": 0
 }
 }
diff --git a/build/tasks/colorize-svg.js b/build/tasks/colorize-svg.js
index 35b5c5d..952af2b 100644
--- a/build/tasks/colorize-svg.js
+++ b/build/tasks/colorize-svg.js
@@ -5,6 +5,8 @@
  * An option to do it may be added in the future.
  */
 
+/* eslint-disable no-use-before-define */
+
 var Q = require( 'q' ),
path = require( 'path' ),
asyncTask = require( 'grunt-promise-q' );
diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 7329105..e5efd51 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -95,8 +95,12 @@
/**
 * Demo for LookupElement.
 *
+* @class
 * @extends OO.ui.TextInputWidget
 * @mixins OO.ui.mixin.LookupElement
+*
+* @constructor
+* @param {Object} config Configuration options
 */
function NumberLookupTextInputWidget( config ) {
// Parent constructor
diff --git a/src/Process.js b/src/Process.js
index 649ffb9..49212f8 100644
--- a/src/Process.js
+++ b/src/Process.js
@@ -20,7 +20,6 @@
  *  that must be resolved before proceeding, or a function to execute. See 
#createStep for more information. see #createStep for more information
  * @param {Object} [context=null] Execution context of the function. The 
context is ignored if the step is
  *  a number or promise.
- * @return {Object} Step object, with `callback` and `context` properties
  */
 OO.ui.Process = function ( step, context ) {
// Properties
diff --git a/src/Theme.js b/src/Theme.js
index a4f0b06..e0a6d82 100644
--- a/src/Theme.js
+++ b/src/Theme.js
@@ -33,7 +33,6 @@
  * For elements with theme logic hooks, this should be called any time there's 
a state change.
  *
  * @param {OO.ui.Element} element Element for which to update classes
- * @return {Object.} Categorized class names with `on` and 
`off` lists
  */
 OO.ui.Theme.prototype.updateElementClasses = function ( element ) {
var $elements = $( [] ),
diff --git a/src/WindowManager.js b/src/WindowManager.js
index 77e8cc0..ad366f2 100644
--- a/src/WindowManager.js
+++ b/src/WindowManager.js
@@ -192,6 +192,7 @@
 /**
  * Check if window is opening.
  *
+ * @param {OO.ui.Window} win Window to check
  * @return {boolean} Window is opening
  */
 OO.ui.WindowManager.prototype.isOpening = function ( win ) {
@@ -201,6 +202,7 @@
 /**
  * Check if window is closing.
  *
+ * @param {OO.ui.Window} win Window to check
  * @return {boolean} Window is closing
  */
 OO.ui.WindowManager.prototype.isClosing = function ( win ) {
@@ -210,6 +212,7 @@
 /**
  * Check if window is opened.
  *
+ * @param {OO.ui.Window} win Window to check
  * @return {boolean} Window is opened
  */
 OO.ui.WindowManager.prototype.isOpened = function ( win ) {
@@ -568,6 +571,7 @@
  *
  * Fullscreen mode will be used if the dialog is too wide to fit in the screen.
  *
+ * @param {OO.ui.Window} win Window to update, should be the current window
  * @chainable
  */
 OO.ui.WindowManager.prototype.updateWindowSize = function ( win ) {
diff --git a/src/layouts/ActionFieldLayout.js b/src/layouts/ActionFieldLayout.js
index b3c8229..1744d35 100644
--- a/src/layouts/ActionFieldLayout.js
+++ b/src/layouts/ActionFieldLayout.js
@@ -42,6 +42,7 @@
  * @constructor
  * @param {OO.ui.Widget} fieldWidget Field widget
  * @param {OO.ui.ButtonWidget} buttonWidget Button widget
+ * @param {Object} config
  */
 OO.ui.ActionFieldLayout = function OoUiActionFieldLayout( fieldWidget, 
buttonWidget, config ) {
// Allow passing positional parameters inside the config object
diff --git a/src/mixins/DraggableElement.js b/src/mixins/DraggableElement.js
index 5bd3399..b442f0c 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Fixup a few more getContent() calls

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixup a few more getContent() calls
..


Fixup a few more getContent() calls

Change-Id: I3f2c42f33ba6bcb8b0bcc0240b616ec114976837
---
M api/ApiFeedLQTThreads.php
M classes/NewMessagesController.php
M classes/View.php
M pages/TalkpageView.php
4 files changed, 15 insertions(+), 8 deletions(-)

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



diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index 7c4dce7..37882d0 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -76,7 +76,7 @@
$thread = Thread::newFromRow( $row );
 
$titleStr = $thread->subject();
-   $completeText = $thread->root()->getContent();
+   $completeText = ContentHandler::getContentText( 
$thread->root()->getPage()->getContent() );
$completeText = $this->getOutput()->parse( $completeText );
$threadTitle = clone $thread->topmostThread()->title();
$threadTitle->setFragment( '#' . $thread->getAnchorName() );
diff --git a/classes/NewMessagesController.php 
b/classes/NewMessagesController.php
index 6b76fd8..93635d2 100644
--- a/classes/NewMessagesController.php
+++ b/classes/NewMessagesController.php
@@ -322,11 +322,16 @@
$date = $lang->date( $adjustedTimestamp );
$time = $lang->time( $adjustedTimestamp );
 
-   $params = array( $u->getName(), 
$t->subjectWithoutIncrement(),
-   $date, $time, $talkPage,
-   $permalink,
-   $t->root()->getContent(),
-   $t->author()->getName() );
+   $params = array(
+   $u->getName(),
+   $t->subjectWithoutIncrement(),
+   $date,
+   $time,
+   $talkPage,
+   $permalink,
+   ContentHandler::getContentText( 
$t->root()->getPage()->getContent() ),
+   $t->author()->getName()
+   );
 
// Get message in user's own language, bug 20645
$msg = wfMessage( $msgName, $params )->inLanguage( 
$langCode )->text();
diff --git a/classes/View.php b/classes/View.php
index 1a75004..0541b34 100644
--- a/classes/View.php
+++ b/classes/View.php
@@ -1903,7 +1903,9 @@
 
foreach ( $replies as $reply ) {
$content = '';
-   if ( $reply->root() ) $content = 
$reply->root()->getContent();
+   if ( $reply->root() ) {
+   $content = ContentHandler::getContentText( 
$reply->root()->getPage()->getContent() );
+   }
 
if ( trim( $content ) != '' ) {
return true;
diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php
index f48c494..a3c91ec 100644
--- a/pages/TalkpageView.php
+++ b/pages/TalkpageView.php
@@ -121,7 +121,7 @@
// Table body
$rows = array();
foreach ( $threads as $thread ) {
-   if ( $thread->root() && !$thread->root()->getContent() 
&&
+   if ( $thread->root() && 
!$thread->root()->getPage()->getContent() &&
!LqtView::threadContainsRepliesWithContent( 
$thread ) ) {
continue;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f2c42f33ba6bcb8b0bcc0240b616ec114976837
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labs dns: Ensure the mysql server starts at boot

2016-10-28 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Labs dns:  Ensure the mysql server starts at boot
..

Labs dns:  Ensure the mysql server starts at boot

Change-Id: I8dfae7ae400fcd598d572e8898fe3d0dd44d716d
---
M modules/role/manifests/labs/dns.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/labs/dns.pp 
b/modules/role/manifests/labs/dns.pp
index 22e8be2..6d2d25c 100644
--- a/modules/role/manifests/labs/dns.pp
+++ b/modules/role/manifests/labs/dns.pp
@@ -39,6 +39,7 @@
 
 service { 'mariadb':
 ensure  => running,
+enable  => true,
 require => Class['mariadb::packages_wmf', 'mariadb::config'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dfae7ae400fcd598d572e8898fe3d0dd44d716d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from b6557174262285dbb280cb2f5250244ffc917453:

2016-10-28 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged.

Change subject: Merging from b6557174262285dbb280cb2f5250244ffc917453:
..


Merging from b6557174262285dbb280cb2f5250244ffc917453:

Merge "Fix chart height for Firefox"

Change-Id: I2b9c47db534dc09a3b33062eaded37308d455825
---
M embed.html
M index.html
D js/embed.wdqs.min.2de14abf3283cf455370.js
A js/embed.wdqs.min.e347772c8d2ac884b1a3.js
D js/wdqs.min.1adf38f49d5183aeb6b8.js
A js/wdqs.min.b345a6eddd5cf36555ed.js
6 files changed, 8 insertions(+), 8 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b9c47db534dc09a3b33062eaded37308d455825
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from b6557174262285dbb280cb2f5250244ffc917453:

2016-10-28 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Merging from b6557174262285dbb280cb2f5250244ffc917453:
..

Merging from b6557174262285dbb280cb2f5250244ffc917453:

Merge "Fix chart height for Firefox"

Change-Id: I2b9c47db534dc09a3b33062eaded37308d455825
---
M embed.html
M index.html
D js/embed.wdqs.min.2de14abf3283cf455370.js
A js/embed.wdqs.min.e347772c8d2ac884b1a3.js
D js/wdqs.min.1adf38f49d5183aeb6b8.js
A js/wdqs.min.b345a6eddd5cf36555ed.js
6 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/71/318571/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b9c47db534dc09a3b33062eaded37308d455825
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add kafka1003 to main-eqiad Kafka cluster

2016-10-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Add kafka1003 to main-eqiad Kafka cluster
..

Add kafka1003 to main-eqiad Kafka cluster

Bug: T148849
Change-Id: I832201e9cbf3497022ad99ca752e4a6b240089b4
---
M hieradata/common.yaml
M manifests/site.pp
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/318570/1

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 67229df..96523d7 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -422,6 +422,8 @@
 id: 1001
   kafka1002.eqiad.wmnet:
 id: 1002
+  kafka1003.eqiad.wmnet:
+id: 1003
 
   main-codfw:
 zookeeper_cluster_name: main-codfw
diff --git a/manifests/site.pp b/manifests/site.pp
index 78e35ab..aa8537e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1351,7 +1351,7 @@
 # Kafka Brokers - main-eqiad
 # For now, eventlogging-service-eventbus is also colocated
 # on these brokers.
-node /kafka100[12]\.eqiad\.wmnet/ {
+node /kafka100[123]\.eqiad\.wmnet/ {
 role(kafka::main::broker,
 # Mirror eqiad.* topics from Kafka main-eqiad into this main-codfw
 kafka::main::mirror,

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Simplify arg parsing

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [IMPR] Simplify arg parsing
..


[IMPR] Simplify arg parsing

Change-Id: If4d9038781d2e702d78bebf11b16c4a8460b250a
---
M scripts/welcome.py
1 file changed, 30 insertions(+), 47 deletions(-)

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



diff --git a/scripts/welcome.py b/scripts/welcome.py
index 0f2f908..ed0dd34 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -893,30 +893,24 @@
 @type args: list of unicode
 """
 for arg in pywikibot.handle_args(args):
-if arg.startswith('-edit'):
-if len(arg) == 5:
-globalvar.attachEditCount = int(pywikibot.input(
-u'After how many edits would you like to welcome new 
users? (0 is allowed)'))
-else:
-globalvar.attachEditCount = int(arg[6:])
-elif arg.startswith('-timeoffset'):
-if len(arg) == 11:
-globalvar.timeoffset = int(pywikibot.input(
-'Which time offset (in minutes) for new users would you 
like to use?'))
-else:
-globalvar.timeoffset = int(arg[12:])
-elif arg.startswith('-time'):
-if len(arg) == 5:
-globalvar.timeRecur = int(pywikibot.input(
-u'For how many seconds would you like to bot to sleep 
before checking again?'))
-else:
-globalvar.timeRecur = int(arg[6:])
-elif arg.startswith('-offset'):
-if len(arg) == 7:
+arg, sep, val = arg.partition(':')
+if arg == '-edit':
+globalvar.attachEditCount = int(val or pywikibot.input(
+'After how many edits would you like to welcome new users? '
+'(0 is allowed)'))
+elif arg == '-timeoffset':
+globalvar.timeoffset = int(val or pywikibot.input(
+'Which time offset (in minutes) for new users would you like '
+'to use?'))
+elif arg == '-time':
+globalvar.timeRecur = int(val or pywikibot.input(
+'For how many seconds would you like to bot to sleep before '
+'checking again?'))
+elif arg == '-offset':
+if not val:
 val = pywikibot.input(
-'Which time offset for new users would you like to use? 
(mmddhhmmss)')
-else:
-val = arg[8:]
+'Which time offset for new users would you like to use? '
+'(mmddhhmmss)')
 try:
 globalvar.offset = pywikibot.Timestamp.fromtimestampformat(val)
 except ValueError:
@@ -926,19 +920,13 @@
 "anymore, but -offset:TIMESTAMP is, assuming TIMESTAMP "
 "is mmddhhmmss. -timeoffset is now also supported. "
 "Please read this script source header for documentation.")
-elif arg.startswith('-file'):
+elif arg == '-file':
 globalvar.randomSign = True
-if len(arg) <= 6:
-globalvar.signFileName = pywikibot.input(
-u'Where have you saved your signatures?')
-else:
-globalvar.signFileName = arg[6:]
-elif arg.startswith('-sign'):
-if len(arg) <= 6:
-globalvar.defaultSign = pywikibot.input(
-u'Which signature to use?')
-else:
-globalvar.defaultSign = arg[6:]
+globalvar.signFileName = val or pywikibot.input(
+'Where have you saved your signatures?')
+elif arg == '-sign':
+globalvar.defaultSign = val or pywikibot.input(
+'Which signature to use?')
 globalvar.defaultSign += timeselected
 elif arg == '-break':
 globalvar.recursive = False
@@ -954,18 +942,13 @@
 globalvar.randomSign = True
 elif arg == '-sul':
 globalvar.welcomeAuto = True
-elif arg.startswith('-limit'):
-if len(arg) == 6:
-globalvar.queryLimit = int(pywikibot.input(
-u'How many of the latest new users would you like to 
load?'))
-else:
-globalvar.queryLimit = int(arg[7:])
-elif arg.startswith('-numberlog'):
-if len(arg) == 10:
-globalvar.dumpToLog = int(pywikibot.input(
-u'After how many welcomed users would you like to update 
the welcome log?'))
-else:
-globalvar.dumpToLog = int(arg[11:])
+elif arg == '-limit':
+globalvar.queryLimit = int(val or pywikibot.input(
+u'How many of the latest new users would you like to load?'))
+elif arg == '-numberlog':
+globalvar.dumpToLog = 

[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: build: Replace jscs and jshint with eslint

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: build: Replace jscs and jshint with eslint
..

build: Replace jscs and jshint with eslint

Change-Id: I95f59d9bef6bb8fec69b454dc8efe4b4c7e40805
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M modules/ext.math.js
M modules/ve-math/tools/makeSvgsAndCss.js
M modules/ve-math/ve.ce.MWMathNode.js
M modules/ve-math/ve.dm.MWMathNode.js
M modules/ve-math/ve.ui.MWMathDialogTool.js
M modules/ve-math/ve.ui.MWMathInspector.js
M modules/ve-math/ve.ui.MWMathPage.js
M package.json
13 files changed, 41 insertions(+), 89 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..955cabc
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,19 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "ve": true,
+   "mw": true,
+   "mediaWiki": false,
+   "OO": false
+   },
+   "rules": {
+   "dot-notation": 0,
+   "wrap-iife": 0,
+   "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }]
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 1959eea..000
--- a/.jscsrc
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "jsDoc": {
-   "checkAnnotations": {
-   "preset": "jsduck5",
-   "extra": {
-   "this": true,
-   "source": true,
-   "see": true
-   }
-   },
-   "checkTypes": "strictNativeCase",
-   "checkParamNames": true,
-   "checkRedundantAccess": true,
-   "checkRedundantReturns": true,
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-   }
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index b646851..000
--- a/.jshintignore
+++ /dev/null
@@ -1,6 +0,0 @@
-# third-party lib
-modules/MathJax
-
-# browser code in the middle of node code
-mathoid/main.js
-mathoid/engine.js
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 8d16fd4..000
--- a/.jshintrc
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": "nofunc",
-   "futurehostile": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false,
-   "ve": false,
-   "mw": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 393ae65..122395a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,10 +1,9 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
@@ -34,37 +33,31 @@
]
}
},
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   all: [
-   '*.js',
-   'modules/**/*.js'
-   ]
-   },
watch: {
files: [
-   '.{stylelintrc,jscsrc,jshintignore,jshintrc}',
-   '<%= jshint.all %>',
+   '.{stylelintrc,.eslintrc.json}',
+   '<%= eslint.main %>',
'<%= stylelint.core.src %>',
'<%= stylelint[ "ve-math" ].src %>'
],
tasks: 'test'
},
-   jscs: {
+   eslint: {
fix: {
options: {
fix: true
},
-   src: '<%= jshint.all %>'
+ 

[MediaWiki-commits] [Gerrit] wikimedia...discernatron[master]: Implement Krippendorff's Alpha

2016-10-28 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Implement Krippendorff's Alpha
..

Implement Krippendorff's Alpha

To measure the disagreement between reviewers (in a followup patch), we
need a metric that can measure this. This implements Krippendorff's
Alpha for ordinal judgements.

Change-Id: I1f25745f9e79ae4127a20d32ff4c98300827edde
---
A src/RelevanceScoring/KrippendorffAlpha.php
A tests/unit/RelevanceScoring/KrippendorffAlphaTest.php
2 files changed, 163 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron 
refs/changes/68/318568/1

diff --git a/src/RelevanceScoring/KrippendorffAlpha.php 
b/src/RelevanceScoring/KrippendorffAlpha.php
new file mode 100644
index 000..0fa350e
--- /dev/null
+++ b/src/RelevanceScoring/KrippendorffAlpha.php
@@ -0,0 +1,118 @@
+http://repository.upenn.edu/cgi/viewcontent.cgi?article=1043=asc_papers
+ */
+class KrippendorffAlpha
+{
+public static function ordinal(array $data, $min, $max)
+{
+$metric = function ($c, $k, array $Nc) {
+if ($c === $k) {
+return 0;
+}
+$sum = 0;
+foreach (range($c, $k) as $g) {
+$sum += $Nc[$g];
+}
+
+return $sum - ($Nc[$c] + $Nc[$k]) / 2;
+};
+
+return self::calculate($data, $min, $max, $metric);
+}
+
+/**
+ * This is probably not the most efficient way to do all this, in fact the
+ * paper seems to suggest a simpler way at the end, in section E, which
+ * bypasses the coincidence matrices. But I couldn't get that to work quite
+ * right...so we have this more complicated form.
+ */
+private static function calculate(array $data, $min, $max, $metric)
+{
+// It is assumed $data is already in the form of the 'reliability data 
matrix'
+// from C1. Missing data is represented by nulls.
+
+// Number of observers valuing a unit
+$Mu = array_pad([], count($data[0]), 0);
+foreach ($data as $observer => $grades) {
+foreach ($grades as $u => $grade) {
+if ($grade !== null) {
+++$Mu[$u];
+}
+}
+}
+
+// Count the number of c-k pairs in unit u
+$pairs = array_fill(
+0,
+count($data[0]),
+array_fill(
+$min,
+($max - $min) + 1,
+array_fill(
+$min,
+($max - $min) + 1,
+0
+)
+)
+);
+foreach ($data as $observer1 => $units1) {
+foreach ($data as $observer2 => $units2) {
+if ($observer1 === $observer2) {
+continue;
+}
+for ($u = 0; $u < count($units1); ++$u) {
+$c = $units1[$u];
+$k = $units2[$u];
+if ($c !== null && $k !== null) {
+++$pairs[$u][$c][$k];
+}
+}
+}
+}
+
+// Calculate the coincidence matrix
+$Ock = [];
+foreach (range($min, $max) as $c) {
+foreach (range($c, $max) as $k) {
+$Ock[$c][$k] = 0;
+for ($u = 0; $u < count($data[0]); ++$u) {
+if ($pairs[$u][$c][$k]) {
+$Ock[$c][$k] += $pairs[$u][$c][$k] / ($Mu[$u] - 1);
+}
+}
+$Ock[$k][$c] = $Ock[$c][$k];
+}
+}
+
+$Nc = [];
+foreach ($Ock as $c => $row) {
+$Nc[$c] = array_sum($row);
+}
+$N = array_sum($Nc);
+
+// calculate difference observed
+$Do = 0;
+for ($c = $min; $c <= $max; ++$c) {
+for ($k = $c + 1; $k <= $max; ++$k) {
+$Do += $Ock[$c][$k] * pow($metric($c, $k, $Nc), 2);
+}
+}
+
+// difference expected by random chance
+$De = 0;
+for ($c = $min; $c <= $max; ++$c) {
+for ($k = $c + 1; $k <= $max; ++$k) {
+$De += $Nc[$c] * $Nc[$k] * pow($metric($c, $k, $Nc), 2);
+}
+}
+
+return 1 - ($N - 1) * $Do / $De;
+}
+}
diff --git a/tests/unit/RelevanceScoring/KrippendorffAlphaTest.php 
b/tests/unit/RelevanceScoring/KrippendorffAlphaTest.php
new file mode 100644
index 000..1889709
--- /dev/null
+++ b/tests/unit/RelevanceScoring/KrippendorffAlphaTest.php
@@ -0,0 +1,45 @@
+ [
+0.815,
+1, 5,
+[
+[1,2, 3, 3, 2, 1, 4, 1, 2, null, null, null],
+[1,2, 3, 3, 2, 2, 4, 1, 2, 5,null, 3],
+[null, 3, 3, 3, 2, 3, 4, 2, 2, 5,1,

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: replace hardcoded font scale with symbol

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: replace hardcoded font scale with symbol
..


Hygiene: replace hardcoded font scale with symbol

Change-Id: Ib273e18ee5d53e1c35dc76b14bc01ff3beb6b87e
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
3 files changed, 22 insertions(+), 22 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
index 54a757f..4ce5592 100644
--- a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
@@ -40,7 +40,7 @@
 }
 
 @Theory public void testLayoutDirection(@NonNull LayoutDirection 
direction) {
-setUp(WIDTH_DP_L, direction, 1, Theme.LIGHT, R.drawable.wmf_logo,
+setUp(WIDTH_DP_L, direction, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
 R.color.foundation_blue);
 snap(subject);
@@ -48,13 +48,13 @@
 
 @Theory public void testTheme(@NonNull Theme theme,
   @TestedOn(ints = {R.color.foundation_blue, 
R.color.foundation_green}) int circleColor) {
-setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 
R.drawable.wmf_logo,
+setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 
R.drawable.wmf_logo,
 R.string.reading_list_name_sample, 
R.string.reading_list_untitled, circleColor);
 snap(subject, circleColor == R.color.foundation_blue ? "blue" : 
"green");
 }
 
 @Theory public void testFocus(@NonNull Theme theme) {
-setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 
R.drawable.wmf_logo,
+setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 
R.drawable.wmf_logo,
 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
 R.color.foundation_blue);
 runOnMainSync(new Runnable() {
@@ -67,13 +67,13 @@
 
 // todo: how can we test popupmenu which requires an activity?
 //@Theory public void testMenu(@NonNull Theme theme) {
-//setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 
R.drawable.wmf_logo,
+//setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 
R.drawable.wmf_logo,
 //R.string.reading_list_name_sample, 
R.string.reading_list_untitled);
 //clickMenu();
 //}
 
 @Test public void testSetCard() {
-setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 0, 0, 0, 
R.color.foundation_blue);
+setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
0, 0, 0, R.color.foundation_blue);
 Card card = mock(Card.class);
 subject.setCard(card);
 assertThat(subject.getCard(), is(card));
@@ -82,7 +82,7 @@
 // todo: how can we test popupmenu which requires an activity?
 //@Theory public void testSetCallback(@TestedOn(ints = {0, 1}) int 
nonnullListener,
 //@TestedOn(ints = {0, 1}) int 
nonnullCard) {
-//setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+//setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], 
Theme.LIGHT, R.drawable.wmf_logo,
 //R.string.reading_list_name_sample, 
R.string.reading_list_untitled);
 //
 //Card card = nonnullCard == 0 ? null : mock(Card.class);
@@ -98,7 +98,7 @@
 //}
 
 @Test public void testSetImage() {
-setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
 R.color.foundation_blue);
 ImageView imageView = findById(subject, R.id.view_card_header_image);
@@ -108,7 +108,7 @@
 }
 
 @Test public void testSetImageCircleColor() {
-setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
 R.color.foundation_blue);
 TintableBackgroundView imageView = findById(subject, 
R.id.view_card_header_image);
@@ -119,13 +119,13 @@
 
 @Theory public void testSetTitleStr(@TestedOn(ints = {0,
 R.string.reading_list_name_sample}) int text) {
-

[MediaWiki-commits] [Gerrit] oojs/ui[master]: build: Update eslint-config-wikimedia to v0.2.0

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Update eslint-config-wikimedia to v0.2.0
..


build: Update eslint-config-wikimedia to v0.2.0

Change-Id: Iff5e439d2ef21b9ebf5895ae163a3ea7afd34080
---
M demos/demo.js
M package.json
M src/Element.js
M src/core.js
4 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/demos/demo.js b/demos/demo.js
index 2d27c3c..7a39a9d 100644
--- a/demos/demo.js
+++ b/demos/demo.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-console */
 /**
  * @class
  * @extends {OO.ui.Element}
@@ -68,6 +69,7 @@
.append( this.$menu );
$( 'html' ).attr( 'dir', this.mode.direction );
$( 'head' ).append( this.stylesheetLinks );
+   // eslint-disable-next-line new-cap
OO.ui.theme = new ( this.constructor.static.themes[ this.mode.theme 
].theme )();
 };
 
@@ -384,6 +386,7 @@
str = 'return ' + str;
}
try {
+   // eslint-disable-next-line no-new-func
func = new Function( layout, widget, 'item', str );
ret = { value: func( item, item.fieldWidget, 
item.fieldWidget ) };
} catch ( error ) {
diff --git a/package.json b/package.json
index 46bb817..fce20bc 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
 "oojs": "1.1.10"
   },
   "devDependencies": {
-"eslint-config-wikimedia": "0.1.0",
+"eslint-config-wikimedia": "0.2.0",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",
 "grunt-contrib-clean": "1.0.0",
diff --git a/src/Element.js b/src/Element.js
index 9c28abc..55d39df 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -230,6 +230,7 @@
// pick up dynamic state, like focus, value of form inputs, scroll 
position, etc.
state = cls.static.gatherPreInfuseState( $elem[ 0 ], data );
// rebuild widget
+   // eslint-disable-next-line new-cap
obj = new cls( data );
// now replace old DOM with this new DOM.
if ( top ) {
diff --git a/src/core.js b/src/core.js
index 669a81d..623b991 100644
--- a/src/core.js
+++ b/src/core.js
@@ -253,6 +253,7 @@
  */
 OO.ui.warnDeprecation = function ( message ) {
if ( OO.getProp( window, 'console', 'warn' ) !== undefined ) {
+   // eslint-disable-next-line no-console
console.warn( message );
}
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff5e439d2ef21b9ebf5895ae163a3ea7afd34080
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add ListCardViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add ListCardViewTest
..


Add ListCardViewTest

Bug: T144399
Change-Id: I1e1b1285d2dab4c99fee9822d63199402f7479b6
---
A app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java
M app/src/main/java/org/wikipedia/feed/view/ListCardView.java
2 files changed, 97 insertions(+), 0 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java
new file mode 100644
index 000..ad70cff
--- /dev/null
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java
@@ -0,0 +1,95 @@
+package org.wikipedia.feed.view;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.support.v7.widget.RecyclerView.Adapter;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.theories.Theory;
+import org.junit.experimental.theories.suppliers.TestedOn;
+import org.wikipedia.feed.model.Card;
+import org.wikipedia.test.ViewTest;
+import org.wikipedia.theme.Theme;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.wikipedia.feed.view.FeedAdapter.Callback;
+import static org.wikipedia.test.ViewTest.LayoutDirection.LOCALE;
+
+public class ListCardViewTest extends ViewTest {
+private ListCardView subject;
+
+@Before public void setUp() {
+setUp(WIDTH_DP_S, LOCALE, FONT_SCALES[0], Theme.LIGHT);
+subject = new Subject(ctx());
+}
+
+@Theory public void testSetCallback(@TestedOn(ints = {0, 1}) int 
nonnullHeader,
+@TestedOn(ints = {0, 1}) int 
nonnullCallback) {
+CardHeaderView header = nonnullHeader == 0 ? null : 
mock(CardHeaderView.class);
+if (header != null) {
+subject.header(header);
+}
+
+Callback callback = nonnullCallback == 0 ? null : 
mock(FeedAdapter.Callback.class);
+subject.setCallback(callback);
+assertThat(subject.getCallback(), is(callback));
+if (header != null) {
+verify(header).setCallback(eq(callback));
+}
+}
+
+@Theory public void testSet(@TestedOn(ints = {0, 1}) int nonnull) {
+Adapter adapter = nonnull == 0 ? null : mock(Adapter.class);
+subject.set(adapter);
+//noinspection rawtypes
+assertThat(subject.recyclerView.getAdapter(), is((Adapter) adapter));
+}
+
+@Theory public void testUpdate(@TestedOn(ints = {0, 1}) int nonnull) {
+Adapter adapter = nonnull == 0 ? null : spy(new NullAdapter());
+subject.set(adapter);
+subject.update();
+if (adapter != null) {
+verify(adapter).notifyDataSetChanged();
+}
+}
+
+@Test public void testHeader() {
+View header = mock(View.class);
+subject.header(header);
+assertThat(subject.headerView, is(header));
+}
+
+@Test public void testLargeHeader() {
+View header = mock(View.class);
+subject.largeHeader(header);
+assertThat(subject.largeHeaderView, is(header));
+}
+
+public static class NullAdapter extends Adapter {
+@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup 
parent, int viewType) {
+return null;
+}
+
+@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, 
int position) {
+}
+
+@Override public int getItemCount() {
+return 0;
+}
+}
+
+private static class Subject extends ListCardView {
+Subject(Context context) {
+super(context);
+}
+}
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/view/ListCardView.java 
b/app/src/main/java/org/wikipedia/feed/view/ListCardView.java
index 0bfaf24..f2e7972 100644
--- a/app/src/main/java/org/wikipedia/feed/view/ListCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/ListCardView.java
@@ -56,6 +56,8 @@
 largeHeaderView = view;
 }
 
+/** Called by the constructor. Override to provide custom behavior but 
otherwise do not call
+directly. */
 protected void initRecycler(@NonNull RecyclerView recyclerView) {
 recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
 recyclerView.addItemDecoration(new DrawableItemDecoration(getContext(),

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] mediawiki...AccessControl[master]: Replaced deprecated Article::fetchContent()

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replaced deprecated Article::fetchContent()
..


Replaced deprecated Article::fetchContent()

Bug: T146191
Bug: T148868
Change-Id: Ib74aa25468450aece00bb061d894c0ed60e7375c
---
M AccessControl.hooks.php
1 file changed, 14 insertions(+), 29 deletions(-)

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



diff --git a/AccessControl.hooks.php b/AccessControl.hooks.php
index f4d1349..0bb996d 100644
--- a/AccessControl.hooks.php
+++ b/AccessControl.hooks.php
@@ -81,33 +81,22 @@
/* Function get content the page identified by title object 
from database */
$Title = new Title();
$gt = $Title->makeTitle( $namespace, $title );
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $contentPage = new WikiPage( $gt );
-   if ( $contentPage->getContent() != null ) {
-   return 
$contentPage->getContent()->getNativeData();
-   }
-   } else {
-   // create Article and get the content
-   $contentPage = new Article( $gt, 0 );
-
-   return $contentPage->fetchContent( 0 );
-   }
+   // Article::fetchContent() is deprecated.
+   // Replaced by WikiPage::getContent()
+   $page = WikiPage::factory( $gt );
+   $content = ContentHandler::getContentText( $page -> 
getContent() );
+   return $content;
}
 
public function getTemplatePage( $template ) {
/* Function get content the template page identified by title 
object from database */
$Title = new Title();
$gt = $Title->makeTitle( 10, $template );
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $contentPage = new WikiPage( $gt );
-
-   return $contentPage->getContent()->getNativeData();
-   } else {
-   // create Article and get the content
-   $contentPage = new Article( $gt, 0 );
-
-   return $contentPage->fetchContent( 0 );
-   }
+   // Article::fetchContent() is deprecated.
+   // Replaced by WikiPage::getContent()
+   $page = WikiPage::factory( $gt );
+   $content = ContentHandler::getContentText( $page -> 
getContent() );
+   return $content;
}
 
public static function getUsersFromPages( $group ) {
@@ -117,14 +106,10 @@
$Title = new Title();
// Remark: position to add code to use namespace from mediawiki
$gt = $Title->makeTitle( 0, $group );
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $groupPage = new WikiPage( $gt );
-   $allowedUsers = 
$groupPage->getContent()->getNativeData();
-   } else {
-   // create Article and get the content
-   $groupPage = new Article( $gt, 0 );
-   $allowedUsers = $groupPage->fetchContent( 0 );
-   }
+   // Article::fetchContent() is deprecated.
+   // Replaced by WikiPage::getContent()
+   $groupPage = WikiPage::factory( $gt );
+   $allowedUsers = ContentHandler::getContentText( $groupPage -> 
getContent() );
$groupPage = null;
$usersAccess = explode( "\n", $allowedUsers );
foreach ( $usersAccess as $userEntry ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib74aa25468450aece00bb061d894c0ed60e7375c
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/AccessControl
Gerrit-Branch: master
Gerrit-Owner: Enigmaeth 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Florianschmidtwelzow 
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] mediawiki...ContentTranslation[master]: Log the user id and source title in eventlogging for campaigns

2016-10-28 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Log the user id and source title in eventlogging for campaigns
..

Log the user id and source title in eventlogging for campaigns

Bug: T149380
Change-Id: Iddd238f3271cf4ab3b473944c75a64f992972947
---
M ContentTranslation.hooks.php
M modules/dashboard/ext.cx.dashboard.js
M modules/eventlogging/ext.cx.eventlogging.js
M modules/source/ext.cx.source.js
4 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 121f73b..dbc0287 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -127,7 +127,7 @@
 */
public static function addEventLogging( array &$schemas ) {
$schemas['ContentTranslation'] = 11628043;
-   $schemas['ContentTranslationCTA'] = 11616099;
+   $schemas['ContentTranslationCTA'] = 16017678;
$schemas['ContentTranslationError'] = 11767097;
}
 
diff --git a/modules/dashboard/ext.cx.dashboard.js 
b/modules/dashboard/ext.cx.dashboard.js
index 0be1eb1..07fecaf 100644
--- a/modules/dashboard/ext.cx.dashboard.js
+++ b/modules/dashboard/ext.cx.dashboard.js
@@ -333,7 +333,7 @@
this.$newTranslationButton.cxSourceSelector( 
sourceSelectorOptions );
 
if ( query.campaign ) {
-   mw.hook( 'mw.cx.cta.accept' ).fire( query.campaign, 
query.from, query.to );
+   mw.hook( 'mw.cx.cta.accept' ).fire( query.campaign, 
query.from, query.page, query.to );
}
};
 
diff --git a/modules/eventlogging/ext.cx.eventlogging.js 
b/modules/eventlogging/ext.cx.eventlogging.js
index 58b8976..4f827d3 100644
--- a/modules/eventlogging/ext.cx.eventlogging.js
+++ b/modules/eventlogging/ext.cx.eventlogging.js
@@ -216,15 +216,17 @@
} );
},
 
-   ctaAccept: function ( campaign, sourceLanguage, targetLanguage 
) {
+   ctaAccept: function ( campaign, sourceLanguage, sourceTitle, 
targetLanguage ) {
mw.track( 'event.ContentTranslationCTA', {
version: 1,
cta: campaign,
action: 'accept',
+   token: mw.user.id(),
session: mw.user.sessionId(),
contentLanguage: mw.config.get( 
'wgContentLanguage' ),
interfaceLanguage: mw.config.get( 
'wgUserLanguage' ),
sourceLanguage: sourceLanguage,
+   sourceTitle: sourceTitle,
targetLanguage: targetLanguage
} );
},
diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index f156065..50ca00c 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -53,7 +53,7 @@
this.listen();
 
if ( query.campaign ) {
-   mw.hook( 'mw.cx.cta.accept' ).fire( query.campaign, 
query.from, query.to );
+   mw.hook( 'mw.cx.cta.accept' ).fire( query.campaign, 
query.from, query.page, query.to );
}
};
 

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add DefaultFeedCardViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add DefaultFeedCardViewTest
..


Add DefaultFeedCardViewTest

Bug: T144399
Change-Id: I664d051183df7ba7cd8a343c6ca4e50969e28e6b
---
A app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
M app/src/androidTest/java/org/wikipedia/test/ViewTest.java
M app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
3 files changed, 49 insertions(+), 5 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
new file mode 100644
index 000..b2f9d08
--- /dev/null
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java
@@ -0,0 +1,44 @@
+package org.wikipedia.feed.view;
+
+import android.content.Context;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.theories.Theory;
+import org.junit.experimental.theories.suppliers.TestedOn;
+import org.wikipedia.feed.model.Card;
+import org.wikipedia.feed.view.FeedAdapter.Callback;
+import org.wikipedia.test.ViewTest;
+import org.wikipedia.theme.Theme;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+import static org.wikipedia.test.ViewTest.LayoutDirection.LOCALE;
+
+public class DefaultFeedCardViewTest extends ViewTest {
+private DefaultFeedCardView subject;
+
+@Before public void setUp() {
+setUp(WIDTH_DP_S, LOCALE, FONT_SCALES[0], Theme.LIGHT);
+subject = new Subject(ctx());
+}
+
+@Test public void testSetGetCard() {
+Card card = mock(Card.class);
+subject.setCard(card);
+assertThat(subject.getCard(), is(card));
+}
+
+@Theory public void testSetGetCallback(@TestedOn(ints = {0, 1}) int 
nonnull) {
+Callback callback = nonnull == 0 ? null : mock(Callback.class);
+subject.setCallback(callback);
+assertThat(subject.getCallback(), is(callback));
+}
+
+private static class Subject extends DefaultFeedCardView {
+Subject(Context context) {
+super(context);
+}
+}
+}
\ No newline at end of file
diff --git a/app/src/androidTest/java/org/wikipedia/test/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/ViewTest.java
index 56afd3eb..4bfe21e 100644
--- a/app/src/androidTest/java/org/wikipedia/test/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/ViewTest.java
@@ -44,7 +44,7 @@
 protected static final int WIDTH_DP_S = 240;
 protected static final int WIDTH_DP_XS = 120;
 
-protected enum LayoutDirection { LOCALE, RTL }
+public enum LayoutDirection { LOCALE, RTL }
 
 private int widthDp;
 private Locale locale;
diff --git a/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java 
b/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
index 0e2434b..b81c019 100644
--- a/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
@@ -19,14 +19,14 @@
 this.card = card;
 }
 
-@Override public void setCallback(@Nullable FeedAdapter.Callback callback) 
{
-this.callback = callback;
-}
-
 @Nullable protected T getCard() {
 return card;
 }
 
+@Override public void setCallback(@Nullable FeedAdapter.Callback callback) 
{
+this.callback = callback;
+}
+
 @Nullable protected FeedAdapter.Callback getCallback() {
 return callback;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I664d051183df7ba7cd8a343c6ca4e50969e28e6b
Gerrit-PatchSet: 4
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
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 Parser to MediaWikiServices

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add Parser to MediaWikiServices
..


Add Parser to MediaWikiServices

So we can avoid using $wgParser everywhere.

Change-Id: Ie5fd2c523ceec8cc2656e749928f38909dc4bdf1
---
M includes/MediaWikiServices.php
M includes/ServiceWiring.php
M includes/Setup.php
M tests/phpunit/includes/MediaWikiServicesTest.php
4 files changed, 18 insertions(+), 1 deletion(-)

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



diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index 7f94ced..2171a5d 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -21,6 +21,7 @@
 use MWException;
 use MimeAnalyzer;
 use ObjectCache;
+use Parser;
 use ProxyLookup;
 use SearchEngine;
 use SearchEngineConfig;
@@ -558,6 +559,14 @@
 
/**
 * @since 1.28
+* @return Parser
+*/
+   public function getParser() {
+   return $this->getService( 'Parser' );
+   }
+
+   /**
+* @since 1.28
 * @return GenderCache
 */
public function getGenderCache() {
diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index 49183e5..a427f5c 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -207,6 +207,11 @@
);
},
 
+   'Parser' => function( MediaWikiServices $services ) {
+   $conf = $services->getMainConfig()->get( 'ParserConf' );
+   return ObjectFactory::constructClassInstance( $conf['class'], [ 
$conf ] );
+   },
+
'LinkCache' => function( MediaWikiServices $services ) {
return new LinkCache(
$services->getTitleFormatter(),
diff --git a/includes/Setup.php b/includes/Setup.php
index 7cda14c..357c76d 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -818,7 +818,9 @@
 /**
  * @var Parser $wgParser
  */
-$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], [ 
$wgParserConf ] );
+$wgParser = new StubObject( 'wgParser', function () {
+   return MediaWikiServices::getInstance()->getParser();
+} );
 
 /**
  * @var Title $wgTitle
diff --git a/tests/phpunit/includes/MediaWikiServicesTest.php 
b/tests/phpunit/includes/MediaWikiServicesTest.php
index 0ff903f..c9c50c0 100644
--- a/tests/phpunit/includes/MediaWikiServicesTest.php
+++ b/tests/phpunit/includes/MediaWikiServicesTest.php
@@ -314,6 +314,7 @@
'WatchedItemQueryService' => [ 
'WatchedItemQueryService', WatchedItemQueryService::class ],
'CryptRand' => [ 'CryptRand', CryptRand::class ],
'MediaHandlerFactory' => [ 'MediaHandlerFactory', 
MediaHandlerFactory::class ],
+   'Parser' => [ 'Parser', Parser::class ],
'GenderCache' => [ 'GenderCache', GenderCache::class ],
'LinkCache' => [ 'LinkCache', LinkCache::class ],
'LinkRenderer' => [ 'LinkRenderer', LinkRenderer::class 
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5fd2c523ceec8cc2656e749928f38909dc4bdf1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Fix PHP demo directionality

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: demos: Fix PHP demo directionality
..


demos: Fix PHP demo directionality

Bug: T133219
Change-Id: Ib022b24afbf12c4687b2a559a5fc5574c1950e56
---
M demos/demos.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/demos/demos.php b/demos/demos.php
index 8d8b8dd..3b623a9 100644
--- a/demos/demos.php
+++ b/demos/demos.php
@@ -38,7 +38,7 @@
$styleFileNameImages = "oojs-ui-images-$theme$directionSuffix.css";
 ?>
 
-
+
 

OOjs UI Widget Demo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib022b24afbf12c4687b2a559a5fc5574c1950e56
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: build: Update eslint-config-wikimedia to 0.2.0 and make a pass

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Update eslint-config-wikimedia to 0.2.0 and make a pass
..


build: Update eslint-config-wikimedia to 0.2.0 and make a pass

Change-Id: I382ea63049dfef76610edf46c2c8c3e5b7f8b3ff
---
M demos/ve/ve.demo.init.js
M package.json
M src/ce/nodes/ve.ce.TableNode.js
M src/ce/nodes/ve.ce.TableRowNode.js
M src/dm/ve.dm.Converter.js
M src/dm/ve.dm.InternalList.js
M src/ui/actions/ve.ui.TableAction.js
M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
M src/ui/dialogs/ve.ui.LanguageSearchDialog.js
M src/ui/ve.ui.DebugBar.js
M src/ve.Filibuster.js
M src/ve.utils.js
M tests/ce/imetests/input-ie11-win8.1-korean.js
M tests/ce/ve.ce.Surface.test.js
M tests/dm/lineardata/ve.dm.ElementLinearData.test.js
M tests/dm/ve.dm.Transaction.test.js
M tests/dm/ve.dm.TransactionProcessor.test.js
M tests/ve.qunit.js
M tests/ve.test.js
19 files changed, 62 insertions(+), 62 deletions(-)

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



diff --git a/demos/ve/ve.demo.init.js b/demos/ve/ve.demo.init.js
index 82c229f..cb5038c 100644
--- a/demos/ve/ve.demo.init.js
+++ b/demos/ve/ve.demo.init.js
@@ -8,6 +8,7 @@
 
var $toolbar = $( '.ve-demo-targetToolbar' ),
$editor = $( '.ve-demo-editor' ),
+   // eslint-disable-next-line new-cap
target = new ve.demo.target(),
hashChanging = false,
 
diff --git a/package.json b/package.json
index a2c3354..b8eaff5 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
 }
   ],
   "devDependencies": {
-"eslint-config-wikimedia": "0.1.0",
+"eslint-config-wikimedia": "0.2.0",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",
 "grunt-contrib-clean": "1.0.0",
diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js
index 0a2a0fe..484b629 100644
--- a/src/ce/nodes/ve.ce.TableNode.js
+++ b/src/ce/nodes/ve.ce.TableNode.js
@@ -375,7 +375,7 @@
}
// Ignore update the overlay if the table selection changed, 
i.e. not an in-cell selection change
if ( selection instanceof ve.dm.TableSelection ) {
-   this.updateOverlayDebounced( true  );
+   this.updateOverlayDebounced( true );
}
} else if ( !active && this.active ) {
this.$overlay.addClass( 'oo-ui-element-hidden' );
diff --git a/src/ce/nodes/ve.ce.TableRowNode.js 
b/src/ce/nodes/ve.ce.TableRowNode.js
index 8df7ac1..2e0f989 100644
--- a/src/ce/nodes/ve.ce.TableRowNode.js
+++ b/src/ce/nodes/ve.ce.TableRowNode.js
@@ -90,7 +90,7 @@
 ve.ce.TableRowNode.prototype.onMissingCellClick = function () {
var row, col,
surfaceModel = this.getRoot().getSurface().getModel(),
-   documentModel =  surfaceModel.getDocument(),
+   documentModel = surfaceModel.getDocument(),
tableModel = this.findParent( ve.ce.TableNode ).getModel(),
matrix = tableModel.getMatrix();
 
diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index f74c158..23acaa7 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -1226,7 +1226,7 @@
}
endOffset = findEndOfNode( i );
// Remove this node's data from dataCopy
-   dataCopy.splice( i - ( dataLen - 
dataCopy.length ),  endOffset - i );
+   dataCopy.splice( i - ( dataLen - 
dataCopy.length ), endOffset - i );
// Move i such that it will be at endOffset in 
the next iteration
i = endOffset - 1;
}
diff --git a/src/dm/ve.dm.InternalList.js b/src/dm/ve.dm.InternalList.js
index 1f43ba1..f4b9b01 100644
--- a/src/dm/ve.dm.InternalList.js
+++ b/src/dm/ve.dm.InternalList.js
@@ -260,7 +260,7 @@
index = this.getItemNodeCount();
this.keyIndexes[ groupName + '/' + key ] = index;
 
-   itemData = [ { type: 'internalItem' } ].concat( data,  [ { 
type: '/internalItem' } ] );
+   itemData = [ { type: 'internalItem' } ].concat( data, [ { type: 
'/internalItem' } ] );
tx = ve.dm.Transaction.newFromInsertion(
this.getDocument(),
this.getListNode().getRange().end,
diff --git a/src/ui/actions/ve.ui.TableAction.js 
b/src/ui/actions/ve.ui.TableAction.js
index 3cff02a..68b711f 100644
--- a/src/ui/actions/ve.ui.TableAction.js
+++ b/src/ui/actions/ve.ui.TableAction.js
@@ -798,7 +798,7 @@
// Detect if the owner of a spanning cell gets deleted and
// leaves orphaned placeholders
span = cell.node.getSpans()[ mode ];
-   if ( cell[ mode ] + span - 1  > 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Re-use eslint.main for eslint.fix

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Re-use eslint.main for eslint.fix
..

Re-use eslint.main for eslint.fix

Change-Id: I6dd1f2e15a4dab441f1135385fbf4dab3597b7c2
---
M Gruntfile.js
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/66/318566/1

diff --git a/Gruntfile.js b/Gruntfile.js
index d00027b..aec1229 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -253,8 +253,7 @@
fix: true
},
src: [
-   '*.js',
-   '{bin,build,demos,src,tests}/**/*.js'
+   '<%= eslint.main %>'
]
},
main: [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dd1f2e15a4dab441f1135385fbf4dab3597b7c2
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add CardHeaderViewTest

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add CardHeaderViewTest
..


Add CardHeaderViewTest

I had to change an ImageView in CardHeaderView back to an explicit
AppCompatImageView because the test library doesn't seem to use that
implementation implicitly.

Bug: T144400
Bug: T148875
Change-Id: Iffe71e944512b00c14f04445191217a807249b6f
---
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testTheme-480dp-en-ltr-font1.0x-dark-blue.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testTheme-480dp-en-ltr-font1.0x-dark-green.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testTheme-480dp-en-ltr-font1.0x-light-blue.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testTheme-480dp-en-ltr-font1.0x-light-green.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-long_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-long_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-long_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-no_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-no_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-no_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-short_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-short_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-image-short_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-long_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-long_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-long_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-no_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-no_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-no_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-short_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-short_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.0x-light-no_image-short_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-long_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-long_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-long_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-no_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-no_title-no_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-no_title-short_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-short_title-long_subtitle.png
A 
app/screenshots-ref/org.wikipedia.feed.view.CardHeaderViewTest.testWidth-320dp-en-ltr-font1.5x-light-image-short_title-no_subtitle.png
A 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove comment about jscs binary space rule

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove comment about jscs binary space rule
..


Remove comment about jscs binary space rule

This is correctly enforced in eslint.

Change-Id: Ic2e77173fb2c0f6103096fcf2b17f9c69365b0e6
---
M tests/ve.test.js
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/tests/ve.test.js b/tests/ve.test.js
index f62534e..366017a 100644
--- a/tests/ve.test.js
+++ b/tests/ve.test.js
@@ -297,7 +297,6 @@
}
tests = [
/* jshint elision:true (awaiting eslint replacement; T149262) */
-   // jscs:disable disallowSpaceBeforeBinaryOperators (awaiting 
eslint replacement; T149263)
// arr, offset, remove, data, expectedReturn, expectedArray, msg
[ [], 0, 0, [ , 3 ], [], [ , 3 ], 'insert empty, leading hole' 
],
[ [], 0, 0, [ 1, , 3 ], [], [ 1, , 3 ], 'insert empty, middle 
hole' ],
@@ -318,7 +317,6 @@
[ [ 4, , 5, , 6 ], 0, 3, [ 1, , 3 ], [ 4, , 5 ], [ 1, , 3, , 6 
], 'diff=0 start' ],
[ [ 4, , 5, , 6 ], 1, 3, [ 1, , 3 ], [ , 5, , ], [ 4, 1, , 3, 6 
], 'diff=0 mid' ],
[ [ 4, , 5, , 6 ], 2, 3, [ 1, , 3 ], [ 5, , 6 ], [ 4, , 1, , 3 
], 'diff=0 end' ]
-   // jscs:enable disallowSpaceBeforeBinaryOperators
/* jshint elision:false */
];
QUnit.expect( 2 * tests.length + 1 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2e77173fb2c0f6103096fcf2b17f9c69365b0e6
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove comment about jscs empty blocks rule

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove comment about jscs empty blocks rule
..


Remove comment about jscs empty blocks rule

We do have an eslint rule, it just allows blocks with comments.

Change-Id: I2bfe963c65d1a99e9d163666cd1f2549d0cef977
---
M src/ce/ve.ce.TextState.js
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js
index dbc8d42..dee3553 100644
--- a/src/ce/ve.ce.TextState.js
+++ b/src/ce/ve.ce.TextState.js
@@ -69,7 +69,6 @@
// If appropriate, step into first child and loop
// If no next sibling, step out until there is (breaking if we 
leave element)
// Step to next sibling and loop
-   // jscs:disable disallowEmptyBlocks (awaiting eslint 
replacement; T149266)
if ( node.nodeType === Node.TEXT_NODE ) {
add( node.data.replace( /\u00A0/g, ' ' ) );
} else if (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bfe963c65d1a99e9d163666cd1f2549d0cef977
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Update eslint config to 0.2.0

2016-10-28 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Update eslint config to 0.2.0
..

Update eslint config to 0.2.0

Change-Id: Iff5e439d2ef21b9ebf5895ae163a3ea7afd34080
---
M demos/demo.js
M package.json
M src/Element.js
M src/core.js
4 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/65/318565/1

diff --git a/demos/demo.js b/demos/demo.js
index 2d27c3c..7a39a9d 100644
--- a/demos/demo.js
+++ b/demos/demo.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-console */
 /**
  * @class
  * @extends {OO.ui.Element}
@@ -68,6 +69,7 @@
.append( this.$menu );
$( 'html' ).attr( 'dir', this.mode.direction );
$( 'head' ).append( this.stylesheetLinks );
+   // eslint-disable-next-line new-cap
OO.ui.theme = new ( this.constructor.static.themes[ this.mode.theme 
].theme )();
 };
 
@@ -384,6 +386,7 @@
str = 'return ' + str;
}
try {
+   // eslint-disable-next-line no-new-func
func = new Function( layout, widget, 'item', str );
ret = { value: func( item, item.fieldWidget, 
item.fieldWidget ) };
} catch ( error ) {
diff --git a/package.json b/package.json
index 46bb817..fce20bc 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
 "oojs": "1.1.10"
   },
   "devDependencies": {
-"eslint-config-wikimedia": "0.1.0",
+"eslint-config-wikimedia": "0.2.0",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",
 "grunt-contrib-clean": "1.0.0",
diff --git a/src/Element.js b/src/Element.js
index 9c28abc..55d39df 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -230,6 +230,7 @@
// pick up dynamic state, like focus, value of form inputs, scroll 
position, etc.
state = cls.static.gatherPreInfuseState( $elem[ 0 ], data );
// rebuild widget
+   // eslint-disable-next-line new-cap
obj = new cls( data );
// now replace old DOM with this new DOM.
if ( top ) {
diff --git a/src/core.js b/src/core.js
index 669a81d..623b991 100644
--- a/src/core.js
+++ b/src/core.js
@@ -253,6 +253,7 @@
  */
 OO.ui.warnDeprecation = function ( message ) {
if ( OO.getProp( window, 'console', 'warn' ) !== undefined ) {
+   // eslint-disable-next-line no-console
console.warn( message );
}
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff5e439d2ef21b9ebf5895ae163a3ea7afd34080
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove jshint comment, no rule required

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove jshint comment, no rule required
..


Remove jshint comment, no rule required

Change-Id: Id785b33d7fb2cbd4983fe1efec8cd2fffd73f53d
---
M src/ce/ve.ce.Surface.js
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 4aeab2e..9530472 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -1870,7 +1870,6 @@
  * @return {boolean} False if the event is cancelled
  */
 ve.ce.Surface.prototype.afterPaste = function () {
-   // jshint unused:false (awaiting eslint replacement; T149267)
var clipboardKey, clipboardHash,
$elements, pasteData, slice, internalListRange,
data, pastedDocumentModel, htmlDoc, $body, $images, i,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id785b33d7fb2cbd4983fe1efec8cd2fffd73f53d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: Skip dh_usrlocal entirely

2016-10-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Skip dh_usrlocal entirely
..


Skip dh_usrlocal entirely

Debian Policy forbids from installing in /usr/local though this package
does and that causes dh_usrlocal to complain:

dh_usrlocal:

debian/wikistats/usr/local/bin/wikistats/import_miraheze.php
is not a directory
dh_usrlocal: debian/wikistats/usr/local/bin/wikistats/check-live-diff
is not a directory
debian/wikistats/usr/local/bin/wikistats/wsa is not a directory
dh_usrlocal: debian/wikistats/usr/local/bin/wikistats/deploy-wikistats
is not a directory

rmdir: failed to remove 'debian/wikistats/usr/local/bin/wikistats':
Directory not empty

Change-Id: I32eac3fdc9d8763165ce20f10695b2eacfd04517
---
M debian/rules
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/debian/rules b/debian/rules
index b760bee..7df52d9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,4 +10,6 @@
 #export DH_VERBOSE=1
 
 %:
-   dh $@ 
+   dh $@
+
+override_dh_usrlocal:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32eac3fdc9d8763165ce20f10695b2eacfd04517
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...wikistats[master]: Polish up Debian packaging

2016-10-28 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Polish up Debian packaging
..


Polish up Debian packaging

Delete build related files that got committed in the source tree. Eg
debian/wikistats/DEBIAN  debian/wikistats/usr.. debian/files

Bump debhelper compatibility from 8 to 9

Change-Id: I628cad5ce31de691c780d2d9e42497b2e69982b5
---
M debian/compat
M debian/control
D debian/files
D debian/wikistats.debhelper.log
D debian/wikistats.substvars
D debian/wikistats/DEBIAN/control
D debian/wikistats/DEBIAN/md5sums
D debian/wikistats/usr/share/doc/wikistats/changelog.gz
D debian/wikistats/usr/share/doc/wikistats/copyright
9 files changed, 2 insertions(+), 120 deletions(-)

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



diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index 8938fcd..f6f31c8 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@
 Section: web
 Priority: extra
 Maintainer: Daniel Zahn 
-Build-Depends: debhelper (>= 8.0.0)
+Build-Depends: debhelper (>= 9.0.0)
 Standards-Version: 3.9.3
 Homepage: http://wikistats.wmflabs.org
 Vcs-Git: https://gerrit.wikimedia.org//r/p/operations/debs/wikistats.git
diff --git a/debian/files b/debian/files
deleted file mode 100644
index 68eee84..000
--- a/debian/files
+++ /dev/null
@@ -1 +0,0 @@
-wikistats_2.5_all.deb web extra
diff --git a/debian/wikistats.debhelper.log b/debian/wikistats.debhelper.log
deleted file mode 100644
index 545a50f..000
--- a/debian/wikistats.debhelper.log
+++ /dev/null
@@ -1,45 +0,0 @@
-dh_auto_configure
-dh_auto_build
-dh_auto_test
-dh_prep
-dh_installdirs
-dh_auto_install
-dh_install
-dh_installdocs
-dh_installchangelogs
-dh_installexamples
-dh_installman
-dh_installcatalogs
-dh_installcron
-dh_installdebconf
-dh_installemacsen
-dh_installifupdown
-dh_installinfo
-dh_pysupport
-dh_installinit
-dh_installmenu
-dh_installmime
-dh_installmodules
-dh_installlogcheck
-dh_installlogrotate
-dh_installpam
-dh_installppp
-dh_installudev
-dh_installwm
-dh_installxfonts
-dh_installgsettings
-dh_bugfiles
-dh_ucf
-dh_lintian
-dh_gconf
-dh_icons
-dh_perl
-dh_usrlocal
-dh_link
-dh_compress
-dh_fixperms
-dh_installdeb
-dh_gencontrol
-dh_md5sums
-dh_builddeb
-dh_builddeb
diff --git a/debian/wikistats.substvars b/debian/wikistats.substvars
deleted file mode 100644
index abd3ebe..000
--- a/debian/wikistats.substvars
+++ /dev/null
@@ -1 +0,0 @@
-misc:Depends=
diff --git a/debian/wikistats/DEBIAN/control b/debian/wikistats/DEBIAN/control
deleted file mode 100644
index 743ed6a..000
--- a/debian/wikistats/DEBIAN/control
+++ /dev/null
@@ -1,12 +0,0 @@
-Package: wikistats
-Version: 2.5
-Architecture: all
-Maintainer: Daniel Zahn 
-Installed-Size: 332
-Depends: php5-cli
-Section: web
-Priority: extra
-Homepage: http://wikistats.wmflabs.org
-Description: Mediawiki statistics project using PHP
- A project to fetch statistics from thousands of Mediawiki installations
- on the web and display them as HTML and Mediawiki syntax tables.
diff --git a/debian/wikistats/DEBIAN/md5sums b/debian/wikistats/DEBIAN/md5sums
deleted file mode 100644
index e2b2251..000
--- a/debian/wikistats/DEBIAN/md5sums
+++ /dev/null
@@ -1,30 +0,0 @@
-d3803884f32ce91f18c03cabab14976f  usr/lib/wikistats/update.php
-4c8faa55800616469255a5d171720b4b  usr/share/doc/wikistats/changelog.gz
-76d53dcf4abc9651f4eec1a6461cb417  usr/share/doc/wikistats/copyright
-92b68267cb15a945f8c70ce19cf2bc0a  usr/share/php/wikistats/coalesced_query.php
-2b7f764de3eab0ffafc1ff29f31e5446  usr/share/php/wikistats/footer.php
-1e1cc4073f0d89576cf8e62d7ff5  usr/share/php/wikistats/functions.php
-dcf99a9436dd4da61b10ea5c9653bd9b  usr/share/php/wikistats/grandtotal.php
-4a7a1c5dbf2a1945a598e899bbce5c76  usr/share/php/wikistats/grandtotal_wiki.php
-6fa3481fa59270f69a96700bcba6b30e  usr/share/php/wikistats/http_status_codes.php
-80e30ba39f7ba99ca575be525650d478  usr/share/php/wikistats/largest_query.php
-0807e9e28003e759feaaa892bc74c91d  usr/share/php/wikistats/sortswitch.php
-809f5c91c0e7d7f27d25c4c763512c0b  var/www/wikistats/api.php
-e4203460cc47dfac210f9cc165332abb  var/www/wikistats/css/wikistats_css.php
-526ade47fe84b5173661b36fb219a4ae  var/www/wikistats/detail.php
-3738f19002e9e8f73f9f02df064a98e1  var/www/wikistats/display.php
-d13366367d9fc393f8cd04f9643d5d3b  var/www/wikistats/displayw.php
-2d061e79bbe7acd2e1122e6c80f97849  var/www/wikistats/favicon.ico
-d32239bcb673463ab874e80d47fae504  var/www/wikistats/gpl.txt
-0fd7c1776aa05c8d19b02a98667496ea  var/www/wikistats/images/Wikistats-logo.png
-3e0823042b28b72908951240200ba290  
var/www/wikistats/images/valid-xhtml10-blue.png
-3cf661cc8862886c1d280823da177661  var/www/wikistats/images/vcss-blue.png
-45141eefd314181de7e607de6211604d  

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [doc] remove duplicate spaces inside doc strings

2016-10-28 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: [doc] remove duplicate spaces inside doc strings
..

[doc] remove duplicate spaces inside doc strings

Change-Id: I4e73880640996311e629a87330802e76e2dee594
---
M pywikibot/textlib.py
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/63/318563/1

diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index c31e530..dc2387f 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -572,7 +572,7 @@
 remaining.
 
 @param text: the text in which to replace links
-@type  text: basestring
+@type text: basestring
 @param replace: either a callable which reacts like described above.
 The callable must accept four parameters link, text, groups, rng and
 allows for user interaction. The groups are a dict containing 'title',
@@ -585,11 +585,11 @@
 result by the callable. It'll convert that into a callable where the
 first item (the Link or Page) has to be equal to the found link and in
 that case it will apply the second value from the sequence.
-@type  replace: sequence of pywikibot.Page/pywikibot.Link/str or
+@type replace: sequence of pywikibot.Page/pywikibot.Link/str or
 callable
 @param site: a Site object to use if replace is not a sequence or the link
 to be replaced is not a Link or Page instance.
-@type  site: pywikibot.APISite
+@type site: pywikibot.APISite
 """
 def to_link(source):
 """Return the link from source when it's a Page otherwise itself."""
@@ -1338,7 +1338,7 @@
 
 Return value is a list of tuples. There is one tuple for each use of a
 template in the page, with the template title as the first entry and a
-dict of parameters as the second entry.  Parameters are indexed by
+dict of parameters as the second entry. Parameters are indexed by
 strings; as in MediaWiki, an unnamed parameter is given a parameter name
 with an integer value corresponding to its position among the unnamed
 parameters, and if this results multiple parameters with the same name
@@ -1353,7 +1353,7 @@
 The two implementations return nested templates in a different order.
 i.e. for {{a|b={{c, mwpfh returns [a, c], whereas regex returns [c, a].
 
-mwpfh preserves whitespace in parameter names and values.  regex excludes
+mwpfh preserves whitespace in parameter names and values. regex excludes
 anything between  before parsing the text.
 
 If there are multiple numbered parameters in the wikitext for the same
@@ -1364,7 +1364,7 @@
 @param text: The wikitext from which templates are extracted
 @type text: unicode or string
 @param remove_disabled_parts: Remove disabled wikitext such as comments
-and pre.  If None (default), this is enabled when mwparserfromhell
+and pre. If None (default), this is enabled when mwparserfromhell
 is not available or is disabled in the config, and disabled if
 mwparserfromhell is present and enabled in the config.
 @type remove_disabled_parts: bool or None

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e73880640996311e629a87330802e76e2dee594
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


  1   2   3   >