[MediaWiki-commits] [Gerrit] labs: Allow granular control over which NFS mounts are mounted - change (operations/puppet)

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

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

Change subject: labs: Allow granular control over which NFS mounts are mounted
..

labs: Allow granular control over which NFS mounts are mounted

Bug: T101660
Change-Id: I79c1fcd8d62fe48d719bad8ce3f64b7b00c4ceeb
---
M hieradata/labs.yaml
M manifests/role/labs.pp
2 files changed, 26 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/217242/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index ae7b8e2..7591108 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -45,3 +45,8 @@
 labs_puppet_master: labs-puppetmaster-eqiad.wikimedia.org
 labs_puppet_master_secondary: labs-puppetmaster-codfw.wikimedia.org
 labs_recursor: labs-recursor0.wikimedia.org
+nfs_mounts:
+  project: true
+  home: true
+  scratch: true
+  dumps: true
diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 6ddc81b..3659266 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -42,11 +42,13 @@
 ensure = present,
 }
 
+$nfs_mounts = hiera('nfs_mounts')
+
 $nfs_opts = 'vers=4,bg,hard,intr,sec=sys,proto=tcp,port=0,noatime,nofsc'
 $nfs_server = 'labstore.svc.eqiad.wmnet'
 $dumps_server = 'labstore1003.eqiad.wmnet'
 
-if hiera('has_shared_home', true) {
+if $nfs_mounts['home'] {
 mount { '/home':
 ensure  = mounted,
 atboot  = true,
@@ -57,7 +59,7 @@
 }
 }
 
-if hiera('has_shared_project_space', true) {
+if $nfs_mounts['project'] or $nfs_mounts['scratch'] {
 # Directory for data mounts
 file { '/data':
 ensure = directory,
@@ -65,7 +67,9 @@
 group  = 'root',
 mode   = '0755',
 }
+}
 
+if $nfs_mounts['project'] {
 file { '/data/project':
 ensure  = directory,
 require = File['/data'],
@@ -79,7 +83,9 @@
 device  = ${nfs_server}:/project/${instanceproject}/project,
 require = File['/data/project', '/etc/modprobe.d/nfs-no-idmap'],
 }
+}
 
+if $nfs_mounts['scratch'] {
 file { '/data/scratch':
 ensure  = directory,
 require = File['/data'],
@@ -95,17 +101,19 @@
 }
 }
 
-file { '/public/dumps':
-ensure  = directory,
-require = File['/public'],
-}
-mount { '/public/dumps':
-ensure  = mounted,
-atboot  = true,
-fstype  = 'nfs',
-options = ro,${nfs_opts},
-device  = ${dumps_server}:/dumps,
-require = File['/public/dumps', '/etc/modprobe.d/nfs-no-idmap'],
+if $nfs_mounts['dumps'] {
+file { '/public/dumps':
+ensure  = directory,
+require = File['/public'],
+}
+mount { '/public/dumps':
+ensure  = mounted,
+atboot  = true,
+fstype  = 'nfs',
+options = ro,${nfs_opts},
+device  = ${dumps_server}:/dumps,
+require = File['/public/dumps', '/etc/modprobe.d/nfs-no-idmap'],
+}
 }
 
 file { '/public/keys':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79c1fcd8d62fe48d719bad8ce3f64b7b00c4ceeb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use LanguageFallbackLabelDescriptionLookupFactory in Special... - change (mediawiki...Wikibase)

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

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

Change subject: Use LanguageFallbackLabelDescriptionLookupFactory in 
SpecialListProperties
..

Use LanguageFallbackLabelDescriptionLookupFactory in SpecialListProperties

Change-Id: Ie1c13bb27ed920b28d4b11734e500f69da96e91b
---
M repo/includes/specials/SpecialListProperties.php
M repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php
2 files changed, 25 insertions(+), 45 deletions(-)


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

diff --git a/repo/includes/specials/SpecialListProperties.php 
b/repo/includes/specials/SpecialListProperties.php
index 403f669..ae3591b 100644
--- a/repo/includes/specials/SpecialListProperties.php
+++ b/repo/includes/specials/SpecialListProperties.php
@@ -6,12 +6,9 @@
 use Html;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataTypeSelector;
-use Wikibase\LanguageFallbackChainFactory;
-use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup;
-use Wikibase\Lib\Store\TermLookup;
 use Wikibase\PropertyInfoStore;
+use Wikibase\Repo\LanguageFallbackLabelDescriptionLookupFactory;
 use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Store\TermBuffer;
 use Wikibase\View\EntityIdFormatterFactory;
 
 /**
@@ -41,24 +38,14 @@
private $propertyInfoStore;
 
/**
-* @var LanguageFallbackChainFactory
-*/
-   private $languageFallbackChainFactory;
-
-   /**
-* @var TermLookup
-*/
-   private $termLookup;
-
-   /**
-* @var TermBuffer
-*/
-   private $termBuffer;
-
-   /**
 * @var EntityIdFormatterFactory
 */
private $entityIdFormatterFactory;
+
+   /**
+* @var LanguageFallbackLabelDescriptionLookupFactory
+*/
+   private $labelDescriptionLookupFactory;
 
/**
 * @var string
@@ -71,10 +58,12 @@
$this-initServices(

WikibaseRepo::getDefaultInstance()-getDataTypeFactory(),

WikibaseRepo::getDefaultInstance()-getStore()-getPropertyInfoStore(),
-   
WikibaseRepo::getDefaultInstance()-getLanguageFallbackChainFactory(),
-   WikibaseRepo::getDefaultInstance()-getTermLookup(),
-   WikibaseRepo::getDefaultInstance()-getTermBuffer(),
-   
WikibaseRepo::getDefaultInstance()-getEntityIdHtmlLinkFormatterFactory()
+   
WikibaseRepo::getDefaultInstance()-getEntityIdHtmlLinkFormatterFactory(),
+   new LanguageFallbackLabelDescriptionLookupFactory(
+   
WikibaseRepo::getDefaultInstance()-getLanguageFallbackChainFactory(),
+   
WikibaseRepo::getDefaultInstance()-getTermLookup(),
+   
WikibaseRepo::getDefaultInstance()-getTermBuffer()
+   )
);
}
 
@@ -85,17 +74,13 @@
public function initServices(
DataTypeFactory $dataTypeFactory,
PropertyInfoStore $propertyInfoStore,
-   LanguageFallbackChainFactory $languageFallbackChainFactory,
-   TermLookup $termLookup,
-   TermBuffer $termBuffer,
-   EntityIdFormatterFactory $entityIdFormatterFactory
+   EntityIdFormatterFactory $entityIdFormatterFactory,
+   LanguageFallbackLabelDescriptionLookupFactory 
$labelDescriptionLookupFactory
) {
$this-dataTypeFactory = $dataTypeFactory;
$this-propertyInfoStore = $propertyInfoStore;
-   $this-languageFallbackChainFactory = 
$languageFallbackChainFactory;
-   $this-termLookup = $termLookup;
-   $this-termBuffer = $termBuffer;
$this-entityIdFormatterFactory = $entityIdFormatterFactory;
+   $this-labelDescriptionLookupFactory = 
$labelDescriptionLookupFactory;
}
 
/**
@@ -198,20 +183,12 @@
return;
}
 
-   $languageFallbackChain = 
$this-languageFallbackChainFactory-newFromLanguage(
+   $labelDescriptionLookup = 
$this-labelDescriptionLookupFactory-newLabelDescriptionLookup(
$this-getLanguage(),
-   LanguageFallbackChainFactory::FALLBACK_SELF
-   | 
LanguageFallbackChainFactory::FALLBACK_VARIANTS
-   | LanguageFallbackChainFactory::FALLBACK_OTHERS
+   $propertyIds
);
-   $languages = $languageFallbackChain-getFetchLanguageCodes();
-   $labelDescriptionLookup = new 
LanguageFallbackLabelDescriptionLookup(
-   $this-termLookup,
-   $languageFallbackChain
-   

[MediaWiki-commits] [Gerrit] Changed 'partial match' to 'potential match' - change (mediawiki...WikidataQualityExternalValidation)

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

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

Change subject: Changed 'partial match' to 'potential match'
..

Changed 'partial match' to 'potential match'

... only in translations, internal it's still 'partial'

Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityExternalValidation
 refs/changes/48/217248/1

diff --git a/i18n/en.json b/i18n/en.json
index 1dd357b..46f9d05 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,7 +20,7 @@
   wbqev-crosscheck-result-table-header-external-source: External source,
   wbqev-crosscheck-result-table-header-status: Status,
   wbqev-crosscheck-status-match: Match,
-  wbqev-crosscheck-status-partial-match: Partial match,
+  wbqev-crosscheck-status-partial-match: Potential match,
   wbqev-crosscheck-status-mismatch: Mismatch,
   wbqev-crosscheck-status-references-missing: missing,
   wbqev-crosscheck-status-references-stated: stated,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ed86792..a22bc99 100755
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,7 +20,7 @@
wbqev-crosscheck-result-table-header-external-source: Header of the 
column that displays the name of the external source.,
wbqev-crosscheck-result-table-header-status: Header of the column 
that shows the result of the constraint check.\n{{Identical|Status}},
wbqev-crosscheck-status-match: Status for claims that have a match 
with any external data,
-   wbqev-crosscheck-status-partial-match: Status for claims that have a 
partial match with any external data,
+   wbqev-crosscheck-status-partial-match: Status for claims that have a 
potential match with any external data,
wbqev-crosscheck-status-mismatch: Status for claims that have a 
mismatch with any external data.,
wbqev-crosscheck-status-references-missing: Status for claims for 
which references are missing.,
wbqev-crosscheck-status-references-stated: Status for claims for 
which references are stated.,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: v1
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix: Link adapation does not happen when language code and d... - change (mediawiki...ContentTranslation)

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

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

Change subject: Fix: Link adapation does not happen when language code and 
domain differs
..

Fix: Link adapation does not happen when language code and domain differs

Testplan:
Translate:
Special:ContentTranslationpage=LaTeXfrom=simpleto=bho
Without this patch, user will see all links in translation
template as missing. With this patch, links will be adapated
to bh.

Bug: T99888
Change-Id: I2d5021c27f8b03563ef5a16723bed3ea83d0e701
---
M modules/base/ext.cx.sitemapper.js
M modules/tools/ext.cx.tools.link.js
2 files changed, 31 insertions(+), 21 deletions(-)


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

diff --git a/modules/base/ext.cx.sitemapper.js 
b/modules/base/ext.cx.sitemapper.js
index 6d7aa72..aec45af 100644
--- a/modules/base/ext.cx.sitemapper.js
+++ b/modules/base/ext.cx.sitemapper.js
@@ -11,21 +11,6 @@
 ( function ( $, mw ) {
'use strict';
 
-   // Some wikis have domain names that do not match the content language.
-   // See: wgLanguageCode in 
operations/mediawiki-config/wmf-config/InitialiseSettings.php
-   // NOTE: Keep list of mapping in sync with includes/SiteMapper.php
-   var languageToWikiDomainMapping = {
-   bho: 'bh',
-   'crh-latn': 'crh',
-   gsw: 'als',
-   sgs: 'bat-smg',
-   'be-tarask': 'be-x-old',
-   vro: 'fiu-vro',
-   rup: 'roa-rup',
-   lzh: 'zh-classical',
-   nan: 'zh-min-nan',
-   yue: 'zh-yue'
-   };
 
/**
 * Handles providing urls to different wikis.
@@ -35,6 +20,30 @@
this.config = siteconfig;
};
 
+
+   /**
+* Some wikis have domain names that do not match the content language.
+* See: wgLanguageCode in 
operations/mediawiki-config/wmf-config/InitialiseSettings.php
+* NOTE: Keep list of mapping in sync with includes/SiteMapper.php
+* @param {string} language Language code
+*/
+   mw.cx.SiteMapper.prototype.getWikiDomainCode = function ( language ) {
+   var languageToWikiDomainMapping = {
+   bho: 'bh',
+   'crh-latn': 'crh',
+   gsw: 'als',
+   sgs: 'bat-smg',
+   'be-tarask': 'be-x-old',
+   vro: 'fiu-vro',
+   rup: 'roa-rup',
+   lzh: 'zh-classical',
+   nan: 'zh-min-nan',
+   yue: 'zh-yue'
+   };
+
+   return languageToWikiDomainMapping[ language ] || language;
+   };
+
/**
 * Get the API for a remote wiki.
 *
@@ -42,10 +51,10 @@
 * @return {mediawiki.Api}
 */
mw.cx.SiteMapper.prototype.getApi = function ( language ) {
-   var url;
+   var url, domain;
 
-   language = languageToWikiDomainMapping[ language ] || language;
-   url = this.config.api.replace( '$1', language );
+   domain = this.getWikiDomainCode( language );
+   url = this.config.api.replace( '$1', domain );
return new mw.Api( {
ajax: {
url: url
@@ -63,15 +72,16 @@
 */
mw.cx.SiteMapper.prototype.getPageUrl = function ( language, title, 
params ) {
var base = this.config.view,
+   domain,
extra = '';
 
-   language = languageToWikiDomainMapping[ language ] || language;
+   domain = this.getWikiDomainCode( language );
if ( params  !$.isEmptyObject( params ) ) {
base = this.config.action || this.config.view;
extra = ( base.indexOf( '?' ) !== -1 ? '' : '?' ) + 
$.param( params );
}
 
-   return base.replace( '$1', language ).replace( '$2', title ) + 
extra;
+   return base.replace( '$1', domain ).replace( '$2', title ) + 
extra;
};
 
/**
diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index db689a3..3d6c90a 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -77,7 +77,7 @@
titles: titles.join( '|' ),
prop: 'langlinks',
lllimit: titles.length, // TODO: Default is 10 and max 
is 500. Do we need more than 500?
-   lllang: language,
+   lllang: mw.cx.siteMapper.getWikiDomainCode( language ),
redirects: true,
format: 'json'
}, {

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Add 3 probjects to #wikimedia-de-tech - change (labs...wikibugs2)

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

Change subject: Add 3 probjects to #wikimedia-de-tech
..


Add 3 probjects to #wikimedia-de-tech

 - Phragile
 - Team-TCB
 - German-Community-Wishlist

Change-Id: I3f4d08866c08e83df8a5ecc24dd7b9b81ee69e41
---
M channels.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/channels.yaml b/channels.yaml
index 0fdcfbf..5b4c238 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -36,6 +36,11 @@
 - Thanks
 - WikiLove
 
+#wikimedia-de-tech:
+- TCB-Team
+- German-Community-Wishlist
+- Phragile
+
 #mediawiki-i18n:
 - .*-ContentTranslation
 - translatewiki\.net

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f4d08866c08e83df8a5ecc24dd7b9b81ee69e41
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Reformatted code - change (mediawiki...WikidataQualityExternalValidation)

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

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

Change subject: Reformatted code
..

Reformatted code

Change-Id: I6ade00d6fd78a66128315273cc7cad3a6850e485
---
M api/CrossCheck.php
M includes/CrossCheck/Comparer/DataValueComparer.php
M includes/CrossCheck/Comparer/DataValueComparerBase.php
M includes/CrossCheck/Comparer/DataValueComparerFactory.php
M includes/CrossCheck/Comparer/DispatchingDataValueComparer.php
M includes/CrossCheck/Comparer/EntityIdValueComparer.php
M includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
M includes/CrossCheck/Comparer/MonolingualTextValueComparer.php
M includes/CrossCheck/Comparer/MultilingualTextValueComparer.php
M includes/CrossCheck/Comparer/QuantityValueComparer.php
M includes/CrossCheck/Comparer/StringComparer.php
M includes/CrossCheck/Comparer/StringValueComparer.php
M includes/CrossCheck/Comparer/TimeValueComparer.php
M includes/CrossCheck/CrossCheckInteractor.php
M includes/CrossCheck/CrossChecker.php
M includes/CrossCheck/ReferenceHandler.php
M includes/CrossCheck/Result/CrossCheckResult.php
M includes/CrossCheck/Result/CrossCheckResultList.php
M includes/CrossCheck/Result/ReferenceResult.php
M includes/DumpMetaInformation/DumpMetaInformationRepo.php
M includes/EvaluateCrossCheckJob.php
M includes/EvaluateCrossCheckJobService.php
M includes/ExternalDataRepo.php
M includes/Serializer/CrossCheckResultListSerializer.php
M includes/Serializer/IndexedTagsSerializer.php
M includes/Serializer/SerializerFactory.php
M includes/UpdateTable/Importer.php
M specials/SpecialCrossCheck.php
M specials/SpecialExternalDbs.php
M tests/phpunit/Api/CrossCheckTest.php
M tests/phpunit/CrossCheck/Comparer/DataValueComparerBaseTest.php
M tests/phpunit/CrossCheck/Comparer/DataValueComparerFactoryTest.php
M tests/phpunit/CrossCheck/Comparer/DispatchingDataValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/MonolingualTextValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/MultilingualTextValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/QuantityValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
M tests/phpunit/CrossCheck/Comparer/StringValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php
M tests/phpunit/CrossCheck/CrossCheckInteractorTest.php
M tests/phpunit/CrossCheck/CrossCheckerTest.php
M tests/phpunit/CrossCheck/ReferenceHandlerTest.php
M tests/phpunit/CrossCheck/Result/CompareResultTest.php
M tests/phpunit/CrossCheck/Result/CrossCheckResultListTest.php
M tests/phpunit/CrossCheck/Result/CrossCheckResultTest.php
M tests/phpunit/CrossCheck/Result/ReferenceResultTest.php
M tests/phpunit/DumpMetaInformation/DumpMetaInformationRepoTest.php
M tests/phpunit/DumpMetaInformation/DumpMetaInformationTest.php
M tests/phpunit/EvaluateCrossCheckJobServiceTest.php
M tests/phpunit/ExternalDataRepoTest.php
M tests/phpunit/ExternalValidationFactoryTest.php
M tests/phpunit/Serializer/CompareResultSerializerTest.php
M tests/phpunit/Serializer/CrossCheckResultListSerializerTest.php
M tests/phpunit/Serializer/CrossCheckResultSerializerTest.php
M tests/phpunit/Serializer/DumpMetaInformationSerializerTest.php
M tests/phpunit/Serializer/IndexedTagsSerializerTest.php
M tests/phpunit/Serializer/ReferenceResultSerializerTest.php
M tests/phpunit/Serializer/SerializerBaseTest.php
M tests/phpunit/Serializer/SerializerFactoryTest.php
M tests/phpunit/Specials/SpecialCrossCheckTest.php
M tests/phpunit/Specials/SpecialExternalDbsTest.php
M tests/phpunit/UpdateTable/ImportContextTest.php
M tests/phpunit/UpdateTable/UpdateTableTest.php
65 files changed, 352 insertions(+), 274 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityExternalValidation
 refs/changes/56/217256/1

diff --git a/api/CrossCheck.php b/api/CrossCheck.php
index f453a33..5771c6d 100755
--- a/api/CrossCheck.php
+++ b/api/CrossCheck.php
@@ -85,6 +85,7 @@
 
/**
 * @param array $entityIds
+*
 * @return array
 */
private function parseEntityIds( array $entityIds ) {
@@ -126,10 +127,10 @@
$serializedResultList
);
} else {
-   $output[(string)$entityId] = 
$serializedResultList;
+   $output[ (string)$entityId ] = 
$serializedResultList;
}
} else {
-   $output[$entityId] = array(
+   $output[ $entityId ] = array(
'missing' = ''
);
}
diff --git 

[MediaWiki-commits] [Gerrit] [WIP] Ensure property alias uniqueness. - change (mediawiki...Wikibase)

2015-06-10 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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

Change subject: [WIP] Ensure property alias uniqueness.
..

[WIP] Ensure property alias uniqueness.

TODO: update tests

Bug: 89661
Change-Id: Ia9c3f1c717df999a81b22d6b4c56e07ab0153b1f
---
M lib/includes/store/LabelConflictFinder.php
M lib/includes/store/TermIndex.php
M lib/includes/store/sql/TermSqlIndex.php
M lib/tests/phpunit/store/MockTermIndex.php
M lib/tests/phpunit/store/TermIndexTest.php
M repo/includes/LabelDescriptionDuplicateDetector.php
M repo/includes/Validators/LabelDescriptionUniquenessValidator.php
M repo/includes/Validators/LabelUniquenessValidator.php
M repo/tests/phpunit/includes/LabelDescriptionDuplicateDetectorTest.php
M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
10 files changed, 137 insertions(+), 70 deletions(-)


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

diff --git a/lib/includes/store/LabelConflictFinder.php 
b/lib/includes/store/LabelConflictFinder.php
index cc2357b..eba543b 100644
--- a/lib/includes/store/LabelConflictFinder.php
+++ b/lib/includes/store/LabelConflictFinder.php
@@ -17,16 +17,20 @@
/**
 * Returns a list of Terms that conflict with (that is, match) the 
given labels.
 * Conflicts are defined to be inside on type of entity and language.
+* If $aliases is not null (but possibly empty), conflicts between 
aliases and labels
+* are also considered.
 *
 * @note: implementations must return *some* conflicts if there are 
*any* conflicts,
 * but are not required to return *all* conflicts.
 *
 * @param string $entityType The entity type to consider for conflicts.
 * @param string[] $labels The labels to look for, with language codes 
as keys.
+* @param string[][]|null $aliases The aliases to look for, with 
language codes as keys. If null,
+*conflicts with aliases are not considered.
 *
 * @return Term[]
 */
-   public function getLabelConflicts( $entityType, array $labels );
+   public function getLabelConflicts( $entityType, array $labels, array 
$aliases = null );
 
/**
 * Returns a list of Terms that conflict with (that is, match) the 
given labels
diff --git a/lib/includes/store/TermIndex.php b/lib/includes/store/TermIndex.php
index f7de790..8e445a2 100644
--- a/lib/includes/store/TermIndex.php
+++ b/lib/includes/store/TermIndex.php
@@ -89,8 +89,8 @@
 * @since 0.2
 *
 * @param Term[] $terms
-* @param string|null $termType
-* @param string|null $entityType
+* @param string|string[]|null $termType
+* @param string|string[]|null $entityType
 * @param array $options
 *Accepted options are:
 *- caseSensitive: boolean, default true
diff --git a/lib/includes/store/sql/TermSqlIndex.php 
b/lib/includes/store/sql/TermSqlIndex.php
index 7670782..489c612 100644
--- a/lib/includes/store/sql/TermSqlIndex.php
+++ b/lib/includes/store/sql/TermSqlIndex.php
@@ -503,8 +503,8 @@
 * @since 0.2
 *
 * @param Term[] $terms
-* @param string|null $termType
-* @param string|null $entityType
+* @param string|string[]|null $termType
+* @param string|string[]|null $entityType
 * @param array $options
 *
 * @return Term[]
@@ -660,8 +660,8 @@
/**
 * @param DatabaseBase $db
 * @param Term[] $terms
-* @param string|null $termType
-* @param string|null $entityType
+* @param string|string[]|null $termType
+* @param string|string[]|null $entityType
 * @param array $options
 *
 * @return string[]
@@ -686,8 +686,8 @@
/**
 * @param DatabaseBase $db
 * @param Term $term
-* @param string|null $termType
-* @param string|null $entityType
+* @param string|string[]|null $termType
+* @param string|string[]|null $entityType
 * @param array $options
 *
 * @return array
@@ -812,24 +812,32 @@
 *
 * @param string $entityType
 * @param string[] $labels
+* @param string[][]|null $aliases
 *
-* @throws InvalidArgumentException
 * @return Term[]
 */
-   public function getLabelConflicts( $entityType, array $labels ) {
+   public function getLabelConflicts( $entityType, array $labels, array 
$aliases = null ) {
if ( !is_string( $entityType ) ) {
throw new InvalidArgumentException( '$entityType must 
be a string' );
}
 
-   if ( empty( $labels ) ) {
+   if ( empty( $labels )  empty( $aliases ) ) {
return array();
}
 

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

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

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


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

Change-Id: Ic141b1c53ce5201443dbc9ba47224d785b818134
---
M composer.lock
M extensions/Wikibase/client/i18n/eu.json
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaEntityBindings.php
M 
extensions/Wikibase/client/includes/DataAccess/StatementTransclusionInteractor.php
A extensions/Wikibase/client/includes/Usage/UsageTrackingSnakFormatter.php
R extensions/Wikibase/client/includes/Usage/UsageTrackingTermLookup.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaEntityBindingsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
A 
extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
R 
extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
M extensions/Wikibase/lib/includes/EntityFactory.php
M extensions/Wikibase/repo/i18n/dty.json
M extensions/Wikibase/repo/i18n/nl.json
M extensions/Wikibase/repo/i18n/yi.json
M vendor/composer/autoload_classmap.php
M vendor/composer/installed.json
23 files changed, 364 insertions(+), 127 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index dc62b11..2a7ced5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1213,12 +1213,12 @@
 source: {
 type: git,
 url: 
https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-reference: 4e4d0dbffdc016942876f5a0c5d4e5cc29f6deb7
+reference: 36aad1efa1d6a2794a7900a4d1dba97f8526fb1c
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/4e4d0dbffdc016942876f5a0c5d4e5cc29f6deb7;,
-reference: 4e4d0dbffdc016942876f5a0c5d4e5cc29f6deb7,
+url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/36aad1efa1d6a2794a7900a4d1dba97f8526fb1c;,
+reference: 36aad1efa1d6a2794a7900a4d1dba97f8526fb1c,
 shasum: 
 },
 require: {
@@ -1286,7 +1286,7 @@
 wikibaserepo,
 wikidata
 ],
-time: 2015-06-09 18:42:43
+time: 2015-06-10 08:35:04
 },
 {
 name: wikibase/wikimedia-badges,
diff --git a/extensions/Wikibase/client/i18n/eu.json 
b/extensions/Wikibase/client/i18n/eu.json
index ea45627..f45ef78 100644
--- a/extensions/Wikibase/client/i18n/eu.json
+++ b/extensions/Wikibase/client/i18n/eu.json
@@ -3,7 +3,8 @@
authors: [
Xabier Armendaritz,
Subi,
-   Sator
+   Sator,
+   An13sa
]
},
wikibase-dataitem: {{WBREPONAME}} itema,
@@ -12,6 +13,7 @@
wikibase-linkitem-input-site: Hizkuntza:,
wikibase-rc-hide-wikidata-hide: Ezkutatu,
wikibase-rc-hide-wikidata-show: Erakutsi,
+   wikibase-rc-wikibase-edit-letter: D,
wikibase-rc-wikibase-edit-title: Aldaketa hau Wikidatan egin da,
wikibase-otherprojects: Beste proiektuak
 }
diff --git 
a/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
 
b/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
index 05ff7e8..0cb201d 100644
--- 
a/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
+++ 
b/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
@@ -5,7 +5,6 @@
 use InvalidArgumentException;
 use Language;
 use Status;
-use Wikibase\Client\Usage\UsageAccumulator;
 use Wikibase\DataAccess\StatementTransclusionInteractor;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\Lib\PropertyLabelNotResolvedException;
@@ -35,23 +34,15 @@
 

[MediaWiki-commits] [Gerrit] Update message indexes for translated and untranslated fields. - change (mediawiki...Translate)

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

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

Change subject: Update message indexes for translated and untranslated fields.
..

Update message indexes for translated and untranslated fields.

Bug: T101222
Change-Id: I371fac24f38de18b24ce503b549ef219280750ff
---
M ttmserver/ElasticSearchTTMServer.php
1 file changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/39/217239/1

diff --git a/ttmserver/ElasticSearchTTMServer.php 
b/ttmserver/ElasticSearchTTMServer.php
index 40d9199..2879247 100644
--- a/ttmserver/ElasticSearchTTMServer.php
+++ b/ttmserver/ElasticSearchTTMServer.php
@@ -255,6 +255,42 @@
}
}
 
+   $languageCode = $handle-getLanguageCodesForTranslations();
+
+   // Update translated and untranslated fields for all message 
indexes with same localid
+   foreach ( $languageCode['translated'] as $key = $value ) {
+   $local = $wiki-$localid-$revId/$value;
+   $scriptText =
+GROOVY
+if ( ctx._source.translated.contains(lang) ) {
+   ctx.op = none;
+} else {
+   ctx._source.translated += lang;
+   ctx._source.untranslated.remove(lang);
+}
+GROOVY;
+   $script = new \Elastica\Script(
+   $scriptText,
+   array( 'lang' = $handle-getCode() ),
+   \Elastica\Script::LANG_GROOVY
+   );
+   $script-setId( $local );
+   $docscript[] = $script;
+   }
+
+   foreach( $docscript as $key = $value ) {
+   try {
+   $bulk = new \Elastica\Bulk( $this-getClient() 
);
+   $bulk-setType( $this-getType() );
+   $bulk-addData( $value, 'update' );
+   $bulk-send();
+   } catch ( \Elastica\Exception\Bulk\ResponseException $e 
) {
+   error_log( Update failed:  . $e );
+   } catch ( \Elastica\Exception\ExceptionInterface $e ) {
+   error_log( $e );
+   }
+   }
+
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I371fac24f38de18b24ce503b549ef219280750ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Phoenix303 divyalife...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix test @groups in client/UsageTracking tests - change (mediawiki...Wikibase)

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

Change subject: Fix test @groups in client/UsageTracking tests
..


Fix test @groups in client/UsageTracking tests

Change-Id: Ib4642e493b085745d582450c82faf284acc060fd
---
M client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
M client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git 
a/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php 
b/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
index dec4f66..f47f221 100644
--- a/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
+++ b/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
@@ -16,8 +16,8 @@
  * @covers Wikibase\Lib\Store\UsageTrackingSnakFormatter
  *
  * @group Wikibase
- * @group WikibaseLib
- * @group WikibaseStore
+ * @group WikibaseClient
+ * @group WikibaseUsageTracking
  *
  * @licence GNU GPL v2+
  * @author Daniel Kinzler
diff --git 
a/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php 
b/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
index 13a182e..935d765 100644
--- a/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
+++ b/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
@@ -11,8 +11,8 @@
  * @covers Wikibase\Client\Usage\UsageTrackingTermLookup
  *
  * @group Wikibase
- * @group WikibaseLib
- * @group WikibaseStore
+ * @group WikibaseClient
+ * @group WikibaseUsageTracking
  *
  * @licence GNU GPL v2+
  * @author Daniel Kinzler

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4642e493b085745d582450c82faf284acc060fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ssh: Fix annoying indentation error - change (operations/puppet)

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

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

Change subject: ssh: Fix annoying indentation error
..

ssh: Fix annoying indentation error

Change-Id: I297cec07b56e20a1d4ce27b6413472d60aa19a2c
---
M modules/ssh/manifests/server.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/217245/1

diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index 7d1407e..2f8a773 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -22,7 +22,7 @@
 if ($::realm == 'labs') {
 $ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
 } else {
-$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
+$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I297cec07b56e20a1d4ce27b6413472d60aa19a2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] driver: allow specifying driver-specific options. - change (operations...conftool)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: driver: allow specifying driver-specific options.
..

driver: allow specifying driver-specific options.

Change-Id: Ifc8aa1965c163347948380f3fb7f9f7e5c6c5904
---
M conftool/configuration.py
M conftool/drivers/etcd.py
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/conftool 
refs/changes/44/217244/1

diff --git a/conftool/configuration.py b/conftool/configuration.py
index c3fede6..26340c6 100644
--- a/conftool/configuration.py
+++ b/conftool/configuration.py
@@ -20,6 +20,7 @@
'api_version',
'pools_path',
'services_path',
+   'driver_options'
])
 
 
@@ -30,7 +31,8 @@
 namespace='/conftool',
 api_version='v1',
 pools_path='pools',
-services_path='services'
+services_path='services',
+driver_options={}
 ):
 if pools_path.startswith('/'):
 raise ValueError(pools_path must be a relative path.)
@@ -42,4 +44,5 @@
   namespace=namespace,
   api_version=api_version,
   pools_path=pools_path,
-  services_path=services_path)
+  services_path=services_path,
+  driver_options=driver_options)
diff --git a/conftool/drivers/etcd.py b/conftool/drivers/etcd.py
index b686c3a..8ef9b48 100644
--- a/conftool/drivers/etcd.py
+++ b/conftool/drivers/etcd.py
@@ -15,7 +15,8 @@
 proto = urlparse.urlparse(config.hosts[0]).scheme
 self.client = etcd.Client(host=tuple(host_list),
   protocol=proto,
-  allow_reconnect=True)
+  allow_reconnect=True,
+  **config.driver_options)
 super(Driver, self).__init__(config)
 
 @drivers.wrap_exception(etcd.EtcdException)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc8aa1965c163347948380f3fb7f9f7e5c6c5904
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Migrate operations-puppet-{pep8, test} to labs - change (integration/config)

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

Change subject: Migrate operations-puppet-{pep8,test} to labs
..


Migrate operations-puppet-{pep8,test} to labs

Bug: T101966
Change-Id: I073da24800eb59fa61057801ddf1f2d4555ff6d9
---
M jjb/operations-puppet.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/jjb/operations-puppet.yaml b/jjb/operations-puppet.yaml
index 392f2a8..d799513 100644
--- a/jjb/operations-puppet.yaml
+++ b/jjb/operations-puppet.yaml
@@ -2,7 +2,7 @@
 # See the shell wrapper in integration/jenkins.git
 - job-template:
 name: 'operations-puppet-test'
-node: hasSlaveScripts  UbuntuPrecise
+node: contintLabsSlave  UbuntuPrecise
 defaults: use-remote-zuul
 concurrent: true
 triggers:
@@ -15,7 +15,7 @@
 #  can specify their own .pep8 rules
 - job-template:
 name: 'operations-puppet-pep8'
-node: hasSlaveScripts  UbuntuPrecise
+node: contintLabsSlave  UbuntuPrecise
 # Dont process other puppet submodules
 defaults: use-remote-zuul-no-submodules
 concurrent: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I073da24800eb59fa61057801ddf1f2d4555ff6d9
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ssh: Don't look for keys in NFS on non-precise hosts - change (operations/puppet)

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

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

Change subject: ssh: Don't look for keys in NFS on non-precise hosts
..

ssh: Don't look for keys in NFS on non-precise hosts

Bug: T101660
Change-Id: I53c5fb525131efe8e2d31cd6384f88a1ae683c63
---
M modules/ssh/manifests/server.pp
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index 2f8a773..6ed4847 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -20,7 +20,10 @@
 $ssh_authorized_keys_file = $authorized_keys_file
 } else {
 if ($::realm == 'labs') {
-$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
+if os_version('ubuntu = precise') {
+$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
+} else {
+$ssh_authorized_keys_file = '/etc/ssh/userkeys/%u'
 } else {
 $ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53c5fb525131efe8e2d31cd6384f88a1ae683c63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] add check for somevalue that caused crash in diffWithinRange... - change (mediawiki...WikidataQualityConstraints)

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

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

Change subject: add check for somevalue that caused crash in 
diffWithinRangeChecker
..

add check for somevalue that caused crash in diffWithinRangeChecker

Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
---
M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints
 refs/changes/53/217253/1

diff --git a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php 
b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
index 23417a7..dadbf68 100644
--- a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
+++ b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
@@ -108,6 +108,10 @@
 * error handling:
 *   types of this and the other value have to 
be equal, both must contain actual values
 */
+   if ( !$mainSnak instanceof PropertyValueSnak ) {
+   $message = 'Referenced property needs 
to have a value.';
+   return new CheckResult( $statement, 
$constraint-getConstraintTypeQid(), $parameters, 
CheckResult::STATUS_VIOLATION, $message );
+   }
if ( $mainSnak-getDataValue()-getType() === 
$dataValue-getType()  $mainSnak-getType() === 'value' ) {
 
$thatValue = 
$this-rangeCheckerHelper-getComparativeValue( $mainSnak-getDataValue() );
@@ -134,4 +138,4 @@
$status = CheckResult::STATUS_VIOLATION;
return new CheckResult( $statement, 
$constraint-getConstraintTypeQid(), $parameters, $status, $message );
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de

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


[MediaWiki-commits] [Gerrit] add check for somevalue that caused crash in diffWithinRange... - change (mediawiki...WikidataQualityConstraints)

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

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

Change subject: add check for somevalue that caused crash in 
diffWithinRangeChecker
..

add check for somevalue that caused crash in diffWithinRangeChecker

Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
---
M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints
 refs/changes/52/217252/1

diff --git a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php 
b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
index 50c8083..eaf46ae 100755
--- a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
+++ b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
@@ -104,6 +104,10 @@
 * error handling:
 *   types of this and the other value have to 
be equal, both must contain actual values
 */
+   if ( !$mainSnak instanceof PropertyValueSnak ) {
+   $message = 'Referenced property needs 
to have a value.';
+   return new CheckResult( $statement, 
$constraint-getConstraintTypeQid(), $parameters, 
CheckResult::STATUS_VIOLATION, $message );
+   }
if ( $mainSnak-getDataValue()-getType() === 
$dataValue-getType()  $mainSnak-getType() === 'value' ) {
 
$thatValue = 
$this-rangeCheckerHelper-getComparativeValue( $mainSnak-getDataValue() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: v1
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de

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


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

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

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

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

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

Change-Id: Ic141b1c53ce5201443dbc9ba47224d785b818134
---
M composer.lock
M extensions/Wikibase/client/i18n/eu.json
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaEntityBindings.php
M 
extensions/Wikibase/client/includes/DataAccess/StatementTransclusionInteractor.php
A extensions/Wikibase/client/includes/Usage/UsageTrackingSnakFormatter.php
R extensions/Wikibase/client/includes/Usage/UsageTrackingTermLookup.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaEntityBindingsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
A 
extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
R 
extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
M extensions/Wikibase/lib/includes/EntityFactory.php
M extensions/Wikibase/repo/i18n/dty.json
M extensions/Wikibase/repo/i18n/nl.json
M extensions/Wikibase/repo/i18n/yi.json
M vendor/composer/autoload_classmap.php
M vendor/composer/installed.json
23 files changed, 364 insertions(+), 127 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index dc62b11..2a7ced5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1213,12 +1213,12 @@
 source: {
 type: git,
 url: 
https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-reference: 4e4d0dbffdc016942876f5a0c5d4e5cc29f6deb7
+reference: 36aad1efa1d6a2794a7900a4d1dba97f8526fb1c
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/4e4d0dbffdc016942876f5a0c5d4e5cc29f6deb7;,
-reference: 4e4d0dbffdc016942876f5a0c5d4e5cc29f6deb7,
+url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/36aad1efa1d6a2794a7900a4d1dba97f8526fb1c;,
+reference: 36aad1efa1d6a2794a7900a4d1dba97f8526fb1c,
 shasum: 
 },
 require: {
@@ -1286,7 +1286,7 @@
 wikibaserepo,
 wikidata
 ],
-time: 2015-06-09 18:42:43
+time: 2015-06-10 08:35:04
 },
 {
 name: wikibase/wikimedia-badges,
diff --git a/extensions/Wikibase/client/i18n/eu.json 
b/extensions/Wikibase/client/i18n/eu.json
index ea45627..f45ef78 100644
--- a/extensions/Wikibase/client/i18n/eu.json
+++ b/extensions/Wikibase/client/i18n/eu.json
@@ -3,7 +3,8 @@
authors: [
Xabier Armendaritz,
Subi,
-   Sator
+   Sator,
+   An13sa
]
},
wikibase-dataitem: {{WBREPONAME}} itema,
@@ -12,6 +13,7 @@
wikibase-linkitem-input-site: Hizkuntza:,
wikibase-rc-hide-wikidata-hide: Ezkutatu,
wikibase-rc-hide-wikidata-show: Erakutsi,
+   wikibase-rc-wikibase-edit-letter: D,
wikibase-rc-wikibase-edit-title: Aldaketa hau Wikidatan egin da,
wikibase-otherprojects: Beste proiektuak
 }
diff --git 
a/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
 
b/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
index 05ff7e8..0cb201d 100644
--- 
a/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
+++ 
b/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
@@ -5,7 +5,6 @@
 use InvalidArgumentException;
 use Language;
 use Status;
-use Wikibase\Client\Usage\UsageAccumulator;
 use Wikibase\DataAccess\StatementTransclusionInteractor;
 use Wikibase\DataModel\Entity\EntityId;
 use 

[MediaWiki-commits] [Gerrit] Phase out deprecated EntityFactory::singleton - change (mediawiki...Wikibase)

2015-06-10 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Phase out deprecated EntityFactory::singleton
..

Phase out deprecated EntityFactory::singleton

This patch:
* Makes EntityFactoryTest completely independent from other components
  and classes. This also means I'm replacing the constants with strings
  on purpose.
* Implements a simple make new entity method in JsonDumpGeneratorTest
  that does not need a factory.
* Replaces singleton with WikibaseRepo factory method in the other two
  cases.

Change-Id: I4ec8bd9158f7d6dc25e4cc70c074b8cbb79b110a
---
M lib/includes/EntityFactory.php
M lib/tests/phpunit/entity/EntityFactoryTest.php
M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
5 files changed, 29 insertions(+), 52 deletions(-)


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

diff --git a/lib/includes/EntityFactory.php b/lib/includes/EntityFactory.php
index 1b624fe..78e79ea 100644
--- a/lib/includes/EntityFactory.php
+++ b/lib/includes/EntityFactory.php
@@ -5,8 +5,6 @@
 use MWException;
 use OutOfBoundsException;
 use Wikibase\DataModel\Entity\Entity;
-use Wikibase\DataModel\Entity\Item;
-use Wikibase\DataModel\Entity\Property;
 
 /**
  * Factory for Entity objects.
@@ -35,28 +33,6 @@
 */
public function __construct( array $typeToClass ) {
$this-typeMap = $typeToClass;
-   }
-
-   /**
-* @since 0.2
-*
-* @deprecated Use WikibaseRepo::getEntityFactory() resp. 
WikibaseClient::getEntityFactory()
-*
-* @return EntityFactory
-*/
-   public static function singleton() {
-   static $instance = false;
-
-   if ( $instance === false ) {
-   $typeToClass = array(
-   Item::ENTITY_TYPE = 
'Wikibase\DataModel\Entity\Item',
-   Property::ENTITY_TYPE = 
'Wikibase\DataModel\Entity\Property',
-   );
-
-   $instance = new static( $typeToClass );
-   }
-
-   return $instance;
}
 
/**
diff --git a/lib/tests/phpunit/entity/EntityFactoryTest.php 
b/lib/tests/phpunit/entity/EntityFactoryTest.php
index 77b223f..c8f783e 100644
--- a/lib/tests/phpunit/entity/EntityFactoryTest.php
+++ b/lib/tests/phpunit/entity/EntityFactoryTest.php
@@ -2,8 +2,6 @@
 
 namespace Wikibase\Test;
 
-use Wikibase\DataModel\Entity\Item;
-use Wikibase\DataModel\Entity\Property;
 use Wikibase\EntityFactory;
 
 /**
@@ -19,15 +17,18 @@
 class EntityFactoryTest extends \MediaWikiTestCase {
 
private function getEntityFactory() {
-   return EntityFactory::singleton();
+   return new EntityFactory( array(
+   'item' = 'Wikibase\DataModel\Entity\Item',
+   'property' = 'Wikibase\DataModel\Entity\Property',
+   ) );
}
 
public function testGetEntityTypes() {
$types = $this-getEntityFactory()-getEntityTypes();
 
$this-assertInternalType( 'array', $types );
-   $this-assertTrue( in_array( Item::ENTITY_TYPE, $types ), must 
contain item type );
-   $this-assertTrue( in_array( Property::ENTITY_TYPE, $types ), 
must contain property type );
+   $this-assertTrue( in_array( 'item', $types ), 'must contain 
item type' );
+   $this-assertTrue( in_array( 'property', $types ), 'must 
contain property type' );
}
 
public function provideIsEntityType() {
@@ -55,8 +56,8 @@
 
public function provideNewEmpty() {
return array(
-   array( Item::ENTITY_TYPE, 
'Wikibase\DataModel\Entity\Item' ),
-   array( Property::ENTITY_TYPE, 
'Wikibase\DataModel\Entity\Property' ),
+   array( 'item', 'Wikibase\DataModel\Entity\Item' ),
+   array( 'property', 'Wikibase\DataModel\Entity\Property' 
),
);
}
 
@@ -67,7 +68,7 @@
$entity = $this-getEntityFactory()-newEmpty( $type );
 
$this-assertInstanceOf( $class, $entity );
-   $this-assertTrue( $entity-isEmpty(), should be empty );
+   $this-assertTrue( $entity-isEmpty(), 'should be empty' );
}
 
 }
diff --git a/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php 
b/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
index 7e51123..14946a0 100644
--- a/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
+++ b/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Test\Dumpers;
 
+use 

[MediaWiki-commits] [Gerrit] Changed 'partial match' to 'potential match' - change (mediawiki...WikidataQualityExternalValidation)

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

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

Change subject: Changed 'partial match' to 'potential match'
..

Changed 'partial match' to 'potential match'

... only in translations, internal it's still 'partial'

Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityExternalValidation
 refs/changes/46/217246/1

diff --git a/i18n/en.json b/i18n/en.json
index febc96e..0c8d7ee 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,7 +20,7 @@
   wbqev-crosscheck-result-table-header-external-source: External source,
   wbqev-crosscheck-result-table-header-status: Status,
   wbqev-crosscheck-status-match: Match,
-  wbqev-crosscheck-status-partial-match: Partial match,
+  wbqev-crosscheck-status-partial-match: Potential match,
   wbqev-crosscheck-status-mismatch: Mismatch,
   wbqev-crosscheck-status-references-missing: missing,
   wbqev-crosscheck-status-references-stated: stated,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index db7b3ac..afe3aef 100755
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,7 +20,7 @@
wbqev-crosscheck-result-table-header-external-source: Header of the 
column that displays the name of the external source.,
wbqev-crosscheck-result-table-header-status: Header of the column 
that shows the result of the constraint check.\n{{Identical|Status}},
wbqev-crosscheck-status-match: Status for claims that have a match 
with any external data,
-   wbqev-crosscheck-status-partial-match: Status for claims that have a 
partial match with any external data,
+   wbqev-crosscheck-status-partial-match: Status for claims that have a 
potential match with any external data,
wbqev-crosscheck-status-mismatch: Status for claims that have a 
mismatch with any external data.,
wbqev-crosscheck-status-references-missing: Status for claims for 
which references are missing.,
wbqev-crosscheck-status-references-stated: Status for claims for 
which references are stated.,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Migrate operations-puppet-{pep8, test} to labs - change (integration/config)

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

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

Change subject: Migrate operations-puppet-{pep8,test} to labs
..

Migrate operations-puppet-{pep8,test} to labs

Bug: T101966
Change-Id: I073da24800eb59fa61057801ddf1f2d4555ff6d9
---
M jjb/operations-puppet.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/49/217249/1

diff --git a/jjb/operations-puppet.yaml b/jjb/operations-puppet.yaml
index 392f2a8..d799513 100644
--- a/jjb/operations-puppet.yaml
+++ b/jjb/operations-puppet.yaml
@@ -2,7 +2,7 @@
 # See the shell wrapper in integration/jenkins.git
 - job-template:
 name: 'operations-puppet-test'
-node: hasSlaveScripts  UbuntuPrecise
+node: contintLabsSlave  UbuntuPrecise
 defaults: use-remote-zuul
 concurrent: true
 triggers:
@@ -15,7 +15,7 @@
 #  can specify their own .pep8 rules
 - job-template:
 name: 'operations-puppet-pep8'
-node: hasSlaveScripts  UbuntuPrecise
+node: contintLabsSlave  UbuntuPrecise
 # Dont process other puppet submodules
 defaults: use-remote-zuul-no-submodules
 concurrent: true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I073da24800eb59fa61057801ddf1f2d4555ff6d9
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Add new test cases - change (mediawiki...WikidataQualityExternalValidation)

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

Change subject: Add new test cases
..


Add new test cases

Change-Id: Ic97e4d4398cd86c56a24defc7e4cfcc51fcd0674
---
M tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/CrossCheck/Comparer/StringComparerTest.php 
b/tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
index 542bdf7..43ba091 100755
--- a/tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
+++ b/tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
@@ -81,6 +81,16 @@
 'foobar',
 CompareResult::STATUS_MATCH
 ),
+   array(
+   'Emily Brontë',
+   'Emily Brontë',
+   CompareResult::STATUS_MATCH
+   ),
+   array(
+   'Richard von Weizsäcker',
+   'Richard von Weizsäcker',
+   CompareResult::STATUS_MATCH
+   ),
 // prefix/suffix partial match
 array(
 'foobar',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic97e4d4398cd86c56a24defc7e4cfcc51fcd0674
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Dominic.sauer dominic.sa...@yahoo.de
Gerrit-Reviewer: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add 3 probjects to #wikimedia-de-tech - change (labs...wikibugs2)

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

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

Change subject: Add 3 probjects to #wikimedia-de-tech
..

Add 3 probjects to #wikimedia-de-tech

 - Phragile
 - Team-TCB
 - German-Community-Wishlist

Change-Id: I3f4d08866c08e83df8a5ecc24dd7b9b81ee69e41
---
M channels.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/55/217255/1

diff --git a/channels.yaml b/channels.yaml
index 0fdcfbf..5b4c238 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -36,6 +36,11 @@
 - Thanks
 - WikiLove
 
+#wikimedia-de-tech:
+- TCB-Team
+- German-Community-Wishlist
+- Phragile
+
 #mediawiki-i18n:
 - .*-ContentTranslation
 - translatewiki\.net

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f4d08866c08e83df8a5ecc24dd7b9b81ee69e41
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com

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


[MediaWiki-commits] [Gerrit] Track label usage with fallback from Lua. - change (mediawiki...Wikibase)

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

Change subject: Track label usage with fallback from Lua.
..


Track label usage with fallback from Lua.

This change removed code that has become redundant by moving usage
tracking away from the rendering logic into decorators for the
lookup logic.

In addition, this change includes several modifications to test cases
to ensure that the SnakFormatter decorator is applied and configured
correctly.

Bug: T93056
Change-Id: I89abc34fe17d9be4377e65ef90f584836a47446f
---
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/DataAccess/Scribunto/SnakSerializationRenderer.php
M client/includes/DataAccess/Scribunto/WikibaseLuaEntityBindings.php
M client/includes/Usage/UsageAccumulator.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/SnakSerializationRendererTest.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaEntityBindingsTest.php
M client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php
10 files changed, 59 insertions(+), 160 deletions(-)

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



diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
index 1d6e1f9..9c99c4b 100644
--- 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
+++ 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
@@ -1,13 +1,14 @@
 ?php
 
 use ValueFormatters\FormatterOptions;
+use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\Usage\UsageTrackingSnakFormatter;
 use Wikibase\DataAccess\StatementTransclusionInteractor;
 use Wikibase\DataAccess\PropertyIdResolver;
 use Wikibase\DataAccess\SnaksFinder;
 use Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings;
-use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
+use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\SnakFormatter;
 use Wikibase\Lib\PropertyLabelNotResolvedException;
 
@@ -42,15 +43,20 @@
 
$wikibaseClient = WikibaseClient::getDefaultInstance();
 
+   $languageFallbackChain = 
$wikibaseClient-getLanguageFallbackChainFactory()-newFromLanguage(
+   $wgContLang,
+   LanguageFallbackChainFactory::FALLBACK_SELF | 
LanguageFallbackChainFactory::FALLBACK_VARIANTS
+   );
+
$formatterOptions = new FormatterOptions( array( 
SnakFormatter::OPT_LANG = $wgContLang-getCode() ) );
-   $usageAccumulator = new ParserOutputUsageAccumulator( 
$this-getParser()-getOutput() );
 
$snakFormatter = new UsageTrackingSnakFormatter(

$wikibaseClient-getSnakFormatterFactory()-getSnakFormatter(
-   SnakFormatter::FORMAT_WIKI, $formatterOptions
+   SnakFormatter::FORMAT_WIKI,
+   $formatterOptions
),
-   $usageAccumulator,
-   array( $wgContLang-getCode() ) //FIXME: fallback
+   $this-getUsageAccumulator(),
+   $languageFallbackChain-getFetchLanguageCodes()
);
 
$entityLookup = $wikibaseClient-getStore()-getEntityLookup();
@@ -71,12 +77,18 @@
return new WikibaseLuaEntityBindings(
$entityStatementsRenderer,
$wikibaseClient-getEntityIdParser(),
-   $usageAccumulator,
$wikibaseClient-getSettings()-getSetting( 
'siteGlobalID' )
);
}
 
/**
+* @return ParserOutputUsageAccumulator
+*/
+   public function getUsageAccumulator() {
+   return new ParserOutputUsageAccumulator( 
$this-getParser()-getOutput() );
+   }
+
+   /**
 * Register mw.wikibase.lua library
 *
 * @since 0.5
diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 41f4076..b3c8efd 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -2,6 +2,7 @@
 
 use Deserializers\Exceptions\DeserializationException;
 use ValueFormatters\FormatterOptions;
+use Wikibase\Client\Usage\UsageTrackingSnakFormatter;
 use 

[MediaWiki-commits] [Gerrit] Use LanguageFallbackLabelDescriptionLookupFactory in SpeciaS... - change (mediawiki...Wikibase)

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

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

Change subject: Use LanguageFallbackLabelDescriptionLookupFactory in 
SpeciaSetSiteLink
..

Use LanguageFallbackLabelDescriptionLookupFactory in SpeciaSetSiteLink

Change-Id: Iba45addf3a92fb24d02b82fa852f2a47e6fce6d8
---
M repo/includes/specials/SpecialSetSiteLink.php
1 file changed, 21 insertions(+), 23 deletions(-)


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

diff --git a/repo/includes/specials/SpecialSetSiteLink.php 
b/repo/includes/specials/SpecialSetSiteLink.php
index 57ccd83..3de7374 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -11,9 +11,8 @@
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup;
-use Wikibase\Lib\Store\TermLookup;
+use Wikibase\Repo\LanguageFallbackLabelDescriptionLookupFactory;
 use Wikibase\Repo\SiteLinkTargetProvider;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Summary;
@@ -69,14 +68,9 @@
private $siteLinkTargetProvider;
 
/**
-* @var TermLookup
+* @var LanguageFallbackLabelDescriptionLookupFactory
 */
-   private $termLookup;
-
-   /**
-* @var LanguageFallbackChainFactory
-*/
-   private $fallbackChainFactory;
+   private $labelDescriptionLookupFactory;
 
/**
 * @since 0.4
@@ -96,8 +90,11 @@
$settings-getSetting( 'specialSiteLinkGroups' )
);
 
-   $this-fallbackChainFactory = 
$wikibaseRepo-getLanguageFallbackChainFactory();
-   $this-termLookup = $wikibaseRepo-getTermLookup();
+   $this-labelDescriptionLookupFactory = new 
LanguageFallbackLabelDescriptionLookupFactory(
+   $wikibaseRepo-getLanguageFallbackChainFactory(),
+   $wikibaseRepo-getTermLookup(),
+   $wikibaseRepo-getTermBuffer()
+   );
}
 
/**
@@ -307,23 +304,24 @@
private function getHtmlForBadges() {
$options = '';
 
-   $fallbackChain = $this-fallbackChainFactory-newFromLanguage(
+   /** @var ItemId[] $badgeItemIds */
+   $badgeItemIds = array_map( function( $badgeId ) {
+   return new ItemId( $badgeId );
+   }, array_keys( $this-badgeItems ) );
+
+   $labelLookup = 
$this-labelDescriptionLookupFactory-newLabelDescriptionLookup(
$this-getLanguage(),
-   LanguageFallbackChainFactory::FALLBACK_SELF
-   | 
LanguageFallbackChainFactory::FALLBACK_VARIANTS
-   | LanguageFallbackChainFactory::FALLBACK_OTHERS
+   $badgeItemIds
);
 
-   $labelLookup = new LanguageFallbackLabelDescriptionLookup( 
$this-termLookup, $fallbackChain );
-
-   foreach ( $this-badgeItems as $badgeId = $value ) {
-   $name = 'badge-' . $badgeId;
+   foreach ( $badgeItemIds as $badgeId ) {
+   $name = 'badge-' . $badgeId-getSerialization();
 
try {
-   $term = $labelLookup-getLabel( new ItemId( 
$badgeId ) );
-   $label = $term-getText();
+   $label = $labelLookup-getLabel( $badgeId 
)-getText();
} catch ( OutOfBoundsException $ex ) {
-   $label = $badgeId;
+   // show plain id if no label has been found
+   $label = $badgeId-getSerialization();
}
 
$options .= Html::rawElement(
@@ -333,7 +331,7 @@
),
Html::check(
$name,
-   in_array( $badgeId, $this-badges ),
+   in_array( $badgeId-getSerialization(), 
$this-badges ),
array(
'id' = $name
)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba45addf3a92fb24d02b82fa852f2a47e6fce6d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene benestar.wikime...@gmail.com

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] labs: Allow granular control over which NFS mounts are mounted - change (operations/puppet)

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

Change subject: labs: Allow granular control over which NFS mounts are mounted
..


labs: Allow granular control over which NFS mounts are mounted

Bug: T101660
Change-Id: I79c1fcd8d62fe48d719bad8ce3f64b7b00c4ceeb
---
M hieradata/labs.yaml
M manifests/role/labs.pp
2 files changed, 26 insertions(+), 13 deletions(-)

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



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index ae7b8e2..7591108 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -45,3 +45,8 @@
 labs_puppet_master: labs-puppetmaster-eqiad.wikimedia.org
 labs_puppet_master_secondary: labs-puppetmaster-codfw.wikimedia.org
 labs_recursor: labs-recursor0.wikimedia.org
+nfs_mounts:
+  project: true
+  home: true
+  scratch: true
+  dumps: true
diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 6ddc81b..3659266 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -42,11 +42,13 @@
 ensure = present,
 }
 
+$nfs_mounts = hiera('nfs_mounts')
+
 $nfs_opts = 'vers=4,bg,hard,intr,sec=sys,proto=tcp,port=0,noatime,nofsc'
 $nfs_server = 'labstore.svc.eqiad.wmnet'
 $dumps_server = 'labstore1003.eqiad.wmnet'
 
-if hiera('has_shared_home', true) {
+if $nfs_mounts['home'] {
 mount { '/home':
 ensure  = mounted,
 atboot  = true,
@@ -57,7 +59,7 @@
 }
 }
 
-if hiera('has_shared_project_space', true) {
+if $nfs_mounts['project'] or $nfs_mounts['scratch'] {
 # Directory for data mounts
 file { '/data':
 ensure = directory,
@@ -65,7 +67,9 @@
 group  = 'root',
 mode   = '0755',
 }
+}
 
+if $nfs_mounts['project'] {
 file { '/data/project':
 ensure  = directory,
 require = File['/data'],
@@ -79,7 +83,9 @@
 device  = ${nfs_server}:/project/${instanceproject}/project,
 require = File['/data/project', '/etc/modprobe.d/nfs-no-idmap'],
 }
+}
 
+if $nfs_mounts['scratch'] {
 file { '/data/scratch':
 ensure  = directory,
 require = File['/data'],
@@ -95,17 +101,19 @@
 }
 }
 
-file { '/public/dumps':
-ensure  = directory,
-require = File['/public'],
-}
-mount { '/public/dumps':
-ensure  = mounted,
-atboot  = true,
-fstype  = 'nfs',
-options = ro,${nfs_opts},
-device  = ${dumps_server}:/dumps,
-require = File['/public/dumps', '/etc/modprobe.d/nfs-no-idmap'],
+if $nfs_mounts['dumps'] {
+file { '/public/dumps':
+ensure  = directory,
+require = File['/public'],
+}
+mount { '/public/dumps':
+ensure  = mounted,
+atboot  = true,
+fstype  = 'nfs',
+options = ro,${nfs_opts},
+device  = ${dumps_server}:/dumps,
+require = File['/public/dumps', '/etc/modprobe.d/nfs-no-idmap'],
+}
 }
 
 file { '/public/keys':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79c1fcd8d62fe48d719bad8ce3f64b7b00c4ceeb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ssh: Fix annoying indentation error - change (operations/puppet)

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

Change subject: ssh: Fix annoying indentation error
..


ssh: Fix annoying indentation error

Change-Id: I297cec07b56e20a1d4ce27b6413472d60aa19a2c
---
M modules/ssh/manifests/server.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index 7d1407e..2f8a773 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -22,7 +22,7 @@
 if ($::realm == 'labs') {
 $ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
 } else {
-$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
+$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
 }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I297cec07b56e20a1d4ce27b6413472d60aa19a2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] labs: Disable mounting /public/keys on non-precise hosts - change (operations/puppet)

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

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

Change subject: labs: Disable mounting /public/keys on non-precise hosts
..

labs: Disable mounting /public/keys on non-precise hosts

They use LDAP for authentication anyway, so no need to have this
mounted at all.

Bug: T101660
Change-Id: Ibf6b3bc35508ab19713a858dfb25d26227a220fa
---
M manifests/role/labs.pp
1 file changed, 26 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/217247/1

diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 3659266..0fd787a 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -30,14 +30,6 @@
 mode= '0444',
 }
 
-# Directory for public (readonly) mounts
-file { '/public':
-ensure = directory,
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-}
-
 package { 'puppet-lint':
 ensure = present,
 }
@@ -101,6 +93,17 @@
 }
 }
 
+# Only create if we need /public/dumps or /public/keys
+if $nfs_mounts['dumps'] or os_version('ubuntu = precise') {
+# Directory for public (readonly) mounts
+file { '/public':
+ensure = directory,
+owner  = 'root',
+group  = 'root',
+mode   = '0755',
+}
+}
+
 if $nfs_mounts['dumps'] {
 file { '/public/dumps':
 ensure  = directory,
@@ -116,18 +119,21 @@
 }
 }
 
-file { '/public/keys':
-ensure  = directory,
-require = File['/public'],
-}
-mount { '/public/keys':
-ensure  = mounted,
-atboot  = true,
-fstype  = 'nfs',
-options = ro,${nfs_opts},
-device  = ${nfs_server}:/keys,
-require = File['/public/keys', '/etc/modprobe.d/nfs-no-idmap'],
-notify  = Service['ssh'],
+# Used by ssh for logging in, only on precise and lower
+if os_version('ubuntu = precise') {
+file { '/public/keys':
+ensure  = directory,
+require = File['/public'],
+}
+mount { '/public/keys':
+ensure  = mounted,
+atboot  = true,
+fstype  = 'nfs',
+options = ro,${nfs_opts},
+device  = ${nfs_server}:/keys,
+require = File['/public/keys', '/etc/modprobe.d/nfs-no-idmap'],
+notify  = Service['ssh'],
+}
 }
 
 # While the default on kernels = 3.3 is to have idmap disabled,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf6b3bc35508ab19713a858dfb25d26227a220fa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] labs: Disable mounting /public/keys on non-precise hosts - change (operations/puppet)

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

Change subject: labs: Disable mounting /public/keys on non-precise hosts
..


labs: Disable mounting /public/keys on non-precise hosts

They use LDAP for authentication anyway, so no need to have this
mounted at all.

Bug: T101660
Change-Id: Ibf6b3bc35508ab19713a858dfb25d26227a220fa
---
M manifests/role/labs.pp
1 file changed, 26 insertions(+), 20 deletions(-)

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



diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 3659266..0fd787a 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -30,14 +30,6 @@
 mode= '0444',
 }
 
-# Directory for public (readonly) mounts
-file { '/public':
-ensure = directory,
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-}
-
 package { 'puppet-lint':
 ensure = present,
 }
@@ -101,6 +93,17 @@
 }
 }
 
+# Only create if we need /public/dumps or /public/keys
+if $nfs_mounts['dumps'] or os_version('ubuntu = precise') {
+# Directory for public (readonly) mounts
+file { '/public':
+ensure = directory,
+owner  = 'root',
+group  = 'root',
+mode   = '0755',
+}
+}
+
 if $nfs_mounts['dumps'] {
 file { '/public/dumps':
 ensure  = directory,
@@ -116,18 +119,21 @@
 }
 }
 
-file { '/public/keys':
-ensure  = directory,
-require = File['/public'],
-}
-mount { '/public/keys':
-ensure  = mounted,
-atboot  = true,
-fstype  = 'nfs',
-options = ro,${nfs_opts},
-device  = ${nfs_server}:/keys,
-require = File['/public/keys', '/etc/modprobe.d/nfs-no-idmap'],
-notify  = Service['ssh'],
+# Used by ssh for logging in, only on precise and lower
+if os_version('ubuntu = precise') {
+file { '/public/keys':
+ensure  = directory,
+require = File['/public'],
+}
+mount { '/public/keys':
+ensure  = mounted,
+atboot  = true,
+fstype  = 'nfs',
+options = ro,${nfs_opts},
+device  = ${nfs_server}:/keys,
+require = File['/public/keys', '/etc/modprobe.d/nfs-no-idmap'],
+notify  = Service['ssh'],
+}
 }
 
 # While the default on kernels = 3.3 is to have idmap disabled,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf6b3bc35508ab19713a858dfb25d26227a220fa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] ssh: Don't look for keys in NFS on non-precise hosts - change (operations/puppet)

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

Change subject: ssh: Don't look for keys in NFS on non-precise hosts
..


ssh: Don't look for keys in NFS on non-precise hosts

Bug: T101660
Change-Id: I53c5fb525131efe8e2d31cd6384f88a1ae683c63
---
M modules/ssh/manifests/server.pp
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index 2f8a773..0ff6869 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -20,7 +20,11 @@
 $ssh_authorized_keys_file = $authorized_keys_file
 } else {
 if ($::realm == 'labs') {
-$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
+if os_version('ubuntu = precise') {
+$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
+} else {
+$ssh_authorized_keys_file = '/etc/ssh/userkeys/%u'
+}
 } else {
 $ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53c5fb525131efe8e2d31cd6384f88a1ae683c63
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Reformatted code - change (mediawiki...WikidataQualityExternalValidation)

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

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

Change subject: Reformatted code
..

Reformatted code

Change-Id: Ib678961f03d01e84a2ffecdc8c768d9338718ded
---
M WikibaseQualityExternalValidation.php
M WikibaseQualityExternalValidationHooks.php
M api/CrossCheck.php
M includes/CrossCheck/Comparer/DataValueComparer.php
M includes/CrossCheck/Comparer/DataValueComparerBase.php
M includes/CrossCheck/Comparer/DataValueComparerFactory.php
M includes/CrossCheck/Comparer/DispatchingDataValueComparer.php
M includes/CrossCheck/Comparer/EntityIdValueComparer.php
M includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
M includes/CrossCheck/Comparer/MonolingualTextValueComparer.php
M includes/CrossCheck/Comparer/MultilingualTextValueComparer.php
M includes/CrossCheck/Comparer/QuantityValueComparer.php
M includes/CrossCheck/Comparer/StringComparer.php
M includes/CrossCheck/Comparer/StringValueComparer.php
M includes/CrossCheck/Comparer/TimeValueComparer.php
M includes/CrossCheck/CrossCheckInteractor.php
M includes/CrossCheck/CrossChecker.php
M includes/CrossCheck/ReferenceHandler.php
M includes/CrossCheck/Result/CompareResult.php
M includes/CrossCheck/Result/CrossCheckResult.php
M includes/CrossCheck/Result/CrossCheckResultList.php
M includes/CrossCheck/Result/ReferenceResult.php
M includes/DumpMetaInformation/DumpMetaInformation.php
M includes/DumpMetaInformation/DumpMetaInformationRepo.php
M includes/EvaluateCrossCheckJob.php
M includes/EvaluateCrossCheckJobService.php
M includes/ExternalDataRepo.php
M includes/ExternalValidationFactory.php
M includes/Serializer/CompareResultSerializer.php
M includes/Serializer/CrossCheckResultListSerializer.php
M includes/Serializer/CrossCheckResultSerializer.php
M includes/Serializer/DumpMetaInformationSerializer.php
M includes/Serializer/IndexedTagsSerializer.php
M includes/Serializer/ReferenceResultSerializer.php
M includes/Serializer/SerializerFactory.php
M includes/UpdateTable/ImportContext.php
M includes/UpdateTable/Importer.php
M includes/Violations/CrossCheckResultToViolationTranslator.php
M includes/Violations/CrossCheckViolationContext.php
M maintenance/UpdateTable.php
M specials/SpecialCrossCheck.php
M specials/SpecialExternalDbs.php
M tests/phpunit/Api/CrossCheckTest.php
M tests/phpunit/CrossCheck/Comparer/DataValueComparerBaseTest.php
M tests/phpunit/CrossCheck/Comparer/DataValueComparerFactoryTest.php
M tests/phpunit/CrossCheck/Comparer/DispatchingDataValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/MonolingualTextValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/MultilingualTextValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/QuantityValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
M tests/phpunit/CrossCheck/Comparer/StringValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php
M tests/phpunit/CrossCheck/CrossCheckInteractorTest.php
M tests/phpunit/CrossCheck/CrossCheckerTest.php
M tests/phpunit/CrossCheck/ReferenceHandlerTest.php
M tests/phpunit/CrossCheck/Result/CompareResultTest.php
M tests/phpunit/CrossCheck/Result/CrossCheckResultListTest.php
M tests/phpunit/CrossCheck/Result/CrossCheckResultTest.php
M tests/phpunit/CrossCheck/Result/ReferenceResultTest.php
M tests/phpunit/DumpMetaInformation/DumpMetaInformationRepoTest.php
M tests/phpunit/DumpMetaInformation/DumpMetaInformationTest.php
M tests/phpunit/EvaluateCrossCheckJobServiceTest.php
M tests/phpunit/ExternalDataRepoTest.php
M tests/phpunit/ExternalValidationFactoryTest.php
M tests/phpunit/Serializer/CompareResultSerializerTest.php
M tests/phpunit/Serializer/CrossCheckResultListSerializerTest.php
M tests/phpunit/Serializer/CrossCheckResultSerializerTest.php
M tests/phpunit/Serializer/DumpMetaInformationSerializerTest.php
M tests/phpunit/Serializer/IndexedTagsSerializerTest.php
M tests/phpunit/Serializer/ReferenceResultSerializerTest.php
M tests/phpunit/Serializer/SerializerBaseTest.php
M tests/phpunit/Serializer/SerializerFactoryTest.php
M tests/phpunit/Specials/SpecialCrossCheckTest.php
M tests/phpunit/Specials/SpecialExternalDbsTest.php
M tests/phpunit/UpdateTable/ImportContextTest.php
M tests/phpunit/UpdateTable/UpdateTableTest.php
M tests/phpunit/Violations/CrossCheckResultToViolationTranslatorTest.php
M tests/phpunit/Violations/CrossCheckViolationContextTest.php
80 files changed, 8,789 insertions(+), 8,728 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib678961f03d01e84a2ffecdc8c768d9338718ded
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] Reformatted code - change (mediawiki...WikidataQualityExternalValidation)

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

Change subject: Reformatted code
..


Reformatted code

Change-Id: Ib678961f03d01e84a2ffecdc8c768d9338718ded
---
M WikibaseQualityExternalValidation.php
M WikibaseQualityExternalValidationHooks.php
M api/CrossCheck.php
M includes/CrossCheck/Comparer/DataValueComparer.php
M includes/CrossCheck/Comparer/DataValueComparerBase.php
M includes/CrossCheck/Comparer/DataValueComparerFactory.php
M includes/CrossCheck/Comparer/DispatchingDataValueComparer.php
M includes/CrossCheck/Comparer/EntityIdValueComparer.php
M includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
M includes/CrossCheck/Comparer/MonolingualTextValueComparer.php
M includes/CrossCheck/Comparer/MultilingualTextValueComparer.php
M includes/CrossCheck/Comparer/QuantityValueComparer.php
M includes/CrossCheck/Comparer/StringComparer.php
M includes/CrossCheck/Comparer/StringValueComparer.php
M includes/CrossCheck/Comparer/TimeValueComparer.php
M includes/CrossCheck/CrossCheckInteractor.php
M includes/CrossCheck/CrossChecker.php
M includes/CrossCheck/ReferenceHandler.php
M includes/CrossCheck/Result/CompareResult.php
M includes/CrossCheck/Result/CrossCheckResult.php
M includes/CrossCheck/Result/CrossCheckResultList.php
M includes/CrossCheck/Result/ReferenceResult.php
M includes/DumpMetaInformation/DumpMetaInformation.php
M includes/DumpMetaInformation/DumpMetaInformationRepo.php
M includes/EvaluateCrossCheckJob.php
M includes/EvaluateCrossCheckJobService.php
M includes/ExternalDataRepo.php
M includes/ExternalValidationFactory.php
M includes/Serializer/CompareResultSerializer.php
M includes/Serializer/CrossCheckResultListSerializer.php
M includes/Serializer/CrossCheckResultSerializer.php
M includes/Serializer/DumpMetaInformationSerializer.php
M includes/Serializer/IndexedTagsSerializer.php
M includes/Serializer/ReferenceResultSerializer.php
M includes/Serializer/SerializerFactory.php
M includes/UpdateTable/ImportContext.php
M includes/UpdateTable/Importer.php
M includes/Violations/CrossCheckResultToViolationTranslator.php
M includes/Violations/CrossCheckViolationContext.php
M maintenance/UpdateTable.php
M specials/SpecialCrossCheck.php
M specials/SpecialExternalDbs.php
M tests/phpunit/Api/CrossCheckTest.php
M tests/phpunit/CrossCheck/Comparer/DataValueComparerBaseTest.php
M tests/phpunit/CrossCheck/Comparer/DataValueComparerFactoryTest.php
M tests/phpunit/CrossCheck/Comparer/DispatchingDataValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/MonolingualTextValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/MultilingualTextValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/QuantityValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/StringComparerTest.php
M tests/phpunit/CrossCheck/Comparer/StringValueComparerTest.php
M tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php
M tests/phpunit/CrossCheck/CrossCheckInteractorTest.php
M tests/phpunit/CrossCheck/CrossCheckerTest.php
M tests/phpunit/CrossCheck/ReferenceHandlerTest.php
M tests/phpunit/CrossCheck/Result/CompareResultTest.php
M tests/phpunit/CrossCheck/Result/CrossCheckResultListTest.php
M tests/phpunit/CrossCheck/Result/CrossCheckResultTest.php
M tests/phpunit/CrossCheck/Result/ReferenceResultTest.php
M tests/phpunit/DumpMetaInformation/DumpMetaInformationRepoTest.php
M tests/phpunit/DumpMetaInformation/DumpMetaInformationTest.php
M tests/phpunit/EvaluateCrossCheckJobServiceTest.php
M tests/phpunit/ExternalDataRepoTest.php
M tests/phpunit/ExternalValidationFactoryTest.php
M tests/phpunit/Serializer/CompareResultSerializerTest.php
M tests/phpunit/Serializer/CrossCheckResultListSerializerTest.php
M tests/phpunit/Serializer/CrossCheckResultSerializerTest.php
M tests/phpunit/Serializer/DumpMetaInformationSerializerTest.php
M tests/phpunit/Serializer/IndexedTagsSerializerTest.php
M tests/phpunit/Serializer/ReferenceResultSerializerTest.php
M tests/phpunit/Serializer/SerializerBaseTest.php
M tests/phpunit/Serializer/SerializerFactoryTest.php
M tests/phpunit/Specials/SpecialCrossCheckTest.php
M tests/phpunit/Specials/SpecialExternalDbsTest.php
M tests/phpunit/UpdateTable/ImportContextTest.php
M tests/phpunit/UpdateTable/UpdateTableTest.php
M tests/phpunit/Violations/CrossCheckResultToViolationTranslatorTest.php
M tests/phpunit/Violations/CrossCheckViolationContextTest.php
80 files changed, 8,789 insertions(+), 8,728 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib678961f03d01e84a2ffecdc8c768d9338718ded
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] Tweak messages to be consistent with conventions - change (mediawiki...WikidataQuality)

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

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

Change subject: Tweak messages to be consistent with conventions
..

Tweak messages to be consistent with conventions

* Use double quotes instead of single quotes.
* Don't yell at users.

Change-Id: I4de005068be2cabcc6b6a8025723652175f5a200
---
M i18n/en.json
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/23/217223/1

diff --git a/i18n/en.json b/i18n/en.json
index 6b01d5f..9f924fe 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -18,10 +18,10 @@
   wbq-violations-form-select-all: (all),
   wbq-violations-exceptions-checkbox-label: Show exceptions,
   wbq-violations-submit-button-label: Show Violations,
-  wbq-violations-invalid-entity-id: '$1' is not a valid entity ID!,
-  wbq-violations-not-existent-entity: Entity '$1' does not exist!,
-  wbq-violations-invalid-property-id: '$1' is not a valid property ID!,
-  wbq-violations-not-existent-property: Property '$1' does not exist!,
+  wbq-violations-invalid-entity-id: \$1\ is not a valid entity ID.,
+  wbq-violations-not-existent-entity: Entity \$1\ does not exist.,
+  wbq-violations-invalid-property-id: \$1\ is not a valid property ID.,
+  wbq-violations-not-existent-property: Property \$1\ does not exist.,
   wbq-violations-table-header-entity: Entity,
   wbq-violations-table-header-claim: Claim,
   wbq-violations-table-header-constraint-type: Type,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4de005068be2cabcc6b6a8025723652175f5a200
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@kitano.nl

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


[MediaWiki-commits] [Gerrit] Update MobilePersonalTools hook handler - change (mediawiki...WikiGrok)

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

Change subject: Update MobilePersonalTools hook handler
..


Update MobilePersonalTools hook handler

Needs to use new array structure.

Dependency: I3ab146a
Change-Id: I9f0cbc7fa306b5d4958fabf31d2e0d1a864b0796
---
M includes/Hooks.php
1 file changed, 8 insertions(+), 9 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index e759b8b..f5efb78 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -326,17 +326,16 @@
MobileContext::singleton()-isBetaGroupMember() 
$config-get( 'WikiGrokUIEnableInSidebar' )
) {
-   $items += array(
-   'contribute' = array(
-   'links' = array(
-   array(
-   'text' = wfMessage( 
'wikigrok-main-menu-wikigrok-roulette' )-escaped(),
-   'href' = '#',
-   'class' = 
MobileUI::iconClass( 'wikigrok', 'before', 'wikigrok-roulette' ),
-   ),
+   $items[] = array(
+   'name' = 'contribute',
+   'components' = array(
+   array(
+   'text' = wfMessage( 
'wikigrok-main-menu-wikigrok-roulette' )-escaped(),
+   'href' = '#',
+   'class' = MobileUI::iconClass( 
'wikigrok', 'before', 'wikigrok-roulette' ),
),
-   'class' = 'jsonly',
),
+   'class' = 'jsonly',
);
}
return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f0cbc7fa306b5d4958fabf31d2e0d1a864b0796
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] tools: Move c2 *.labsdb aliases to c1 and some to c3 - change (operations/puppet)

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

Change subject: tools: Move c2 *.labsdb aliases to c1 and some to c3
..


tools: Move c2 *.labsdb aliases to c1 and some to c3

In preparation for maintenance on c2

Bug: T101567
Change-Id: Iffcad53a9a2059ea95c2a29032748caf50a8ae05
---
M modules/toollabs/templates/hosts.erb
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved
  Merlijn van Deen: Looks good to me, but someone else must approve



diff --git a/modules/toollabs/templates/hosts.erb 
b/modules/toollabs/templates/hosts.erb
index 466eebd..4fbb24b 100644
--- a/modules/toollabs/templates/hosts.erb
+++ b/modules/toollabs/templates/hosts.erb
@@ -237,11 +237,11 @@
 10.64.37.5 guwikiquote.labsdb lvwikibooks.labsdb map_bmswiki.labsdb 
thwikisource.labsdb
 10.64.37.5 hrwikiquote.labsdb
 
-10.64.37.4 cswiki.labsdb svwiki.labsdb commonswiki.labsdb nowiki.labsdb
-10.64.37.4 zhwiki.labsdb bgwiktionary.labsdb idwiki.labsdb eowiki.labsdb
-10.64.37.4 enwikiquote.labsdb wikidatawiki.labsdb thwiki.labsdb nlwiki.labsdb
-10.64.37.4 ptwiki.labsdb dewiki.labsdb plwiki.labsdb itwiki.labsdb
-10.64.37.4 trwiki.labsdb bgwiki.labsdb enwiktionary.labsdb fiwiki.labsdb
+10.64.37.5 cswiki.labsdb svwiki.labsdb commonswiki.labsdb nowiki.labsdb
+10.64.37.5 zhwiki.labsdb bgwiktionary.labsdb idwiki.labsdb eowiki.labsdb
+10.64.37.5 enwikiquote.labsdb wikidatawiki.labsdb thwiki.labsdb nlwiki.labsdb
+10.64.4.11 ptwiki.labsdb dewiki.labsdb plwiki.labsdb itwiki.labsdb
+10.64.4.11 trwiki.labsdb bgwiki.labsdb enwiktionary.labsdb fiwiki.labsdb
 
 10.64.4.11 enwiki.labsdb
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffcad53a9a2059ea95c2a29032748caf50a8ae05
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] conftool: adding the cli-tool and integration tests - change (operations...conftool)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: conftool: adding the cli-tool and integration tests
..


conftool: adding the cli-tool and integration tests

Change-Id: I87147db34746d9f9b02cc93d97fecaec69aa6912
---
M conftool/__init__.py
A conftool/action.py
M conftool/cli/syncer.py
A conftool/cli/tool.py
M conftool/configuration.py
M conftool/drivers/__init__.py
M conftool/drivers/etcd.py
M conftool/node.py
A conftool/tests/__init__.py
R conftool/tests/fixtures/nodes/eqiad.yaml
R conftool/tests/fixtures/services/data.yaml
A conftool/tests/integration/__init__.py
A conftool/tests/integration/test_syncer.py
A conftool/tests/integration/test_tool.py
A conftool/tests/unit/__init__.py
A conftool/tests/unit/test_node.py
A setup.py
17 files changed, 534 insertions(+), 23 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/conftool/__init__.py b/conftool/__init__.py
index 1ba4c8a..36aea6d 100644
--- a/conftool/__init__.py
+++ b/conftool/__init__.py
@@ -1,5 +1,6 @@
 import os
 import logging
+import json
 from conftool import backend
 from conftool import drivers
 
@@ -22,6 +23,10 @@
 def key(self):
 raise NotImplementedError(All kvstore objects should implement this)
 
+@property
+def name(self):
+return os.path.basename(self.key)
+
 def get_default(self, what):
 raise NotImplementedError(All kvstore objects should implement this.)
 
@@ -43,6 +48,23 @@
 def delete(self):
 self.backend.driver.delete(self.key)
 
+@classmethod
+def get_tags(cls, taglist):
+tuplestrip = lambda tup: tuple(map(lambda x: x.strip(), tup))
+tagdict = dict([tuplestrip(el.split('=')) for el in taglist])
+# will raise a KeyError if not all tags are matched
+return [tagdict[t] for t in cls._tags]
+
+def update(self, values):
+
+Update values of properties in the schema
+
+for k, v in values.items():
+if k not in self._schema:
+continue
+self._set_value(k, self._schema[k], {k: v}, set_defaults=False)
+self.write()
+
 def _from_net(self, values):
 
 Fetch the values from the kvstore into the object
@@ -59,9 +81,14 @@
 values[key] = self.get_default(key)
 return values
 
-def _set_value(self, key, validator, values):
+def _set_value(self, key, validator, values, set_defaults=True):
 try:
 setattr(self, key, validator(values[key]))
 except Exception as e:
 # TODO: log validation error
-setattr(self, key, self.get_default(key))
+if set_defaults:
+setattr(self, key, self.get_default(key))
+
+def __str__(self):
+d = {self.name: self._to_net()}
+return json.dumps(d)
diff --git a/conftool/action.py b/conftool/action.py
new file mode 100644
index 000..2f73aa8
--- /dev/null
+++ b/conftool/action.py
@@ -0,0 +1,50 @@
+config = {}
+backend = None
+
+
+class ActionError(Exception):
+pass
+
+
+class Action(object):
+
+def __init__(self, obj, act):
+self.action, self.args = self._parse_action(act)
+self.entity = obj
+self.description = 
+
+def _parse_action(self, act):
+if act.startswith('get'):
+return ('get', None)
+elif act.startswith('delete'):
+return ('delete', None)
+elif not act.startswith('set/'):
+raise ActionError(Cannot parse action %s % act)
+set_arg = act.strip('set/')
+try:
+values = dict((el.strip().split('=')) for el in set_arg.split(':'))
+except Exception as e:
+raise ActionError(Could not parse set instructions: %s % set_arg)
+return ('set', values)
+
+def run(self):
+if self.action == 'get':
+self.entity.fetch()
+if self.entity.exists:
+return str(self.entity)
+else:
+return %s not found % self.entity.name
+elif self.action == 'delete':
+self.entity.delete()
+entity_type = self.entity.__class__.__name__,
+return Deleted %s %s. % (entity_type,
+   self.entity.name)
+else:
+desc = []
+for (k, v) in self.args.items():
+msg = %s: %s changed %s = %s % (
+self.entity.name, k,
+getattr(self.entity, k), v)
+desc.append(msg)
+self.entity.update(self.args)
+return \n.join(desc)
diff --git a/conftool/cli/syncer.py b/conftool/cli/syncer.py
index 73c797d..486cc4c 100644
--- a/conftool/cli/syncer.py
+++ b/conftool/cli/syncer.py
@@ -10,6 +10,7 @@
 import functools
 import logging
 
+
 # Generic exception handling decorator
 def 

[MediaWiki-commits] [Gerrit] SkinAfterContent / Vector compatibility - change (mediawiki...BlueSpiceFoundation)

2015-06-10 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: SkinAfterContent / Vector compatibility
..

SkinAfterContent / Vector compatibility

Fixed an issue with BsBaseTemplate-Skins where the SkinAfterContent hook
was interrupted.

See https://sourceforge.net/p/bluespice/bugs/284/ for details

Change-Id: Ieae2d8db0eb61ae126ae4daa020140070cad34f2
---
M includes/CoreHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/24/217224/1

diff --git a/includes/CoreHooks.php b/includes/CoreHooks.php
index 9c760fc..1c430c4 100755
--- a/includes/CoreHooks.php
+++ b/includes/CoreHooks.php
@@ -494,7 +494,7 @@
 */
public static function onSkinAfterContent(  $data, $skin ) {
if( self::$oCurrentTemplate == null ) {
-   return false;
+   return true;
}
 
if ( isset( 
self::$oCurrentTemplate-data['bs_dataAfterContent'] ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieae2d8db0eb61ae126ae4daa020140070cad34f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel vo...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Provide a 'qqq' doc message for category-renamed Bug: T85934 - change (pywikibot/i18n)

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

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

Change subject: Provide a 'qqq' doc message for category-renamed Bug: T85934
..

Provide a 'qqq' doc message for category-renamed
Bug: T85934

Change-Id: Ief292a8ea4504a162cc46241b54d05d8491d148c
---
M category.py
M category/qqq.json
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/i18n 
refs/changes/27/217227/1

diff --git a/category.py b/category.py
index 431335e..85b0252 100644
--- a/category.py
+++ b/category.py
@@ -31,6 +31,7 @@
 'category-changing': u'Edit summary when the bot moves pages from one 
category to another. code%(oldcat)s/code is the source category, 
code%(newcat)s/code the target.',
 'category-listifying': u'Definition of 
[[mw:Manual:Pywikibot/category.py#Syntax|listify]] - make a list of all of the 
articles that are in a category.\n\n*Variable %(fromcat)s = the category to 
make a list of in the listify option.\n*Variable %(num)d is probably a 
number.\n*You may use PLURAL tag like (codenowiki{{PLURAL:%(num)d|1 
entry|%(num)d entries}}/nowiki/code)\nDo not translate the variables.',
 'category-removing': u'Edit summary. Parameters:\n* %(oldcat)s - old 
category name',
+'category-renamed': u'Edit summary when a category was renamed.',
 'category-replacing': u'Edit summary. Parameters:\n* %(oldcat)s - old 
category name\n* %(newcat)s - new category name',
 'category-section-title': u'Section title for keeping page history',
 'category-strip-cfd-templates': u'Edit summary when CFD (Categories 
for deletion) templates are removed from the page\'s text following a move/keep 
action',
diff --git a/category/qqq.json b/category/qqq.json
index 921a3be..482ff66 100644
--- a/category/qqq.json
+++ b/category/qqq.json
@@ -16,6 +16,7 @@
category-changing: Edit summary when the bot moves pages from one 
category to another. code%(oldcat)s/code is the source category, 
code%(newcat)s/code the target.,
category-listifying: Definition of 
[[mw:Manual:Pywikibot/category.py#Syntax|listify]] - make a list of all of the 
articles that are in a category.\n\n*Variable \%(fromcat)s\ = the category to 
make a list of in the listify option.\n*Variable \%(num)d\ is probably a 
number.\n*You may use PLURAL tag like (codenowiki{{PLURAL:%(num)d|1 
entry|%(num)d entries}}/nowiki/code)\nDo not translate the variables.,
category-removing: Edit summary. Parameters:\n* %(oldcat)s - old 
category name,
+   category-renamed: Edit summary when a category was renamed.,
category-replacing: Edit summary. Parameters:\n* %(oldcat)s - old 
category name\n* %(newcat)s - new category name,
category-section-title: Section title for keeping page history,
category-strip-cfd-templates: Edit summary when CFD (Categories for 
deletion) templates are removed from the page's text following a move/keep 
action,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief292a8ea4504a162cc46241b54d05d8491d148c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] Parse region in geoip cookie - change (mediawiki...CentralNotice)

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

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

Change subject: Parse region in geoip cookie
..

Parse region in geoip cookie

Depends on I130f406b230dc9c6c7f64c898dce942571f0f5a4

Bug: T101819
Change-Id: I480cbc7adb1a8eed0b5bee71e2b9c6737596f617
---
M modules/ext.centralNotice.bannerController/bannerController.js
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/31/217231/1

diff --git a/modules/ext.centralNotice.bannerController/bannerController.js 
b/modules/ext.centralNotice.bannerController/bannerController.js
index 5533e59..c2b7ee0 100644
--- a/modules/ext.centralNotice.bannerController/bannerController.js
+++ b/modules/ext.centralNotice.bannerController/bannerController.js
@@ -39,12 +39,13 @@
 
function synthesizeGeoCookie() {
if ( !window.Geo || !window.Geo.country ) {
-   $.cookie( 'GeoIP', 'vx', { path: '/' } );
+   $.cookie( 'GeoIP', ':vx', { path: '/' } );
return;
}
 
var parts = [
window.Geo.country,
+   window.Geo.region,
window.Geo.city.replace( /[^a-z]/i, '_' ),
window.Geo.lat,
window.Geo.lon,
@@ -54,13 +55,14 @@
$.cookie( 'GeoIP', parts.join( ':' ), { path: '/' } );
}
 
-   window.Geo = ( function ( match, country, city, lat, lon, af ) {
+   window.Geo = ( function ( match, country, region, city, lat, lon, af ) {
if ( typeof country !== 'string' || ( country.length !== 0  
country.length !== 2 ) ) {
// 'country' is neither empty nor a country code (string of
// length 2), so something is wrong with the cookie, and we
// cannot rely on its value.
$.cookie( 'GeoIP', null, { path: '/' } );
country = '';
+   region = '';
city = '';
lat = '';
lon = '';
@@ -68,12 +70,13 @@
}
return {
country: country,
+   region: region,
city: city,
lat: lat  parseFloat( lat ),
lon: lon  parseFloat( lon ),
af: af
};
-   } ).apply( null, ( $.cookie( 'GeoIP' ) || '' ).match( 
/([^:]*):([^:]*):([^:]*):([^:]*):([^;]*)/ ) || [] );
+   } ).apply( null, ( $.cookie( 'GeoIP' ) || '' ).match( 
/([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^;]*)/ ) || [] );
 
// FIXME Following the switch to client-side banner selection, it would
// make more sense for this to be defined in bannerController.lib. 
Before

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I480cbc7adb1a8eed0b5bee71e2b9c6737596f617
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add check for somevalue that caused crash in diffWithinRange... - change (mediawiki...WikidataQualityConstraints)

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

Change subject: add check for somevalue that caused crash in 
diffWithinRangeChecker
..


add check for somevalue that caused crash in diffWithinRangeChecker

Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
---
M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php 
b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
index 50c8083..eaf46ae 100755
--- a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
+++ b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
@@ -104,6 +104,10 @@
 * error handling:
 *   types of this and the other value have to 
be equal, both must contain actual values
 */
+   if ( !$mainSnak instanceof PropertyValueSnak ) {
+   $message = 'Referenced property needs 
to have a value.';
+   return new CheckResult( $statement, 
$constraint-getConstraintTypeQid(), $parameters, 
CheckResult::STATUS_VIOLATION, $message );
+   }
if ( $mainSnak-getDataValue()-getType() === 
$dataValue-getType()  $mainSnak-getType() === 'value' ) {
 
$thatValue = 
$this-rangeCheckerHelper-getComparativeValue( $mainSnak-getDataValue() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: v1
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de
Gerrit-Reviewer: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] WIP: Explicitly enter/exit link annotations - change (VisualEditor/VisualEditor)

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

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

Change subject: WIP: Explicitly enter/exit link annotations
..

WIP: Explicitly enter/exit link annotations

Link anchor tags are nailed with surrounding img nodes

TODO:
- Decide exactly where to call fixupCursorPosition (general event order cleanup)
- Account for cursor direction to avoid cursoring loops (requires 
cursor-offsets)
- Better function name for fixupCursorPosition
- Debug image for annotation nails
- Better visualisation
- Better documentation

Change-Id: Ie643984c24168ae31d37e0eae8e9003b63ac4f18
---
M src/ce/annotations/ve.ce.LinkAnnotation.js
M src/ce/ve.ce.Annotation.js
M src/ce/ve.ce.ContentBranchNode.js
M src/ce/ve.ce.Surface.js
M src/ce/ve.ce.js
5 files changed, 131 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/57/217257/1

diff --git a/src/ce/annotations/ve.ce.LinkAnnotation.js 
b/src/ce/annotations/ve.ce.LinkAnnotation.js
index 53c1eac..c4f73c9 100644
--- a/src/ce/annotations/ve.ce.LinkAnnotation.js
+++ b/src/ce/annotations/ve.ce.LinkAnnotation.js
@@ -19,12 +19,23 @@
ve.ce.LinkAnnotation.super.apply( this, arguments );
 
// Initialization
-   this.$element
-   .addClass( 've-ce-linkAnnotation' )
+   this.contentTextNode = document.createTextNode( '' );
+   this.contentTextNode.containerParent = this.$element[0].parentNode;
+
+   this.$anchor = $( 'a' )
.prop( {
href: ve.resolveUrl( this.model.getHref(), 
this.getModelHtmlDocument() ),
title: this.constructor.static.getDescription( 
this.model )
-   } );
+   } )
+   .append( this.constructor.static.makePostNail() )
+   .append( this.contentTextNode )
+   .append( this.constructor.static.makePreNail() );
+
+   this.$element
+   .addClass( 've-ce-linkAnnotation' )
+   .append( this.constructor.static.makePreNail() )
+   .append( this.$anchor )
+   .append( this.constructor.static.makePostNail() );
 };
 
 /* Inheritance */
@@ -35,9 +46,9 @@
 
 ve.ce.LinkAnnotation.static.name = 'link';
 
-ve.ce.LinkAnnotation.static.tagName = 'a';
+ve.ce.LinkAnnotation.static.tagName = 'span';
 
-ve.ce.LinkAnnotation.static.forceContinuation = true;
+ve.ce.LinkAnnotation.static.forceContinuation = false;
 
 /* Static Methods */
 
@@ -48,6 +59,26 @@
return model.getHref();
 };
 
+ve.ce.LinkAnnotation.static.makePreNail = function () {
+   return $( 'img' )
+   .prop( 'src', ve.ce.chimeraImgDataUri )
+   .addClass( 've-ce-pre-nail' )
+   .get( 0 );
+};
+
+ve.ce.LinkAnnotation.static.makePostNail = function () {
+   return $( 'img' )
+   .prop( 'src', ve.ce.chimeraImgDataUri )
+   .addClass( 've-ce-post-nail' )
+   .get( 0 );
+};
+
+/* Methods */
+
+ve.ce.LinkAnnotation.prototype.getContentNode = function () {
+   return this.contentTextNode;
+};
+
 /* Registration */
 
 ve.ce.annotationFactory.register( ve.ce.LinkAnnotation );
diff --git a/src/ce/ve.ce.Annotation.js b/src/ce/ve.ce.Annotation.js
index 99bdd70..fac6314 100644
--- a/src/ce/ve.ce.Annotation.js
+++ b/src/ce/ve.ce.Annotation.js
@@ -77,6 +77,14 @@
return this.parentNode  this.parentNode.getModelHtmlDocument();
 };
 
+ve.ce.Annotation.prototype.appendChild = function ( childNode ) {
+   this.$element.append( childNode );
+};
+
+ve.ce.Annotation.prototype.getContentNode = function () {
+   return this.$element[0];
+};
+
 /**
  * Release all memory.
  */
diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index 45a93e8..0601dba 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -162,7 +162,7 @@
  * @returns {Object} return.unicornInfo Unicorn information
  */
 ve.ce.ContentBranchNode.prototype.getRenderedContents = function () {
-   var i, ilen, j, jlen, item, itemAnnotations, ann, clone, dmSurface, 
dmSelection, relCursor,
+   var i, ilen, j, jlen, item, itemAnnotations, clone, dmSurface, 
dmSelection, relCursor,
unicorn, img1, img2, annotationsChanged, childLength, offset, 
htmlItem, ceSurface,
nextItemAnnotations, linkAnnotations,
store = this.model.doc.getStore(),
@@ -171,30 +171,51 @@
doc = this.getElementDocument(),
wrapper = doc.createElement( 'div' ),
current = wrapper,
+   nodeStack = [],
unicornInfo = {},
buffer = '',
node = this;
 
function openAnnotation( annotation ) {
+   var ann;
annotationsChanged = true;
if ( buffer !== '' ) {
-   

[MediaWiki-commits] [Gerrit] [FIX] BlockEntry: Allow flags to be an empty str - change (pywikibot/core)

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

Change subject: [FIX] BlockEntry: Allow flags to be an empty str
..


[FIX] BlockEntry: Allow flags to be an empty str

When flags is an empty string it wouldn't split it and thus returning the
string directly. Instead it should just return an empty list.

Bug: T101976
Change-Id: Ifc18270c5027d9fd5b76037534e477702e8429f6
---
M pywikibot/logentries.py
M tests/logentry_tests.py
2 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index 40dfb14..a639628 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -157,8 +157,11 @@
 if not hasattr(self, '_flags'):
 self._flags = self._params['flags']
 # pre mw 1.19 returned a delimited string.
-if self._flags and isinstance(self._flags, basestring):
-self._flags = self._flags.split(',')
+if isinstance(self._flags, basestring):
+if self._flags:
+self._flags = self._flags.split(',')
+else:
+self._flags = []
 return self._flags
 
 def duration(self):
diff --git a/tests/logentry_tests.py b/tests/logentry_tests.py
index f6a1611..2326ebd 100644
--- a/tests/logentry_tests.py
+++ b/tests/logentry_tests.py
@@ -118,6 +118,8 @@
 logentry = self._get_logentry('block')
 if logentry.action() == 'block':
 self.assertIsInstance(logentry.flags(), list)
+# Check that there are no empty strings
+self.assertTrue(all(logentry.flags()))
 if logentry.expiry() is not None:
 self.assertIsInstance(logentry.expiry(), pywikibot.Timestamp)
 self.assertIsInstance(logentry.duration(), datetime.timedelta)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc18270c5027d9fd5b76037534e477702e8429f6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] role::etherpad: include standard - change (operations/puppet)

2015-06-10 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: role::etherpad: include standard
..


role::etherpad: include standard

Include standard in role::etherpad

Change-Id: Idacdcc276cc4409a9b30d1e17533ff4ca680bf8b
---
M manifests/role/etherpad.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp
index 5349ae9..532d74b 100644
--- a/manifests/role/etherpad.pp
+++ b/manifests/role/etherpad.pp
@@ -1,4 +1,5 @@
 class role::etherpad{
+include standard
 
 include passwords::etherpad_lite
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idacdcc276cc4409a9b30d1e17533ff4ca680bf8b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] add check for somevalue that caused crash in diffWithinRange... - change (mediawiki...WikidataQualityConstraints)

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

Change subject: add check for somevalue that caused crash in 
diffWithinRangeChecker
..


add check for somevalue that caused crash in diffWithinRangeChecker

Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
---
M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php 
b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
index 23417a7..dadbf68 100644
--- a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
+++ b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
@@ -108,6 +108,10 @@
 * error handling:
 *   types of this and the other value have to 
be equal, both must contain actual values
 */
+   if ( !$mainSnak instanceof PropertyValueSnak ) {
+   $message = 'Referenced property needs 
to have a value.';
+   return new CheckResult( $statement, 
$constraint-getConstraintTypeQid(), $parameters, 
CheckResult::STATUS_VIOLATION, $message );
+   }
if ( $mainSnak-getDataValue()-getType() === 
$dataValue-getType()  $mainSnak-getType() === 'value' ) {
 
$thatValue = 
$this-rangeCheckerHelper-getComparativeValue( $mainSnak-getDataValue() );
@@ -134,4 +138,4 @@
$status = CheckResult::STATUS_VIOLATION;
return new CheckResult( $statement, 
$constraint-getConstraintTypeQid(), $parameters, $status, $message );
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4d77406e4d2931dab88fffccdcab3e285e9e5c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de
Gerrit-Reviewer: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] tools: Stop bigbrother attempting to look at webservice jobs - change (operations/puppet)

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

Change subject: tools: Stop bigbrother attempting to look at webservice jobs
..


tools: Stop bigbrother attempting to look at webservice jobs

Service Manifests deal with this much better.

Change-Id: I4fa8be5c6dfc4fa4fff087239e67e75c4bcb5d1d
---
M modules/toollabs/files/bigbrother
1 file changed, 2 insertions(+), 25 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  Merlijn van Deen: Looks good to me, but someone else must approve
  BBlack: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/toollabs/files/bigbrother 
b/modules/toollabs/files/bigbrother
index b4ca696..7b5ab58 100755
--- a/modules/toollabs/files/bigbrother
+++ b/modules/toollabs/files/bigbrother
@@ -80,31 +80,8 @@
 my $start;
 if (m/^\s*(?:#.*)?$/) {   # Ignore empty lines and comments.
 next;
-} elsif(m/^webservice(:?\s+-([a-z]+(?:-[a-z]+)*))?$/) {
-my $name = $2 // lighttpd;
-unless($username =~ m/^tools\.(.*)$/) {
-ulog $username, 'error', $rcfile:$line: unable to figure 
out webgrid name! (not possible);
-next;
-}
-$expect = $name-$1;
-$start = /usr/local/bin/webservice2 --release precise $name 
start;
-} elsif(m/^webservice2(:?\s+-([a-z]+(?:-[a-z]+)*))?$/) {
-my $name = $2 // lighttpd;
-unless($username =~ m/^tools\.(.*)$/) {
-ulog $username, 'error', $rcfile:$line: unable to figure 
out webgrid name! (not possible);
-next;
-}
-$expect = $name-$1;
-$start = /usr/local/bin/webservice2 $name start;
-} 
elsif(m/^webservice(:?\s+(--release\s+[a-z]+))?(:?\s+([a-z]+(?:-[a-z]+)*))?$/) {
-my $rel = $2 // '';
-my $name = $3 // lighttpd;
-unless($username =~ m/^tools\.(.*)$/) {
-ulog $username, 'error', $rcfile:$line: unable to figure 
out webgrid name! (not possible);
-next;
-}
-$expect = $name-$1;
-$start = /usr/local/bin/webservice2 $rel $name start;
+} elsif(m/^webservice/) {
+next;  # Ignore webservice lines, they are taken care of by 
service manifests
 } elsif(m/^jstart\s+-N\s+(\S+)\s+(.*)$/) {
 $expect = $1;
 $start = /usr/bin/jstart -N '$expect' $2;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fa8be5c6dfc4fa4fff087239e67e75c4bcb5d1d
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Implemented hints from review from Daniel. - change (mediawiki...WikidataQualityConstraints)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has uploaded a new change for review.

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

Change subject: Implemented hints from review from Daniel.
..

Implemented hints from review from Daniel.

Change-Id: I3cafc18c668f54bc7e761b534d777b05e951453f
---
M WikibaseQualityConstraints.php
M i18n/en.json
M i18n/qqq.json
M includes/ConstraintReportFactory.php
M includes/Violations/CheckResultToViolationTranslator.php
R includes/Violations/ConstraintViolationFormatter.php
M specials/SpecialConstraintReport.php
M tests/phpunit/Specials/SpecialConstraintReportTest.php
R tests/phpunit/Violations/ConstraintViolationFormatterTest.php
9 files changed, 72 insertions(+), 108 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints
 refs/changes/59/217259/1

diff --git a/WikibaseQualityConstraints.php b/WikibaseQualityConstraints.php
index 586f017..0fb8282 100644
--- a/WikibaseQualityConstraints.php
+++ b/WikibaseQualityConstraints.php
@@ -47,5 +47,9 @@
$GLOBALS['wgDebugLogGroups']['wbq_evaluation'] = 
'/var/log/mediawiki/wbq_evaluation.log';
 
 // Register violation context
-$GLOBALS['wbqViolationContexts'][] = function() { return 
WikibaseQuality\ConstraintReport\ConstraintReportFactory::getDefaultInstance()-getViolationContext();
 };
+   define( 'WBQ_CONSTRAINTS_ID', 'wbqc' );
+   $GLOBALS['wbqSubExtensions'][WBQ_CONSTRAINTS_ID] = array(
+   'violationTypes' = function() { return array_keys( 
WikibaseQuality\ConstraintReport\ConstraintReportFactory::getDefaultInstance()-getConstraintCheckerMap()
 ); },
+   'violationFormatter' = function() { return 
WikibaseQuality\ConstraintReport\ConstraintReportFactory::getDefaultInstance()-getViolationFormatter();
 }
+   );
 } );
\ No newline at end of file
diff --git a/i18n/en.json b/i18n/en.json
index bbd6322..c093766 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -22,7 +22,7 @@
   wbqc-constraintreport-result-link-to-claim: go to claim,
   wbqc-constraintreport-result-link-to-constraint: go to constraint,
 
-  wbqc-violations-group: Constraints,
+  wbq-subextension-name-wbqc: Constraints,
   wbqc-violation-header-parameters: Parameters:,
   wbqc-violation-message: Constraint check has pointed out a violation. 
Please click on icon for further information.
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 743dbb3..abbbda3 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -16,5 +16,9 @@
wbqc-constraintreport-result-table-header-claim: Header of the 
column that displays a link to the claim, the used property and its 
value.\n{{Identical|Claim}},
wbqc-constraintreport-result-table-header-constraint: Header of the 
column that gives information about which constraint was 
checked.\n{{Identical|Constraint}},
wbqc-constraintreport-result-link-to-claim: Text for the link to a 
claim group on the entity page.,
-   wbqc-constraintreport-result-link-to-constraint: Text for the link 
to a constraint on the property page.
+   wbqc-constraintreport-result-link-to-constraint: Text for the link 
to a constraint on the property page.,
+
+  wbq-subextension-name-wbqc: Name of this subextension. Is shown in 
special page that lists all the violations.,
+  wbqc-violation-header-parameters: Header for section in violations 
special page that displays the parameters of the constraint.,
+  wbqc-violation-message: message that is shown for violated claims in 
pop-up on item page. First parameter is name of the data source.
 }
diff --git a/includes/ConstraintReportFactory.php 
b/includes/ConstraintReportFactory.php
index aad8cde..42dead5 100644
--- a/includes/ConstraintReportFactory.php
+++ b/includes/ConstraintReportFactory.php
@@ -29,7 +29,8 @@
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\RangeCheckerHelper;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\TypeCheckerHelper;
 use 
WikibaseQuality\ConstraintReport\Violations\CheckResultToViolationTranslator;
-use WikibaseQuality\ConstraintReport\Violations\ConstraintViolationContext;
+use WikibaseQuality\ConstraintReport\Violations\ConstraintViolationFormatter;
+use WikibaseQuality\Violations\ViolationFormatter;
 
 
 class ConstraintReportFactory {
@@ -63,6 +64,11 @@
 * @var array
 */
private $constraintParameterMap;
+
+   /**
+* @var ViolationFormatter
+*/
+   private $violationFormatter;
 
 /**
  * @var CheckResultToViolationTranslator
@@ -111,7 +117,7 @@
/**
 * @return array
 */
-   private function getConstraintCheckerMap(){
+   public function getConstraintCheckerMap(){
if ( $this-constraintCheckerMap === null ) {
$constraintReportHelper = new ConstraintReportHelper();
$connectionCheckerHelper = new 
ConnectionCheckerHelper();
@@ -185,12 +191,14 @@
}
 
   

[MediaWiki-commits] [Gerrit] Add hooks and files for qunit testing - change (mediawiki...WikidataQuality)

2015-06-10 Thread Dominic.sauer (Code Review)
Dominic.sauer has uploaded a new change for review.

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

Change subject: Add hooks and files for qunit testing
..

Add hooks and files for qunit testing

Change-Id: I6d46870cc6bf53d19ca6527cf7c5644f8558
---
M WikibaseQuality.php
M modules/ext.WikibaseQuality.UiScript.js
A tests/qunit/ext.WikibaseQuality.UiScript.test.js
3 files changed, 22 insertions(+), 2 deletions(-)


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

diff --git a/WikibaseQuality.php b/WikibaseQuality.php
index 2343657..7ee0ff0 100755
--- a/WikibaseQuality.php
+++ b/WikibaseQuality.php
@@ -27,6 +27,21 @@
// Register hooks for tasks to be done before page display
$GLOBALS['wgHooks']['BeforePageDisplay'][] = 
'WikibaseQualityHooks::onBeforePageDisplay';
 
+   // Register hooks for QUnit Tests
+   $GLOBALS['wgHooks']['ResourceLoaderTestModules'][] = function(
+   array $testModules,
+   \ResourceLoader $resourceLoader
+   ) {
+
+   $testModules['qunit']['ext.WikibaseQuality.UiScript.tests'] = 
array(
+   'scripts' = array( 
'tests/qunit/ext.WikibaseQuality.UiScript.test.js' ),
+   'dependencies' = array( 'ext.WikibaseQuality.UiScript' 
),
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'WikibaseQuality'
+   );
+   return true;
+   };
+
// Initialize special pages
$GLOBALS['wgSpecialPages']['Violations'] = 
'WikibaseQuality\Specials\SpecialViolationsPage';
 
diff --git a/modules/ext.WikibaseQuality.UiScript.js 
b/modules/ext.WikibaseQuality.UiScript.js
index 26b1afb..cc688e8 100755
--- a/modules/ext.WikibaseQuality.UiScript.js
+++ b/modules/ext.WikibaseQuality.UiScript.js
@@ -7,7 +7,7 @@
 
 
 
-( function( $, util, mw ) {
+( function( $, mw ) {
 'use strict';
 
 if ( !mw.config.exists( 'wbEntityId' ) ) {
@@ -43,7 +43,7 @@
 } );
 } );
 
-}( jQuery, util, mediaWiki ) );
+}( jQuery, mediaWiki ) );
 
 function appendViolationInformation( api, claim_guid, response, index, anchor 
) {
 
diff --git a/tests/qunit/ext.WikibaseQuality.UiScript.test.js 
b/tests/qunit/ext.WikibaseQuality.UiScript.test.js
new file mode 100755
index 000..eec3b0e
--- /dev/null
+++ b/tests/qunit/ext.WikibaseQuality.UiScript.test.js
@@ -0,0 +1,5 @@
+QUnit.module( 'ext.WikibaseQuality.UiScript' );
+
+QUnit.test( hello test, function( assert ) {
+assert.ok( 1 == 1, Passed! );
+});
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d46870cc6bf53d19ca6527cf7c5644f8558
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Dominic.sauer dominic.sa...@yahoo.de

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


[MediaWiki-commits] [Gerrit] [FIX] BlockEntry: Allow flags to be an empty str - change (pywikibot/core)

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

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

Change subject: [FIX] BlockEntry: Allow flags to be an empty str
..

[FIX] BlockEntry: Allow flags to be an empty str

When flags is an empty string it wouldn't split it and thus returning the
string directly. Instead it should just return an empty list.

Bug: T101976
Change-Id: Ifc18270c5027d9fd5b76037534e477702e8429f6
---
M pywikibot/logentries.py
M tests/logentry_tests.py
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/58/217258/1

diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index 40dfb14..a639628 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -157,8 +157,11 @@
 if not hasattr(self, '_flags'):
 self._flags = self._params['flags']
 # pre mw 1.19 returned a delimited string.
-if self._flags and isinstance(self._flags, basestring):
-self._flags = self._flags.split(',')
+if isinstance(self._flags, basestring):
+if self._flags:
+self._flags = self._flags.split(',')
+else:
+self._flags = []
 return self._flags
 
 def duration(self):
diff --git a/tests/logentry_tests.py b/tests/logentry_tests.py
index f6a1611..2326ebd 100644
--- a/tests/logentry_tests.py
+++ b/tests/logentry_tests.py
@@ -118,6 +118,8 @@
 logentry = self._get_logentry('block')
 if logentry.action() == 'block':
 self.assertIsInstance(logentry.flags(), list)
+# Check that there are no empty strings
+self.assertTrue(all(logentry.flags()))
 if logentry.expiry() is not None:
 self.assertIsInstance(logentry.expiry(), pywikibot.Timestamp)
 self.assertIsInstance(logentry.duration(), datetime.timedelta)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc18270c5027d9fd5b76037534e477702e8429f6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] [WIP] Encapsulate rc_params handling in RecentChange - change (mediawiki/core)

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

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

Change subject: [WIP] Encapsulate rc_params handling in RecentChange
..

[WIP] Encapsulate rc_params handling in RecentChange

Change-Id: I443d14f5d4cdac0945cb9c03608d55745bbb865b
---
M includes/changes/RecentChange.php
M tests/phpunit/includes/changes/RecentChangeTest.php
2 files changed, 60 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/217260/1

diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index 13e94db..bf806c4 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -848,4 +848,19 @@
 
return wfTimestamp( TS_UNIX, $timestamp )  time() - $tolerance 
- $wgRCMaxAge;
}
+
+   /**
+* Parses and returns the rc_params attribute
+*
+* @return array|null
+*/
+   public function parseParams() {
+   $rcParams = $this-getAttribute( 'rc_params' );
+
+   wfSuppressWarnings();
+   $unserializedParams = unserialize( $rcParams );
+   wfRestoreWarnings();
+
+   return $unserializedParams;
+   }
 }
diff --git a/tests/phpunit/includes/changes/RecentChangeTest.php 
b/tests/phpunit/includes/changes/RecentChangeTest.php
index e39c382..2844004 100644
--- a/tests/phpunit/includes/changes/RecentChangeTest.php
+++ b/tests/phpunit/includes/changes/RecentChangeTest.php
@@ -337,6 +337,51 @@
*/
 
/**
+* @covers RecentChange::parseParams
+*/
+   public function testParseParams() {
+   $params = array(
+   'root' = array(
+   'A' = 1,
+   'B' = 'two'
+   )
+   );
+
+   $this-assertParseParams(
+   $params,
+   'a:1:{s:4:root;a:2:{s:1:A;i:1;s:1:B;s:3:two;}}'
+   );
+
+   $this-assertParseParams(
+   null,
+   null
+   );
+
+   $this-assertParseParams(
+   null,
+   serialize( false )
+   );
+
+   $this-assertParseParams(
+   null,
+   'not-an-array'
+   );
+   }
+
+   /**
+* @param array $expectedParseParams
+* @param string|null $rawRcParams
+*/
+   protected function assertParseParams( $expectedParseParams, 
$rawRcParams ) {
+   $rc = new RecentChange;
+   $rc-setAttribs( array( 'rc_params' = $rawRcParams ) );
+
+   $actualParseParams = $rc-parseParams();
+
+   $this-assertEquals($expectedParseParams, $actualParseParams);
+   }
+
+   /**
 * @param string $expected Expected IRC text without colors codes
 * @param string $type Log type (move, delete, suppress, patrol ...)
 * @param string $action A log type action

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I443d14f5d4cdac0945cb9c03608d55745bbb865b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson sbis...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] certs: replace require by collector ordering - change (operations/puppet)

2015-06-10 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: certs: replace require by collector ordering
..


certs: replace require by collector ordering

Change-Id: I6d999199d1a6da5727ad374f8a1f2b27a5ab6936
---
M manifests/certs.pp
M modules/base/manifests/certificates.pp
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  BBlack: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/manifests/certs.pp b/manifests/certs.pp
index af09b3a..e3effe9 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -2,9 +2,6 @@
 $group = 'ssl-cert',
 $privatekey=true,
 ) {
-
-require base::certificates
-
 sslcert::certificate { $name:
 group  = $group,
 source = puppet:///files/ssl/${name}.crt,
diff --git a/modules/base/manifests/certificates.pp 
b/modules/base/manifests/certificates.pp
index 2f41aec..7d8723c 100644
--- a/modules/base/manifests/certificates.pp
+++ b/modules/base/manifests/certificates.pp
@@ -22,4 +22,7 @@
 sslcert::ca { 'GlobalSign_Organization_Validation_CA_-_SHA256_-_G2':
 source  = 
'puppet:///modules/base/ca/GlobalSign_Organization_Validation_CA_-_SHA256_-_G2.crt',
 }
+
+# install all CAs before generating certificates
+Sslcert::Ca | | - Sslcert::Certificate| |
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d999199d1a6da5727ad374f8a1f2b27a5ab6936
Gerrit-PatchSet: 10
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] deployment_server: fix salt-call path - change (operations/puppet)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: deployment_server: fix salt-call path
..


deployment_server: fix salt-call path

Change-Id: Ibe86508af43fb10770fce3b0d97d66acf9a43957
---
M modules/deployment/manifests/deployment_server.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/deployment/manifests/deployment_server.pp 
b/modules/deployment/manifests/deployment_server.pp
index c30ce93..25a659a 100644
--- a/modules/deployment/manifests/deployment_server.pp
+++ b/modules/deployment/manifests/deployment_server.pp
@@ -86,7 +86,7 @@
 }
 
 exec { 'eventual_consistency_deployment_server_init':
-path= ['/usr/bin'],
+path= ['/usr/bin', '/usr/sbin', '/sbin', '/bin'],
 command = 'salt-call deploy.deployment_server_init',
 require = [
 Package['salt-minion'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe86508af43fb10770fce3b0d97d66acf9a43957
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ssh: remove .ssh/authorized_keys support from prod - change (operations/puppet)

2015-06-10 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: ssh: remove .ssh/authorized_keys support from prod
..


ssh: remove .ssh/authorized_keys support from prod

This is the scariest patch in this whole changeset:

Remove support for $HOME/.ssh/authorized_keys from hosts in production,
relying solely on /etc/ssh/userkeys/ instead. This removes the
capability from users to set their own authorized_keys which is a good
security measure.

Combined with /etc/ssh/userkeys being recurse = true, purge = true,
this means that no SSH key can be provisioned manually on hosts and
puppet and only puppet can control SSH access, also a good security
measure.

Bug: T92475
Change-Id: Ibe090569a9241ba13bd76a44005483390629dda7
---
D hieradata/hosts/sodium.yaml
M hieradata/role/common/ganeti.yaml
M modules/ssh/manifests/server.pp
3 files changed, 4 insertions(+), 11 deletions(-)

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



diff --git a/hieradata/hosts/sodium.yaml b/hieradata/hosts/sodium.yaml
deleted file mode 100644
index 2cac849..000
--- a/hieradata/hosts/sodium.yaml
+++ /dev/null
@@ -1 +0,0 @@
-ssh::server::authorized_keys_file: %h/.ssh/authorized_keys
diff --git a/hieradata/role/common/ganeti.yaml 
b/hieradata/role/common/ganeti.yaml
index 728511c..f3f2d58 100644
--- a/hieradata/role/common/ganeti.yaml
+++ b/hieradata/role/common/ganeti.yaml
@@ -1,4 +1,4 @@
-ssh::server::authorized_keys_file: /etc/ssh/userkeys/%u 
/etc/ssh/userkeys/%u.d/ganeti .ssh/authorized_keys
+ssh::server::authorized_keys_file: /etc/ssh/userkeys/%u 
/etc/ssh/userkeys/%u.d/ganeti
 ganeti::ganeti01.svc.codfw.wmnet::nodes:
   - ganeti2001.codfw.wmnet
   - ganeti2002.codfw.wmnet
diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index 0ff6869..dce0cae 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -18,16 +18,10 @@
 
 if $authorized_keys_file {
 $ssh_authorized_keys_file = $authorized_keys_file
+} elsif ($::realm == 'labs' and os_version('ubuntu = precise')) {
+$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
 } else {
-if ($::realm == 'labs') {
-if os_version('ubuntu = precise') {
-$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
/public/keys/%u/.ssh/authorized_keys'
-} else {
-$ssh_authorized_keys_file = '/etc/ssh/userkeys/%u'
-}
-} else {
-$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u 
.ssh/authorized_keys .ssh/authorized_keys2'
-}
+$ssh_authorized_keys_file ='/etc/ssh/userkeys/%u'
 }
 
 file { '/etc/ssh/userkeys':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe090569a9241ba13bd76a44005483390629dda7
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] role::etherpad: include standard - change (operations/puppet)

2015-06-10 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: role::etherpad: include standard
..

role::etherpad: include standard

Include standard in role::etherpad

Change-Id: Idacdcc276cc4409a9b30d1e17533ff4ca680bf8b
---
M manifests/role/etherpad.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp
index 5349ae9..532d74b 100644
--- a/manifests/role/etherpad.pp
+++ b/manifests/role/etherpad.pp
@@ -1,4 +1,5 @@
 class role::etherpad{
+include standard
 
 include passwords::etherpad_lite
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idacdcc276cc4409a9b30d1e17533ff4ca680bf8b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mediawiki: make www-data the default user - change (operations/puppet)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: mediawiki: make www-data the default user
..

mediawiki: make www-data the default user

Also, remove any remaining stanza creating the apache user.

Change-Id: Ia5641ecd206e9e384cc6618167394569851c5f34
---
M hieradata/hosts/silver.yaml
M hieradata/hosts/terbium.yaml
M hieradata/hosts/tin.yaml
M hieradata/labs/deployment-prep/common.yaml
M hieradata/role/common/mediawiki/appserver.yaml
M hieradata/role/common/mediawiki/appserver/api.yaml
M hieradata/role/common/mediawiki/appserver/canary_api.yaml
M hieradata/role/common/mediawiki/canary_appserver.yaml
M hieradata/role/common/mediawiki/imagescaler.yaml
M hieradata/role/common/mediawiki/jobrunner.yaml
M hieradata/role/common/mediawiki/videoscaler.yaml
M modules/mediawiki/manifests/users.pp
12 files changed, 4 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/217265/1

diff --git a/hieradata/hosts/silver.yaml b/hieradata/hosts/silver.yaml
index 4e2d615..72fb02b 100644
--- a/hieradata/hosts/silver.yaml
+++ b/hieradata/hosts/silver.yaml
@@ -1,4 +1,3 @@
-mediawiki::users::web: www-data
 cluster: virt
 admin::groups:
   - deployment
diff --git a/hieradata/hosts/terbium.yaml b/hieradata/hosts/terbium.yaml
index bc8a6c6..7c4bb57 100644
--- a/hieradata/hosts/terbium.yaml
+++ b/hieradata/hosts/terbium.yaml
@@ -5,5 +5,4 @@
 base::resolving::domain_search:
   - wikimedia.org
   - eqiad.wmnet
-mediawiki::users::web: www-data
 ganglia_class: new
diff --git a/hieradata/hosts/tin.yaml b/hieradata/hosts/tin.yaml
index 13048e6..ab037c0 100644
--- a/hieradata/hosts/tin.yaml
+++ b/hieradata/hosts/tin.yaml
@@ -3,7 +3,6 @@
   - eqiad.wmnet
   - esams.wikimedia.org
   - codfw.wmnet
-mediawiki::users::web: www-data
 admin::groups:
   - deployment
   - parsoid-admin
diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 168519a..05778f3 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -748,7 +748,6 @@
 hhvm::base_jit_size: 183500800
 role::logging::mediawiki::log_directory: /data/project/logs
 role::mediawiki::webserver::pool: one-pool-to-rule-them-all
-mediawiki::users::web: www-data
 beta::syncsiteresources::user: www-data
 role::url_downloader::url_downloader_ip: 10.68.16.135
 zotero::http_proxy: 
deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080
diff --git a/hieradata/role/common/mediawiki/appserver.yaml 
b/hieradata/role/common/mediawiki/appserver.yaml
index 468b709..4e8f4a6 100644
--- a/hieradata/role/common/mediawiki/appserver.yaml
+++ b/hieradata/role/common/mediawiki/appserver.yaml
@@ -2,7 +2,6 @@
 role::mediawiki::webserver::pool: apaches
 admin::groups:
   - deployment
-mediawiki::users::web: www-data
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
 hhvm::extra::fcgi:
diff --git a/hieradata/role/common/mediawiki/appserver/api.yaml 
b/hieradata/role/common/mediawiki/appserver/api.yaml
index 3a8afd5..0aaeedf 100644
--- a/hieradata/role/common/mediawiki/appserver/api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/api.yaml
@@ -2,7 +2,6 @@
 role::mediawiki::webserver::pool: api
 admin::groups:
   - deployment
-mediawiki::users::web: www-data
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
 hhvm::extra::fcgi:
diff --git a/hieradata/role/common/mediawiki/appserver/canary_api.yaml 
b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
index 0c7f240..05612c6 100644
--- a/hieradata/role/common/mediawiki/appserver/canary_api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
@@ -4,7 +4,6 @@
 mediawiki::web::mpm_config::mpm: worker
 admin::groups:
   - deployment
-mediawiki::users::web: www-data
 hhvm::extra::fcgi:
   hhvm:
 mysql:
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml 
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index 1d345ee..9b9e0be 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -2,7 +2,6 @@
 role::mediawiki::webserver::pool: apaches
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
-mediawiki::users::web: www-data
 admin::groups:
   - deployment
 hhvm::extra::fcgi:
diff --git a/hieradata/role/common/mediawiki/imagescaler.yaml 
b/hieradata/role/common/mediawiki/imagescaler.yaml
index 17d3089..d5a465f 100644
--- a/hieradata/role/common/mediawiki/imagescaler.yaml
+++ b/hieradata/role/common/mediawiki/imagescaler.yaml
@@ -1,4 +1,4 @@
 cluster: imagescaler
 role::mediawiki::webserver::pool: rendering
 mediawiki::web::mpm_config::workers_limit: 30
-mediawiki::users::web: www-data
+
diff --git a/hieradata/role/common/mediawiki/jobrunner.yaml 
b/hieradata/role/common/mediawiki/jobrunner.yaml
index 961cbe1..0fd3586 

[MediaWiki-commits] [Gerrit] deployment_server: fix salt-call path - change (operations/puppet)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: deployment_server: fix salt-call path
..

deployment_server: fix salt-call path

Change-Id: Ibe86508af43fb10770fce3b0d97d66acf9a43957
---
M modules/deployment/manifests/deployment_server.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/deployment/manifests/deployment_server.pp 
b/modules/deployment/manifests/deployment_server.pp
index c30ce93..25a659a 100644
--- a/modules/deployment/manifests/deployment_server.pp
+++ b/modules/deployment/manifests/deployment_server.pp
@@ -86,7 +86,7 @@
 }
 
 exec { 'eventual_consistency_deployment_server_init':
-path= ['/usr/bin'],
+path= ['/usr/bin', '/usr/sbin', '/sbin', '/bin'],
 command = 'salt-call deploy.deployment_server_init',
 require = [
 Package['salt-minion'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe86508af43fb10770fce3b0d97d66acf9a43957
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Correctly aggregate flow.dm.List item events - change (mediawiki...Flow)

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

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

Change subject: Correctly aggregate flow.dm.List item events
..

Correctly aggregate flow.dm.List item events

The previous version neglected to actually aggregate the events.
This is a correction to make sure item events can be aggregated
in the list object.

Change-Id: I42b966c68ae365bc7baf42ed55bc11c4ee83c5e5
---
M modules/flow/dm/mixins/mw.flow.dm.List.js
1 file changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/modules/flow/dm/mixins/mw.flow.dm.List.js 
b/modules/flow/dm/mixins/mw.flow.dm.List.js
index b4cdd48..35e2eb7 100644
--- a/modules/flow/dm/mixins/mw.flow.dm.List.js
+++ b/modules/flow/dm/mixins/mw.flow.dm.List.js
@@ -137,12 +137,13 @@
 * @fires add
 */
mw.flow.dm.List.prototype.addItems = function ( items, index ) {
-   var i, at, len, item, currentIndex, existingItem;
+   var i, len, item, event, events, currentIndex, existingItem, at;
 
// Support adding existing items at new locations
for ( i = 0, len = items.length; i  len; i++ ) {
item = items[i];
existingItem = this.getItemById( item.getId() );
+
// Check if item exists then remove it first, 
effectively moving it
currentIndex = this.items.indexOf( existingItem );
if ( currentIndex = 0 ) {
@@ -153,6 +154,15 @@
}
}
 
+   // Add the item
+   if ( item.connect  item.disconnect  
!$.isEmptyObject( this.aggregateItemEvents ) ) {
+   events = {};
+   for ( event in this.aggregateItemEvents ) {
+   events[ event ] = [ 'emit', 
this.aggregateItemEvents[ event ], item ];
+   }
+   item.connect( this, events );
+   }
+
// Add by reference
this.itemsById[ item.getId() ] = items[i];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42b966c68ae365bc7baf42ed55bc11c4ee83c5e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo mor...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add hooks and files for qunit testing - change (mediawiki...WikidataQuality)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Add hooks and files for qunit testing
..


Add hooks and files for qunit testing

Change-Id: I6d46870cc6bf53d19ca6527cf7c5644f8558
---
M WikibaseQuality.php
M modules/ext.WikibaseQuality.UiScript.js
A tests/qunit/ext.WikibaseQuality.UiScript.test.js
3 files changed, 22 insertions(+), 2 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/WikibaseQuality.php b/WikibaseQuality.php
index 2343657..7ee0ff0 100755
--- a/WikibaseQuality.php
+++ b/WikibaseQuality.php
@@ -27,6 +27,21 @@
// Register hooks for tasks to be done before page display
$GLOBALS['wgHooks']['BeforePageDisplay'][] = 
'WikibaseQualityHooks::onBeforePageDisplay';
 
+   // Register hooks for QUnit Tests
+   $GLOBALS['wgHooks']['ResourceLoaderTestModules'][] = function(
+   array $testModules,
+   \ResourceLoader $resourceLoader
+   ) {
+
+   $testModules['qunit']['ext.WikibaseQuality.UiScript.tests'] = 
array(
+   'scripts' = array( 
'tests/qunit/ext.WikibaseQuality.UiScript.test.js' ),
+   'dependencies' = array( 'ext.WikibaseQuality.UiScript' 
),
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'WikibaseQuality'
+   );
+   return true;
+   };
+
// Initialize special pages
$GLOBALS['wgSpecialPages']['Violations'] = 
'WikibaseQuality\Specials\SpecialViolationsPage';
 
diff --git a/modules/ext.WikibaseQuality.UiScript.js 
b/modules/ext.WikibaseQuality.UiScript.js
index 26b1afb..cc688e8 100755
--- a/modules/ext.WikibaseQuality.UiScript.js
+++ b/modules/ext.WikibaseQuality.UiScript.js
@@ -7,7 +7,7 @@
 
 
 
-( function( $, util, mw ) {
+( function( $, mw ) {
 'use strict';
 
 if ( !mw.config.exists( 'wbEntityId' ) ) {
@@ -43,7 +43,7 @@
 } );
 } );
 
-}( jQuery, util, mediaWiki ) );
+}( jQuery, mediaWiki ) );
 
 function appendViolationInformation( api, claim_guid, response, index, anchor 
) {
 
diff --git a/tests/qunit/ext.WikibaseQuality.UiScript.test.js 
b/tests/qunit/ext.WikibaseQuality.UiScript.test.js
new file mode 100755
index 000..eec3b0e
--- /dev/null
+++ b/tests/qunit/ext.WikibaseQuality.UiScript.test.js
@@ -0,0 +1,5 @@
+QUnit.module( 'ext.WikibaseQuality.UiScript' );
+
+QUnit.test( hello test, function( assert ) {
+assert.ok( 1 == 1, Passed! );
+});
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d46870cc6bf53d19ca6527cf7c5644f8558
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Dominic.sauer dominic.sa...@yahoo.de
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] Add 2 fields and 1 update to refine table - change (analytics/refinery)

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

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

Change subject: Add 2 fields and 1 update to refine table
..

Add 2 fields and 1 update to refine table

Add pageview_info and normalized_host fields from hive UDF.
Add wiki_app_version in existing user_agent_map modifying user_agent parsing 
UDF.

Bug: T96044,T99918,T99932
Change-Id: I5d0527ce1ad76a67ab26eb62b9e96c36c82ef787
---
M hive/webrequest/create_webrequest_table.hql
M oozie/webrequest/refine/bundle.properties
M oozie/webrequest/refine/refine_webrequest.hql
3 files changed, 11 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/29/217229/1

diff --git a/hive/webrequest/create_webrequest_table.hql 
b/hive/webrequest/create_webrequest_table.hql
index 184c3d9..90b75e9 100644
--- a/hive/webrequest/create_webrequest_table.hql
+++ b/hive/webrequest/create_webrequest_table.hql
@@ -44,13 +44,15 @@
 -- Next two fields are to replace original ua and x_analytics ones.
 -- However such schema modification implies backward incompatibility.
 -- We will replace once we feel confident enough that 'every' backward 
incompatible change is done.
-`user_agent_map`mapstring, string  COMMENT 'User-agent map with 
browser_name, browser_major, device, os_name, os_minor, os_major keys and 
associated values',
+`user_agent_map`mapstring, string  COMMENT 'User-agent map with 
browser_name, browser_major, device, os_name, os_major, os_minor and 
wmf_app_version keys and associated values',
 `x_analytics_map`   mapstring, string  COMMENT 'X_analytics map view of 
the x_analytics field',
 `ts`timestampCOMMENT 'Unix timestamp in 
milliseconds extracted from dt',
 `access_method` string  COMMENT 'Method used to accessing the site 
(mobile app|mobile web|desktop)',
 `agent_type`string  COMMENT 'Categorise the agent making the 
webrequest as either user or spider (automatas to be added).',
 `is_zero`   boolean COMMENT 'Indicates if the webrequest is 
accessed through a zero provider',
-`referer_class` string  COMMENT 'Indicates if a referer is internal, 
external or unknown.'
+`referer_class` string  COMMENT 'Indicates if a referer is internal, 
external or unknown.',
+`normalized_host`   structproject_class: string, project:string, 
qualifiers: arraystring, tld: String  COMMENT 'struct containing 
project_class (such as wikipedia or wikidata for instance), project (such as en 
or commons), qualifiers (a list of in-between values, such as m and/or zero) 
and tld (org most often)',
+`pageview_info` mapstring, string  COMMENT 'map containing project, 
dialect and page_title values only when is_pageview = TRUE.'
 )
 PARTITIONED BY (
 `webrequest_source` string  COMMENT 'Source cluster',
diff --git a/oozie/webrequest/refine/bundle.properties 
b/oozie/webrequest/refine/bundle.properties
index dbee34a..a654bd9 100644
--- a/oozie/webrequest/refine/bundle.properties
+++ b/oozie/webrequest/refine/bundle.properties
@@ -51,14 +51,14 @@
 hive_site_xml = ${oozie_directory}/util/hive/hive-site.xml
 
 # Version of Hive UDF jar to import
-refinery_jar_version  = 0.0.11
+refinery_jar_version  = 0.0.12
 
 # Fully qualified Hive table name.
 source_table  = wmf_raw.webrequest
 destination_table = wmf.webrequest
 
 # Record version to keep track of changes
-record_version= 0.0.4
+record_version= 0.0.5
 
 # HDFS path to directory where webrequest data is time bucketed.
 webrequest_raw_data_directory = ${name_node}/wmf/data/raw/webrequest
diff --git a/oozie/webrequest/refine/refine_webrequest.hql 
b/oozie/webrequest/refine/refine_webrequest.hql
index 3bc559a..cdc4f96 100644
--- a/oozie/webrequest/refine/refine_webrequest.hql
+++ b/oozie/webrequest/refine/refine_webrequest.hql
@@ -55,6 +55,8 @@
 CREATE TEMPORARY FUNCTION get_access_method as 
'org.wikimedia.analytics.refinery.hive.GetAccessMethodUDF';
 CREATE TEMPORARY FUNCTION is_crawler as 
'org.wikimedia.analytics.refinery.hive.IsCrawlerUDF';
 CREATE TEMPORARY FUNCTION classify_referer AS 
'org.wikimedia.analytics.refinery.hive.RefererClassifierUDF';
+CREATE TEMPORARY FUNCTION get_pageview_info AS 
'org.wikimedia.analytics.refinery.hive.GetPageviewInfoUDF';
+CREATE TEMPORARY FUNCTION normalize_host AS 
'org.wikimedia.analytics.refinery.hive.HostNormalizerUDF';
 
 
 INSERT OVERWRITE TABLE ${destination_table}
@@ -97,7 +99,9 @@
 ELSE 'user'
 END as agent_type,
 (str_to_map(x_analytics, '\;', '=')['zero'] IS NOT NULL) as is_zero,
-classify_referer(referer) as referer_class
+classify_referer(referer) as referer_class,
+normalize_host(uri_host) as normalized_host,
+get_pageview_info(uri_host, 

[MediaWiki-commits] [Gerrit] [ArticleComment] Add keys to ignore - change (translatewiki)

2015-06-10 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [ArticleComment] Add keys to ignore
..


[ArticleComment] Add keys to ignore

Change-Id: I98ee7d6f031aef52aba5571807fe6771a0af4470
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 658eed1..ad39556 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -83,6 +83,7 @@
 Article Comments
 aliasfile = ArticleComments/ArticleComments.alias.php
 descmsg = article-comments-desc
+ignored = article-comments-prefilled-comment-text, 
article-comments-new-comment-heading, article-comments-comment-contents
 
 # Unmaintained by Wikimedia, no longer deployed.
 #Article Feedback

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98ee7d6f031aef52aba5571807fe6771a0af4470
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [ArticleComment] Add keys to ignore - change (translatewiki)

2015-06-10 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [ArticleComment] Add keys to ignore
..

[ArticleComment] Add keys to ignore

Change-Id: I98ee7d6f031aef52aba5571807fe6771a0af4470
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/28/217228/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 658eed1..ad39556 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -83,6 +83,7 @@
 Article Comments
 aliasfile = ArticleComments/ArticleComments.alias.php
 descmsg = article-comments-desc
+ignored = article-comments-prefilled-comment-text, 
article-comments-new-comment-heading, article-comments-comment-contents
 
 # Unmaintained by Wikimedia, no longer deployed.
 #Article Feedback

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98ee7d6f031aef52aba5571807fe6771a0af4470
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add oozie job for pageview_hourly aggregation - change (analytics/refinery)

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

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

Change subject: Add oozie job for pageview_hourly aggregation
..

Add oozie job for pageview_hourly aggregation

Add hive creation table file.
Add oozie job files.

Bug: T99931

Change-Id: I54af6e905b0d7bdff1a05e4b36a3e5f7dcc1c26e
---
A hive/pageview/hourly/create_pageview_hourly_table.hql
A oozie/pageview/datasets.xml
A oozie/pageview/hourly/README.md
A oozie/pageview/hourly/coordinator.properties
A oozie/pageview/hourly/coordinator.xml
A oozie/pageview/hourly/pageview_hourly.hql
A oozie/pageview/hourly/workflow.xml
7 files changed, 469 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/32/217232/1

diff --git a/hive/pageview/hourly/create_pageview_hourly_table.hql 
b/hive/pageview/hourly/create_pageview_hourly_table.hql
new file mode 100644
index 000..f983c70
--- /dev/null
+++ b/hive/pageview/hourly/create_pageview_hourly_table.hql
@@ -0,0 +1,46 @@
+-- Creates table statement for hourly aggregated pageview table.
+--
+-- NOTE:  When choosing partition field types,
+-- one should take into consideration Hive's
+-- insistence on storing partition values
+-- as strings.  See:
+-- https://wikitech.wikimedia.org/wiki/File:Hive_partition_formats.png
+-- and
+-- http://bots.wmflabs.org/~wm-bot/logs/%23wikimedia-analytics/20140721.txt
+--
+-- Parameters:
+-- none
+--
+-- Usage
+-- hive -f create_pageview_hourly_table.hql --database wmf
+--
+
+CREATE EXTERNAL TABLE IF NOT EXISTS `pageview_hourly`(
+`project`   string  COMMENT 'Project name from requests hostname',
+`dialect`   string  COMMENT 'Dialect from requests path (not set 
if present in project name)',
+`page_title`string  COMMENT 'Page Title from requests path and 
query',
+`access_method` string  COMMENT 'Method used to access the pages, can 
be desktop, mobile web, or mobile app',
+`zero_carrier`  string  COMMENT 'Zero carrier if pageviews are 
accessed through one, null otherwise',
+`agent_type`string  COMMENT 'Agent accessing the pages, can be 
spider or user',
+`referer_class` string  COMMENT 'Can be internal, external or unknown'
+`continent` string  COMMENT 'Continent of the accessing agents 
(computed using maxmind GeoIP database)',
+`country_code`  string  COMMENT 'Country iso code of the accessing 
agents (computed using maxmind GeoIP database)',
+`country`   string  COMMENT 'Country (text) of the accessing 
agents (computed using maxmind GeoIP database)',
+`subdivision`   string  COMMENT 'Subdivision of the accessing agents 
(computed using maxmind GeoIP database)',
+`city`  string  COMMENT 'City iso code of the accessing agents 
(computed using maxmind GeoIP database)',
+`record_version`string  COMMENT 'Keeps track of changes in the table 
content definition - 
https://wikitech.wikimedia.org/wiki/Analytics/Data/Pageview_hourly',
+`count` bigint  COMMENT 'number of pageviews'
+)
+PARTITIONED BY (
+`year`  int COMMENT 'Unpadded year of pageviews',
+`month` int COMMENT 'Unpadded month of pageviews',
+`day`   int COMMENT 'Unpadded day of pageviews',
+`hour`  int COMMENT 'Unpadded hour of pageviews'
+)
+STORED AS PARQUET
+LOCATION '/wmf/data/wmf/pageview/hourly'
+;
+
+
+
+
diff --git a/oozie/pageview/datasets.xml b/oozie/pageview/datasets.xml
new file mode 100644
index 000..87b16c4
--- /dev/null
+++ b/oozie/pageview/datasets.xml
@@ -0,0 +1,33 @@
+?xml version=1.0 encoding=UTF-8?
+!--
+Defines reusable datasets for aggregated pageview data.
+Use this dataset in your coordinator.xml files by setting:
+
+${start_time} - the initial instance of your data.
+Example: 2014-04-01T00:00Z
+${pageview_data_directory} - Path to directory where pageview data is 
stored.
+Example: /wmf/data/wmf/pageview
+--
+
+datasets
+
+!--
+The pageview_hourly dataset contains aggregated pageviews
+over interesting dimensions from refined webrequest data.
+
+Note that we do not use “${...}” but “${$}{...}, as dataset files are
+passed to EL twice in cascade, and in the first EL level, ${MONTH}
+evaluates to the string “${MONTH}”. Hence, we escape the dollar sign in
+“${} to “${$}{...}”. At the first EL level, “${$}” gets turned
+into a dollar sign, and “{...}”  is just passed along. Hence, we arrive
+at “${...}” as input for the second EL level. There, the variables hold
+their expected values, and we can start unpadding them.
+--
+dataset name=pageview_hourly
+ frequency=${coord:hours(1)}
+ initial-instance=${start_time}
+ timezone=Universal
+

[MediaWiki-commits] [Gerrit] Fix test @groups in client/UsageTracking tests - change (mediawiki...Wikibase)

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

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

Change subject: Fix test @groups in client/UsageTracking tests
..

Fix test @groups in client/UsageTracking tests

Change-Id: Ib4642e493b085745d582450c82faf284acc060fd
---
M client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
M client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git 
a/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php 
b/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
index dec4f66..f47f221 100644
--- a/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
+++ b/client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
@@ -16,8 +16,8 @@
  * @covers Wikibase\Lib\Store\UsageTrackingSnakFormatter
  *
  * @group Wikibase
- * @group WikibaseLib
- * @group WikibaseStore
+ * @group WikibaseClient
+ * @group WikibaseUsageTracking
  *
  * @licence GNU GPL v2+
  * @author Daniel Kinzler
diff --git 
a/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php 
b/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
index 13a182e..935d765 100644
--- a/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
+++ b/client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
@@ -11,8 +11,8 @@
  * @covers Wikibase\Client\Usage\UsageTrackingTermLookup
  *
  * @group Wikibase
- * @group WikibaseLib
- * @group WikibaseStore
+ * @group WikibaseClient
+ * @group WikibaseUsageTracking
  *
  * @licence GNU GPL v2+
  * @author Daniel Kinzler

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4642e493b085745d582450c82faf284acc060fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com

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


[MediaWiki-commits] [Gerrit] WIP: Add Village Pump link in guwiki sidebar - change (operations/mediawiki-config)

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

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

Change subject: WIP: Add Village Pump link in guwiki sidebar
..

WIP: Add Village Pump link in guwiki sidebar

Change-Id: I35519623994216077731e7d7f15afb4550ae4dcd
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 700dc6c..5194a7a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6339,6 +6339,9 @@
'licenses',
'uploadtext',
),
+   'guwiki' = array(
+   'village pump-url',
+   ),
'incubatorwiki' = array(
'sidebar-mainpage-url',
'sidebar-help-url',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35519623994216077731e7d7f15afb4550ae4dcd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] adding debianization - change (operations...conftool)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: adding debianization
..

adding debianization

Change-Id: Icb7dd1e2d420e8e37969e0c96e183b58b92b08ee
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/python-etcd.links
A debian/rules
A debian/source/format
7 files changed, 50 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/conftool 
refs/changes/36/217236/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..f518c06
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-conftool (0.0.1-1) unstable; urgency=medium
+
+  * Initial packaging
+
+ -- Giuseppe Lavagetto glavage...@wikimedia.org  Thu, 21 May 2015 10:35:24 
+0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..df75faf
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: python-conftool
+Section: python
+Priority: optional
+Maintainer: Giuseppe Lavagetto glavage...@wikimedia.org
+Standards-Version: 3.9.6
+Build-Depends: debhelper (= 9), dh-python,
+  python-all (= 2.7), python-setuptools,
+  python-etcd (= 0.3.4), python-yaml
+Homepage: https://github.com/wikimedia/operations-software-conftool
+X-Python-Version: = 2.7
+
+Package: python-conftool
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Breaks: ${python:Breaks}
+Provides: ${python:Provides}
+Description: Set of tools to configure the WMF kv config store.
+ Conftool provides a couple of tools: conftool-sync that allows
+ syncing objects from a series of yaml files.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..28a11e7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,12 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: conftool
+Source: https://github.com/wikimedia/operations-software-conftool
+
+Files: *
+Copyright: 2015 Giuseppe Lavagetto glavage...@wikimedia.org
+   2015 Wikimedia Foundation
+License: GPL-3.0
+
+License: GPL-3.0
+ See /usr/share/common-licenses/GPL-3.0
+
diff --git a/debian/python-etcd.links b/debian/python-etcd.links
new file mode 100644
index 000..c131156
--- /dev/null
+++ b/debian/python-etcd.links
@@ -0,0 +1 @@
+usr/share/doc/python-etcd-doc/html/_sources usr/share/doc/python-etcd/rst
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..c97f3e6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+export PYBUILD_NAME=conftool
+export PYBUILD_DISABLE=tests
+
+%:
+   dh $@ --with python2 --buildsystem=pybuild
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb7dd1e2d420e8e37969e0c96e183b58b92b08ee
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Correct UAParser not to fail for malformed wmf_app - change (analytics...source)

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

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

Change subject: Correct UAParser not to fail for malformed wmf_app
..

Correct UAParser not to fail for malformed wmf_app

Previous commit had a failure case for malformed WikimediaApp user agent 
strings.
Now it shouldn't fail.

Bug: T99932
Change-Id: I539a45327ed08e3ef198a5ede2dc7fec569ced4d
---
M 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/UAParser.java
M 
refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestUAParserAppVersionRecognition.java
2 files changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source 
refs/changes/26/217226/1

diff --git 
a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/UAParser.java
 
b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/UAParser.java
index de41e8c..4560e44 100644
--- 
a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/UAParser.java
+++ 
b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/UAParser.java
@@ -115,13 +115,18 @@
 result.put(os_minor, NA);
 }
 
+// Default wmf_app_version is NA
+result.put(wmf_app_version, NA);
+
 String wmfAppStart = WikipediaApp/;
 if (uaString.startsWith(wmfAppStart)) {
 int from = wmfAppStart.length();
 int to = uaString.indexOf(' ', from);
-result.put(wmf_app_version, uaString.substring(from, to));
-} else {
-result.put(wmf_app_version, NA);
+// if space after wmfAppStart, in between wmfAppStart and space 
substring
+if (to  from)
+result.put(wmf_app_version, uaString.substring(from, to));
+else // Else between wmfAppStart and end of string
+result.put(wmf_app_version, uaString.substring(from, 
uaString.length()));
 }
 
 return result;
diff --git 
a/refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestUAParserAppVersionRecognition.java
 
b/refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestUAParserAppVersionRecognition.java
index df2f65a..7b347f3 100644
--- 
a/refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestUAParserAppVersionRecognition.java
+++ 
b/refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestUAParserAppVersionRecognition.java
@@ -41,6 +41,10 @@
 String ua2 = WikipediaApp/4.1.2 (iPhone OS 8.3; Tablet);
 MapString, String uaMap2 = uaParser.getUAMap(ua2);
 assertEquals(App version check, 4.1.2, 
uaMap2.get(wmf_app_version));
+
+String ua = WikipediaApp/2.0-r-2015-04-23;
+MapString, String uaMap = uaParser.getUAMap(ua);
+assertEquals(App version check, 2.0-r-2015-04-23, 
uaMap.get(wmf_app_version));
 }
 
 @Test
@@ -50,4 +54,5 @@
 MapString, String uaMap = uaParser.getUAMap(ua);
 assertEquals(App version check, uaParser.NA, 
uaMap.get(wmf_app_version));
 }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I539a45327ed08e3ef198a5ede2dc7fec569ced4d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery/source
Gerrit-Branch: master
Gerrit-Owner: Joal j...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Get operations/mediawiki-config out of the mediawiki gate-an... - change (integration/config)

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

Change subject: Get operations/mediawiki-config out of the mediawiki 
gate-and-submit queue
..


Get operations/mediawiki-config out of the mediawiki gate-and-submit queue

Bug: T101908
Change-Id: Ibe7506619be7581337910c3de12caab204d56202
---
M jjb/operations-misc.yaml
M zuul/layout.yaml
2 files changed, 26 insertions(+), 7 deletions(-)

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



diff --git a/jjb/operations-misc.yaml b/jjb/operations-misc.yaml
index f980786..bde66fd 100644
--- a/jjb/operations-misc.yaml
+++ b/jjb/operations-misc.yaml
@@ -23,3 +23,24 @@
  - 'operations-dns-lint'
  - '{name}-tabs':
  fileselector: '*'
+
+- project:
+name: 'operations-mw-config'
+jobs:
+ - '{name}-phplint'
+
+# Runs 'phpunit' and 'composer validate', for the
+# operations/mediawiki-config repo to get it out of
+# the MediaWiki gate-and-submit queue (T101908)
+- job:
+name: 'operations-mw-config-phpunit'
+node: contintLabsSlave  UbuntuPrecise
+defaults: use-remote-zuul-shallow-clone
+triggers:
+ - zuul
+builders:
+ - composer-validate
+ - phpunit-junit
+publishers:
+ - phpunit-junit
+ - archive-log-dir
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 0af509f..639a263 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2680,16 +2680,14 @@
 
   - name: operations/mediawiki-config
 check:
-  - phplint
+  - operations-mw-config-phplint
   - php-composer-validate
 test:
-  - phplint
-  - phpunit
-  - php-composer-validate
+  - operations-mw-config-phplint
+  - operations-mw-config-phpunit
 gate-and-submit:
-  - phplint
-  - phpunit
-  - php-composer-validate
+  - operations-mw-config-phplint
+  - operations-mw-config-phpunit
 experimental:
   - php-composer-test
 postmerge:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe7506619be7581337910c3de12caab204d56202
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix EOLMessageChecker not found issue - change (translatewiki)

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

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

Change subject: Fix EOLMessageChecker not found issue
..

Fix EOLMessageChecker not found issue

Change-Id: Ib0fdff9976ab9e72d46c16cb5f5996c99a3dd61b
---
M bin/export-by-prefix
M groups/iNaturalist/iNaturalist.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/25/217225/1

diff --git a/bin/export-by-prefix b/bin/export-by-prefix
index 32d9576..f29f15b 100755
--- a/bin/export-by-prefix
+++ b/bin/export-by-prefix
@@ -28,4 +28,4 @@
 fi
 
 # Ready for prime time.
-php $EXPORTER --target=$TARGET --lang=* $SKIPLANGS $HOURS 
--group=$GROUP* $SKIPGROUPS
+echo php $EXPORTER --target=$TARGET --lang=* $SKIPLANGS $HOURS 
--group=$GROUP* $SKIPGROUPS
diff --git a/groups/iNaturalist/iNaturalist.yaml 
b/groups/iNaturalist/iNaturalist.yaml
index 3c8ce8d..8f719d8 100644
--- a/groups/iNaturalist/iNaturalist.yaml
+++ b/groups/iNaturalist/iNaturalist.yaml
@@ -29,4 +29,4 @@
 - INaturalistVariablesCheck
 
 AUTOLOAD:
-  EOLMessageChecker: Checker.php
+  INaturalistMessageChecker: Checker.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0fdff9976ab9e72d46c16cb5f5996c99a3dd61b
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Introduce planet1001.eqiad.wmnet - change (operations/dns)

2015-06-10 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Introduce planet1001.eqiad.wmnet
..

Introduce planet1001.eqiad.wmnet

Planet will be moved from zirconium to this ganeti VM

Bug: T101899
Change-Id: Ibfcaf820f50e80daa81981d7bdbd6e457458a0b1
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/30/217230/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index e07a170..fefdd2d 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -819,7 +819,8 @@
 175 1H IN PTR   etcd1002.eqiad.wmnet.
 176 1H IN PTR   etcd1003.eqiad.wmnet.
 177 1H IN PTR   etherpad1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
-178 1H IN PTRrestbase1008.eqiad.wmnet.
+178 1H IN PTR   restbase1008.eqiad.wmnet.
+179 1H IN PTR   planet1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
 201 1H IN PTR   d-i-test.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
diff --git a/templates/wmnet b/templates/wmnet
index dcd7433..fbb93ff 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -686,6 +686,7 @@
 pc1001  1H  IN A10.64.16.156
 pc1002  1H  IN A10.64.16.157
 pc1003  1H  IN A10.64.16.158
+planet1001  1H  IN A10.64.32.179
 potassium   1H  IN A10.64.16.152
 praseodymium1H  IN A10.64.16.149
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfcaf820f50e80daa81981d7bdbd6e457458a0b1
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow DM-identical range changes to cause a repaint - change (VisualEditor/VisualEditor)

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

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

Change subject: Allow DM-identical range changes to cause a repaint
..

Allow DM-identical range changes to cause a repaint

Bug: T101523
Change-Id: Iae9866f03e6bd086048f413ff813cf0dd17f889b
---
M src/ce/ve.ce.Surface.js
M src/ce/ve.ce.SurfaceObserver.js
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/21/217221/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 4377f75..b4ece3e 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2532,7 +2532,7 @@
  * @param {ve.Range|null} newRange
  */
 ve.ce.Surface.prototype.onSurfaceObserverRangeChange = function ( oldRange, 
newRange ) {
-   if ( oldRange  oldRange.equalsSelection( newRange ) ) {
+   if ( !newRange.isCollapsed()  oldRange  oldRange.equalsSelection( 
newRange ) ) {
// Ignore when the newRange is just a flipped oldRange
return;
}
diff --git a/src/ce/ve.ce.SurfaceObserver.js b/src/ce/ve.ce.SurfaceObserver.js
index 222e192..ab151f7 100644
--- a/src/ce/ve.ce.SurfaceObserver.js
+++ b/src/ce/ve.ce.SurfaceObserver.js
@@ -230,6 +230,9 @@
}
 
if ( newState.selectionChanged  emitChanges ) {
+   // Caution: selectionChanged is true if the CE selection is 
different, which can
+   // be the case even if the DM selection is unchanged. So the 
following line can
+   // emit a rangeChange event with identical oldState and 
newState.
this.emit(
'rangeChange',
( oldState ? oldState.veRange : null ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae9866f03e6bd086048f413ff813cf0dd17f889b
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec da...@sheetmusic.org.uk

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


[MediaWiki-commits] [Gerrit] WIP: Cursoring: find adjacent position in DOM order - change (VisualEditor/VisualEditor)

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

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

Change subject: WIP: Cursoring: find adjacent position in DOM order
..

WIP: Cursoring: find adjacent position in DOM order

WIP only because the dependent code is not yet pushed

Change-Id: I12a9c9a5f1fcf7c9415c6d1f9d1d319ce1563b46
---
M src/ve.utils.js
M tests/ve.test.js
2 files changed, 186 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/22/217222/1

diff --git a/src/ve.utils.js b/src/ve.utils.js
index 81a0ef6..783acdc 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -1458,3 +1458,75 @@
);
return $result.contents();
 };
+
+/**
+ * Get the closest DOM position in document order (forward or reverse)
+ *
+ * A DOM position is represented as an object with node and offset 
properties. The noDescend
+ * option can be used to exclude the positions inside certain element nodes; 
it is a jQuery
+ * selector/function ( used as a test by $node.is() - see 
http://api.jquery.com/is/ ).
+ *
+ * Caveat: Distinct DOM positions may be treated equivalently for cursoring 
purposes, e.g. the
+ * positions just before/just after the boundary of a text element or an 
annotation element, or
+ * the start/the interior of certain grapheme clusters such as 'x\u0301'. 
Chromium normalizes
+ * cursor focus/offset, when they are set, to the start-most equivalent 
position in document order.
+ * Firefox does not normalize, but jumps when cursoring over positions that 
are equivalent to the
+ * start position.
+ *
+ * Even aside from equivalence, some DOM positions cannot actually hold the 
cursor; e.g. the start
+ * of the interior of a table node.
+ *
+ * @param {Object} position Start position
+ * @param {Node} position.node Start node
+ * @param {Node} position.offset Start offset
+ * @param {number} direction +1 for forward, -1 for reverse
+ * @param {Object} [options]
+ * @param {Function|string} [options.noDescend] Selector or function: nodes to 
skip over
+ * @returns {Object} The adjacent DOM position encountered
+ * @returns.node {Node|null} The node, or null if we stepped past the root node
+ * @returns.offset {number|null} The offset, or null if we stepped past the 
root node
+ */
+ve.adjacentDomPosition = function ( position, direction, options ) {
+   var forward, childNode,
+   node = position.node,
+   offset = position.offset,
+   noDescend = ( options || {} ).noDescend;
+
+   direction = direction  0 ? -1 : 1;
+   forward = ( direction === 1 );
+
+   // If we're at the node's leading edge, return the adjacent position in 
the parent node
+   if ( offset === ( forward ? node.length || node.childNodes.length : 0 ) 
) {
+   if ( node.parentNode === null ) {
+   return { node: null, offset: null };
+   }
+   return {
+   node: node.parentNode,
+   offset: Array.prototype.indexOf.call( 
node.parentNode.childNodes, node ) +
+   ( forward ? 1 : 0 )
+   };
+   }
+
+   // If we're in a text node, return the position in this node at the 
next offset
+   if ( node.nodeType === Node.TEXT_NODE ) {
+   return { node: node, offset: offset + ( forward ? 1 : -1 ) };
+   }
+
+   childNode = node.childNodes[ forward ? offset : offset - 1 ];
+
+   // If the child is an element matching noDescend, do not descend into 
it: instead,
+   // return the position at the next offset in the current node
+   if (
+   noDescend 
+   childNode.nodeType === Node.ELEMENT_NODE 
+   $( childNode ).is( noDescend )
+   ) {
+   return { node: node, offset: offset + ( forward ? 1 : -1 ) };
+   }
+
+   // Return the closest offset inside the child node
+   return {
+   node: childNode,
+   offset: forward ? 0 : childNode.length || 
childNode.childNodes.length
+   };
+};
diff --git a/tests/ve.test.js b/tests/ve.test.js
index 482dd36..fa5c5ac 100644
--- a/tests/ve.test.js
+++ b/tests/ve.test.js
@@ -883,3 +883,117 @@
);
}
 } );
+
+QUnit.test( 'adjacentDomPosition', function ( assert ) {
+   var tests, direction, i, len, test, offsetPaths, position,
+   div = document.createElement( 'div' );
+
+   // In the following tests, the html is put inside the top-level div as 
innerHTML. Then
+   // ve.adjacentDomNode is called with the position just inside the div 
(i.e.
+   // { node: div, offset: 0 } for forward direction tests, and
+   // { node: div, offset: div.childNodes.length } for reverse direction 
tests). The result
+   // of the first call is passed into the function again, and so on 
iteratively until the
+   // function returns 

[MediaWiki-commits] [Gerrit] Introduce planet1001.eqiad.wmnet - change (operations/dns)

2015-06-10 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Introduce planet1001.eqiad.wmnet
..


Introduce planet1001.eqiad.wmnet

Planet will be moved from zirconium to this ganeti VM

Bug: T101899
Change-Id: Ibfcaf820f50e80daa81981d7bdbd6e457458a0b1
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index e07a170..fefdd2d 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -819,7 +819,8 @@
 175 1H IN PTR   etcd1002.eqiad.wmnet.
 176 1H IN PTR   etcd1003.eqiad.wmnet.
 177 1H IN PTR   etherpad1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
-178 1H IN PTRrestbase1008.eqiad.wmnet.
+178 1H IN PTR   restbase1008.eqiad.wmnet.
+179 1H IN PTR   planet1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
 201 1H IN PTR   d-i-test.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
diff --git a/templates/wmnet b/templates/wmnet
index dcd7433..fbb93ff 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -686,6 +686,7 @@
 pc1001  1H  IN A10.64.16.156
 pc1002  1H  IN A10.64.16.157
 pc1003  1H  IN A10.64.16.158
+planet1001  1H  IN A10.64.32.179
 potassium   1H  IN A10.64.16.152
 praseodymium1H  IN A10.64.16.149
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfcaf820f50e80daa81981d7bdbd6e457458a0b1
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Tweak messages to be consistent with conventions - change (mediawiki...WikidataQuality)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Tweak messages to be consistent with conventions
..


Tweak messages to be consistent with conventions

* Use double quotes instead of single quotes.
* Don't yell at users.

Change-Id: I4de005068be2cabcc6b6a8025723652175f5a200
---
M i18n/en.json
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved
  Raimond Spekking: Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index 6b01d5f..9f924fe 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -18,10 +18,10 @@
   wbq-violations-form-select-all: (all),
   wbq-violations-exceptions-checkbox-label: Show exceptions,
   wbq-violations-submit-button-label: Show Violations,
-  wbq-violations-invalid-entity-id: '$1' is not a valid entity ID!,
-  wbq-violations-not-existent-entity: Entity '$1' does not exist!,
-  wbq-violations-invalid-property-id: '$1' is not a valid property ID!,
-  wbq-violations-not-existent-property: Property '$1' does not exist!,
+  wbq-violations-invalid-entity-id: \$1\ is not a valid entity ID.,
+  wbq-violations-not-existent-entity: Entity \$1\ does not exist.,
+  wbq-violations-invalid-property-id: \$1\ is not a valid property ID.,
+  wbq-violations-not-existent-property: Property \$1\ does not exist.,
   wbq-violations-table-header-entity: Entity,
   wbq-violations-table-header-claim: Claim,
   wbq-violations-table-header-constraint-type: Type,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4de005068be2cabcc6b6a8025723652175f5a200
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] Track fallback languages used via parser function. - change (mediawiki...Wikibase)

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

Change subject: Track fallback languages used via parser function.
..


Track fallback languages used via parser function.

This factors the tracking logic into a decorator implementation of
SnakFormatter. This moves the tracking closer to the actual usage in
the ValueFormatter, and reduces the number of places that need
to care about usage tracking.

This change includes several modifications to test cases to ensure that
the SnakFormatter decorator is applied and configured correctly.

Note that this only covers usages via the Parser Function, not via Lua.
Lua is to be addressed in a later change.

Bug: T93056
Change-Id: I0fe2b184e8c8f096af37bcff6a7f6ecd9355d663
---
M client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M 
client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/DataAccess/Scribunto/WikibaseLuaEntityBindings.php
M client/includes/DataAccess/StatementTransclusionInteractor.php
A client/includes/Usage/UsageTrackingSnakFormatter.php
R client/includes/Usage/UsageTrackingTermLookup.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaEntityBindingsTest.php
M 
client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M 
client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
A client/tests/phpunit/includes/Usage/UsageTrackingSnakFormatterTest.php
R client/tests/phpunit/includes/Usage/UsageTrackingTermLookupTest.php
15 files changed, 318 insertions(+), 107 deletions(-)

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



diff --git 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
index 05ff7e8..0cb201d 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
@@ -5,7 +5,6 @@
 use InvalidArgumentException;
 use Language;
 use Status;
-use Wikibase\Client\Usage\UsageAccumulator;
 use Wikibase\DataAccess\StatementTransclusionInteractor;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\Lib\PropertyLabelNotResolvedException;
@@ -35,23 +34,15 @@
private $statementTransclusionInteractor;
 
/**
-* @var UsageAccumulator
-*/
-   private $usageAccumulator;
-
-   /**
 * @param Language $language
 * @param StatementTransclusionInteractor 
$statementTransclusionInteractor
-* @param UsageAccumulator $usageAccumulator
 */
public function __construct(
Language $language,
-   StatementTransclusionInteractor 
$statementTransclusionInteractor,
-   UsageAccumulator $usageAccumulator
+   StatementTransclusionInteractor $statementTransclusionInteractor
) {
$this-language = $language;
$this-statementTransclusionInteractor = 
$statementTransclusionInteractor;
-   $this-usageAccumulator = $usageAccumulator;
}
 
/**
@@ -65,7 +56,6 @@
$status = Status::newGood(
$this-statementTransclusionInteractor-render(
$entityId,
-   $this-usageAccumulator,
$propertyLabelOrId
)
);
diff --git 
a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
 
b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
index 050e9f5..b726219 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
@@ -7,6 +7,7 @@
 use ValueFormatters\FormatterOptions;
 use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\Usage\UsageAccumulator;
+use Wikibase\Client\Usage\UsageTrackingSnakFormatter;
 use Wikibase\DataAccess\PropertyIdResolver;
 use Wikibase\DataAccess\StatementTransclusionInteractor;
 use Wikibase\DataAccess\SnaksFinder;
@@ -93,7 +94,7 @@
 
/**
 * @param Language $language
-* @param UsageAccumulator|null $usageAccumulator
+* @param UsageAccumulator $usageAccumulator
 *
 * @return LanguageAwareRenderer
 */
@@ 

[MediaWiki-commits] [Gerrit] In Wikibase linking, check the target title instead of source - change (mediawiki...ContentTranslation)

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

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

Change subject: In Wikibase linking, check the target title instead of source
..

In Wikibase linking, check the target title instead of source

Follow up to
Iba7e6abb01ad8b1f4c207c705ff079517aa0bb03

Bug: T101410
Change-Id: Iaa680513b0b2cda92a6c42ba08b6fec9b6ff859f
---
M modules/publish/ext.cx.wikibase.link.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/publish/ext.cx.wikibase.link.js 
b/modules/publish/ext.cx.wikibase.link.js
index 6b7207a..722da5f 100644
--- a/modules/publish/ext.cx.wikibase.link.js
+++ b/modules/publish/ext.cx.wikibase.link.js
@@ -17,7 +17,7 @@
var title, sourceApi;
 
// Link only pages in the main space
-   title = new mw.Title( sourceTitle );
+   title = new mw.Title( targetTitle );
if ( title.getNamespaceId() !== 0 ) {
return;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa680513b0b2cda92a6c42ba08b6fec9b6ff859f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Re enable ArticleComments - change (translatewiki)

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

Change subject: Re enable ArticleComments
..


Re enable ArticleComments

Change-Id: I4b97057d036e6a187ce1f0688a5f2ef9557c80c0
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 87e75ec..658eed1 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -80,8 +80,9 @@
 
 Arrays
 
-# SVN import, incomplete message documenation
-#Article Comments
+Article Comments
+aliasfile = ArticleComments/ArticleComments.alias.php
+descmsg = article-comments-desc
 
 # Unmaintained by Wikimedia, no longer deployed.
 #Article Feedback

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b97057d036e6a187ce1f0688a5f2ef9557c80c0
Gerrit-PatchSet: 7
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com
Gerrit-Reviewer: Paladox thomasmulhall...@yahoo.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update MobilePersonalTools hook handler - change (mediawiki...Gather)

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

Change subject: Update MobilePersonalTools hook handler
..


Update MobilePersonalTools hook handler

Needs to use new array structure.

Dependency: I3ab146a
Change-Id: I946d8b9504c154bd8a83facd5b2845db3f861ba7
---
M includes/Gather.hooks.php
1 file changed, 12 insertions(+), 13 deletions(-)

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



diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index 483386a..19a0442 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -222,20 +222,19 @@
public static function onMobilePersonalTools( $items ) {
if ( MobileContext::singleton()-isBetaGroupMember() ) {
// Add collections link below watchlist
-   $itemArray = array_slice( $items, 0, 1, true ) +
-   array(
-   'collections' = array(
-   'links' = array(
-   array(
-   'text' = 
wfMessage( 'gather-lists-title' )-escaped(),
-   'href' = 
SpecialPage::getTitleFor( 'Gather' )-getLocalURL(),
-   'class' = 
CSS::iconClass( 'collections-icon', 'before', 'collection-menu-item' ),
-   
'data-event-name' = 'collections',
-   ),
-   ),
+   $itemArray = array_slice( $items, 0, 1, true );
+   $itemArray[] = array(
+   'name' = 'collections',
+   'components' = array(
+   array(
+   'text' = wfMessage( 
'gather-lists-title' )-escaped(),
+   'href' = 
SpecialPage::getTitleFor( 'Gather' )-getLocalURL(),
+   'class' = CSS::iconClass( 
'collections-icon', 'before', 'collection-menu-item' ),
+   'data-event-name' = 
'collections',
),
-   ) +
-   array_slice( $items, 1, count( $items ) - 1, 
true );
+   ),
+   );
+   $itemArray += array_slice( $items, 1, count( $items ) - 
1, true );
$items = $itemArray;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I946d8b9504c154bd8a83facd5b2845db3f861ba7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] objectcache: Minor code clean up in ObjectCache.php - change (mediawiki/core)

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

Change subject: objectcache: Minor code clean up in ObjectCache.php
..


objectcache: Minor code clean up in ObjectCache.php

* Whitespace.
* Simplify logic.
* Apply coding conventions to documentation blocks (empty line
  before annotations, no empty lines between annotation, consistent
  order of annotations).

Change-Id: I3e5268d6a6295643d5725c66ea2a01bccf610ed8
---
M includes/objectcache/ObjectCache.php
1 file changed, 22 insertions(+), 31 deletions(-)

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



diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 7faf4bb..c5850b6 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -38,6 +38,7 @@
 class ObjectCache {
/** @var Array Map of (id = BagOStuff) */
public static $instances = array();
+
/** @var Array Map of (id = WANObjectCache) */
public static $wanInstances = array();
 
@@ -45,35 +46,29 @@
 * Get a cached instance of the specified type of cache object.
 *
 * @param string $id
-*
 * @return BagOStuff
 */
static function getInstance( $id ) {
-   if ( isset( self::$instances[$id] ) ) {
-   return self::$instances[$id];
+   if ( !isset( self::$instances[$id] ) ) {
+   self::$instances[$id] = self::newFromId( $id );
}
 
-   $object = self::newFromId( $id );
-   self::$instances[$id] = $object;
-   return $object;
+   return self::$instances[$id];
}
 
/**
 * Get a cached instance of the specified type of cache object.
 *
-* @param string $id
-*
-* @return WANObjectCache
 * @since 1.26
+* @param string $id
+* @return WANObjectCache
 */
static function getWANInstance( $id ) {
-   if ( isset( self::$wanInstances[$id] ) ) {
-   return self::$wanInstances[$id];
+   if ( !isset( self::$wanInstances[$id] ) ) {
+   self::$wanInstances[$id] = self::newWANCacheFromId( $id 
);
}
 
-   $object = self::newWANCacheFromId( $id );
-   self::$wanInstances[$id] = $object;
-   return $object;
+   return self::$wanInstances[$id];
}
 
/**
@@ -88,9 +83,8 @@
 * Create a new cache object of the specified type.
 *
 * @param string $id
-*
-* @throws MWException
 * @return BagOStuff
+* @throws MWException
 */
static function newFromId( $id ) {
global $wgObjectCaches;
@@ -107,9 +101,8 @@
 * Create a new cache object from parameters
 *
 * @param array $params
-*
-* @throws MWException
 * @return BagOStuff
+* @throws MWException
 */
static function newFromParams( $params ) {
if ( isset( $params['loggroup'] ) ) {
@@ -140,6 +133,7 @@
 * be an alias to the configured cache choice for that.
 * If no cache choice is configured (by default $wgMainCacheType is 
CACHE_NONE),
 * then CACHE_ANYTHING will forward to CACHE_DB.
+*
 * @param array $params
 * @return BagOStuff
 */
@@ -162,8 +156,8 @@
 *
 * @param array $params
 * @param int|string $fallback Fallback cache, e.g. (CACHE_NONE, 
hash) (since 1.24)
-* @throws MWException
 * @return BagOStuff
+* @throws MWException
 */
static function newAccelerator( $params, $fallback = null ) {
if ( function_exists( 'apc_fetch' ) ) {
@@ -173,11 +167,11 @@
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';
} else {
-   if ( $fallback !== null ) {
-   return self::newFromId( $fallback );
+   if ( $fallback === null ) {
+   throw new MWException( 'CACHE_ACCEL requested 
but no suitable object ' .
+   'cache is present. You may want to 
install APC.' );
}
-   throw new MWException( CACHE_ACCEL requested but no 
suitable object  .
-   cache is present. You may want to install 
APC. );
+   $id = $fallback;
}
return self::newFromId( $id );
}
@@ -190,7 +184,6 @@
 * switching between the two clients randomly would be disastrous.
 *
 * @param array $params
-*
 * @return MemcachedPhpBagOStuff

[MediaWiki-commits] [Gerrit] Convert mediawiki.toc and mediawiki.user to using mw.cookie - change (mediawiki/core)

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

Change subject: Convert mediawiki.toc and mediawiki.user to using mw.cookie
..


Convert mediawiki.toc and mediawiki.user to using mw.cookie

* Remove redundant 'path' parameter (handled by mw.cookie)
* Remove redundant 'expires' parameter (handled by mw.cookie)
* Return value for absent cookie is now reliably 'null'.

This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost. Make
use of this oppertunity to rename some cookie names.

* mw_hidetoc - {wikiprefix} hidetoc
* mediaWiki.user.sessionId - {wikiprefix} mwuser-sessionId
* mediaWiki.user.bucket - {wikiprefix} mwuser-bucket

This is a re-submission of a4d3d3b427713, which was reverted due
to T101857. Commit amended to use sessionId instead of session.

Bug: T67384
Change-Id: Ibe88778cf3b6db90b3875c89305ffba53ac84104
---
M resources/Resources.php
M resources/src/mediawiki/mediawiki.cookie.js
M resources/src/mediawiki/mediawiki.toc.js
M resources/src/mediawiki/mediawiki.user.js
M tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js
5 files changed, 16 insertions(+), 23 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 644ff9c..43a75a2 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -218,7 +218,6 @@
'styles' = 'resources/src/jquery/jquery.confirmable.css',
'dependencies' = 'mediawiki.jqueryMsg',
),
-   // Use mediawiki.cookie in new code, rather than jquery.cookie.
'jquery.cookie' = array(
'scripts' = 'resources/lib/jquery/jquery.cookie.js',
'targets' = array( 'desktop', 'mobile' ),
@@ -1058,7 +1057,7 @@
),
'mediawiki.toc' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.toc.js',
-   'dependencies' = 'jquery.cookie',
+   'dependencies' = 'mediawiki.cookie',
'messages' = array( 'showtoc', 'hidetoc' ),
'targets' = array( 'desktop', 'mobile' ),
),
@@ -1070,7 +1069,7 @@
'mediawiki.user' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.user.js',
'dependencies' = array(
-   'jquery.cookie',
+   'mediawiki.cookie',
'mediawiki.api',
'user.options',
'user.tokens',
diff --git a/resources/src/mediawiki/mediawiki.cookie.js 
b/resources/src/mediawiki/mediawiki.cookie.js
index 8f091e4..d260fca 100644
--- a/resources/src/mediawiki/mediawiki.cookie.js
+++ b/resources/src/mediawiki/mediawiki.cookie.js
@@ -16,7 +16,7 @@
mw.cookie = {
 
/**
-* Sets or deletes a cookie.
+* Set or delete a cookie.
 *
 * While this is natural in JavaScript, contrary to 
`WebResponse#setcookie` in PHP, the
 * default values for the `options` properties only apply if 
that property isn't set
@@ -101,13 +101,13 @@
},
 
/**
-* Gets the value of a cookie.
+* Get the value of a cookie.
 *
 * @param {string} key
 * @param {string} [prefix=wgCookiePrefix] The prefix of the 
key. If `prefix` is
 *   `undefined` or `null`, then `wgCookiePrefix` is used
 * @param {Mixed} [defaultValue=null]
-* @return {string} If the cookie exists, then the value of the
+* @return {string|null|Mixed} If the cookie exists, then the 
value of the
 *   cookie, otherwise `defaultValue`
 */
get: function ( key, prefix, defaultValue ) {
diff --git a/resources/src/mediawiki/mediawiki.toc.js 
b/resources/src/mediawiki/mediawiki.toc.js
index 45338ea..78627fc 100644
--- a/resources/src/mediawiki/mediawiki.toc.js
+++ b/resources/src/mediawiki/mediawiki.toc.js
@@ -15,25 +15,19 @@
$tocList.slideDown( 'fast' );
$tocToggleLink.text( mw.msg( 'hidetoc' ) );
$toc.removeClass( 'tochidden' );
-   $.cookie( 'mw_hidetoc', null, {
-   expires: 30,
-   path: '/'
-   } );
+   mw.cookie.set( 'hidetoc', null );
} else {
$tocList.slideUp( 'fast' );
$tocToggleLink.text( mw.msg( 'showtoc' ) );
$toc.addClass( 'tochidden' );
-   $.cookie( 'mw_hidetoc', '1', {
- 

[MediaWiki-commits] [Gerrit] mediawiki.jqueryMsg: Phase out redundant data module and min... - change (mediawiki/core)

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

Change subject: mediawiki.jqueryMsg: Phase out redundant data module and minor 
clean up
..


mediawiki.jqueryMsg: Phase out redundant data module and minor clean up

Follows-up 4a3e50a54.

* Merge mediawiki.jqueryMsg.data and mediawiki.jqueryMsg modules.

  There's no need for this to be a separate module. The data is not for public 
consumption,
  it's provided to jqueryMsg only.

* Remove unused default-default values for 'allowedHtmlElements'.

* Remove conditionals around data providing at initial run-time. Instead, expose
  private method can call that. This way, we don't have two code paths claim
  ownership over the namespace. And it makes the module easier to test and 
re-use
  by not requiring the data to exist at first run time.

* Fix getDefinitionSummary() implementation to append data instead of setting
  arbitary keys in parent data. ResourceLoader documentation of 
getDefinitionSummary()
  has been updated to reflect this practice.

Change-Id: I40006d39514a997dce4930756a3dac84a0c9bb83
---
M autoload.php
R includes/resourceloader/ResourceLoaderJqueryMsgModule.php
M resources/Resources.php
M resources/src/mediawiki/mediawiki.jqueryMsg.js
4 files changed, 36 insertions(+), 34 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 74c7efd..d543fe0 100644
--- a/autoload.php
+++ b/autoload.php
@@ -993,7 +993,7 @@
'ResourceLoaderFilePath' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderFilePath.php',
'ResourceLoaderImage' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderImage.php',
'ResourceLoaderImageModule' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderImageModule.php',
-   'ResourceLoaderJqueryMsgDataModule' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderJqueryMsgDataModule.php',
+   'ResourceLoaderJqueryMsgModule' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderJqueryMsgModule.php',
'ResourceLoaderLanguageDataModule' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderLanguageDataModule.php',
'ResourceLoaderLanguageNamesModule' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderLanguageNamesModule.php',
'ResourceLoaderModule' = __DIR__ . 
'/includes/resourceloader/ResourceLoaderModule.php',
diff --git a/includes/resourceloader/ResourceLoaderJqueryMsgDataModule.php 
b/includes/resourceloader/ResourceLoaderJqueryMsgModule.php
similarity index 67%
rename from includes/resourceloader/ResourceLoaderJqueryMsgDataModule.php
rename to includes/resourceloader/ResourceLoaderJqueryMsgModule.php
index fda3faa..b905781 100644
--- a/includes/resourceloader/ResourceLoaderJqueryMsgDataModule.php
+++ b/includes/resourceloader/ResourceLoaderJqueryMsgModule.php
@@ -1,6 +1,6 @@
 ?php
 /**
- * Resource loader module for populating mediawiki.jqueryMsg data.
+ * ResourceLoader module for mediawiki.jqueryMsg that provides generated data.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,21 +22,20 @@
  */
 
 /**
- * ResourceLoader module for populating mediawiki.jqueryMsg data.
+ * ResourceLoader module for mediawiki.jqueryMsg and its generated data
  */
-class ResourceLoaderJqueryMsgDataModule extends ResourceLoaderModule {
-
-   protected $targets = array( 'desktop', 'mobile' );
+class ResourceLoaderJqueryMsgModule extends ResourceLoaderFileModule {
 
/**
 * @param ResourceLoaderContext $context
 * @return string JavaScript code
 */
public function getScript( ResourceLoaderContext $context ) {
-   $jsData = array();
+   $fileScript = parent::getScript( $context );
 
$tagData = Sanitizer::getRecognizedTagData();
-   $jsData['allowedHtmlElements'] = array_merge(
+   $parserDefaults = array();
+   $parserDefaults['allowedHtmlElements'] = array_merge(
array_keys( $tagData['htmlpairs'] ),
array_diff(
array_keys( $tagData['htmlsingle'] ),
@@ -44,10 +43,9 @@
)
);
 
-   return if ( !mw.jqueryMsg ) {\n .
-   \tmw.jqueryMsg = {};\n .
-   }\n .
-   mw.jqueryMsg.data =  . Xml::encodeJsVar( $jsData ) . 
;\n;
+   $dataScript = Xml::encodeJsCall( 
'mw.jqueryMsg.setParserDefaults', array( $parserDefaults ) );
+
+   return $fileScript . $dataScript;
}
 
/**
@@ -55,8 +53,10 @@
 * @return array|null
 */
public function getDefinitionSummary( ResourceLoaderContext $context ) {
-   $ret = parent::getDefinitionSummary( $context );
-   $ret['hash'] = 

[MediaWiki-commits] [Gerrit] Make cx-campaign-newarticle-notice more consistent - change (mediawiki...ContentTranslation)

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

Change subject: Make cx-campaign-newarticle-notice more consistent
..


Make cx-campaign-newarticle-notice more consistent

* New content is hard to translate and unnecessarily different from
  the message newarticletext and all related terminology.
* Core uses strong, not b.

Change-Id: Ia91e11e52750ab1e2264a2b3d887ee482f603e14
---
M i18n/en.json
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index ad192a5..968a0e9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,6 +4,7 @@
Amire80,
Joel Sahleen,
Kartik Mistry,
+   Nemo bis,
Pau Giner,
Santhosh.thottingal,
Sucheta Ghoshal
@@ -167,7 +168,7 @@
cx-draft-cancel-button-label: Cancel,
cx-draft-discard-button-label: Delete translation,
cx-beta-feature-enabled-notification: Content Translation has been 
activated in this wiki.,
-   cx-campaign-newarticle-notice: Now you can also create new content 
by btranslating/b! Do you want to try the Content Translation beta tool?,
+   cx-campaign-newarticle-notice: Now you can also create new pages by 
strongtranslating/strong! Do you want to try the Content Translation beta 
tool?,
cx-campaign-no-thanks: No, thanks,
cx-campaign-try: Try Content Translation,
cx-campaign-contributionsmenu-mycontributions: Contributions,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia91e11e52750ab1e2264a2b3d887ee482f603e14
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Pginer pgi...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add en.json credits - change (mediawiki...ContentTranslation)

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

Change subject: Add en.json credits
..


Add en.json credits

Found using `git shortlog -s -n`, and I checked that they are all
meaningful.

Change-Id: I4903013e3c59b8627520f5baa2360ce24b896b1b
---
M i18n/en.json
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 968a0e9..83e361a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,9 +5,13 @@
Joel Sahleen,
Kartik Mistry,
Nemo bis,
+   Niklas Laxström,
Pau Giner,
Santhosh.thottingal,
-   Sucheta Ghoshal
+   Shirayuki,
+   Siebrand Mazeland,
+   Sucheta Ghoshal,
+   This, that and the other
]
},
cx: Translate page,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4903013e3c59b8627520f5baa2360ce24b896b1b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] In Wikibase linking, check the target title instead of source - change (mediawiki...ContentTranslation)

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

Change subject: In Wikibase linking, check the target title instead of source
..


In Wikibase linking, check the target title instead of source

Follow up to
Iba7e6abb01ad8b1f4c207c705ff079517aa0bb03

Bug: T101410
Change-Id: Iaa680513b0b2cda92a6c42ba08b6fec9b6ff859f
---
M modules/publish/ext.cx.wikibase.link.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/publish/ext.cx.wikibase.link.js 
b/modules/publish/ext.cx.wikibase.link.js
index 6b7207a..722da5f 100644
--- a/modules/publish/ext.cx.wikibase.link.js
+++ b/modules/publish/ext.cx.wikibase.link.js
@@ -17,7 +17,7 @@
var title, sourceApi;
 
// Link only pages in the main space
-   title = new mw.Title( sourceTitle );
+   title = new mw.Title( targetTitle );
if ( title.getNamespaceId() !== 0 ) {
return;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa680513b0b2cda92a6c42ba08b6fec9b6ff859f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] certs: remove $group from install_certificate - change (operations/puppet)

2015-06-10 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: certs: remove $group from install_certificate
..

certs: remove $group from install_certificate

Looks like it's completely unused, with sslcert::certificate's default
of ssl-cert being used everywhere.

Change-Id: I659274f8addf7280488531bcceb7b931b79f9557
---
M manifests/certs.pp
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/manifests/certs.pp b/manifests/certs.pp
index e3effe9..95b9a63 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,9 +1,7 @@
 define install_certificate(
-$group = 'ssl-cert',
 $privatekey=true,
 ) {
 sslcert::certificate { $name:
-group  = $group,
 source = puppet:///files/ssl/${name}.crt,
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I659274f8addf7280488531bcceb7b931b79f9557
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] certs: remove $group from install_certificate - change (operations/puppet)

2015-06-10 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: certs: remove $group from install_certificate
..


certs: remove $group from install_certificate

Looks like it's completely unused, with sslcert::certificate's default
of ssl-cert being used everywhere.

Change-Id: I659274f8addf7280488531bcceb7b931b79f9557
---
M manifests/certs.pp
1 file changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/manifests/certs.pp b/manifests/certs.pp
index e3effe9..95b9a63 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,9 +1,7 @@
 define install_certificate(
-$group = 'ssl-cert',
 $privatekey=true,
 ) {
 sslcert::certificate { $name:
-group  = $group,
 source = puppet:///files/ssl/${name}.crt,
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I659274f8addf7280488531bcceb7b931b79f9557
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Adapted GlobeCoordinateComparer - change (mediawiki...WikidataQualityExternalValidation)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Adapted GlobeCoordinateComparer
..


Adapted GlobeCoordinateComparer

[cherry-picked from master]
* removed string-based comparison
* if the local precision is satisfied it's a match
* if pi * precision is satisfied it's a patial-match

Bug: T96856
Change-Id: I6b55d37a506e0b6203c30ac84e36de4aa6feb81a
---
M includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
M tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
2 files changed, 39 insertions(+), 6 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php 
b/includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
index c88a923..88b7488 100755
--- a/includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
+++ b/includes/CrossCheck/Comparer/GlobeCoordinateValueComparer.php
@@ -3,7 +3,6 @@
 namespace WikibaseQuality\ExternalValidation\CrossCheck\Comparer;
 
 use DataValues\DataValue;
-use DataValues\Geo\Formatters\GlobeCoordinateFormatter;
 use DataValues\Geo\Parsers\GlobeCoordinateParser;
 use DataValues\GlobeCoordinateValue;
 use Doctrine\Instantiator\Exception\InvalidArgumentException;
@@ -34,18 +33,27 @@
throw new InvalidArgumentException( 
'GlobeCoordinateValueComparer can only compare GlobeCoordinateValue objects.' );
}
 
-   $globeFormatter = new GlobeCoordinateFormatter();
-   $formattedLocalValue = $globeFormatter-format( $localValue );
-
$externalValues = $this-parseExternalValues( $externalValues, 
$dumpMetaInformation );
if ( $externalValues ) {
$status = CompareResult::STATUS_MISMATCH;
foreach ( $externalValues as $externalValue ) {
-   $formattedExternalValue = 
$globeFormatter-format( $externalValue );
-   if ( $formattedLocalValue === 
$formattedExternalValue ) {
+
+   $precision = $localValue-getPrecision();
+   $locLat = $localValue-getLatitude();
+   $locLong = $localValue-getLongitude();
+   $extLat = $externalValue-getLatitude();
+   $extLong = $externalValue-getLongitude();
+   $diffLat = abs( $locLat - $extLat );
+   $diffLong = abs( $locLong - $extLong );
+   if ( ( $diffLat = $precision )  ( $diffLong 
= $precision ) ) {
$status = CompareResult::STATUS_MATCH;
break;
}
+   $daumen = $precision;
+   if ( ( $diffLat = pi() * $daumen )  ( 
$diffLong = pi() * $daumen ) ) {
+   $status = 
CompareResult::STATUS_PARTIAL_MATCH;
+   }
+
}
 
return new CompareResult( $localValue, $externalValues, 
$status );
diff --git 
a/tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php 
b/tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
index f033240..3cee6a1 100755
--- a/tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
+++ b/tests/phpunit/CrossCheck/Comparer/GlobeCoordinateValueComparerTest.php
@@ -41,6 +41,7 @@
 
public function comparisonProvider() {
$localValue = new GlobeCoordinateValue( new LatLongValue( 64, 
26 ), 1 );
+   $localPrecisionValue = new GlobeCoordinateValue( new 
LatLongValue( 42, 32 ), 0.1 );
 
return array(
// Correct formatted external data
@@ -97,6 +98,30 @@
'42.00 N, 32.00 E'
)
),
+   // Match with precision
+   array(
+   new CompareResult(
+   $localPrecisionValue,
+   array(
+   new GlobeCoordinateValue( new 
LatLongValue( 42.09, 31.91 ), 0.01 )
+   ),
+   CompareResult::STATUS_MATCH
+   ),
+   $localPrecisionValue,
+   array( '42.09 N, 31.91 E' )
+   ),
+   // Partial match with pi * daumen
+   array(
+   new CompareResult(
+   $localPrecisionValue,
+  

[MediaWiki-commits] [Gerrit] Fix documentation and styles - change (mediawiki...Josa)

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

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

Change subject: Fix documentation and styles
..

Fix documentation and styles

* Also change variable $chr to $code in Josa::getJosa

Change-Id: Ifafd2049fd847511a2b26c43feb856792a628260
---
M Josa.class.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/Josa.class.php b/Josa.class.php
index 91adf1a..c7486c8 100644
--- a/Josa.class.php
+++ b/Josa.class.php
@@ -36,21 +36,21 @@
}
 
/*
-* @param string $type Type of last letter in word (see 
Josa::$josaMap's keys)
-* @param string $str Word to determine josa
+* @param string $type Type of the last letter in the word (see 
Josa::$josaMap's keys)
+* @param string $str Word to determine the josa
 * @return string Josa
 */
public static function getJosa( $type, $str ) {
if ( mb_substr( $str, -2, 2, 'utf-8' ) == ']]' ) { # if end 
with internel link
$str = mb_substr( $str, 0, -2, 'utf-8' );
}
-   $chr = self::convertToJohabCode( mb_substr( $str, -1, 1, 
'utf-8' ) );
-   if ( !$chr ) {
+   $code = self::convertToJohabCode( mb_substr( $str, -1, 1, 
'utf-8' ) );
+   if ( !$code ) {
$idx = 2; # Not hangul
-   } elseif ( ( $chr - 0xAC00 ) % 28 == 0 ) {
+   } elseif ( ( $code - 0xAC00 ) % 28 == 0 ) {
$idx = 1; # No trailing consonant
-   } elseif ( ( $type === 'Euro/Ro' )  ( ( $chr - 0xAC00 ) % 28 
== 8 ) ) {
-   $idx = 1;  # $type is Euro/Ro and trailing consonant is 
rieul(ㄹ). This is exception on Korean postposition rules.
+   } elseif ( ( $type === 'Euro/Ro' )  ( ( $code - 0xAC00 ) % 28 
== 8 ) ) {
+   $idx = 1; # $type is Euro/Ro and trailing consonant is 
rieul(ㄹ). This is an exception on Korean postposition rules.
} else {
$idx = 0; # Trailing consonant exists
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifafd2049fd847511a2b26c43feb856792a628260
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Josa
Gerrit-Branch: master
Gerrit-Owner: devunt dev...@gmail.com

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


[MediaWiki-commits] [Gerrit] tooltip only shown when right button is hovered/clicked tool... - change (mediawiki...WikidataQualityConstraints)

2015-06-10 Thread Dimitri.schmidt (Code Review)
Dimitri.schmidt has uploaded a new change for review.

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

Change subject: tooltip only shown when right button is hovered/clicked tooltip 
works in safari
..

tooltip only shown when right button is hovered/clicked
tooltip works in safari

Change-Id: I0176b357ed47d5717ea461fd87796b53a2b7ace4
---
M modules/SpecialConstraintReportPage.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints
 refs/changes/68/217268/1

diff --git a/modules/SpecialConstraintReportPage.js 
b/modules/SpecialConstraintReportPage.js
index 9e6455e..3d50bf7 100755
--- a/modules/SpecialConstraintReportPage.js
+++ b/modules/SpecialConstraintReportPage.js
@@ -4,10 +4,10 @@
 });
 $('.wbqc-indicator').hover(
 function(){
-$(this).parent().parent().find('.wbqc-tooltip').css('display', 
'flex');
+$(this).parent().find('.wbqc-tooltip').show();
 },
 function(){
-$(this).parent().parent().find('.wbqc-tooltip').css('display', 
'none');
+$(this).parent().find('.wbqc-tooltip').css('display', 'none');
 }
 );
 
@@ -17,7 +17,7 @@
 if($(e.target).attr(class) == 'wbqc-indicator') {
 tooltip = $(e.target).parent().find('.wbqc-tooltip');
 if(tooltip.css('display') == 'none') {
-tooltip.css('display', 'flex');
+tooltip.show();
 }
 }
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0176b357ed47d5717ea461fd87796b53a2b7ace4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: v1
Gerrit-Owner: Dimitri.schmidt dimitri.schm...@student.hpi.uni-potsdam.de

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


[MediaWiki-commits] [Gerrit] Constraint param mandatory is saved in violation - change (mediawiki...WikidataQualityConstraints)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Constraint param mandatory is saved in violation
..


Constraint param mandatory is saved in violation

Change-Id: Ica1f661c15b616662f5852ab15b2022b4060674d
---
M includes/Violations/CheckResultToViolationTranslator.php
M tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
2 files changed, 26 insertions(+), 1 deletion(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/includes/Violations/CheckResultToViolationTranslator.php 
b/includes/Violations/CheckResultToViolationTranslator.php
index 8d1fe0f..d325e5b 100644
--- a/includes/Violations/CheckResultToViolationTranslator.php
+++ b/includes/Violations/CheckResultToViolationTranslator.php
@@ -44,7 +44,15 @@
$revisionId = 
$this-entityRevisionLookup-getLatestRevisionId( $entityId );
$status = CheckResult::STATUS_VIOLATION;
 
-   $violationArray[ ] = new Violation( $entityId, 
$propertyId, $claimGuid, $constraintId, $constraintTypeEntityId, $revisionId, 
$status );
+$constraintParameters = $checkResult-getParameters();
+
+$additionalInfo = array();
+
+if ( array_key_exists( 'constraint_status', $constraintParameters 
)) {
+$additionalInfo['constraint_status'] = 
$constraintParameters['constraint_status'];
+}
+
+$violationArray[ ] = new Violation( $entityId, $propertyId, 
$claimGuid, $constraintId, $constraintTypeEntityId, $revisionId, $status, 
$additionalInfo );
}
 
return $violationArray;
diff --git a/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php 
b/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
index 6bafe94..dc5e1cb 100644
--- a/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
+++ b/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
@@ -118,9 +118,26 @@
$this-assertEquals( 
'wbqc|P1$----Range', 
$violation-getConstraintId() );
$this-assertEquals( $checkResult-getConstraintName(), 
$violation-getConstraintTypeEntityId() );
 $this-assertEquals( 42, $violation-getRevisionId() );
+   $this-assertEquals( array(), $violation-getAdditionalInfo() );
 
}
 
+   public function testViolationAdditionalInfo() {
+   $parameters = array( 'constraint_status' = array( 'mandatory' 
) );
+   $checkResult = new CheckResult( $this-statement, 
$this-constraintName, $parameters, 'violation', $this-message );
+   $violations = $this-translator-translateToViolation( 
$this-entity, $checkResult );
+   $this-assertEquals( 1, sizeof( $violations ) );
+
+   $violation = $violations[ 0 ];
+   $this-assertEquals( self::$idMap[ 'Q1' ], 
$violation-getEntityId() );
+   $this-assertEquals( 'P1', 
$violation-getPropertyId()-getSerialization() );
+   $this-assertEquals( $this-statement-getGuid(), 
$violation-getClaimGuid() );
+   $this-assertEquals( 
'wbqc|P1$----Rangemandatory', 
$violation-getConstraintId() );
+   $this-assertEquals( $checkResult-getConstraintName(), 
$violation-getConstraintTypeEntityId() );
+   $this-assertEquals( 42, $violation-getRevisionId() );
+   $this-assertEquals( 'mandatory', 
$violation-getAdditionalInfo()['constraint_status'][0] );
+   }
+
public function testMultipleCheckResults() {
$checkResults = array ();
$checkResults[ ] = new CheckResult( $this-statement, 
$this-constraintName, $this-parameters, 'violation', $this-message );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica1f661c15b616662f5852ab15b2022b4060674d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] tooltip only shown when right button is hovered/clicked tool... - change (mediawiki...WikidataQualityConstraints)

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

Change subject: tooltip only shown when right button is hovered/clicked tooltip 
works in safari
..


tooltip only shown when right button is hovered/clicked
tooltip works in safari

Change-Id: I0176b357ed47d5717ea461fd87796b53a2b7ace4
---
M modules/SpecialConstraintReportPage.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/SpecialConstraintReportPage.js 
b/modules/SpecialConstraintReportPage.js
index 9e6455e..3d50bf7 100755
--- a/modules/SpecialConstraintReportPage.js
+++ b/modules/SpecialConstraintReportPage.js
@@ -4,10 +4,10 @@
 });
 $('.wbqc-indicator').hover(
 function(){
-$(this).parent().parent().find('.wbqc-tooltip').css('display', 
'flex');
+$(this).parent().find('.wbqc-tooltip').show();
 },
 function(){
-$(this).parent().parent().find('.wbqc-tooltip').css('display', 
'none');
+$(this).parent().find('.wbqc-tooltip').css('display', 'none');
 }
 );
 
@@ -17,7 +17,7 @@
 if($(e.target).attr(class) == 'wbqc-indicator') {
 tooltip = $(e.target).parent().find('.wbqc-tooltip');
 if(tooltip.css('display') == 'none') {
-tooltip.css('display', 'flex');
+tooltip.show();
 }
 }
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0176b357ed47d5717ea461fd87796b53a2b7ace4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: v1
Gerrit-Owner: Dimitri.schmidt dimitri.schm...@student.hpi.uni-potsdam.de
Gerrit-Reviewer: Jonaskeutel jonas.keu...@student.hpi.de

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


[MediaWiki-commits] [Gerrit] certs: inline privatekey=false install_certificate - change (operations/puppet)

2015-06-10 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: certs: inline privatekey=false install_certificate
..

certs: inline privatekey=false install_certificate

Inline sslcert::certificate on the handful install_certificate call
sites where a privatekey isn't passed (all of them star.wmflabs.org
ones) and remove the option from install_certificate altogether.

Change-Id: I42dd380c72248086951471633806ebde9ad3d129
---
M manifests/certs.pp
M manifests/role/labsproxy.pp
M manifests/role/protoproxy.pp
M modules/toollabs/manifests/proxy.pp
M modules/toollabs/manifests/static.pp
5 files changed, 15 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/217271/1

diff --git a/manifests/certs.pp b/manifests/certs.pp
index 95b9a63..f1abe10 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,13 +1,6 @@
-define install_certificate(
-$privatekey=true,
-) {
+define install_certificate {
 sslcert::certificate { $name:
-source = puppet:///files/ssl/${name}.crt,
-}
-
-if ( $privatekey == true ) {
-Sslcert::Certificate[$name] {
-private = puppet:///private/ssl/${name}.key,
-}
+source  = puppet:///files/ssl/${name}.crt,
+private = puppet:///private/ssl/${name}.key,
 }
 }
diff --git a/manifests/role/labsproxy.pp b/manifests/role/labsproxy.pp
index 97383c3..2bb3493 100644
--- a/manifests/role/labsproxy.pp
+++ b/manifests/role/labsproxy.pp
@@ -1,17 +1,17 @@
 # A dynamic HTTP routing proxy, based on nginx+lua+redis
 class role::dynamicproxy::eqiad {
-install_certificate{ 'star.wmflabs.org':
-privatekey = false
-}
-
 include base::firewall
+
+sslcert::certificate { 'star.wmflabs.org':
+source = 'puppet:///files/ssl/star.wmflabs.org.crt',
+}
 
 class { '::dynamicproxy':
 ssl_certificate_name = 'star.wmflabs.org',
 ssl_settings = ssl_ciphersuite('nginx', 'compat'),
 set_xff  = true,
 luahandler   = 'domainproxy',
-require  = Install_certificate['star.wmflabs.org']
+require  = Sslcert::Certificate['star.wmflabs.org'],
 }
 include dynamicproxy::api
 }
diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index e18414a..8ff7e10 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -42,8 +42,8 @@
 include standard
 include role::protoproxy::ssl::common
 
-install_certificate { 'star.wmflabs.org':
-privatekey = false,
+sslcert::certificate { 'star.wmflabs.org':
+source = 'puppet:///files/ssl/star.wmflabs.org.crt',
 }
 
 }
diff --git a/modules/toollabs/manifests/proxy.pp 
b/modules/toollabs/manifests/proxy.pp
index 0d1911d..2594bed 100644
--- a/modules/toollabs/manifests/proxy.pp
+++ b/modules/toollabs/manifests/proxy.pp
@@ -9,9 +9,9 @@
 include base::firewall
 
 if $ssl_install_certificate {
-install_certificate { $ssl_certificate_name:
-privatekey = false,
-before = Class['::dynamicproxy'],
+sslcert::certificate { $ssl_certificate_name:
+source = puppet:///files/ssl/$ssl_certificate_name.crt,
+before = Class['::dynamicproxy'],
 }
 }
 
diff --git a/modules/toollabs/manifests/static.pp 
b/modules/toollabs/manifests/static.pp
index 7114b7f..ad2939a 100644
--- a/modules/toollabs/manifests/static.pp
+++ b/modules/toollabs/manifests/static.pp
@@ -9,8 +9,8 @@
 include toollabs::infrastructure
 
 if $ssl_certificate_name != false {
-install_certificate { $ssl_certificate_name:
-privatekey = false,
+sslcert::certificate { $ssl_certificate_name:
+source = puppet:///files/ssl/$ssl_certificate_name.crt,
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42dd380c72248086951471633806ebde9ad3d129
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix for PHP 5.3 - change (mediawiki...WikidataQualityConstraints)

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

Change subject: Fix for PHP 5.3
..


Fix for PHP 5.3

Change-Id: I91f650bf5ac0d05039e6d4c93c7d17047c1f4326
---
M tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php 
b/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
index dc5e1cb..bebc810 100644
--- a/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
+++ b/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
@@ -135,7 +135,8 @@
$this-assertEquals( 
'wbqc|P1$----Rangemandatory', 
$violation-getConstraintId() );
$this-assertEquals( $checkResult-getConstraintName(), 
$violation-getConstraintTypeEntityId() );
$this-assertEquals( 42, $violation-getRevisionId() );
-   $this-assertEquals( 'mandatory', 
$violation-getAdditionalInfo()['constraint_status'][0] );
+   $additionalInfo = $violation-getAdditionalInfo();
+   $this-assertEquals( 'mandatory', 
$additionalInfo['constraint_status'][0] );
}
 
public function testMultipleCheckResults() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91f650bf5ac0d05039e6d4c93c7d17047c1f4326
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com
Gerrit-Reviewer: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] ores: Explicitly define nginx cache to be true for prod lb - change (operations/puppet)

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

Change subject: ores: Explicitly define nginx cache to be true for prod lb
..


ores: Explicitly define nginx cache to be true for prod lb

Change-Id: I093b8e30d7b38836b692493bd8aca3a7e56a2215
---
M manifests/role/labsores.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/manifests/role/labsores.pp b/manifests/role/labsores.pp
index fd3a52c..881c542 100644
--- a/manifests/role/labsores.pp
+++ b/manifests/role/labsores.pp
@@ -21,6 +21,7 @@
 
 class { '::ores::lb':
 realservers = $realservers,
+cache   = true,
 require = Labs_lvm::Volume['srv'],
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I093b8e30d7b38836b692493bd8aca3a7e56a2215
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Changed 'partial match' to 'potential match' - change (mediawiki...WikidataQualityExternalValidation)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Changed 'partial match' to 'potential match'
..


Changed 'partial match' to 'potential match'

... only in translations, internal it's still 'partial'

Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index febc96e..0c8d7ee 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,7 +20,7 @@
   wbqev-crosscheck-result-table-header-external-source: External source,
   wbqev-crosscheck-result-table-header-status: Status,
   wbqev-crosscheck-status-match: Match,
-  wbqev-crosscheck-status-partial-match: Partial match,
+  wbqev-crosscheck-status-partial-match: Potential match,
   wbqev-crosscheck-status-mismatch: Mismatch,
   wbqev-crosscheck-status-references-missing: missing,
   wbqev-crosscheck-status-references-stated: stated,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index db7b3ac..afe3aef 100755
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,7 +20,7 @@
wbqev-crosscheck-result-table-header-external-source: Header of the 
column that displays the name of the external source.,
wbqev-crosscheck-result-table-header-status: Header of the column 
that shows the result of the constraint check.\n{{Identical|Status}},
wbqev-crosscheck-status-match: Status for claims that have a match 
with any external data,
-   wbqev-crosscheck-status-partial-match: Status for claims that have a 
partial match with any external data,
+   wbqev-crosscheck-status-partial-match: Status for claims that have a 
potential match with any external data,
wbqev-crosscheck-status-mismatch: Status for claims that have a 
mismatch with any external data.,
wbqev-crosscheck-status-references-missing: Status for claims for 
which references are missing.,
wbqev-crosscheck-status-references-stated: Status for claims for 
which references are stated.,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] certs: inline privatekey=false install_certificate - change (operations/puppet)

2015-06-10 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: certs: inline privatekey=false install_certificate
..


certs: inline privatekey=false install_certificate

Inline sslcert::certificate on the handful install_certificate call
sites where a privatekey isn't passed (all of them star.wmflabs.org
ones) and remove the option from install_certificate altogether.

Change-Id: I42dd380c72248086951471633806ebde9ad3d129
---
M manifests/certs.pp
M manifests/role/labsproxy.pp
M manifests/role/protoproxy.pp
M modules/toollabs/manifests/proxy.pp
M modules/toollabs/manifests/static.pp
5 files changed, 15 insertions(+), 22 deletions(-)

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



diff --git a/manifests/certs.pp b/manifests/certs.pp
index 95b9a63..f1abe10 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,13 +1,6 @@
-define install_certificate(
-$privatekey=true,
-) {
+define install_certificate {
 sslcert::certificate { $name:
-source = puppet:///files/ssl/${name}.crt,
-}
-
-if ( $privatekey == true ) {
-Sslcert::Certificate[$name] {
-private = puppet:///private/ssl/${name}.key,
-}
+source  = puppet:///files/ssl/${name}.crt,
+private = puppet:///private/ssl/${name}.key,
 }
 }
diff --git a/manifests/role/labsproxy.pp b/manifests/role/labsproxy.pp
index 97383c3..2bb3493 100644
--- a/manifests/role/labsproxy.pp
+++ b/manifests/role/labsproxy.pp
@@ -1,17 +1,17 @@
 # A dynamic HTTP routing proxy, based on nginx+lua+redis
 class role::dynamicproxy::eqiad {
-install_certificate{ 'star.wmflabs.org':
-privatekey = false
-}
-
 include base::firewall
+
+sslcert::certificate { 'star.wmflabs.org':
+source = 'puppet:///files/ssl/star.wmflabs.org.crt',
+}
 
 class { '::dynamicproxy':
 ssl_certificate_name = 'star.wmflabs.org',
 ssl_settings = ssl_ciphersuite('nginx', 'compat'),
 set_xff  = true,
 luahandler   = 'domainproxy',
-require  = Install_certificate['star.wmflabs.org']
+require  = Sslcert::Certificate['star.wmflabs.org'],
 }
 include dynamicproxy::api
 }
diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index e18414a..8ff7e10 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -42,8 +42,8 @@
 include standard
 include role::protoproxy::ssl::common
 
-install_certificate { 'star.wmflabs.org':
-privatekey = false,
+sslcert::certificate { 'star.wmflabs.org':
+source = 'puppet:///files/ssl/star.wmflabs.org.crt',
 }
 
 }
diff --git a/modules/toollabs/manifests/proxy.pp 
b/modules/toollabs/manifests/proxy.pp
index 0d1911d..2594bed 100644
--- a/modules/toollabs/manifests/proxy.pp
+++ b/modules/toollabs/manifests/proxy.pp
@@ -9,9 +9,9 @@
 include base::firewall
 
 if $ssl_install_certificate {
-install_certificate { $ssl_certificate_name:
-privatekey = false,
-before = Class['::dynamicproxy'],
+sslcert::certificate { $ssl_certificate_name:
+source = puppet:///files/ssl/$ssl_certificate_name.crt,
+before = Class['::dynamicproxy'],
 }
 }
 
diff --git a/modules/toollabs/manifests/static.pp 
b/modules/toollabs/manifests/static.pp
index 7114b7f..ad2939a 100644
--- a/modules/toollabs/manifests/static.pp
+++ b/modules/toollabs/manifests/static.pp
@@ -9,8 +9,8 @@
 include toollabs::infrastructure
 
 if $ssl_certificate_name != false {
-install_certificate { $ssl_certificate_name:
-privatekey = false,
+sslcert::certificate { $ssl_certificate_name:
+source = puppet:///files/ssl/$ssl_certificate_name.crt,
 }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42dd380c72248086951471633806ebde9ad3d129
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
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-extensions-zend only triggered on gate - change (integration/config)

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

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

Change subject: mediawiki-extensions-zend only triggered on gate
..

mediawiki-extensions-zend only triggered on gate

Stop triggering mediawiki-extensions-zend in test pipeline since it does
almost the same as the HHVM one.
Migrate it to the `zend` pipeline so it can be triggered manually.
Keep it in gate-and-submit to prevent Zend regressions.

Change-Id: I7c3dd2a18cc9d4ff5018eb6b1a4096f7083a38ea
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/77/217277/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 639a263..634bf50 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1826,8 +1826,9 @@
   - name: extension-gate
 test:
   - mediawiki-extensions-hhvm
-  - mediawiki-extensions-zend
   - mediawiki-extensions-qunit
+zend:
+  - mediawiki-extensions-zend
 gate-and-submit:
   - mediawiki-extensions-hhvm
   - mediawiki-extensions-zend

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c3dd2a18cc9d4ff5018eb6b1a4096f7083a38ea
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Use Identical operator insteads of Equal operator - change (mediawiki...Josa)

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

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

Change subject: Use Identical operator insteads of Equal operator
..

Use Identical operator insteads of Equal operator

Change-Id: I9dd11284f2e9407407b60dc8668ba35dbbc71965
---
M Josa.class.php
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Josa 
refs/changes/78/217278/1

diff --git a/Josa.class.php b/Josa.class.php
index c7486c8..d97e977 100644
--- a/Josa.class.php
+++ b/Josa.class.php
@@ -47,9 +47,9 @@
$code = self::convertToJohabCode( mb_substr( $str, -1, 1, 
'utf-8' ) );
if ( !$code ) {
$idx = 2; # Not hangul
-   } elseif ( ( $code - 0xAC00 ) % 28 == 0 ) {
+   } elseif ( ( $code - 0xAC00 ) % 28 === 0 ) {
$idx = 1; # No trailing consonant
-   } elseif ( ( $type === 'Euro/Ro' )  ( ( $code - 0xAC00 ) % 28 
== 8 ) ) {
+   } elseif ( ( $type === 'Euro/Ro' )  ( ( $code - 0xAC00 ) % 28 
=== 8 ) ) {
$idx = 1; # $type is Euro/Ro and trailing consonant is 
rieul(ㄹ). This is an exception on Korean postposition rules.
} else {
$idx = 0; # Trailing consonant exists
@@ -70,12 +70,12 @@
if ( $thisValue  128 ) {
return false;
} else {
-   if ( count( $values ) == 0 ) {
+   if ( count( $values ) === 0 ) {
$lookingFor = ( $thisValue  224 ) ? 2 
: 3;
}
$values[] = $thisValue;
-   if ( count( $values ) == $lookingFor ) {
-   $number = ( $lookingFor == 3 ) ?
+   if ( count( $values ) === $lookingFor ) {
+   $number = ( $lookingFor === 3 ) ?
( ( $values[0] % 16 ) * 4096 ) 
+ ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ) :
( ( $values[0] % 32 ) * 64 ) + 
( $values[1] % 64 );
return $number;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dd11284f2e9407407b60dc8668ba35dbbc71965
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Josa
Gerrit-Branch: master
Gerrit-Owner: devunt dev...@gmail.com

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


[MediaWiki-commits] [Gerrit] adding debianization - change (operations...conftool)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: adding debianization
..


adding debianization

Change-Id: Icb7dd1e2d420e8e37969e0c96e183b58b92b08ee
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/python-etcd.links
A debian/rules
A debian/source/format
7 files changed, 50 insertions(+), 0 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, but someone else must approve



diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..5aa84a1
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-conftool (0.0.1) unstable; urgency=medium
+
+  * Initial packaging
+
+ -- Giuseppe Lavagetto glavage...@wikimedia.org  Thu, 21 May 2015 10:35:24 
+0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..df75faf
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: python-conftool
+Section: python
+Priority: optional
+Maintainer: Giuseppe Lavagetto glavage...@wikimedia.org
+Standards-Version: 3.9.6
+Build-Depends: debhelper (= 9), dh-python,
+  python-all (= 2.7), python-setuptools,
+  python-etcd (= 0.3.4), python-yaml
+Homepage: https://github.com/wikimedia/operations-software-conftool
+X-Python-Version: = 2.7
+
+Package: python-conftool
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Breaks: ${python:Breaks}
+Provides: ${python:Provides}
+Description: Set of tools to configure the WMF kv config store.
+ Conftool provides a couple of tools: conftool-sync that allows
+ syncing objects from a series of yaml files.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..28a11e7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,12 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: conftool
+Source: https://github.com/wikimedia/operations-software-conftool
+
+Files: *
+Copyright: 2015 Giuseppe Lavagetto glavage...@wikimedia.org
+   2015 Wikimedia Foundation
+License: GPL-3.0
+
+License: GPL-3.0
+ See /usr/share/common-licenses/GPL-3.0
+
diff --git a/debian/python-etcd.links b/debian/python-etcd.links
new file mode 100644
index 000..c131156
--- /dev/null
+++ b/debian/python-etcd.links
@@ -0,0 +1 @@
+usr/share/doc/python-etcd-doc/html/_sources usr/share/doc/python-etcd/rst
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..c97f3e6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+export PYBUILD_NAME=conftool
+export PYBUILD_DISABLE=tests
+
+%:
+   dh $@ --with python2 --buildsystem=pybuild
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb7dd1e2d420e8e37969e0c96e183b58b92b08ee
Gerrit-PatchSet: 3
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Chasemp chas...@gmail.com
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] driver: allow specifying driver-specific options. - change (operations...conftool)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: driver: allow specifying driver-specific options.
..


driver: allow specifying driver-specific options.

Change-Id: Ifc8aa1965c163347948380f3fb7f9f7e5c6c5904
---
M conftool/configuration.py
M conftool/drivers/etcd.py
2 files changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/conftool/configuration.py b/conftool/configuration.py
index c3fede6..26340c6 100644
--- a/conftool/configuration.py
+++ b/conftool/configuration.py
@@ -20,6 +20,7 @@
'api_version',
'pools_path',
'services_path',
+   'driver_options'
])
 
 
@@ -30,7 +31,8 @@
 namespace='/conftool',
 api_version='v1',
 pools_path='pools',
-services_path='services'
+services_path='services',
+driver_options={}
 ):
 if pools_path.startswith('/'):
 raise ValueError(pools_path must be a relative path.)
@@ -42,4 +44,5 @@
   namespace=namespace,
   api_version=api_version,
   pools_path=pools_path,
-  services_path=services_path)
+  services_path=services_path,
+  driver_options=driver_options)
diff --git a/conftool/drivers/etcd.py b/conftool/drivers/etcd.py
index b686c3a..8ef9b48 100644
--- a/conftool/drivers/etcd.py
+++ b/conftool/drivers/etcd.py
@@ -15,7 +15,8 @@
 proto = urlparse.urlparse(config.hosts[0]).scheme
 self.client = etcd.Client(host=tuple(host_list),
   protocol=proto,
-  allow_reconnect=True)
+  allow_reconnect=True,
+  **config.driver_options)
 super(Driver, self).__init__(config)
 
 @drivers.wrap_exception(etcd.EtcdException)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc8aa1965c163347948380f3fb7f9f7e5c6c5904
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ganglia::web::view: order resources in template - change (operations/puppet)

2015-06-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: ganglia::web::view: order resources in template
..


ganglia::web::view: order resources in template

Change-Id: I7f114ca595c70f6b235b7e682a66c3c8a5bd7508
---
M modules/ganglia_new/templates/ganglia_view.json.erb
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/modules/ganglia_new/templates/ganglia_view.json.erb 
b/modules/ganglia_new/templates/ganglia_view.json.erb
index f5717c1..ee2aefb 100644
--- a/modules/ganglia_new/templates/ganglia_view.json.erb
+++ b/modules/ganglia_new/templates/ganglia_view.json.erb
@@ -1,6 +1,4 @@
 %
-require 'json'
-
 # If graphs was specified, convert it into
 # the items structure expected by ganglia-web.
 @graphs.each do |graph|
@@ -22,7 +20,7 @@
  view_type:%= @view_type %,
  default_size:%= @default_size %,
 
- items:%= JSON.pretty_generate(@items) %
+ items:%= scope.function_ordered_json([@items]) %
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f114ca595c70f6b235b7e682a66c3c8a5bd7508
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix for PHP 5.3 - change (mediawiki...WikidataQualityConstraints)

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

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

Change subject: Fix for PHP 5.3
..

Fix for PHP 5.3

Change-Id: I91f650bf5ac0d05039e6d4c93c7d17047c1f4326
---
M tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints
 refs/changes/72/217272/1

diff --git a/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php 
b/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
index dc5e1cb..bebc810 100644
--- a/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
+++ b/tests/phpunit/Violations/CheckResultToViolationTranslatorTest.php
@@ -135,7 +135,8 @@
$this-assertEquals( 
'wbqc|P1$----Rangemandatory', 
$violation-getConstraintId() );
$this-assertEquals( $checkResult-getConstraintName(), 
$violation-getConstraintTypeEntityId() );
$this-assertEquals( 42, $violation-getRevisionId() );
-   $this-assertEquals( 'mandatory', 
$violation-getAdditionalInfo()['constraint_status'][0] );
+   $additionalInfo = $violation-getAdditionalInfo();
+   $this-assertEquals( 'mandatory', 
$additionalInfo['constraint_status'][0] );
}
 
public function testMultipleCheckResults() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91f650bf5ac0d05039e6d4c93c7d17047c1f4326
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Changed 'partial match' to 'potential match' - change (mediawiki...WikidataQualityExternalValidation)

2015-06-10 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Changed 'partial match' to 'potential match'
..


Changed 'partial match' to 'potential match'

... only in translations, internal it's still 'partial'

Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index 1dd357b..46f9d05 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,7 +20,7 @@
   wbqev-crosscheck-result-table-header-external-source: External source,
   wbqev-crosscheck-result-table-header-status: Status,
   wbqev-crosscheck-status-match: Match,
-  wbqev-crosscheck-status-partial-match: Partial match,
+  wbqev-crosscheck-status-partial-match: Potential match,
   wbqev-crosscheck-status-mismatch: Mismatch,
   wbqev-crosscheck-status-references-missing: missing,
   wbqev-crosscheck-status-references-stated: stated,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ed86792..a22bc99 100755
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,7 +20,7 @@
wbqev-crosscheck-result-table-header-external-source: Header of the 
column that displays the name of the external source.,
wbqev-crosscheck-result-table-header-status: Header of the column 
that shows the result of the constraint check.\n{{Identical|Status}},
wbqev-crosscheck-status-match: Status for claims that have a match 
with any external data,
-   wbqev-crosscheck-status-partial-match: Status for claims that have a 
partial match with any external data,
+   wbqev-crosscheck-status-partial-match: Status for claims that have a 
potential match with any external data,
wbqev-crosscheck-status-mismatch: Status for claims that have a 
mismatch with any external data.,
wbqev-crosscheck-status-references-missing: Status for claims for 
which references are missing.,
wbqev-crosscheck-status-references-stated: Status for claims for 
which references are stated.,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76b787b037a3a5b287302ffe8693fb6137a3e693
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: v1
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


  1   2   3   >