[MediaWiki-commits] [Gerrit] Refactor lineardoc module to multiple small files - change (mediawiki...cxserver)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/176325 Change subject: Refactor lineardoc module to multiple small files .. Refactor lineardoc module to multiple small files Bug: T76000 Change-Id: Ie32986ffcdaf84ef90c12a71f77c85f9d16a30ba --- M bin/linearize M index.js A lineardoc/Builder.js A lineardoc/Doc.js D lineardoc/LinearDoc.js A lineardoc/Normalizer.js A lineardoc/Parser.js A lineardoc/TextBlock.js A lineardoc/TextChunk.js A lineardoc/Utils.js A lineardoc/index.js M mt/MTClient.js M mt/annotationmapper/SubsequenceMatcher.js M segmentation/CXSegmenter.js M segmentation/languages/SegmenterDefault.js M segmentation/languages/SegmenterEn.js M segmentation/languages/SegmenterHi.js M tests/index.js 18 files changed, 1,298 insertions(+), 1,248 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/25/176325/1 diff --git a/bin/linearize b/bin/linearize index 56c2cb3..c65b709 100755 --- a/bin/linearize +++ b/bin/linearize @@ -1,7 +1,7 @@ #!/usr/bin/env node var script, xhtmlSource, xhtml, parser, fs = require( 'fs' ), - LinearDoc = require( __dirname + '/../lineardoc/LinearDoc.js' ); + LinearDoc = require( __dirname + '/../lineardoc' ); script = process.argv[ 1 ]; if ( process.argv.length !== 3 ) { diff --git a/index.js b/index.js index 167639e..4051b72 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,6 @@ Apertium: require( './mt/Apertium.js' ), Yandex: require( './mt/Yandex.js' ), MTClient: require( './mt/MTClient.js' ), - LinearDoc: require( './lineardoc/LinearDoc.js' ), + LinearDoc: require( './lineardoc' ), Dictionary: require( './dictionary' ) }; diff --git a/lineardoc/Builder.js b/lineardoc/Builder.js new file mode 100644 index 000..15f806c --- /dev/null +++ b/lineardoc/Builder.js @@ -0,0 +1,135 @@ +var Doc = require( './Doc.js' ), + TextBlock = require( './TextBlock.js' ), + TextChunk = require( './TextChunk.js' ); + +/** + * A document builder + * @class + * + * @constructor + * @param {Builder} [parent] Parent document builder + * @param {Object} [wrapperTag] tag that wraps document (if there is a parent) + */ +function Builder( parent, wrapperTag ) { + this.blockTags = []; + // Stack of annotation tags + this.inlineAnnotationTags = []; + // The height of the annotation tags that have been used, minus one + this.inlineAnnotationTagsUsed = 0; + this.doc = new Doc( wrapperTag || null ); + this.textChunks = []; + this.parent = parent || null; +} + +Builder.prototype.createChildBuilder = function ( wrapperTag ) { + return new Builder( this, wrapperTag ); +}; + +Builder.prototype.pushBlockTag = function ( tag ) { + this.finishTextBlock(); + this.blockTags.push( tag ); + this.doc.addItem( 'open', tag ); +}; + +Builder.prototype.popBlockTag = function ( tagName ) { + var tag = this.blockTags.pop(); + if ( !tag || tag.name !== tagName ) { + throw new Error( + 'Mismatched block tags: open=' + ( tag && tag.name ) + ', close=' + tagName + ); + } + this.finishTextBlock(); + this.doc.addItem( 'close', tag ); + return tag; +}; + +Builder.prototype.pushInlineAnnotationTag = function ( tag ) { + this.inlineAnnotationTags.push( tag ); +}; + +Builder.prototype.popInlineAnnotationTag = function ( tagName ) { + var tag, textChunk, chunkTag, i, replace, whitespace; + tag = this.inlineAnnotationTags.pop(); + if ( this.inlineAnnotationTagsUsed === this.inlineAnnotationTags.length ) { + this.inlineAnnotationTagsUsed--; + } + if ( !tag || tag.name !== tagName ) { + throw new Error( + 'Mismatched inline tags: open=' + ( tag && tag.name ) + ', close=' + tagName + ); + } + if ( tag.name !== 'span' || !tag.attributes[ 'data-mw' ] ) { + return tag; + } + // Check for empty/whitespace-only data span. Replace as inline content + replace = true; + whitespace = []; + for ( i = this.textChunks.length - 1; i >= 0; i-- ) { + textChunk = this.textChunks[ i ]; + chunkTag = textChunk.tags[ textChunk.tags.length - 1 ]; + if ( !chunkTag || chunkTag !== tag ) { + break; + } + if ( textChunk.text.match( /\S/ ) || textChunk.inlineContent ) { + replace = false; + break; + } + whitespace.push( textChunk.text ); + } + if ( replace ) { + // truncate list and add data span as new sub-Doc. + this.textChunks.length = i + 1; + whitespace.reverse(); + this.addInlineContent( +
[MediaWiki-commits] [Gerrit] [FIX] CFD: Only allow script to be run on enwp - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] CFD: Only allow script to be run on enwp .. [FIX] CFD: Only allow script to be run on enwp This script only works on the English Wikipedia, so don't even start if not using that. Bug: T71015 Change-Id: I3abacb1746b7f02ab654be4a76ccfb2539e10f29 --- M scripts/cfd.py 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/cfd.py b/scripts/cfd.py index 8687735..53a49aa 100644 --- a/scripts/cfd.py +++ b/scripts/cfd.py @@ -17,8 +17,9 @@ __version__ = '$Id$' # -import pywikibot import re +import pywikibot +from pywikibot import config2 as config import category # The location of the CFD working page. @@ -69,6 +70,10 @@ """ pywikibot.handle_args(args) +if config.family != 'wikipedia' or config.mylang != 'en': +pywikibot.warning('CFD does work only on the English Wikipedia.') +return + page = pywikibot.Page(pywikibot.Site(), cfdPage) # Variable declarations -- To view, visit https://gerrit.wikimedia.org/r/176323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3abacb1746b7f02ab654be4a76ccfb2539e10f29 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use $separator at the start of entries in recent changes. - change (mediawiki...Flow)
Deskana has uploaded a new change for review. https://gerrit.wikimedia.org/r/176324 Change subject: Use $separator at the start of entries in recent changes. .. Use $separator at the start of entries in recent changes. This patches modifies Flow to use $separator at the start of entries in recent changes, which makes entries generated by Flow more consistent with those not created by Flow. Bug: T76170 Change-Id: I0662dee9bc7af7c357dd6da6a11caa8380eb0a6f --- M includes/Formatter/RecentChanges.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/24/176324/1 diff --git a/includes/Formatter/RecentChanges.php b/includes/Formatter/RecentChanges.php index 4e4e704..3cf4f00 100644 --- a/includes/Formatter/RecentChanges.php +++ b/includes/Formatter/RecentChanges.php @@ -58,7 +58,7 @@ $description = $this->formatDescription( $data, $ctx ); return $this->formatAnchorsAsPipeList( $links, $ctx ) . - ' ' . + $separator . $this->getTitleLink( $data, $row, $ctx ) . $ctx->msg( 'semicolon-separator' )->escaped() . ' ' . -- To view, visit https://gerrit.wikimedia.org/r/176324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0662dee9bc7af7c357dd6da6a11caa8380eb0a6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Deskana ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More consistent variable naming, e.g. $languageCode - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: More consistent variable naming, e.g. $languageCode .. More consistent variable naming, e.g. $languageCode * Renamed some variables, e.g. $language if it does not contain a Language object. * Make use of PHP 5.3's short ?: operator. * Made some stuff private that just does not need to be protected. Change-Id: I0cb5068d72bb64578ee1e721720e16bae7916b47 --- M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php M client/tests/phpunit/includes/scribunto/WikibaseLuaEntityBindingsTest.php M repo/includes/specials/SpecialItemByTitle.php M repo/includes/specials/SpecialItemDisambiguation.php M repo/includes/specials/SpecialModifyTerm.php M repo/includes/specials/SpecialNewEntity.php M repo/includes/specials/SpecialSetAliases.php M repo/includes/specials/SpecialSetDescription.php M repo/includes/specials/SpecialSetLabel.php 9 files changed, 124 insertions(+), 127 deletions(-) Approvals: Daniel Kinzler: Looks good to me, but someone else must approve Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php b/client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php index 60408f0..e4a8d0d 100644 --- a/client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php +++ b/client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php @@ -32,14 +32,15 @@ class WikibaseLuaBindingsTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { - $wikibaseLibrary = $this->getWikibaseLibraryImplementation(); + $wikibaseLuaBindings = $this->getWikibaseLuaBindings(); + $this->assertInstanceOf( 'Wikibase\Client\Scribunto\WikibaseLuaBindings', - $wikibaseLibrary + $wikibaseLuaBindings ); } - private function getWikibaseLibraryImplementation( + private function getWikibaseLuaBindings( EntityLookup $entityLookup = null, UsageAccumulator $usageAccumulator = null ) { @@ -68,7 +69,7 @@ return new WikibaseLuaBindings( new BasicEntityIdParser(), - $entityLookup ? $entityLookup : new MockRepository(), + $entityLookup ?: new MockRepository(), $siteLinkTable, new LanguageFallbackChainFactory(), $language, // language @@ -92,9 +93,9 @@ */ public function testGetEntity( array $expected, Item $item, EntityLookup $entityLookup ) { $prefixedId = $item->getId()->getSerialization(); - $wikibaseLibrary = $this->getWikibaseLibraryImplementation( $entityLookup ); + $wikibaseLuaBindings = $this->getWikibaseLuaBindings( $entityLookup ); - $entityArr = $wikibaseLibrary->getEntity( $prefixedId ); + $entityArr = $wikibaseLuaBindings->getEntity( $prefixedId ); $actual = is_array( $entityArr ) ? array_keys( $entityArr ) : array(); $this->assertEquals( $expected, $actual ); } @@ -107,9 +108,9 @@ $entityLookup->putEntity( $item ); $usages = new HashUsageAccumulator(); - $wikibaseLibrary = $this->getWikibaseLibraryImplementation( $entityLookup, $usages ); + $wikibaseLuaBindings = $this->getWikibaseLuaBindings( $entityLookup, $usages ); - $wikibaseLibrary->getEntity( $itemId->getSerialization() ); + $wikibaseLuaBindings->getEntity( $itemId->getSerialization() ); $this->assertTrue( $this->hasUsage( $usages->getUsages(), $item->getId(), EntityUsage::ALL_USAGE ), 'all usage' ); } @@ -130,21 +131,22 @@ public function testGetEntityId() { $usages = new HashUsageAccumulator(); - $wikibaseLibrary = $this->getWikibaseLibraryImplementation( null, $usages ); + $wikibaseLuaBindings = $this->getWikibaseLuaBindings( null, $usages ); - $itemId = $wikibaseLibrary->getEntityId( 'Rome' ); + $itemId = $wikibaseLuaBindings->getEntityId( 'Rome' ); $this->assertEquals( 'Q33' , $itemId ); $this->assertTrue( $this->hasUsage( $usages->getUsages(), new ItemId( $itemId ), EntityUsage::TITLE_USAGE ), 'title usage' ); $this->assertFalse( $this->hasUsage( $usages->getUsages(), new ItemId( $itemId ), EntityUsage::SITELINK_USAGE ), 'sitelink usage' ); - $itemId = $wikibaseLibrary->getEntityId( 'Barcelona' ); + $itemId = $wikibaseLuaBindings->getEntityId( 'Barcelona' ); $this->assertSame( null, $itemId );
[MediaWiki-commits] [Gerrit] Remove no longer used class - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove no longer used class .. Remove no longer used class Change-Id: Ie669575cc373d1f3b67050d842c47a74e0a35457 --- D repo/tests/phpunit/TestItemContents.php 1 file changed, 0 insertions(+), 65 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/TestItemContents.php b/repo/tests/phpunit/TestItemContents.php deleted file mode 100644 index b0ee093..000 --- a/repo/tests/phpunit/TestItemContents.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -final class TestItemContents { - - /** -* @return ItemContent[] -*/ - public static function getItems() { - return array_map( - '\Wikibase\ItemContent::newFromItem', - self::getItemObjects() - ); - } - - private static function getItemObjects() { - $items = array(); - - $items[] = Item::newEmpty(); - - $item = Item::newEmpty(); - - $item->setDescription( 'en', 'foo' ); - $item->setLabel( 'en', 'bar' ); - - $items[] = $item; - - $item = Item::newEmpty(); - - $item->addAliases( 'en', array( 'foobar', 'baz' ) ); - - $items[] = $item; - - $item = Item::newEmpty(); - $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'spam' ); - - $items[] = $item; - - $item = Item::newEmpty(); - $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'spamz' ); - $item->getSiteLinkList()->addNewSiteLink( 'dewiki', 'foobar' ); - - $item->setDescription( 'en', 'foo' ); - $item->setLabel( 'en', 'bar' ); - - $item->addAliases( 'en', array( 'foobar', 'baz' ) ); - $item->addAliases( 'de', array( 'foobar', 'spam' ) ); - - $items[] = $item; - - return $items; - } - -} -- To view, visit https://gerrit.wikimedia.org/r/176318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie669575cc373d1f3b67050d842c47a74e0a35457 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Hoo man 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.ui: Reorder styleguide sections - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.ui: Reorder styleguide sections .. mediawiki.ui: Reorder styleguide sections Mostly to have checkboxes and radio buttons in neighboring sections. Before: 1. Inputs 2. Buttons 3. Forms 4. Icons 5. Checkbox 6. Text & anchors 7. Radio After: 1. Text inputs 2. Buttons 3. Checkbox 4. Radio 5. Forms 6. Icons 7. Text & anchors Change-Id: I6b067eb90f5f05d7773c4879b87317436554701e --- M resources/src/mediawiki.ui/components/checkbox.less M resources/src/mediawiki.ui/components/forms.less M resources/src/mediawiki.ui/components/icons.less M resources/src/mediawiki.ui/components/inputs.less M resources/src/mediawiki.ui/components/radio.less 5 files changed, 26 insertions(+), 26 deletions(-) Approvals: Prtksxna: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.ui/components/checkbox.less b/resources/src/mediawiki.ui/components/checkbox.less index 67f8a21..ff454e1 100644 --- a/resources/src/mediawiki.ui/components/checkbox.less +++ b/resources/src/mediawiki.ui/components/checkbox.less @@ -11,23 +11,23 @@ // // Markup: // -// -// Standard checkbox +// +// Standard checkbox // // -// -// Standard checked checkbox +// +// Standard checked checkbox // // -// -// Disabled checkbox +// +// Disabled checkbox // // -// -// Disabled checked checkbox +// +// Disabled checked checkbox // // -// Styleguide 5. +// Styleguide 3. .mw-ui-checkbox { display: inline-block; vertical-align: middle; diff --git a/resources/src/mediawiki.ui/components/forms.less b/resources/src/mediawiki.ui/components/forms.less index 499b91a..dc49e20 100644 --- a/resources/src/mediawiki.ui/components/forms.less +++ b/resources/src/mediawiki.ui/components/forms.less @@ -15,7 +15,7 @@ // Forms // -// Styleguide 3. +// Styleguide 5. // VForm // @@ -34,7 +34,7 @@ // // // -// Styleguide 3.1. +// Styleguide 5.1. .mw-ui-vform { .box-sizing(border-box); @@ -102,7 +102,7 @@ // // // - // Styleguide 3.2. + // Styleguide 5.2. .error, .errorbox, .warningbox, diff --git a/resources/src/mediawiki.ui/components/icons.less b/resources/src/mediawiki.ui/components/icons.less index dc2ca52..0912554 100644 --- a/resources/src/mediawiki.ui/components/icons.less +++ b/resources/src/mediawiki.ui/components/icons.less @@ -26,7 +26,7 @@ // However, icon-only elements do not yet degrade to text-only elements in these // browsers. // -// Styleguide 4. +// Styleguide 6. .mw-ui-icon { position: relative; @@ -39,7 +39,7 @@ // OK // OK // - // Styleguide 4.1.1. + // Styleguide 6.1.1. &.mw-ui-icon-element { @width: @iconSize + ( 2 * @gutterWidth ); @@ -75,7 +75,7 @@ // OK // OK // - // Styleguide 4.1.2 + // Styleguide 6.1.2 &.mw-ui-icon-before { &:before { position: relative; @@ -89,7 +89,7 @@ // Markup: // OK // - // Styleguide 4.1.3 + // Styleguide 6.1.3 &.mw-ui-icon-after { &:after { position: relative; diff --git a/resources/src/mediawiki.ui/components/inputs.less b/resources/src/mediawiki.ui/components/inputs.less index 9f3a77d..28d597e 100644 --- a/resources/src/mediawiki.ui/components/inputs.less +++ b/resources/src/mediawiki.ui/components/inputs.less @@ -9,7 +9,7 @@ font-style: italic; font-weight: normal; } -// Inputs +// Text inputs // // Apply the mw-ui-input class to input and textarea fields. // diff --git a/resources/src/mediawiki.ui/components/radio.less b/resources/src/mediawiki.ui/components/radio.less index 328..425ec1b 100644 --- a/resources/src/mediawiki.ui/components/radio.less +++ b/resources/src/mediawiki.ui/components/radio.less @@ -11,23 +11,23 @@ // // Markup: // -// -// Standard radio +// +// Standard radio // // -// -// Standard checked radio +// +// Standard checked radio // // -// -// Disabled radio +// +// Disabled radio // // -// -// Disabled checked radio +// +// Disabled checked radio // // -// Styleguide 7. +// Styleguide 4. .mw-ui-radio { display: inline-block; vertical-align: middle; -- To view, visit https://gerrit.wikimedia.org/r/175031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b067eb90f5f05d7773c4879b87317436554701e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: jenkins-bot <>
[MediaWiki-commits] [Gerrit] [FIX] CFD: Only allow script to be run on enwp - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/176323 Change subject: [FIX] CFD: Only allow script to be run on enwp .. [FIX] CFD: Only allow script to be run on enwp This script only works on the English Wikipedia, so don't even start if not using that. Bug: T71015 Change-Id: I3abacb1746b7f02ab654be4a76ccfb2539e10f29 --- M scripts/cfd.py 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/23/176323/1 diff --git a/scripts/cfd.py b/scripts/cfd.py index 8687735..53a49aa 100644 --- a/scripts/cfd.py +++ b/scripts/cfd.py @@ -17,8 +17,9 @@ __version__ = '$Id$' # -import pywikibot import re +import pywikibot +from pywikibot import config2 as config import category # The location of the CFD working page. @@ -69,6 +70,10 @@ """ pywikibot.handle_args(args) +if config.family != 'wikipedia' or config.mylang != 'en': +pywikibot.warning('CFD does work only on the English Wikipedia.') +return + page = pywikibot.Page(pywikibot.Site(), cfdPage) # Variable declarations -- To view, visit https://gerrit.wikimedia.org/r/176323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3abacb1746b7f02ab654be4a76ccfb2539e10f29 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop using deprecateds method in TestChanges - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Stop using deprecateds method in TestChanges .. Stop using deprecateds method in TestChanges Change-Id: I2397e394254a664ed40e76520383496f6fe31ca7 --- M lib/tests/phpunit/changes/TestChanges.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/changes/TestChanges.php b/lib/tests/phpunit/changes/TestChanges.php index 0a67909..634c34d 100644 --- a/lib/tests/phpunit/changes/TestChanges.php +++ b/lib/tests/phpunit/changes/TestChanges.php @@ -37,13 +37,13 @@ protected static function getItem() { $item = Item::newEmpty(); - $item->setLabel( 'en', 'Venezuela' ); - $item->setDescription( 'en', 'a country' ); - $item->addAliases( 'en', array( 'Bolivarian Republic of Venezuela' ) ); + $item->getFingerprint()->setLabel( 'en', 'Venezuela' ); + $item->getFingerprint()->setDescription( 'en', 'a country' ); + $item->getFingerprint()->setAliasGroup( 'en', array( 'Bolivarian Republic of Venezuela' ) ); - $item->addSiteLink( new SiteLink( 'enwiki', 'Venezuela' ) ); - $item->addSiteLink( new SiteLink( 'jawiki', 'ベネズエラ' ) ); - $item->addSiteLink( new SiteLink( 'cawiki', 'Veneçuela' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Venezuela' ); + $item->getSiteLinkList()->addNewSiteLink( 'jawiki', 'ベネズエラ' ); + $item->getSiteLinkList()->addNewSiteLink( 'cawiki', 'Veneçuela' ); return $item; } -- To view, visit https://gerrit.wikimedia.org/r/175770 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2397e394254a664ed40e76520383496f6fe31ca7 Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Construct properties with a data type - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176322 Change subject: Construct properties with a data type .. Construct properties with a data type (Doing without is deprecated, so we can enforce type being set in the future) Change-Id: I48391fc617ec0a6423b7bfe3f94226dcbd8c1ffa --- M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php M repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php M repo/tests/phpunit/includes/View/ClaimsViewTest.php M repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/22/176322/1 diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php index 103abf5..3d0dbe7 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php @@ -214,7 +214,7 @@ } public function testApplyWithProperty() { - $property = Property::newEmpty(); + $property = Property::newFromType( 'string' ); $property->setId( new PropertyId( 'P73923' ) ); $statement = $this->makeStatement( $property, new PropertyNoValueSnak( 45 ) ); diff --git a/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php b/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php index 491fda2..fd7c4a4 100644 --- a/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php +++ b/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php @@ -50,7 +50,7 @@ $this->repo->putEntity( $item ); // a property - $prop = Property::newEmpty(); + $prop = Property::newFromType( 'string' ); $prop->setId( new PropertyId( 'P11' ) ); $this->repo->putEntity( $prop ); diff --git a/repo/tests/phpunit/includes/View/ClaimsViewTest.php b/repo/tests/phpunit/includes/View/ClaimsViewTest.php index 60a3343..74586c9 100644 --- a/repo/tests/phpunit/includes/View/ClaimsViewTest.php +++ b/repo/tests/phpunit/includes/View/ClaimsViewTest.php @@ -70,7 +70,7 @@ $store = WikibaseRepo::getDefaultInstance()->getEntityStore(); $testUser = new TestUser( 'WikibaseUser' ); - $property = Property::newEmpty(); + $property = Property::newFromType( 'string' ); $property->setLabel( 'en', "alert( 'omg!!!' );" ); $property->setDataTypeId( 'string' ); diff --git a/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php b/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php index 43e3500..f3f1c43 100644 --- a/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php +++ b/repo/tests/phpunit/includes/api/CreateRedirectModuleTest.php @@ -55,7 +55,7 @@ $this->repo->putEntity( $item ); // a property - $prop = Property::newEmpty(); + $prop = Property::newFromType( 'string' ); $prop->setId( new PropertyId( 'P11' ) ); $this->repo->putEntity( $prop ); -- To view, visit https://gerrit.wikimedia.org/r/176322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48391fc617ec0a6423b7bfe3f94226dcbd8c1ffa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop using deprecated Item::removeSiteLink method - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Stop using deprecated Item::removeSiteLink method .. Stop using deprecated Item::removeSiteLink method Change-Id: I974fdefb0b3ebd099e9cbf7df9aecc130cbe4e82 --- M client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php M lib/tests/phpunit/changes/TestChanges.php M lib/tests/phpunit/store/SiteLinkTableTest.php 3 files changed, 7 insertions(+), 7 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php index 3c187d2..ff99676 100644 --- a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php +++ b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php @@ -87,7 +87,7 @@ $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); - $item2->removeSiteLink( 'enwiki' ); + $item2->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -162,7 +162,7 @@ $item->getSiteLinkList()->addNewSiteLink( 'dewiki', 'Japan' ); $item2 = $item->copy(); - $item2->removeSiteLink( 'dewiki' ); + $item2->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); diff --git a/lib/tests/phpunit/changes/TestChanges.php b/lib/tests/phpunit/changes/TestChanges.php index 0a67909..ec93d79 100644 --- a/lib/tests/phpunit/changes/TestChanges.php +++ b/lib/tests/phpunit/changes/TestChanges.php @@ -127,8 +127,8 @@ $old = $new->copy(); // - - $new->removeSiteLink( 'enwiki' ); - $new->removeSiteLink( 'dewiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $link = new SiteLink( 'enwiki', "Emmy" ); $new->addSiteLink( $link, 'add' ); @@ -155,7 +155,7 @@ $changes['change-enwiki-sitelink-badges'] = $changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new ); $old = $new->copy(); - $new->removeSiteLink( 'dewiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $changes['remove-dewiki-sitelink'] = $changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new ); $old = $new->copy(); @@ -192,7 +192,7 @@ $changes['item-deletion-linked'] = $changeFactory->newFromUpdate( EntityChange::REMOVE, $old, null ); // - - $new->removeSiteLink( 'enwiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); $changes['remove-enwiki-sitelink'] = $changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new ); // apply all the defaults -- diff --git a/lib/tests/phpunit/store/SiteLinkTableTest.php b/lib/tests/phpunit/store/SiteLinkTableTest.php index 9d4fbac..a3f6b3e 100644 --- a/lib/tests/phpunit/store/SiteLinkTableTest.php +++ b/lib/tests/phpunit/store/SiteLinkTableTest.php @@ -83,7 +83,7 @@ // modify links, and save again $item->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'FooK' ); - $item->removeSiteLink( 'dewiki' ); + $item->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $item->getSiteLinkList()->addNewSiteLink( 'nlwiki', 'GrooK' ); $this->siteLinkTable->saveLinksOfItem( $item ); -- To view, visit https://gerrit.wikimedia.org/r/176314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I974fdefb0b3ebd099e9cbf7df9aecc130cbe4e82 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use Statement rank enum - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176321 Change subject: Use Statement rank enum .. Use Statement rank enum Change-Id: I7f8270b6854d4f95ddf272822ee1b434d11a1fa8 --- M client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/21/176321/1 diff --git a/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php b/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php index 180292e..b9bf4e6 100644 --- a/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php +++ b/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php @@ -57,7 +57,7 @@ ); $statement1 = $this->getTestStatement( $stringSnak ); - $statement1->setRank( Claim::RANK_PREFERRED ); + $statement1->setRank( Statement::RANK_PREFERRED ); $stringProperty->getStatements()->addStatement( $statement1 ); $this->mockRepository->putEntity( $stringProperty ); @@ -68,7 +68,7 @@ ); $statement2 = $this->getTestStatement( $stringSnak2 ); - $statement2->setRank( Claim::RANK_NORMAL ); + $statement2->setRank( Statement::RANK_NORMAL ); $siteLinks = array( $siteLink ); $siteLinks[] = new SiteLink( -- To view, visit https://gerrit.wikimedia.org/r/176321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f8270b6854d4f95ddf272822ee1b434d11a1fa8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use Statement rank enum - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176320 Change subject: Use Statement rank enum .. Use Statement rank enum Change-Id: I4bbcb43131be2dd723c8f272abd5ecec29518654 --- M repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/20/176320/1 diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php index 2c69b29..5bde95e 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php @@ -4,9 +4,9 @@ use Wikibase\ChangeOp\ChangeOpFactoryProvider; use Wikibase\ChangeOp\ChangeOpsMerge; -use Wikibase\DataModel\Claim\Claim; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Statement\Statement; use Wikibase\Repo\WikibaseRepo; use Wikibase\Validators\EntityConstraintProvider; @@ -246,7 +246,7 @@ 'q' => array( ), 'g' => 'Q111$D8404CDA-25E4-4334-AF13-A390BCD9C556', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -258,7 +258,7 @@ 'q' => array( ), 'g' => 'Q111$D8404CDA-25E4-4334-AF13-A390BCD9C556', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -270,7 +270,7 @@ 'q' => array( array( 'novalue', 56 ) ), 'g' => 'Q111$D8404CDA-25E4-4334-AF13-A3290BCD9C0F', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -282,7 +282,7 @@ 'q' => array( array( 'novalue', 56 ) ), 'g' => 'Q111$D8404CDA-25E4-4334-AF13-A3290BCD9C0F', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -299,7 +299,7 @@ 'q' => array( array( 'novalue', 88 ) ), 'g' => 'Q111$D8404CDA-25E4-4334-AF88-A3290BCD9C0F', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -316,7 +316,7 @@ 'q' => array( array( 'novalue', 88 ) ), 'g' => 'Q111$D8404CDA-25E4-4334-AF88-A3290BCD9C0F', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -336,7 +336,7 @@ 'q' => array( array( 'novalue', 88 ) ), 'g' => 'Q111$D8404CDA-25E4-4334-AF88-A3290BCD9C0F', 'refs' => array(), - 'rank' => Claim::RANK_NORMAL, + 'rank' => Statement::RANK_NORMAL, ) ), ), @@ -364,7 +364,7 @@ 'q' => array( array( 'novalue', 88 ) ), 'g' => 'Q111$D8404CDA-25E4-4334-AF88-A3290BCD9C0F', 'refs' => array(), -
[MediaWiki-commits] [Gerrit] Also propagate moves/deletions from non-Wikibase enabled nam... - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Also propagate moves/deletions from non-Wikibase enabled namespaces .. Also propagate moves/deletions from non-Wikibase enabled namespaces Per discussion with Lydia: If we start with invalid data, but end up with valid data there's no reason not to propagate the move. Same goes for deletions. Change-Id: I02ecfffa1c69b230171a89c44a7859ecba9eda3f --- M client/includes/hooks/UpdateRepoHookHandlers.php 1 file changed, 1 insertion(+), 7 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/client/includes/hooks/UpdateRepoHookHandlers.php b/client/includes/hooks/UpdateRepoHookHandlers.php index 2ad721e..a1b2180 100644 --- a/client/includes/hooks/UpdateRepoHookHandlers.php +++ b/client/includes/hooks/UpdateRepoHookHandlers.php @@ -205,11 +205,6 @@ * @return bool */ private function doArticleDeleteComplete( Title $title, User $user ) { - if ( !$this->isWikibaseEnabled( $title->getNamespace() ) ) { - // shorten out - return true; - } - if ( $this->propagateChangesToRepo !== true ) { return true; } @@ -249,8 +244,7 @@ * @return bool */ private function doTitleMoveComplete( Title $oldTitle, Title $newTitle, User $user ) { - if ( !$this->isWikibaseEnabled( $oldTitle->getNamespace() ) - && !$this->isWikibaseEnabled( $newTitle->getNamespace() ) ) { + if ( !$this->isWikibaseEnabled( $newTitle->getNamespace() ) ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/176290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02ecfffa1c69b230171a89c44a7859ecba9eda3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man Gerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move UpdateRepo hook handlers into a dedicated class - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Move UpdateRepo hook handlers into a dedicated class .. Move UpdateRepo hook handlers into a dedicated class Change-Id: I60ab88d3d43d9981ee71412a569bb21bfc2bbd30 --- M client/WikibaseClient.hooks.php M client/WikibaseClient.php A client/includes/hooks/UpdateRepoHookHandlers.php 3 files changed, 290 insertions(+), 164 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 58bda4c..5cc19e5 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -8,11 +8,8 @@ use Content; use FormOptions; use IContextSource; -use JobQueueGroup; -use ManualLogEntry; use Message; use MovePageForm; -use MWException; use OutputPage; use Parser; use QuickTemplate; @@ -685,165 +682,6 @@ $pageInfo = $infoActionHookHandler->handle( $context, $pageInfo ); - return true; - } - - /** -* After a page has been moved also update the item on the repo -* This only works with CentralAuth -* -* @see https://www.mediawiki.org/wiki/Manual:Hooks/TitleMoveComplete -* -* @param Title $oldTitle -* @param Title $newTitle -* @param User $user -* @param integer $pageId database ID of the page that's been moved -* @param integer $redirectId database ID of the created redirect -* @param string $reason -* -* @return bool -*/ - public static function onTitleMoveComplete( - Title $oldTitle, - Title $newTitle, - User $user, - $pageId, - $redirectId, - $reason - ) { - - if ( !self::isWikibaseEnabled( $oldTitle->getNamespace() ) - && !self::isWikibaseEnabled( $newTitle->getNamespace() ) ) { - // shorten out - return true; - } - - wfProfileIn( __METHOD__ ); - - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient->getSettings(); - - if ( $settings->getSetting( 'propagateChangesToRepo' ) !== true ) { - wfProfileOut( __METHOD__ ); - return true; - } - - $repoDB = $settings->getSetting( 'repoDatabase' ); - $siteLinkLookup = $wikibaseClient->getStore()->getSiteLinkTable(); - $jobQueueGroup = JobQueueGroup::singleton( $repoDB ); - - if ( !$jobQueueGroup ) { - wfLogWarning( "Failed to acquire a JobQueueGroup for $repoDB" ); - wfProfileOut( __METHOD__ ); - return true; - } - - $updateRepo = new UpdateRepoOnMove( - $repoDB, - $siteLinkLookup, - $user, - $settings->getSetting( 'siteGlobalID' ), - $oldTitle, - $newTitle - ); - - if ( !$updateRepo || !$updateRepo->getEntityId() || !$updateRepo->userIsValidOnRepo() ) { - wfProfileOut( __METHOD__ ); - return true; - } - - try { - $updateRepo->injectJob( $jobQueueGroup ); - - // To be able to find out about this in the SpecialMovepageAfterMove hook - $newTitle->wikibasePushedMoveToRepo = true; - } catch( MWException $e ) { - // This is not a reason to let an exception bubble up, we just - // show a message to the user that the Wikibase item needs to be - // manually updated. - wfLogWarning( $e->getMessage() ); - } - - wfProfileOut( __METHOD__ ); - return true; - } - - /** -* After a page has been deleted also update the item on the repo -* This only works with CentralAuth -* -* @see https://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete -* -* @param WikiPage $article -* @param User $user -* @param string $reason -* @param int $id id of the article that was deleted -* @param Content $content -* @param ManualLogEntry $logEntry -* -* @return bool -*/ - public static function onArticleDeleteComplete( - WikiPage &$article, - User &$user, - $reason, - $id, - Content $content, - ManualLogEntry $logEntry - ) { - $title = $article->ge
[MediaWiki-commits] [Gerrit] mediawiki.ui: Synchronise checkbox and radio code - change (mediawiki/core)
Prtksxna has submitted this change and it was merged. Change subject: mediawiki.ui: Synchronise checkbox and radio code .. mediawiki.ui: Synchronise checkbox and radio code Get rid of tiny meaningless differences. Change-Id: I78b3bf378bae1fce11b6ef4f85f7449421211721 --- M resources/src/mediawiki.ui/components/checkbox.less M resources/src/mediawiki.ui/components/radio.less 2 files changed, 21 insertions(+), 15 deletions(-) Approvals: Prtksxna: Looks good to me, approved diff --git a/resources/src/mediawiki.ui/components/checkbox.less b/resources/src/mediawiki.ui/components/checkbox.less index b479020..67f8a21 100644 --- a/resources/src/mediawiki.ui/components/checkbox.less +++ b/resources/src/mediawiki.ui/components/checkbox.less @@ -11,16 +11,20 @@ // // Markup: // -// Standard checkbox +// +// Standard checkbox // // -// Standard checked checkbox +// +// Standard checked checkbox // // -// Disabled checkbox +// +// Disabled checkbox // // -// Disabled checked checkbox +// +// Disabled checked checkbox // // // Styleguide 5. @@ -52,12 +56,13 @@ height: @checkboxSize; // This is needed for Firefox mobile (See bug 71750 to workaround default Firefox stylesheet) max-width: none; - margin-right: .4em; + margin-right: 0.4em; // the pseudo before element of the label after the checkbox now looks like a checkbox & + label::before { content: ''; cursor: pointer; + .box-sizing(border-box); position: absolute; left: 0; border-radius: @borderRadius; @@ -65,7 +70,6 @@ height: @checkboxSize; background-color: #fff; border: 1px solid @colorGray7; - .box-sizing(border-box); } // when the input is checked, style the label pseudo before element that followed as a checked checkbox @@ -86,6 +90,7 @@ border-width: 2px; } + &:focus:hover + label::before, &:hover + label::before { border-bottom-width: 3px; } diff --git a/resources/src/mediawiki.ui/components/radio.less b/resources/src/mediawiki.ui/components/radio.less index 6d8978e..328 100644 --- a/resources/src/mediawiki.ui/components/radio.less +++ b/resources/src/mediawiki.ui/components/radio.less @@ -42,6 +42,7 @@ line-height: @radioSize; * { + // reset font sizes (see bug 72727) font: inherit; vertical-align: middle; } @@ -59,8 +60,8 @@ // the pseudo before element of the label after the radio now looks like a radio & + label::before { - cursor: pointer; content: ''; + cursor: pointer; .box-sizing(border-box); position: absolute; left: 0; @@ -80,6 +81,11 @@ background-origin: border-box; } + &:active + label::before { + background-color: @colorGray13; + border-color: @colorGray13; + } + &:focus + label::before { border-width: 2px; } @@ -89,19 +95,14 @@ border-bottom-width: 3px; } - &:active + label::before { - background-color: @colorGray13; - border-color: @colorGray13; - } - - // disabled checked boxes have a gray background + // disabled radios have a gray background &:disabled + label::before { cursor: default; - border-color: @colorGray14; background-color: @colorGray14; + border-color: @colorGray14; } - // disabled and checked boxes have a white circle + // disabled and checked radios have a white circle &:disabled:checked + label::before { .background-image-svg('images/radio_disabled.svg', 'images/radio_disabled.png'); } -- To view, visit https://gerrit.wikimedia.org/r/175030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78b3bf378bae1fce11b6ef4f85f7449421211721 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jack Pho
[MediaWiki-commits] [Gerrit] Fix typo in classname - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176319 Change subject: Fix typo in classname .. Fix typo in classname Change-Id: I2e9ba46c50f3746f733d41d30132520dd4875b82 --- M repo/maintenance/createBlacklistedItems.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/19/176319/1 diff --git a/repo/maintenance/createBlacklistedItems.php b/repo/maintenance/createBlacklistedItems.php index aea62d5..3e827b0 100644 --- a/repo/maintenance/createBlacklistedItems.php +++ b/repo/maintenance/createBlacklistedItems.php @@ -17,7 +17,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroended...@gmail.com > */ -class CreatedBlacklistedItems extends \Maintenance { +class CreateBlacklistedItems extends \Maintenance { public function __construct() { $this->mDescription = 'Created blacklisted items'; -- To view, visit https://gerrit.wikimedia.org/r/176319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e9ba46c50f3746f733d41d30132520dd4875b82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove no longer used class - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176318 Change subject: Remove no longer used class .. Remove no longer used class Change-Id: Ie669575cc373d1f3b67050d842c47a74e0a35457 --- D repo/tests/phpunit/TestItemContents.php 1 file changed, 0 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/18/176318/1 diff --git a/repo/tests/phpunit/TestItemContents.php b/repo/tests/phpunit/TestItemContents.php deleted file mode 100644 index b0ee093..000 --- a/repo/tests/phpunit/TestItemContents.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -final class TestItemContents { - - /** -* @return ItemContent[] -*/ - public static function getItems() { - return array_map( - '\Wikibase\ItemContent::newFromItem', - self::getItemObjects() - ); - } - - private static function getItemObjects() { - $items = array(); - - $items[] = Item::newEmpty(); - - $item = Item::newEmpty(); - - $item->setDescription( 'en', 'foo' ); - $item->setLabel( 'en', 'bar' ); - - $items[] = $item; - - $item = Item::newEmpty(); - - $item->addAliases( 'en', array( 'foobar', 'baz' ) ); - - $items[] = $item; - - $item = Item::newEmpty(); - $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'spam' ); - - $items[] = $item; - - $item = Item::newEmpty(); - $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'spamz' ); - $item->getSiteLinkList()->addNewSiteLink( 'dewiki', 'foobar' ); - - $item->setDescription( 'en', 'foo' ); - $item->setLabel( 'en', 'bar' ); - - $item->addAliases( 'en', array( 'foobar', 'baz' ) ); - $item->addAliases( 'de', array( 'foobar', 'spam' ) ); - - $items[] = $item; - - return $items; - } - -} -- To view, visit https://gerrit.wikimedia.org/r/176318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie669575cc373d1f3b67050d842c47a74e0a35457 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop using deprecated methods in importInterlang - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176317 Change subject: Stop using deprecated methods in importInterlang .. Stop using deprecated methods in importInterlang Change-Id: I1127a6335f3bdc204fd3b3c15687056f42203b69 --- M repo/maintenance/importInterlang.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/17/176317/1 diff --git a/repo/maintenance/importInterlang.php b/repo/maintenance/importInterlang.php index e8dc823..9237758 100644 --- a/repo/maintenance/importInterlang.php +++ b/repo/maintenance/importInterlang.php @@ -15,7 +15,6 @@ */ use Wikibase\DataModel\Entity\Item; -use Wikibase\DataModel\SiteLink; use Wikibase\Lib\Store\EntityStore; use Wikibase\Repo\WikibaseRepo; @@ -24,6 +23,7 @@ require_once $basePath . '/maintenance/Maintenance.php'; class importInterlang extends Maintenance { + protected $verbose = false; protected $ignore_errors = false; protected $skip = 0; @@ -141,8 +141,8 @@ $name = strtr( $title, "_", " " ); $label = preg_replace( '/ *\(.*\)$/u', '', $name ); - $item->setLabel( $lang, $label ); - $item->addSiteLink( new SiteLink( $lang . 'wiki', $name ) ); + $item->getFingerprint()->setLabel( $lang, $label ); + $item->getSiteLinkList()->addNewSiteLink( $lang . 'wiki', $name ); } try { -- To view, visit https://gerrit.wikimedia.org/r/176317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1127a6335f3bdc204fd3b3c15687056f42203b69 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix broken CreatedBlacklistedItems - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176316 Change subject: Fix broken CreatedBlacklistedItems .. Fix broken CreatedBlacklistedItems Item was not referenced. Also removed usage of deprecated methods Change-Id: Ie08a2436709e95acd04d0a0a8995cc53ea00e08d --- M repo/maintenance/createBlacklistedItems.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/16/176316/1 diff --git a/repo/maintenance/createBlacklistedItems.php b/repo/maintenance/createBlacklistedItems.php index 3d57b6c..aea62d5 100644 --- a/repo/maintenance/createBlacklistedItems.php +++ b/repo/maintenance/createBlacklistedItems.php @@ -2,7 +2,7 @@ namespace Wikibase; -use Wikibase\DataModel\SiteLink; +use Wikibase\DataModel\Entity\Item; use Wikibase\Repo\WikibaseRepo; $basePath = getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) : __DIR__ . '/../../../..'; @@ -70,8 +70,8 @@ $item = Item::newEmpty(); $item->setId( $id ); - $item->setLabel( 'en', $name ); - $item->addSiteLink( new SiteLink( 'enwiki', $name ) ); + $item->getFingerprint()->setLabel( 'en', $name ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', $name ); $store->saveEntity( $item, 'Import', $user, EDIT_NEW ); } -- To view, visit https://gerrit.wikimedia.org/r/176316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie08a2436709e95acd04d0a0a8995cc53ea00e08d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix broken @see in Number(Un)Localizer doc - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Fix broken @see in Number(Un)Localizer doc .. Fix broken @see in Number(Un)Localizer doc Also see https://github.com/DataValues/Number/pull/14 Change-Id: Iad716fb67f14980b35ab32e2a333cfb00a8eee81 --- M lib/includes/formatters/MediaWikiNumberLocalizer.php M lib/includes/parsers/MediaWikiNumberUnlocalizer.php 2 files changed, 11 insertions(+), 13 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/lib/includes/formatters/MediaWikiNumberLocalizer.php b/lib/includes/formatters/MediaWikiNumberLocalizer.php index c23eeb3..a6c0d70 100644 --- a/lib/includes/formatters/MediaWikiNumberLocalizer.php +++ b/lib/includes/formatters/MediaWikiNumberLocalizer.php @@ -19,7 +19,7 @@ /** * @var Language */ - protected $language; + private $language; /** * @param Language $language @@ -29,17 +29,16 @@ } /** -* @see Localizer::localize() +* @see NumberLocalizer::localizeNumber * -* @since 0.5 +* @param string|int|float $number * -* @param string $number a numeric string -* -* @return string * @throws InvalidArgumentException +* @return string */ public function localizeNumber( $number ) { - $localiezdNumber = $this->language->formatNum( $number ); - return $localiezdNumber; + $localizedNumber = $this->language->formatNum( $number ); + return $localizedNumber; } + } diff --git a/lib/includes/parsers/MediaWikiNumberUnlocalizer.php b/lib/includes/parsers/MediaWikiNumberUnlocalizer.php index 25e91e0..691bf2e 100644 --- a/lib/includes/parsers/MediaWikiNumberUnlocalizer.php +++ b/lib/includes/parsers/MediaWikiNumberUnlocalizer.php @@ -1,12 +1,11 @@ language->parseFormattedNumber( $number ); @@ -52,7 +51,7 @@ } /** -* @see Unlocalizer::getNumberRegex() +* @see NumberUnlocalizer::getNumberRegex * * Constructs a regular expression based on Language::digitTransformTable() * and Language::separatorTransformTable(). -- To view, visit https://gerrit.wikimedia.org/r/176230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad716fb67f14980b35ab32e2a333cfb00a8eee81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Hoo man Gerrit-Reviewer: JanZerebecki Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove usages of deprecated setLabel method - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Remove usages of deprecated setLabel method .. Remove usages of deprecated setLabel method Change-Id: I60bbb4faea5c75d66a9cde56b79cb2c0c34f5ce3 --- M lib/tests/phpunit/MockRepositoryTest.php M repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php M repo/tests/phpunit/includes/EditEntityTest.php M repo/tests/phpunit/includes/EntityViewTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 6 files changed, 26 insertions(+), 18 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/MockRepositoryTest.php b/lib/tests/phpunit/MockRepositoryTest.php index 633ad95..53ba960 100644 --- a/lib/tests/phpunit/MockRepositoryTest.php +++ b/lib/tests/phpunit/MockRepositoryTest.php @@ -563,7 +563,7 @@ $this->assertEquals( $entity->getLabels(), $this->repo->getEntity( $entity->getId() )->getLabels() ); // test we can't mess with entities in the repo - $entity->setLabel( 'en', 'STRANGE' ); + $entity->getFingerprint()->setLabel( 'en', 'STRANGE' ); $entity = $this->repo->getEntity( $entity->getId() ); $this->assertNotNull( $entity ); $this->assertNotEquals( 'STRANGE', $entity->getLabel( 'en' ) ); diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php index 3f929ac..9112318 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php @@ -57,7 +57,7 @@ */ public function testApply( ChangeOp $changeOpLabel, $expectedLabel ) { $entity = $this->provideNewEntity(); - $entity->setLabel( 'en', 'INVALID' ); + $entity->getFingerprint()->setLabel( 'en', 'INVALID' ); $changeOpLabel->apply( $entity ); @@ -115,11 +115,11 @@ $args = array(); $entity = $this->provideNewEntity(); - $entity->setLabel( 'de', 'Test' ); + $entity->getFingerprint()->setLabel( 'de', 'Test' ); $args[] = array ( $entity, new ChangeOpLabel( 'de', 'Zusammenfassung', $validatorFactory ), 'set', 'de' ); $entity = $this->provideNewEntity(); - $entity->setLabel( 'de', 'Test' ); + $entity->getFingerprint()->setLabel( 'de', 'Test' ); $args[] = array ( $entity, new ChangeOpLabel( 'de', null, $validatorFactory ), 'remove', 'de' ); $entity = $this->provideNewEntity(); diff --git a/repo/tests/phpunit/includes/EditEntityTest.php b/repo/tests/phpunit/includes/EditEntityTest.php index e976dc9..0daedb9 100644 --- a/repo/tests/phpunit/includes/EditEntityTest.php +++ b/repo/tests/phpunit/includes/EditEntityTest.php @@ -339,13 +339,13 @@ // create item $entity = Item::newEmpty(); - $entity->setLabel( 'en', 'Test' ); + $entity->getFingerprint()->setLabel( 'en', 'Test' ); $repo->putEntity( $entity, 0, 0, $user ); // begin editing the entity $entity = $entity->copy(); - $entity->setLabel( 'en', 'Trust' ); + $entity->getFingerprint()->setLabel( 'en', 'Trust' ); $editEntity = $this->makeEditEntity( $repo, $entity, $user, $baseRevId ); $editEntity->getLatestRevision(); // make sure EditEntity has page and revision diff --git a/repo/tests/phpunit/includes/EntityViewTest.php b/repo/tests/phpunit/includes/EntityViewTest.php index 65917c9..2e1490d 100644 --- a/repo/tests/phpunit/includes/EntityViewTest.php +++ b/repo/tests/phpunit/includes/EntityViewTest.php @@ -296,8 +296,8 @@ */ protected function getTestEntity() { $entity = $this->makeEntity( $this->makeEntityId( 22 ) ); - $entity->setLabel( 'de', 'fuh' ); - $entity->setLabel( 'en', 'foo' ); + $entity->getFingerprint()->setLabel( 'de', 'fuh' ); + $entity->getFingerprint()->setLabel( 'en', 'foo' ); $entity->setDescription( 'de', 'fuh barr' ); $entity->setDescription( 'en', 'foo bar' ); diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index f325f36..5978d49 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -12,6 +12,7 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Term\Fingerprint; use Wikibase\EntityRevision; use Wikibase\
[MediaWiki-commits] [Gerrit] Remove usages of deprecated setSiteLink method - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove usages of deprecated setSiteLink method .. Remove usages of deprecated setSiteLink method Change-Id: I40069ec11f30fbb2c5d75d84b91cf46f60a05795 --- M client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php M lib/tests/phpunit/MockRepositoryTest.php M lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php M lib/tests/phpunit/store/SiteLinkTableTest.php M repo/tests/phpunit/TestItemContents.php M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php M repo/tests/phpunit/includes/ItemSearchTextGeneratorTest.php M repo/tests/phpunit/includes/Validators/SiteLinkUniquenessValidatorTest.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php M repo/tests/phpunit/includes/api/EntityTestHelper.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php M repo/tests/phpunit/includes/content/ItemContentTest.php M repo/tests/phpunit/includes/content/ItemHandlerTest.php M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php 15 files changed, 79 insertions(+), 78 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php index 41de08e..3c187d2 100644 --- a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php +++ b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php @@ -74,7 +74,7 @@ protected function getConnectDiff() { $item = $this->getNewItem(); $item2 = $item->copy(); - $item2->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -84,7 +84,7 @@ protected function getUnlinkDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); $item2->removeSiteLink( 'enwiki' ); @@ -97,10 +97,10 @@ protected function getLinkChangeDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); - $item2->addSiteLink( new SiteLink( 'enwiki', 'Tokyo' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Tokyo' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -118,7 +118,7 @@ protected function getBadgeChangeDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); $item2->addSiteLink( new SiteLink( 'enwiki', 'Japan', array( new ItemId( 'Q17' ) ) ) ); @@ -131,10 +131,10 @@ protected function getAddLinkDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $item->copy(); - $item2->addSiteLink( new SiteLink( 'dewiki', 'Japan' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'dewiki', 'Japan' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -144,11 +144,11 @@ protected function getAddMultipleLinksDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $item->copy(); - $item2->addSiteLink( new SiteLink( 'dewiki', 'Japan' ) ); - $item2->addSiteLink( new SiteLink( 'frwiki', 'Japan' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'dewiki', 'Japan' ); + $item2->getSiteLinkList()->addNewSiteLink( 'frwiki', 'Japan' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -158,8 +158,8 @@ protected function getRemoveLinkDif
[MediaWiki-commits] [Gerrit] Remove assumption that all entities have a fingerprint - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove assumption that all entities have a fingerprint .. Remove assumption that all entities have a fingerprint Change-Id: Ide4db1e0e95bae4306ba109aa2f560a0f5d0acf8 --- M lib/includes/store/EntityRetrievingTermLookup.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/EntityRetrievingTermLookup.php b/lib/includes/store/EntityRetrievingTermLookup.php index 5f65d1d..17e0f01 100644 --- a/lib/includes/store/EntityRetrievingTermLookup.php +++ b/lib/includes/store/EntityRetrievingTermLookup.php @@ -5,6 +5,7 @@ use OutOfBoundsException; use Wikibase\DataModel\Term\Fingerprint; use Wikibase\DataModel\Entity\EntityId; +use Wikibase\DataModel\Term\FingerprintProvider; /** * @since 0.5 @@ -123,7 +124,7 @@ throw new StorageException( "An Entity with the id $entityId could not be loaded" ); } - return $entity->getFingerprint(); + return $entity instanceof FingerprintProvider ? $entity->getFingerprint() : Fingerprint::newEmpty(); } } -- To view, visit https://gerrit.wikimedia.org/r/175766 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide4db1e0e95bae4306ba109aa2f560a0f5d0acf8 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove usages of deprecated setLabel method - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176315 Change subject: Remove usages of deprecated setLabel method .. Remove usages of deprecated setLabel method Change-Id: I60bbb4faea5c75d66a9cde56b79cb2c0c34f5ce3 --- M lib/tests/phpunit/MockRepositoryTest.php M repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php M repo/tests/phpunit/includes/EditEntityTest.php M repo/tests/phpunit/includes/EntityViewTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 6 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/176315/1 diff --git a/lib/tests/phpunit/MockRepositoryTest.php b/lib/tests/phpunit/MockRepositoryTest.php index 633ad95..53ba960 100644 --- a/lib/tests/phpunit/MockRepositoryTest.php +++ b/lib/tests/phpunit/MockRepositoryTest.php @@ -563,7 +563,7 @@ $this->assertEquals( $entity->getLabels(), $this->repo->getEntity( $entity->getId() )->getLabels() ); // test we can't mess with entities in the repo - $entity->setLabel( 'en', 'STRANGE' ); + $entity->getFingerprint()->setLabel( 'en', 'STRANGE' ); $entity = $this->repo->getEntity( $entity->getId() ); $this->assertNotNull( $entity ); $this->assertNotEquals( 'STRANGE', $entity->getLabel( 'en' ) ); diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php index 3f929ac..9112318 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpLabelTest.php @@ -57,7 +57,7 @@ */ public function testApply( ChangeOp $changeOpLabel, $expectedLabel ) { $entity = $this->provideNewEntity(); - $entity->setLabel( 'en', 'INVALID' ); + $entity->getFingerprint()->setLabel( 'en', 'INVALID' ); $changeOpLabel->apply( $entity ); @@ -115,11 +115,11 @@ $args = array(); $entity = $this->provideNewEntity(); - $entity->setLabel( 'de', 'Test' ); + $entity->getFingerprint()->setLabel( 'de', 'Test' ); $args[] = array ( $entity, new ChangeOpLabel( 'de', 'Zusammenfassung', $validatorFactory ), 'set', 'de' ); $entity = $this->provideNewEntity(); - $entity->setLabel( 'de', 'Test' ); + $entity->getFingerprint()->setLabel( 'de', 'Test' ); $args[] = array ( $entity, new ChangeOpLabel( 'de', null, $validatorFactory ), 'remove', 'de' ); $entity = $this->provideNewEntity(); diff --git a/repo/tests/phpunit/includes/EditEntityTest.php b/repo/tests/phpunit/includes/EditEntityTest.php index e976dc9..0daedb9 100644 --- a/repo/tests/phpunit/includes/EditEntityTest.php +++ b/repo/tests/phpunit/includes/EditEntityTest.php @@ -339,13 +339,13 @@ // create item $entity = Item::newEmpty(); - $entity->setLabel( 'en', 'Test' ); + $entity->getFingerprint()->setLabel( 'en', 'Test' ); $repo->putEntity( $entity, 0, 0, $user ); // begin editing the entity $entity = $entity->copy(); - $entity->setLabel( 'en', 'Trust' ); + $entity->getFingerprint()->setLabel( 'en', 'Trust' ); $editEntity = $this->makeEditEntity( $repo, $entity, $user, $baseRevId ); $editEntity->getLatestRevision(); // make sure EditEntity has page and revision diff --git a/repo/tests/phpunit/includes/EntityViewTest.php b/repo/tests/phpunit/includes/EntityViewTest.php index 65917c9..2e1490d 100644 --- a/repo/tests/phpunit/includes/EntityViewTest.php +++ b/repo/tests/phpunit/includes/EntityViewTest.php @@ -296,8 +296,8 @@ */ protected function getTestEntity() { $entity = $this->makeEntity( $this->makeEntityId( 22 ) ); - $entity->setLabel( 'de', 'fuh' ); - $entity->setLabel( 'en', 'foo' ); + $entity->getFingerprint()->setLabel( 'de', 'fuh' ); + $entity->getFingerprint()->setLabel( 'en', 'foo' ); $entity->setDescription( 'de', 'fuh barr' ); $entity->setDescription( 'en', 'foo bar' ); diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index f325f36..8bb176f 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -47,7 +47,7 @@ $entity = Item::newEmpty(); $entities['terms'] = $entity; - $entity->setLabel( 'en', 'Berlin' );
[MediaWiki-commits] [Gerrit] Stop using deprecated Item::removeSiteLink method - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176314 Change subject: Stop using deprecated Item::removeSiteLink method .. Stop using deprecated Item::removeSiteLink method Change-Id: I974fdefb0b3ebd099e9cbf7df9aecc130cbe4e82 --- M client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php M lib/tests/phpunit/changes/TestChanges.php M lib/tests/phpunit/store/SiteLinkTableTest.php 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/14/176314/1 diff --git a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php index 41de08e..ab1a591 100644 --- a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php +++ b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php @@ -87,7 +87,7 @@ $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); $item2 = $this->getNewItem(); - $item2->removeSiteLink( 'enwiki' ); + $item2->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -162,7 +162,7 @@ $item->addSiteLink( new SiteLink( 'dewiki', 'Japan' ) ); $item2 = $item->copy(); - $item2->removeSiteLink( 'dewiki' ); + $item2->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); diff --git a/lib/tests/phpunit/changes/TestChanges.php b/lib/tests/phpunit/changes/TestChanges.php index 0a67909..ec93d79 100644 --- a/lib/tests/phpunit/changes/TestChanges.php +++ b/lib/tests/phpunit/changes/TestChanges.php @@ -127,8 +127,8 @@ $old = $new->copy(); // - - $new->removeSiteLink( 'enwiki' ); - $new->removeSiteLink( 'dewiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $link = new SiteLink( 'enwiki', "Emmy" ); $new->addSiteLink( $link, 'add' ); @@ -155,7 +155,7 @@ $changes['change-enwiki-sitelink-badges'] = $changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new ); $old = $new->copy(); - $new->removeSiteLink( 'dewiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $changes['remove-dewiki-sitelink'] = $changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new ); $old = $new->copy(); @@ -192,7 +192,7 @@ $changes['item-deletion-linked'] = $changeFactory->newFromUpdate( EntityChange::REMOVE, $old, null ); // - - $new->removeSiteLink( 'enwiki' ); + $new->getSiteLinkList()->removeLinkWithSiteId( 'enwiki' ); $changes['remove-enwiki-sitelink'] = $changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new ); // apply all the defaults -- diff --git a/lib/tests/phpunit/store/SiteLinkTableTest.php b/lib/tests/phpunit/store/SiteLinkTableTest.php index 8f55dd4..40d2f27 100644 --- a/lib/tests/phpunit/store/SiteLinkTableTest.php +++ b/lib/tests/phpunit/store/SiteLinkTableTest.php @@ -82,7 +82,7 @@ // modify links, and save again $item->addSiteLink( new SiteLink( 'enwiki', 'FooK' ) ); - $item->removeSiteLink( 'dewiki' ); + $item->getSiteLinkList()->removeLinkWithSiteId( 'dewiki' ); $item->addSiteLink( new SiteLink( 'nlwiki', 'GrooK' ) ); $this->siteLinkTable->saveLinksOfItem( $item ); -- To view, visit https://gerrit.wikimedia.org/r/176314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I974fdefb0b3ebd099e9cbf7df9aecc130cbe4e82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove usages of deprecated setSiteLink method - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/176313 Change subject: Remove usages of deprecated setSiteLink method .. Remove usages of deprecated setSiteLink method Change-Id: I40069ec11f30fbb2c5d75d84b91cf46f60a05795 --- M client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php M lib/tests/phpunit/MockRepositoryTest.php M lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php M lib/tests/phpunit/store/SiteLinkTableTest.php M repo/tests/phpunit/TestItemContents.php M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php M repo/tests/phpunit/includes/ItemSearchTextGeneratorTest.php M repo/tests/phpunit/includes/Validators/SiteLinkUniquenessValidatorTest.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php M repo/tests/phpunit/includes/api/EntityTestHelper.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php M repo/tests/phpunit/includes/content/ItemContentTest.php M repo/tests/phpunit/includes/content/ItemHandlerTest.php M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php 15 files changed, 77 insertions(+), 77 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/13/176313/1 diff --git a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php index 41de08e..3c187d2 100644 --- a/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php +++ b/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php @@ -74,7 +74,7 @@ protected function getConnectDiff() { $item = $this->getNewItem(); $item2 = $item->copy(); - $item2->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -84,7 +84,7 @@ protected function getUnlinkDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); $item2->removeSiteLink( 'enwiki' ); @@ -97,10 +97,10 @@ protected function getLinkChangeDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); - $item2->addSiteLink( new SiteLink( 'enwiki', 'Tokyo' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Tokyo' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -118,7 +118,7 @@ protected function getBadgeChangeDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $this->getNewItem(); $item2->addSiteLink( new SiteLink( 'enwiki', 'Japan', array( new ItemId( 'Q17' ) ) ) ); @@ -131,10 +131,10 @@ protected function getAddLinkDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $item->copy(); - $item2->addSiteLink( new SiteLink( 'dewiki', 'Japan' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'dewiki', 'Japan' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@ -144,11 +144,11 @@ protected function getAddMultipleLinksDiff() { $item = $this->getNewItem(); - $item->addSiteLink( new SiteLink( 'enwiki', 'Japan' ) ); + $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 'Japan' ); $item2 = $item->copy(); - $item2->addSiteLink( new SiteLink( 'dewiki', 'Japan' ) ); - $item2->addSiteLink( new SiteLink( 'frwiki', 'Japan' ) ); + $item2->getSiteLinkList()->addNewSiteLink( 'dewiki', 'Japan' ); + $item2->getSiteLinkList()->addNewSiteLink( 'frwiki', 'Japan' ); $changeFactory = TestChanges::getEntityChangeFactory(); $change = $changeFactory->newFromUpdate( ItemChange::UPDATE, $item, $item2 ); @@
[MediaWiki-commits] [Gerrit] Update Metrolook - change (mediawiki...Metrolook)
Paladox has submitted this change and it was merged. Change subject: Update Metrolook .. Update Metrolook * Includes bug fixes and new features. Please see README.md for new setting. * Adds support for composer. Change-Id: I647d48c0b81dca734041159391b7e210af85ec06 --- M Metrolook.php M MetrolookTemplate.php M README.md M composer.json 4 files changed, 37 insertions(+), 33 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/Metrolook.php b/Metrolook.php index 8d1d8e3..e27e628 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -21,61 +21,61 @@ * @ingroup Skins */ -$wgExtensionCredits['skin'][] = array( +$GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' => __FILE__, 'name' => 'Metrolook', 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '1.3.6', + 'version' => '1.3.7', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', ); // Register files -$wgAutoloadClasses['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; -$wgAutoloadClasses['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; +$GLOBALS['wgAutoloadClasses']['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; +$GLOBALS['wgAutoloadClasses']['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; // Register skin -$wgValidSkinNames['metrolook'] = 'Metrolook'; +$GLOBALS['wgValidSkinNames']['metrolook'] = 'Metrolook'; -/* To enable logo. Note that if enabled it will not show properly.*/ -$Logoshow = false; +/* Logo is off by default to turn it on plase see README.md. Note that if enabled it will not show properly.*/ +$GLOBALS['logo'] = false; /* to enable search bar on the sidebar and disables the search bar on the top bar */ -$SearchBar = true; +$GLOBALS['SearchBar'] = true; -$DownArrow = true; +$GLOBALS['DownArrow'] = true; -$link1 = true; +$GLOBALS['Line'] = true; -$image1 = true; +$GLOBALS['link1'] = true; -$link2 = true; +$GLOBALS['image1'] = true; -$image2 = true; +$GLOBALS['link2'] = true; -$link3 = true; +$GLOBALS['image2'] = true; -$image3 = true; +$GLOBALS['link3'] = true; -$link4 = true; +$GLOBALS['image3'] = true; -$image4 = true; +$GLOBALS['link4'] = true; -$link5 = false; +$GLOBALS['image4'] = true; -$image5 = false; +$GLOBALS['link5'] = false; -$link6 = false; +$GLOBALS['image5'] = false; -$image6 = false; +$GLOBALS['link6'] = false; -$UploadButton = true; +$GLOBALS['image6'] = false; -$logo = false; +$GLOBALS['UploadButton'] = false; // Register modules -$wgResourceModules['skins.metrolook.styles'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.styles'] = array( 'styles' => array( 'Metrolook/screen.less' => array( 'media' => 'screen' ), 'Metrolook/screen-hd.less' => array( 'media' => 'screen and (min-width: 982px)' ), @@ -85,7 +85,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.js'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.js'] = array( 'scripts' => array( 'Metrolook/collapsibleTabs.js', 'Metrolook/vector.js', @@ -97,7 +97,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.collapsibleNav'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.collapsibleNav'] = array( 'scripts' => array( 'Metrolook/collapsibleNav.js', ), diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index 787c6fc..929dda4 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -38,9 +38,10 @@ */ public function execute() { global $wgVectorUseIconWatch; - global $Logoshow; + global $logo; global $SearchBar; global $DownArrow; + global $Line; global $image1; global $link1; global $picture1; @@ -66,7 +67,6 @@ global $picture6; global $url6; global $UploadButton; - global $logo; // Build additional attributes for navigation urls $nav = $this->data['content_navigation']; @@ -324,7 +324,7 @@ ?> - + diff --git a/README.md b/README.md index a3529b0..79d570e 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,11 @@ To enable logo -$Logoshow = true; +$logo = true; Default is -$Logoshow = false; +$logo = false; To enable sidebar search bar @@ -66,7 +66,11 @@ Default is -$DownArrow = true; +$Line = true; + +To turn it off + +$Line = false; to change
[MediaWiki-commits] [Gerrit] Update Metrolook - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/176309 Change subject: Update Metrolook .. Update Metrolook * Includes bug fixes and new features. Please see README.md for new setting. * Adds support for composer. Change-Id: I647d48c0b81dca734041159391b7e210af85ec06 --- M Metrolook.php M MetrolookTemplate.php M README.md M composer.json 4 files changed, 37 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/09/176309/1 diff --git a/Metrolook.php b/Metrolook.php index 8d1d8e3..e27e628 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -21,61 +21,61 @@ * @ingroup Skins */ -$wgExtensionCredits['skin'][] = array( +$GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' => __FILE__, 'name' => 'Metrolook', 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '1.3.6', + 'version' => '1.3.7', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', ); // Register files -$wgAutoloadClasses['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; -$wgAutoloadClasses['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; +$GLOBALS['wgAutoloadClasses']['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; +$GLOBALS['wgAutoloadClasses']['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; // Register skin -$wgValidSkinNames['metrolook'] = 'Metrolook'; +$GLOBALS['wgValidSkinNames']['metrolook'] = 'Metrolook'; -/* To enable logo. Note that if enabled it will not show properly.*/ -$Logoshow = false; +/* Logo is off by default to turn it on plase see README.md. Note that if enabled it will not show properly.*/ +$GLOBALS['logo'] = false; /* to enable search bar on the sidebar and disables the search bar on the top bar */ -$SearchBar = true; +$GLOBALS['SearchBar'] = true; -$DownArrow = true; +$GLOBALS['DownArrow'] = true; -$link1 = true; +$GLOBALS['Line'] = true; -$image1 = true; +$GLOBALS['link1'] = true; -$link2 = true; +$GLOBALS['image1'] = true; -$image2 = true; +$GLOBALS['link2'] = true; -$link3 = true; +$GLOBALS['image2'] = true; -$image3 = true; +$GLOBALS['link3'] = true; -$link4 = true; +$GLOBALS['image3'] = true; -$image4 = true; +$GLOBALS['link4'] = true; -$link5 = false; +$GLOBALS['image4'] = true; -$image5 = false; +$GLOBALS['link5'] = false; -$link6 = false; +$GLOBALS['image5'] = false; -$image6 = false; +$GLOBALS['link6'] = false; -$UploadButton = true; +$GLOBALS['image6'] = false; -$logo = false; +$GLOBALS['UploadButton'] = false; // Register modules -$wgResourceModules['skins.metrolook.styles'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.styles'] = array( 'styles' => array( 'Metrolook/screen.less' => array( 'media' => 'screen' ), 'Metrolook/screen-hd.less' => array( 'media' => 'screen and (min-width: 982px)' ), @@ -85,7 +85,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.js'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.js'] = array( 'scripts' => array( 'Metrolook/collapsibleTabs.js', 'Metrolook/vector.js', @@ -97,7 +97,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.collapsibleNav'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.collapsibleNav'] = array( 'scripts' => array( 'Metrolook/collapsibleNav.js', ), diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index 787c6fc..929dda4 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -38,9 +38,10 @@ */ public function execute() { global $wgVectorUseIconWatch; - global $Logoshow; + global $logo; global $SearchBar; global $DownArrow; + global $Line; global $image1; global $link1; global $picture1; @@ -66,7 +67,6 @@ global $picture6; global $url6; global $UploadButton; - global $logo; // Build additional attributes for navigation urls $nav = $this->data['content_navigation']; @@ -324,7 +324,7 @@ ?> - + diff --git a/README.md b/README.md index a3529b0..79d570e 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,11 @@ To enable logo -$Logoshow = true; +$logo = true; Default is -$Logoshow = false; +$logo = false; To enable sidebar search bar @@ -66,7 +66,11 @@ Default is -$DownArrow =
[MediaWiki-commits] [Gerrit] Update Metrolook - change (mediawiki...Metrolook)
Paladox has submitted this change and it was merged. Change subject: Update Metrolook .. Update Metrolook * Include bugfixes and new features. Please see README.md * Adds support for composer. Change-Id: I77ef4c87cba6158df54352fb0f986735822d --- M Metrolook.php M MetrolookTemplate.php M README.md M composer.json 4 files changed, 38 insertions(+), 34 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/Metrolook.php b/Metrolook.php index 5758c0e..858e66a 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -21,61 +21,61 @@ * @ingroup Skins */ -$wgExtensionCredits['skin'][] = array( +$GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' => __FILE__, 'name' => 'Metrolook', 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '0.3.4', + 'version' => '0.3.5', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', ); // Register files -$wgAutoloadClasses['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; -$wgAutoloadClasses['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; +$GLOBALS['wgAutoloadClasses']['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; +$GLOBALS['wgAutoloadClasses']['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; // Register skin -$wgValidSkinNames['metrolook'] = 'Metrolook'; +$GLOBALS['wgValidSkinNames']['metrolook'] = 'Metrolook'; -/* To enable logo. Note that if enabled it will not show properly.*/ -$Logoshow = false; +/* Logo is off by default to turn it on plase see README.md. Note that if enabled it will not show properly.*/ +$GLOBALS['logo'] = false; /* to enable search bar on the sidebar and disables the search bar on the top bar */ -$SearchBar = true; +$GLOBALS['SearchBar'] = true; -$DownArrow = true; +$GLOBALS['DownArrow'] = true; -$link1 = true; +$GLOBALS['Line'] = true; -$image1 = true; +$GLOBALS['link1'] = true; -$link2 = true; +$GLOBALS['image1'] = true; -$image2 = true; +$GLOBALS['link2'] = true; -$link3 = true; +$GLOBALS['image2'] = true; -$image3 = true; +$GLOBALS['link3'] = true; -$link4 = true; +$GLOBALS['image3'] = true; -$image4 = true; +$GLOBALS['link4'] = true; -$link5 = false; +$GLOBALS['image4'] = true; -$image5 = false; +$GLOBALS['link5'] = false; -$link6 = false; +$GLOBALS['image5'] = false; -$image6 = false; +$GLOBALS['link6'] = false; -$UploadButton = true; +$GLOBALS['image6'] = false; -$logo = false; +$GLOBALS['UploadButton'] = false; // Register modules -$wgResourceModules['skins.metrolook'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook'] = array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -85,7 +85,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.beta'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.beta'] = array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -95,7 +95,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.js'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.js'] = array( 'scripts' => array( 'Metrolook/collapsibleTabs.js', 'Metrolook/vector.js', @@ -107,7 +107,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.collapsibleNav'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.collapsibleNav'] = array( 'scripts' => array( 'Metrolook/collapsibleNav.js', ), diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index faa181c..4344307 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -38,9 +38,10 @@ */ public function execute() { global $wgVectorUseIconWatch; - global $Logoshow; + global $logo; global $SearchBar; global $DownArrow; + global $Line; global $image1; global $link1; global $picture1; @@ -66,7 +67,6 @@ global $picture6; global $url6; global $UploadButton; - global $logo; // Build additional attributes for navigation urls $nav = $this->data['content_navigation']; @@ -323,7 +323,7 @@ ?> - +
[MediaWiki-commits] [Gerrit] Update Metrolook - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/176308 Change subject: Update Metrolook .. Update Metrolook * Include bugfixes and new features. Please see README.md * Adds support for composer. Change-Id: I77ef4c87cba6158df54352fb0f986735822d --- M Metrolook.php M MetrolookTemplate.php M README.md M composer.json 4 files changed, 38 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/08/176308/1 diff --git a/Metrolook.php b/Metrolook.php index 5758c0e..858e66a 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -21,61 +21,61 @@ * @ingroup Skins */ -$wgExtensionCredits['skin'][] = array( +$GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' => __FILE__, 'name' => 'Metrolook', 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '0.3.4', + 'version' => '0.3.5', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', ); // Register files -$wgAutoloadClasses['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; -$wgAutoloadClasses['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; +$GLOBALS['wgAutoloadClasses']['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; +$GLOBALS['wgAutoloadClasses']['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; // Register skin -$wgValidSkinNames['metrolook'] = 'Metrolook'; +$GLOBALS['wgValidSkinNames']['metrolook'] = 'Metrolook'; -/* To enable logo. Note that if enabled it will not show properly.*/ -$Logoshow = false; +/* Logo is off by default to turn it on plase see README.md. Note that if enabled it will not show properly.*/ +$GLOBALS['logo'] = false; /* to enable search bar on the sidebar and disables the search bar on the top bar */ -$SearchBar = true; +$GLOBALS['SearchBar'] = true; -$DownArrow = true; +$GLOBALS['DownArrow'] = true; -$link1 = true; +$GLOBALS['Line'] = true; -$image1 = true; +$GLOBALS['link1'] = true; -$link2 = true; +$GLOBALS['image1'] = true; -$image2 = true; +$GLOBALS['link2'] = true; -$link3 = true; +$GLOBALS['image2'] = true; -$image3 = true; +$GLOBALS['link3'] = true; -$link4 = true; +$GLOBALS['image3'] = true; -$image4 = true; +$GLOBALS['link4'] = true; -$link5 = false; +$GLOBALS['image4'] = true; -$image5 = false; +$GLOBALS['link5'] = false; -$link6 = false; +$GLOBALS['image5'] = false; -$image6 = false; +$GLOBALS['link6'] = false; -$UploadButton = true; +$GLOBALS['image6'] = false; -$logo = false; +$GLOBALS['UploadButton'] = false; // Register modules -$wgResourceModules['skins.metrolook'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook'] = array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -85,7 +85,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.beta'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.beta'] = array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -95,7 +95,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.js'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.js'] = array( 'scripts' => array( 'Metrolook/collapsibleTabs.js', 'Metrolook/vector.js', @@ -107,7 +107,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.collapsibleNav'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.collapsibleNav'] = array( 'scripts' => array( 'Metrolook/collapsibleNav.js', ), diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index faa181c..4344307 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -38,9 +38,10 @@ */ public function execute() { global $wgVectorUseIconWatch; - global $Logoshow; + global $logo; global $SearchBar; global $DownArrow; + global $Line; global $image1; global $link1; global $picture1; @@ -66,7 +67,6 @@ global $picture6; global $url6; global $UploadButton; - global $logo; // Build additional attributes for navigation urls $nav = $this->data['content_na
[MediaWiki-commits] [Gerrit] Update Metrolook - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/176306 Change subject: Update Metrolook .. Update Metrolook * Include bugfixes and new features. Please see README.md * Adds support for composer. Change-Id: I77ef4c87cba6158df54352fb0f986735822d --- M Metrolook.php M MetrolookTemplate.php M README.md A composer.json 4 files changed, 83 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/06/176306/1 diff --git a/Metrolook.php b/Metrolook.php index 5758c0e..858e66a 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -21,61 +21,61 @@ * @ingroup Skins */ -$wgExtensionCredits['skin'][] = array( +$GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' => __FILE__, 'name' => 'Metrolook', 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '0.3.4', + 'version' => '0.3.5', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', ); // Register files -$wgAutoloadClasses['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; -$wgAutoloadClasses['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; +$GLOBALS['wgAutoloadClasses']['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; +$GLOBALS['wgAutoloadClasses']['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; // Register skin -$wgValidSkinNames['metrolook'] = 'Metrolook'; +$GLOBALS['wgValidSkinNames']['metrolook'] = 'Metrolook'; -/* To enable logo. Note that if enabled it will not show properly.*/ -$Logoshow = false; +/* Logo is off by default to turn it on plase see README.md. Note that if enabled it will not show properly.*/ +$GLOBALS['logo'] = false; /* to enable search bar on the sidebar and disables the search bar on the top bar */ -$SearchBar = true; +$GLOBALS['SearchBar'] = true; -$DownArrow = true; +$GLOBALS['DownArrow'] = true; -$link1 = true; +$GLOBALS['Line'] = true; -$image1 = true; +$GLOBALS['link1'] = true; -$link2 = true; +$GLOBALS['image1'] = true; -$image2 = true; +$GLOBALS['link2'] = true; -$link3 = true; +$GLOBALS['image2'] = true; -$image3 = true; +$GLOBALS['link3'] = true; -$link4 = true; +$GLOBALS['image3'] = true; -$image4 = true; +$GLOBALS['link4'] = true; -$link5 = false; +$GLOBALS['image4'] = true; -$image5 = false; +$GLOBALS['link5'] = false; -$link6 = false; +$GLOBALS['image5'] = false; -$image6 = false; +$GLOBALS['link6'] = false; -$UploadButton = true; +$GLOBALS['image6'] = false; -$logo = false; +$GLOBALS['UploadButton'] = false; // Register modules -$wgResourceModules['skins.metrolook'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook'] = array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -85,7 +85,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.beta'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.beta'] = array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -95,7 +95,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.js'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.js'] = array( 'scripts' => array( 'Metrolook/collapsibleTabs.js', 'Metrolook/vector.js', @@ -107,7 +107,7 @@ 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], ); -$wgResourceModules['skins.metrolook.collapsibleNav'] = array( +$GLOBALS['wgResourceModules']['skins.metrolook.collapsibleNav'] = array( 'scripts' => array( 'Metrolook/collapsibleNav.js', ), diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index faa181c..4344307 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -38,9 +38,10 @@ */ public function execute() { global $wgVectorUseIconWatch; - global $Logoshow; + global $logo; global $SearchBar; global $DownArrow; + global $Line; global $image1; global $link1; global $picture1; @@ -66,7 +67,6 @@ global $picture6; global $url6; global $UploadButton; - global $logo; // Build additional attributes for navigation urls $nav = $this->data['content_na
[MediaWiki-commits] [Gerrit] Move idiosyncratic gdbinit to /home/ori - change (operations/puppet)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/176307 Change subject: Move idiosyncratic gdbinit to /home/ori .. Move idiosyncratic gdbinit to /home/ori Feel free to experiment there. Change-Id: Id044d14dcbb568ee31abd6ed1bc6a0c7a7d64e87 --- R modules/admin/files/home/ori/.gdbinit M modules/hhvm/manifests/debug.pp 2 files changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/176307/1 diff --git a/modules/hhvm/files/debug/gdbinit b/modules/admin/files/home/ori/.gdbinit similarity index 100% rename from modules/hhvm/files/debug/gdbinit rename to modules/admin/files/home/ori/.gdbinit diff --git a/modules/hhvm/manifests/debug.pp b/modules/hhvm/manifests/debug.pp index 29d41ff..b20d64c 100644 --- a/modules/hhvm/manifests/debug.pp +++ b/modules/hhvm/manifests/debug.pp @@ -101,14 +101,4 @@ source => 'puppet:///modules/hhvm/debug/printers.py', require => Package['libstdc++6-4.8-dbg'], } - -# Set sensible gdb options for debugging HHVM and load gdb helpers -# bundled with the HHVM source distribution. - -file { '/etc/gdb/gdbinit': -source => 'puppet:///modules/hhvm/debug/gdbinit', -owner => 'root', -group => 'root', -mode=> '0555', -} } -- To view, visit https://gerrit.wikimedia.org/r/176307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id044d14dcbb568ee31abd6ed1bc6a0c7a7d64e87 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set wgMetaNamespace on TitleTest.php - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Set wgMetaNamespace on TitleTest.php .. Set wgMetaNamespace on TitleTest.php Also added it to the MediaWikiTitleCodecTest.php (which seems not exists at time of bug creation) Bug: T67879 Change-Id: I8411d46320201b594ebaa56953dc355d863d0500 --- M tests/phpunit/includes/TitleTest.php M tests/phpunit/includes/title/MediaWikiTitleCodecTest.php 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php index a4bc427..01c2578 100644 --- a/tests/phpunit/includes/TitleTest.php +++ b/tests/phpunit/includes/TitleTest.php @@ -14,6 +14,7 @@ 'wgLang' => Language::factory( 'en' ), 'wgAllowUserJs' => false, 'wgDefaultLanguageVariant' => false, + 'wgMetaNamespace' => 'Project', ) ); } diff --git a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php index f95b305..f1146a7 100644 --- a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php +++ b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php @@ -39,6 +39,7 @@ 'wgLang' => Language::factory( 'en' ), 'wgAllowUserJs' => false, 'wgDefaultLanguageVariant' => false, + 'wgMetaNamespace' => 'Project', 'wgLocalInterwikis' => array( 'localtestiw' ), 'wgCapitalLinks' => true, @@ -82,6 +83,8 @@ protected function makeCodec( $lang ) { $gender = $this->getGenderCache(); $lang = Language::factory( $lang ); + // language object can came from cache, which does not respect test settings + $lang->resetNamespaces(); return new MediaWikiTitleCodec( $lang, $gender ); } -- To view, visit https://gerrit.wikimedia.org/r/173060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8411d46320201b594ebaa56953dc355d863d0500 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Jjanes Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Populate revision data when expanding templates - change (mediawiki/core)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/176305 Change subject: Populate revision data when expanding templates .. Populate revision data when expanding templates Bug: T73306 Change-Id: I93ef39fdabbaa5f394efce9b5c5e080666ff6119 --- M includes/api/ApiExpandTemplates.php 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/176305/1 diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index eea10e9..6ad0611 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -98,7 +98,12 @@ if ( $prop || $params['prop'] === null ) { $wgParser->startExternalParse( $title_obj, $options, Parser::OT_PREPROCESS ); $frame = $wgParser->getPreprocessor()->newFrame(); - $wikitext = $wgParser->preprocess( $params['text'], $title_obj, $options, null, $frame ); + $oldid = $params['oldid']; + if ( is_null($oldid) ) { + $rev = $wgParser->fetchCurrentRevisionOfTitle( $title_obj ); + $oldid = $rev ? $rev->getId(): null; + } + $wikitext = $wgParser->preprocess( $params['text'], $title_obj, $options, $oldid, $frame ); if ( $params['prop'] === null ) { // the old way ApiResult::setContent( $retval, $wikitext ); @@ -141,6 +146,9 @@ ApiBase::PARAM_TYPE => 'string', ApiBase::PARAM_REQUIRED => true, ), + 'oldid' => array( + ApiBase::PARAM_TYPE => 'integer', + ), 'prop' => array( ApiBase::PARAM_TYPE => array( 'wikitext', -- To view, visit https://gerrit.wikimedia.org/r/176305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I93ef39fdabbaa5f394efce9b5c5e080666ff6119 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Arlolra ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement SiteListFileCache and rebuild script - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Implement SiteListFileCache and rebuild script .. Implement SiteListFileCache and rebuild script Provides file-based cache of the SitesStore data, using a static json file dump of the data from the SiteSQLStore. Includes a maintenance script to rebuild the sites cache. Bug: 56602 Bug: 45532 Change-Id: Iaee4c1f9fb5d54efe01975f733ebd5c339ac106f --- M autoload.php M includes/DefaultSettings.php A includes/site/SiteListFileCache.php A includes/site/SiteListFileCacheBuilder.php A maintenance/rebuildSitesCache.php A tests/phpunit/includes/site/SiteListFileCacheBuilderTest.php A tests/phpunit/includes/site/SiteListFileCacheTest.php 7 files changed, 550 insertions(+), 0 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 472d17e..58e62b9 100644 --- a/autoload.php +++ b/autoload.php @@ -917,6 +917,7 @@ 'RebuildLocalisationCache' => __DIR__ . '/maintenance/rebuildLocalisationCache.php', 'RebuildMessages' => __DIR__ . '/maintenance/rebuildmessages.php', 'RebuildRecentchanges' => __DIR__ . '/maintenance/rebuildrecentchanges.php', + 'RebuildSitesCache' => __DIR__ . '/maintenance/rebuildSitesCache.php', 'RebuildTextIndex' => __DIR__ . '/maintenance/rebuildtextindex.php', 'RecentChange' => __DIR__ . '/includes/changes/RecentChange.php', 'RecompressTracked' => __DIR__ . '/maintenance/storage/recompressTracked.php', @@ -1023,6 +1024,8 @@ 'SiteArray' => __DIR__ . '/includes/site/SiteList.php', 'SiteConfiguration' => __DIR__ . '/includes/SiteConfiguration.php', 'SiteList' => __DIR__ . '/includes/site/SiteList.php', + 'SiteListFileCache' => __DIR__ . '/includes/site/SiteListFileCache.php', + 'SiteListFileCacheBuilder' => __DIR__ . '/includes/site/SiteListFileCacheBuilder.php', 'SiteObject' => __DIR__ . '/includes/site/Site.php', 'SiteSQLStore' => __DIR__ . '/includes/site/SiteSQLStore.php', 'SiteStats' => __DIR__ . '/includes/SiteStats.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 85f25c2..7523193 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3755,6 +3755,18 @@ /** @} */ # end of Interwiki caching settings. /** + * @name SiteStore caching settings. + * @{ + */ + +/** + * Specify the file location for the SiteStore json cache file. + */ +$wgSitesCacheFile = false; + +/** @} */ # end of SiteStore caching settings. + +/** * If local interwikis are set up which allow redirects, * set this regexp to restrict URLs which will be displayed * as 'redirected from' links. diff --git a/includes/site/SiteListFileCache.php b/includes/site/SiteListFileCache.php new file mode 100644 index 000..c0ecab1 --- /dev/null +++ b/includes/site/SiteListFileCache.php @@ -0,0 +1,126 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @since 1.25 + * + * @file + * + * @license GNU GPL v2+ + */ +class SiteListFileCache { + + /** +* @var SiteList +*/ + private $sites = null; + + /** +* @var string +*/ + private $cacheFile; + + /** +* @param string $cacheFile +*/ + public function __construct( $cacheFile ) { + $this->cacheFile = $cacheFile; + } + + /** +* @since 1.25 +* +* @return SiteList +*/ + public function getSites() { + if ( $this->sites === null ) { + $this->sites = $this->loadSitesFromCache(); + } + + return $this->sites; + } + + /** +* @since 1.25 +*/ + public function getSite( $globalId ) { + $sites = $this->getSites(); + + return $sites->hasSite( $globalId ) ? $sites->getSite( $globalId ) : null; + } + + /** +* @return SiteList +*/ + private function loadSitesFromCache() { + $data = $this->loadJsonFile(); + + $sites = new SiteList(); + + // @todo lazy initialize the site objects in the site list (e.g. only when needed to access) + foreach( $data['sites'] as $siteArray ) { + $sites[] = $this->newSiteFromArray( $siteArray ); + } + + return $sites; + } + + /** +* @throws MWException +* @return array +*/ + private function loadJsonFile() { + if ( !is_readable( $this->cacheFile ) ) { + throw new MWException( 'SiteList cache file not found.' ); + } + + $contents = file_get_contents( $this->cacheFile ); + $data = json_decode( $contents, true ); + + if ( !is_array( $data ) || !arra
[MediaWiki-commits] [Gerrit] Add promise support to get method - change (analytics/mediawiki-storage)
Mforns has uploaded a new change for review. https://gerrit.wikimedia.org/r/176304 Change subject: Add promise support to get method .. Add promise support to get method To get the results and the thrown errors, get method was accepting the success and error parameters respectively. However, Dashiki uses jQuery promises returned by the apis to subscribe callbacks. To adapt to Dashiki and to implement a common interface, this fix implements promise support for get method. Bug: 68448 Change-Id: I719960b677b66f60fbe2c28e8028b1a220b5567e --- M bower.json M dist/mediawiki-storage.js M dist/mediawiki-storage.min.js M doc/api.md M package.json M src/mediawiki-storage.js M test/mediawiki-storage-spec.js 7 files changed, 195 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/mediawiki-storage refs/changes/04/176304/1 diff --git a/bower.json b/bower.json index 85aa395..89dc058 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "mediawiki-storage", - "version": "0.0.0", + "version": "0.0.1", "authors": [ "Marcel Ruiz Forns " ], diff --git a/dist/mediawiki-storage.js b/dist/mediawiki-storage.js index 70c2e42..7c78e25 100644 --- a/dist/mediawiki-storage.js +++ b/dist/mediawiki-storage.js @@ -13,32 +13,28 @@ * - the page id * - the revision id * - * Note that: - * The page contents must be valid json. - * The retrieval of the page contents is done via jsonp. - * The return value is passed as parameter for the success callback. - * Errors occurring before jsonp call (TypeError) will be thrown - * synchronously, and errors occurring within or after jsonp call - * will be handed as parameter for error callback. - * * Parameter: options {object} * { - * host: {string}, // i.e. www.wikipedia.org - * // at least one of the following three: - * pageName: {string}, - * pageId: {string}, - * revId: {string}, - * success: {function}, // callback [optional] - * // parameter: object with page contents - * error: {function} // callback [optional] - * // parameter: error thrown + * host: {string}, + * // specify one of the following 3 params + * pageName: {string} [optional], + * pageId: {string} [optional], + * revId: {string} [optional], + * success: {function} [optional], + * error: {function} [optional] * } + * + * Returns: {Promise} + * + * For more information, see the api documentation: + * https://github.com/wikimedia/analytics-mediawiki-storage/blob/master/doc/api.md */ MediawikiStorage.prototype.get = function (options) { if (typeof options !== 'object') { throw new TypeError('function must receive an object'); } +var deferred = $.Deferred(); var url = this._createQueryUrl(options); var that = this; @@ -48,23 +44,35 @@ contentType: 'application/json', success: function (data) { -if (typeof options.success === 'function') { -var pageJson; -try { -pageJson = that._getPageJson(data); -} catch (e) { -return options.error(e); +var pageJson; + +// try to parse page contents +try { +pageJson = that._getPageJson(data); +} catch (e) { +if (typeof options.success === 'function') { +options.error(e); } +deferred.reject(e); +return; +} + +// return parsed page contents +if (typeof options.success === 'function') { options.success(pageJson); } +deferred.resolve(pageJson); }, -error: function (jqXHR, textStatus, errorThrown) { +error: function (jqXHR, textStatus, e) { if (typeof options.error === 'function') { -options.error(errorThrown); +options.error(e); } +deferred.reject(e); } }); + +return deferred.promise(); }; /** diff --git a/dist/mediawiki-storage.min.js b/dist/mediawiki-storage.min.js index bfb3a4e..c76ef81 100644 --- a/dist/mediawiki-storage.min.js +++ b/dist/mediawiki-storage.min.js @@ -1 +1 @@ -"use strict";!function(e){var t=function(){};t.prototype.get=function(e){if("object"!=typeof e)throw new TypeError("function must receive an object");var t=this._createQueryUrl(e),r=t
[MediaWiki-commits] [Gerrit] SECURITY: Add edit token to Special:ExpandTemplates - change (mediawiki...ExpandTemplates)
PleaseStand has uploaded a new change for review. https://gerrit.wikimedia.org/r/176303 Change subject: SECURITY: Add edit token to Special:ExpandTemplates .. SECURITY: Add edit token to Special:ExpandTemplates On wikis that allow raw HTML, it is not safe to preview wikitext coming from an untrusted source such as a cross-site request. Thus add an edit token to the form, and when raw HTML is allowed, ensure the token is provided before showing the preview. Unfortunately, MediaWiki does not currently provide logged-out users with CSRF protection; in that case, do not show the preview unless anonymous editing is allowed (such wikis have been, and are still, vulnerable). Backported from MediaWiki 1.23 (c1d6638704e6 in mediawiki/core). Bug: T73111 Change-Id: I2f1caa57e8fc705ef52fc4b6f351a174b72b33cb --- M ExpandTemplates.i18n.php M ExpandTemplates_body.php 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExpandTemplates refs/changes/03/176303/1 diff --git a/ExpandTemplates.i18n.php b/ExpandTemplates.i18n.php index e8103e1..0307ffd 100644 --- a/ExpandTemplates.i18n.php +++ b/ExpandTemplates.i18n.php @@ -25,6 +25,13 @@ 'expand_templates_remove_nowiki' => 'Suppress tags in result', 'expand_templates_generate_xml'=> 'Show XML parse tree', 'expand_templates_preview' => 'Preview', + 'expand_templates_preview_fail_html' => 'Because {{SITENAME}} has raw HTML enabled and there was a loss of session data, the preview is hidden as a precaution against JavaScript attacks. + +If this is a legitimate preview attempt, please try again. +If it still does not work, try [[Special:UserLogout|logging out]] and logging back in.', + 'expand_templates_preview_fail_html_anon' => 'Because {{SITENAME}} has raw HTML enabled and you are not logged in, the preview is hidden as a precaution against JavaScript attacks. + +If this is a legitimate preview attempt, please [[Special:UserLogin|log in]] and try again.', ); /** Message documentation (Message documentation) @@ -51,6 +58,8 @@ 'expand_templates_remove_nowiki' => 'Option on [[Special:Expandtemplates]]', 'expand_templates_generate_xml' => 'Used as checkbox label.', 'expand_templates_preview' => '{{Identical|Preview}}', + 'expand_templates_preview_fail_html' => 'Used as error message in Preview section of [[Special:ExpandTemplates]] page.', + 'expand_templates_preview_fail_html_anon' => 'Used as error message in Preview section of [[Special:ExpandTemplates]] page.', ); /** Afrikaans (Afrikaans) diff --git a/ExpandTemplates_body.php b/ExpandTemplates_body.php index 345e61d..712b30b 100644 --- a/ExpandTemplates_body.php +++ b/ExpandTemplates_body.php @@ -93,6 +93,9 @@ */ private function makeForm( $title, $input ) { $self = $this->getTitle(); + $request = $this->getRequest(); + $user = $this->getUser(); + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) @@ -143,6 +146,7 @@ array( 'accesskey' => 's' ) ) . ''; $form .= "\n"; + $form .= Html::hidden( 'wpEditToken', $user->getEditToken( '', $request ) ); $form .= Xml::closeElement( 'form' ); return $form; } @@ -179,6 +183,30 @@ $pout = $wgParser->parse( $text, $title, $popts ); $lang = $title->getPageViewLanguage(); $out->addHTML( "" . $this->msg( 'expand_templates_preview' )->escaped() . "\n" ); + + global $wgRawHtml; + if ( $wgRawHtml ) { + $request = $this->getRequest(); + $user = $this->getUser(); + + // To prevent cross-site scripting attacks, don't show the preview if raw HTML is + // allowed and a valid edit token is not provided (bug 7). However, MediaWiki + // does not currently provide logged-out users with CSRF protection; in that case, + // do not show the preview unless anonymous editing is allowed. + if ( $user->isAnon() && !$user->isAllowed( 'edit' ) ) { + $error = array( 'expand_templates_preview_fail_html_anon' ); + } elseif ( !$user->matchEditToken( $request->getVal( 'wpEditToken' ), '', $request ) ) { + $error = array( 'expand_templates_preview_fail_html' ); + } else { + $error = false; + } + + if ( $error ) { + $out->wrapWikiMsg( "\n$1\n", $error ); +
[MediaWiki-commits] [Gerrit] tools: Update update-scripts.sh to update updated Packages p... - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Update update-scripts.sh to update updated Packages properly .. tools: Update update-scripts.sh to update updated Packages properly We don't use gzipped Package lists anymore on tools, since (IIRC) it caused apt-get update to get stuck sometimes. Change-Id: If2fdf2976f8a28d7812c8c138be707b0c90f5d04 --- M modules/toollabs/files/update-repo.sh 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Looks good to me, approved coren: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/toollabs/files/update-repo.sh b/modules/toollabs/files/update-repo.sh index 2855829..a234a3e 100644 --- a/modules/toollabs/files/update-repo.sh +++ b/modules/toollabs/files/update-repo.sh @@ -7,8 +7,8 @@ cd /data/project/.system/deb for arch in *; do if [ -d $arch ]; then -dpkg-scanpackages $arch | gzip -9c >$arch/Packages.gz~ -mv $arch/Packages.gz~ $arch/Packages.gz +dpkg-scanpackages $arch > $arch/Packages~ +mv $arch/Packages~ $arch/Packages fi done -- To view, visit https://gerrit.wikimedia.org/r/176302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2fdf2976f8a28d7812c8c138be707b0c90f5d04 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: coren 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: Update update-scripts.sh to update updated Packages p... - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/176302 Change subject: tools: Update update-scripts.sh to update updated Packages properly .. tools: Update update-scripts.sh to update updated Packages properly We don't use gzipped Package lists anymore on tools, since (IIRC) it caused apt-get update to get stuck sometimes. Change-Id: If2fdf2976f8a28d7812c8c138be707b0c90f5d04 --- M modules/toollabs/files/update-repo.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/176302/1 diff --git a/modules/toollabs/files/update-repo.sh b/modules/toollabs/files/update-repo.sh index 2855829..a234a3e 100644 --- a/modules/toollabs/files/update-repo.sh +++ b/modules/toollabs/files/update-repo.sh @@ -7,8 +7,8 @@ cd /data/project/.system/deb for arch in *; do if [ -d $arch ]; then -dpkg-scanpackages $arch | gzip -9c >$arch/Packages.gz~ -mv $arch/Packages.gz~ $arch/Packages.gz +dpkg-scanpackages $arch > $arch/Packages~ +mv $arch/Packages~ $arch/Packages fi done -- To view, visit https://gerrit.wikimedia.org/r/176302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2fdf2976f8a28d7812c8c138be707b0c90f5d04 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dupicate startSanityCheck from ViewPageTarget - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/176301 Change subject: Remove dupicate startSanityCheck from ViewPageTarget .. Remove dupicate startSanityCheck from ViewPageTarget Method was moved to parent, but not deleted from child. Also move sanityCheckPromise to parent where it is used. Change-Id: Ie2b00330d796cd089fd4bc84d9332c316500633f --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js M modules/ve-mw/init/ve.init.mw.Target.js 2 files changed, 5 insertions(+), 61 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/01/176301/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index b79fdfc..32af43d 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -60,11 +60,6 @@ this.originalDocumentTitle = document.title; this.tabLayout = mw.config.get( 'wgVisualEditorConfig' ).tabLayout; - /** -* @property {jQuery.Promise|null} -*/ - this.sanityCheckPromise = null; - // Add modules specific to desktop (modules shared with mobile go in MWTarget) this.modules.push( 'ext.visualEditor.mwformatting', @@ -987,62 +982,6 @@ } return options; -}; - -/** - * Fire off the sanity check. Must be called before the surface is activated. - * - * To access the result, check whether #sanityCheckPromise has been resolved or rejected - * (it's asynchronous, so it may still be pending when you check). - */ -ve.init.mw.ViewPageTarget.prototype.startSanityCheck = function () { - // We have to get a copy of the data now, before we unlock the surface and let the user edit, - // but we can defer the actual conversion and comparison - var viewPage = this, - doc = viewPage.surface.getModel().getDocument(), - data = new ve.dm.FlatLinearData( doc.getStore().clone(), ve.copy( doc.getFullData() ) ), - oldDom = viewPage.doc, - d = $.Deferred(); - - // Reset - viewPage.sanityCheckFinished = false; - viewPage.sanityCheckVerified = false; - - setTimeout( function () { - // We can't compare oldDom.body and newDom.body directly, because the attributes on the - // were ignored in the conversion. So compare each child separately. - var i, - len = oldDom.body.childNodes.length, - newDoc = new ve.dm.Document( data, oldDom, undefined, doc.getInternalList(), doc.getInnerWhitespace(), doc.getLang(), doc.getDir() ), - newDom = ve.dm.converter.getDomFromModel( newDoc ); - - // Explicitly unlink our full copy of the original version of the document data - data = undefined; - - if ( len !== newDom.body.childNodes.length ) { - // Different number of children, so they're definitely different - d.reject(); - return; - } - for ( i = 0; i < len; i++ ) { - if ( !oldDom.body.childNodes[i].isEqualNode( newDom.body.childNodes[i] ) ) { - d.reject(); - return; - } - } - d.resolve(); - } ); - - viewPage.sanityCheckPromise = d.promise() - .done( function () { - // If we detect no roundtrip errors, - // don't emphasize "review changes" to the user. - viewPage.sanityCheckVerified = true; - }) - .always( function () { - viewPage.sanityCheckFinished = true; - viewPage.updateToolbarSaveButtonState(); - } ); }; /** diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 733a41c..775ff68 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -40,6 +40,11 @@ .extend( { action: 'submit' } ); this.events = new ve.init.mw.TargetEvents( this ); + /** +* @property {jQuery.Promise|null} +*/ + this.sanityCheckPromise = null; + this.modules = [ 'ext.visualEditor.mwcore', 'ext.visualEditor.mwlink', -- To view, visit https://gerrit.wikimedia.org/r/176301 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2b00330d796cd089fd4bc84d9332c316500633f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders
[MediaWiki-commits] [Gerrit] Bump version to 2.4 - change (mediawiki...CheckUser)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/176300 Change subject: Bump version to 2.4 .. Bump version to 2.4 * Bumps version to 2.4. Reason because it was never done when CheckUser migrated to .json which was a big change and unlike other extensions which were bumped this one never did. Change-Id: Ib7a53e52bb9f1eb5798e770afa862ad5386a3cd1 --- M CheckUser.php M i18n/de.json 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/00/176300/1 diff --git a/CheckUser.php b/CheckUser.php index 2d3532f..0405a4e 100644 --- a/CheckUser.php +++ b/CheckUser.php @@ -29,7 +29,7 @@ 'path' => __FILE__, 'author' => array( 'Tim Starling', 'Aaron Schulz' ), 'name' => 'CheckUser', - 'version' => '2.3', + 'version' => '2.4', 'url' => 'https://www.mediawiki.org/wiki/Extension:CheckUser', 'descriptionmsg' => 'checkuser-desc', ); diff --git a/i18n/de.json b/i18n/de.json index 0cd0277..cf43112 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -83,5 +83,7 @@ "checkuser-email-action": "sendete E-Mail an „$1“", "checkuser-reset-action": "forderte ein Passwort für „{{GENDER:$1|Benutzer:$1|Benutzerin:$1|Benutzer:$1}}“ an", "apihelp-query+checkuser-param-target": "IP-Adresse des Benutzernamens oder zu prüfender CIDR-Bereich.", - "apihelp-query+checkuser-param-reason": "Grund für die Überprüfung." + "apihelp-query+checkuser-param-reason": "Grund für die Überprüfung.", + "apihelp-query+checkuser-example-1": "IP-Adressen für [[User:Example]] überprüfen", + "apihelp-query+checkuser-example-2": "Bearbeitungen von 192.0.2.0/24 überprüfen" } -- To view, visit https://gerrit.wikimedia.org/r/176300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7a53e52bb9f1eb5798e770afa862ad5386a3cd1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Package fixes for webservice2 - change (labs/toollabs)
Yuvipanda has submitted this change and it was merged. Change subject: Package fixes for webservice2 .. Package fixes for webservice2 Change-Id: Ic0ab8539c34c6e610424c784dfd2c887012e03d1 --- M debian/changelog M debian/misctools.install 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved coren: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index d15cb39..7a803d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +toollabs (1.0.12) unstable; urgency=low + + * webservice2: Added port of webservice to python [Yuvi Panda] + * webservice2: Added support for running webservices on Trusty [Yuvi Panda] + + -- Yuvi Panda Fri, 28 Nov 2014 02:09:01 +0530 + toollabs (1.0.11) unstable; urgency=low * become: Fix typo [Merlijn van Deen] diff --git a/debian/misctools.install b/debian/misctools.install index 6df9429..7f42484 100644 --- a/debian/misctools.install +++ b/debian/misctools.install @@ -1,5 +1,6 @@ usr/bin/become usr/bin/take usr/bin/webservice +usr/bin/webservice2 usr/sbin/rmtool usr/sbin/toolwatcher -- To view, visit https://gerrit.wikimedia.org/r/176299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0ab8539c34c6e610424c784dfd2c887012e03d1 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Package fixes for webservice2 - change (labs/toollabs)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/176299 Change subject: Package fixes for webservice2 .. Package fixes for webservice2 Change-Id: Ic0ab8539c34c6e610424c784dfd2c887012e03d1 --- M debian/changelog M debian/misctools.install 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs refs/changes/99/176299/1 diff --git a/debian/changelog b/debian/changelog index d15cb39..7a803d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +toollabs (1.0.12) unstable; urgency=low + + * webservice2: Added port of webservice to python [Yuvi Panda] + * webservice2: Added support for running webservices on Trusty [Yuvi Panda] + + -- Yuvi Panda Fri, 28 Nov 2014 02:09:01 +0530 + toollabs (1.0.11) unstable; urgency=low * become: Fix typo [Merlijn van Deen] diff --git a/debian/misctools.install b/debian/misctools.install index 6df9429..7f42484 100644 --- a/debian/misctools.install +++ b/debian/misctools.install @@ -1,5 +1,6 @@ usr/bin/become usr/bin/take usr/bin/webservice +usr/bin/webservice2 usr/sbin/rmtool usr/sbin/toolwatcher -- To view, visit https://gerrit.wikimedia.org/r/176299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0ab8539c34c6e610424c784dfd2c887012e03d1 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mention the "Continue" label as a parameter in visualeditor-... - change (mediawiki...VisualEditor)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/176298 Change subject: Mention the "Continue" label as a parameter in visualeditor-recreate .. Mention the "Continue" label as a parameter in visualeditor-recreate Bug: T75971 Change-Id: Id075233da4e8a2978b07b5f2735ac6620ff5330d --- M VisualEditor.php M modules/ve-mw/i18n/en.json M modules/ve-mw/i18n/qqq.json M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 4 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/98/176298/1 diff --git a/VisualEditor.php b/VisualEditor.php index 328b4bf..8b2bef1 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -889,6 +889,9 @@ 'visualeditor-wikitext-warning-title', 'visualeditor-window-title', + // Mentioned in another message + 'ooui-dialog-process-continue', + // Used by the TOC widget (currently experimental) 'toc', 'showtoc', diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 23ab2e8..05f1e91 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -273,7 +273,7 @@ "visualeditor-savedialog-warning-dirty": "Your edit may have been corrupted – please review before saving.", "visualeditor-saveerror": "Error saving data to server: $1.", "visualeditor-serializeerror": "Error loading data from server: $1.", - "visualeditor-recreate": "The page has been deleted since you started editing. Press continue to recreate it.", + "visualeditor-recreate": "The page has been deleted since you started editing. Press \"$1\" to recreate it.", "visualeditor-settings-tool": "Page settings", "visualeditor-timeout":"It looks like this editor is currently unavailable. Would you like to edit in source mode instead?", "visualeditor-toolbar-cite-label": "Cite", diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json index fbdf3ef..74b0bc7 100644 --- a/modules/ve-mw/i18n/qqq.json +++ b/modules/ve-mw/i18n/qqq.json @@ -282,7 +282,7 @@ "visualeditor-savedialog-warning-dirty": "Note displayed to users in the save dialog if VisualEditor believes that it may have corrupted the page.", "visualeditor-saveerror": "Text shown when the editor fails to save properly.\n\nParameters:\n* $1 is an error message, in English.", "visualeditor-serializeerror": "Text shown when the editor fails to load the wikitext for saving.\n\nParameters:\n* $1 is an error message, in English.", - "visualeditor-recreate": "Text shown when the editor fails to save the page due to it having been deleted since they opened VE. The \"continue\" message is {{mw-msg|ooui-dialog-process-continue}}.", + "visualeditor-recreate": "Text shown when the editor fails to save the page due to it having been deleted since they opened VE. $1 is the message {{msg-mw|ooui-dialog-process-continue}}.", "visualeditor-settings-tool": "Text of tool in the toolbar the lets users set specific page settings.\n{{Identical|Page settings}}", "visualeditor-timeout": "Text (JavaScript confirm()) shown when the editor fails to load properly due to a 504 Gateway Timeout error.", "visualeditor-toolbar-cite-label": "Label text for the toolbar button for inserting customized references.\n{{Identical|Cite}}", diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index b79fdfc..e1eaf56 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -667,8 +667,10 @@ * @method */ ve.init.mw.ViewPageTarget.prototype.onSaveErrorPageDeleted = function () { + var continueLabel = mw.msg( 'ooui-dialog-process-continue' ); + this.pageDeletedWarning = true; - this.showSaveError( mw.msg( 'visualeditor-recreate' ), true, true ); + this.showSaveError( mw.msg( 'visualeditor-recreate', continueLabel ), true, true ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/176298 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id075233da4e8a2978b07b5f2735ac6620ff5330d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add webservice2 script - change (labs/toollabs)
Yuvipanda has submitted this change and it was merged. Change subject: Add webservice2 script .. Add webservice2 script - Rewrite of webservice in python. More maintainable. - Allows you to specify trusty, to run on trusty hosts Change-Id: I8eb49476544900629837768f4539215f0dc897f8 --- M misctools/Makefile.am A misctools/webservice2 2 files changed, 165 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved coren: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/misctools/Makefile.am b/misctools/Makefile.am index 87b590d..ce9bf08 100644 --- a/misctools/Makefile.am +++ b/misctools/Makefile.am @@ -1,3 +1,3 @@ man_MANS = become.1 rmtool.8 toolwatcher.8 -bin_SCRIPTS = become webservice +bin_SCRIPTS = become webservice webservice2 sbin_SCRIPTS = rmtool toolwatcher diff --git a/misctools/webservice2 b/misctools/webservice2 new file mode 100644 index 000..1a72216 --- /dev/null +++ b/misctools/webservice2 @@ -0,0 +1,164 @@ +#!/usr/bin/python +import os +import pwd +import re +import subprocess +import argparse +import xml.etree.ElementTree as ET + + +def read_file(path, default=None): +""" +Helper function to return contents of file if it exists, or a default value. + +:param path: Path to file to read from +:param default: Value to return if the file does not exist +:return: String containing either contents of the file, or default value +""" +if os.path.exists(path): +with open(path) as f: +return f.read() +return default + + +def start_web_job(server, release): +""" +Submits a job to the grid, running a particular server, for current user + +:param server: Server type to start job as. Current options are lighttpd and tomcat +""" +command = ['qsub', + '-e', '%s/error.log' % HOME, + '-o', '%s/error.log' % HOME, + '-i', '/dev/null', + '-q', 'webgrid-%s' % server, + '-l', 'h_vmem=%s,release=%s' % (MEMLIMIT, release), + '-b', 'y', + '-N', '%s-%s' % (server, TOOL), + '/usr/local/bin/tool-%s' % server] +subprocess.check_call(command, stdout=open(os.devnull, 'wb')) + + +def stop_job(job_id): +""" +Deletes a job with given job id from the grid + +:param job_id: Job id to delete +""" +command = ['qdel', job_id] +subprocess.check_call(command, stdout=open(os.devnull, 'wb')) + + +def qstat_xml(*args): +""" +Executes a qstat call and returns the output in XML format + +:param args: Arguments to the qstat call +:return: String response in XML form of the qstat output +""" +qstat_args = ['qstat'] + list(args) + ['-xml'] +output = subprocess.check_output(qstat_args) +return output + + +def xpath_string(string, xpath): +""" +Parses given string as XML, returns single string value +produced by the given xpath query + +:param string: String to parse as XML +:param xpath: XPath query to run over the parsed XML +:return: Single string that is the result of the XPath query +""" +xml = ET.fromstring(string) +return xml.findtext(xpath) + +def get_job_id(queue_name, job_name): +""" +Gets job id of a particular job with a particular name in a particular queue + +:param queue_name: Queue name to look in +:param job_name: Job name to look for +:return: Job id if the job is found, None otherwise +""" +output = qstat_xml('-q', queue_name, '-j', job_name) +# GE is stupid. +# Returns output like: +# <>blah +# If the job is not found. +if '' in output: +return None +return xpath_string(output, './/JB_job_number') + +def wait_for_job(queue_name, job_name, up=True): +""" +Waits for a job to be either up (or down), printing .s while waiting + +:param queue_name: Queue name to look for the job in +:param job_name: Name of job to look for +:param up: True if we want to wait for the job to be up, false for down +:return returns the job id, if up=True +""" +while True: +jid = get_job_id(queue_name, job_name) +if jid is None == up: +print '.', +else: +return jid + +# Setup constants that we would need later on +PREFIX = read_file('/etc/wmflabs-project', 'tools').strip() # project name + +pwd_entry = pwd.getpwuid(os.getuid()) +USER = pwd_entry.pw_name +HOME = pwd_entry.pw_dir +TOOL = re.sub(r'^%s.' % PREFIX, '', USER) # Tool users are of form PREFIX.TOOLNAME + +# Read memlimit customizations for individual tools, set by +# admins for tools that require more than usual memory limits. +MEMLIMIT = read_file( +os.path.join( +'/data/project/.system/config/', +'%s.web-memlimit' % TOOL +), '4g' +) + +parser = argparse.ArgumentParser() +parser.add_argument('server', help='Type
[MediaWiki-commits] [Gerrit] Include anchor in group page wiki link - change (mediawiki/core)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/176297 Change subject: Include anchor in group page wiki link .. Include anchor in group page wiki link We effectively did this when outputting an HTML link in the function above, but not for the wiki text version. Just use getFullText instead of getPrefixedText, which handles adding anchors where necessary and nothing else. Bug: T75959 Change-Id: I1a4aa46d26e738c2a97e41463231da632e4ca8e5 --- M includes/User.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/176297/1 diff --git a/includes/User.php b/includes/User.php index 16a78f6..5348020 100644 --- a/includes/User.php +++ b/includes/User.php @@ -4476,7 +4476,7 @@ } $title = self::getGroupPage( $group ); if ( $title ) { - $page = $title->getPrefixedText(); + $page = $title->getFullText(); return "[[$page|$text]]"; } else { return $text; -- To view, visit https://gerrit.wikimedia.org/r/176297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a4aa46d26e738c2a97e41463231da632e4ca8e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expand error message when parser tests found no hook - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/176296 Change subject: Expand error message when parser tests found no hook .. Expand error message when parser tests found no hook The existing message is hard to understand and does not mention, that this is a problem in the parser test itself and not with phpunit. Before: 1) Warning The data provider specified for ParserTest_::testParserTest is invalid. Problem running hook After: 1) Warning The data provider specified for ParserTest_::testParser Problem running requested parser hook from the test file Change-Id: I0b4225cc9ab95e8dd048515315c789113dacf39e --- M tests/testHelpers.inc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/96/176296/1 diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index b5fc800..f1e8c44 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -471,7 +471,7 @@ $hooksResult = $this->delayedParserTest->unleash( $this->parserTest ); if ( !$hooksResult ) { # Some hook reported an issue. Abort. - throw new MWException( "Problem running hook" ); + throw new MWException( "Problem running requested parser hook from the test file" ); } $this->test = array( -- To view, visit https://gerrit.wikimedia.org/r/176296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b4225cc9ab95e8dd048515315c789113dacf39e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] extdist: composer depends on php5-cli - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: extdist: composer depends on php5-cli .. extdist: composer depends on php5-cli Change-Id: Ibe421ff94355fb7e1f18207d59086779f7fb6d89 --- M modules/extdist/manifests/init.pp 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/extdist/manifests/init.pp b/modules/extdist/manifests/init.pp index 05b5f9a..1f50e29 100644 --- a/modules/extdist/manifests/init.pp +++ b/modules/extdist/manifests/init.pp @@ -65,11 +65,15 @@ group => 'extdist', } +package { 'php5-cli': +ensure => 'present', +} + git::clone { 'integration/composer': ensure => 'latest', directory => $composer_dir, branch => 'master', -require=> [File[$composer_dir], User['extdist']], +require=> [File[$composer_dir], User['extdist'], Package['php5-cli']], recurse_submodules => true, owner => 'extdist', group => 'extdist', -- To view, visit https://gerrit.wikimedia.org/r/176295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe421ff94355fb7e1f18207d59086779f7fb6d89 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Legoktm Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] extdist: composer depends on php5-cli - change (operations/puppet)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/176295 Change subject: extdist: composer depends on php5-cli .. extdist: composer depends on php5-cli Change-Id: Ibe421ff94355fb7e1f18207d59086779f7fb6d89 --- M modules/extdist/manifests/init.pp 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/176295/1 diff --git a/modules/extdist/manifests/init.pp b/modules/extdist/manifests/init.pp index 05b5f9a..1f50e29 100644 --- a/modules/extdist/manifests/init.pp +++ b/modules/extdist/manifests/init.pp @@ -65,11 +65,15 @@ group => 'extdist', } +package { 'php5-cli': +ensure => 'present', +} + git::clone { 'integration/composer': ensure => 'latest', directory => $composer_dir, branch => 'master', -require=> [File[$composer_dir], User['extdist']], +require=> [File[$composer_dir], User['extdist'], Package['php5-cli']], recurse_submodules => true, owner => 'extdist', group => 'extdist', -- To view, visit https://gerrit.wikimedia.org/r/176295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe421ff94355fb7e1f18207d59086779f7fb6d89 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] extdist: clone composer into /srv/composer - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: extdist: clone composer into /srv/composer .. extdist: clone composer into /srv/composer Bug: T70940 Change-Id: I9c4c655eec649019bd40bcd397e9e8a435e448d2 --- M modules/extdist/manifests/init.pp 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/extdist/manifests/init.pp b/modules/extdist/manifests/init.pp index b7e2692..05b5f9a 100644 --- a/modules/extdist/manifests/init.pp +++ b/modules/extdist/manifests/init.pp @@ -10,6 +10,7 @@ $dist_dir = "${base_dir}/dist" $clone_dir = "${base_dir}/extdist" $src_path = "${base_dir}/src" +$composer_dir = "${base_dir}/composer" $pid_folder = '/run/extdist' $ext_settings = { @@ -48,7 +49,7 @@ require => User['extdist'] } -file { [$dist_dir, $clone_dir, $src_path, $pid_folder]: +file { [$dist_dir, $clone_dir, $src_path, $pid_folder, $composer_dir]: ensure => directory, owner => 'extdist', group => 'www-data', @@ -64,6 +65,16 @@ group => 'extdist', } +git::clone { 'integration/composer': +ensure => 'latest', +directory => $composer_dir, +branch => 'master', +require=> [File[$composer_dir], User['extdist']], +recurse_submodules => true, +owner => 'extdist', +group => 'extdist', +} + file { '/etc/extdist.conf': ensure => present, content => ordered_json($ext_settings), -- To view, visit https://gerrit.wikimedia.org/r/176294 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c4c655eec649019bd40bcd397e9e8a435e448d2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Legoktm Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] extdist: clone composer into /srv/composer - change (operations/puppet)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/176294 Change subject: extdist: clone composer into /srv/composer .. extdist: clone composer into /srv/composer Bug: T70940 Change-Id: I9c4c655eec649019bd40bcd397e9e8a435e448d2 --- M modules/extdist/manifests/init.pp 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/176294/1 diff --git a/modules/extdist/manifests/init.pp b/modules/extdist/manifests/init.pp index b7e2692..176dbb6 100644 --- a/modules/extdist/manifests/init.pp +++ b/modules/extdist/manifests/init.pp @@ -64,6 +64,16 @@ group => 'extdist', } +git::clone { 'integration/composer': +ensure => 'latest', +directory => '/srv/composer', +branch => 'master', +require=> User['extdist'], +recurse_submodules => true, +owner => 'extdist', +group => 'extdist', +} + file { '/etc/extdist.conf': ensure => present, content => ordered_json($ext_settings), -- To view, visit https://gerrit.wikimedia.org/r/176294 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c4c655eec649019bd40bcd397e9e8a435e448d2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace webservice bash script with python script - change (labs/toollabs)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/176293 Change subject: Replace webservice bash script with python script .. Replace webservice bash script with python script Too big to bash Change-Id: I8eb49476544900629837768f4539215f0dc897f8 --- M misctools/webservice 1 file changed, 149 insertions(+), 101 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs refs/changes/93/176293/1 diff --git a/misctools/webservice b/misctools/webservice index e5ef365..e5f6e10 100755 --- a/misctools/webservice +++ b/misctools/webservice @@ -1,114 +1,162 @@ -#! /bin/bash +#!/usr/bin/python +import os +import pwd +import re +import subprocess +import argparse +import xml.etree.ElementTree as ET -prefix=$(/bin/cat /etc/wmflabs-project) -tool=$(/usr/bin/id -nu|sed -e "s/^$prefix.//") -user="$prefix.$tool" -server="lighttpd" -public="public_html" -memlimit=4g -if [ -r "/data/project/.system/config/$tool.web-memlimit" ]; then - memlimit=$(cat "/data/project/.system/config/$tool.web-memlimit") -fi +def read_file(path, default=None): +""" +Helper function to return contents of file if it exists, or a default value. -case "$1" in - -tomcat) -server="tomcat" -public="public_tomcat" -shift -;; - -lighttpd) -shift -;; - -*) -echo "Unknown webservice type $1" >&2 -exit 1 -;; -esac +:param path: Path to file to read from +:param default: Value to return if the file does not exist +:return: String containing either contents of the file, or default value +""" +if os.path.exists(path): +with open(path) as f: +return f.read() +return default -home=$(getent passwd $user | cut -d : -f 6 | sed -e 's/\/$//') -if [ "$(getent group $user | cut -d : -f 1)" != "$user" ]; then -echo "$0: $tool does not appear to be a tool" >&2 -exit 1 -fi -if [ "$home" = "" -o ! -d "$home/$public" ]; then -echo "$tool does not have a $public" >&2 -exit 1 -fi +def start_web_job(server): +""" +Submits a job to the grid, running a particular server, for current user -job=$(qstat -q "webgrid-$server" -j "$server-$tool" 2>&1 | grep job_number: | sed -e 's/^.* *\(.*\)$/\1/') -if [ "$job" != "" ]; then -si=$(qstat -j "$job" 2>&1 | grep 'scheduling info': | sed -e 's/^.*: *\(.*\)$/\1/') -fi +:param server: Server type to start job as. Current options are lighttpd and tomcat +""" +command = ['qsub', + '-e', '%s/error.log' % HOME, + '-o', '%s/error.log' % HOME, + '-i', '/dev/null', + '-q', 'webgrid-%s' % server, + '-l', 'h_vmem=%s' % MEMLIMIT, + '-b', 'y', + '-N', '%s-%s' % (server, TOOL), + '/usr/local/bin/tool-%s' % server] +subprocess.check_call(command) -waitdown() { -wj="$1" -while [ "$wj" = "$1" ]; do -wj=$(qstat -j "$1" 2>&1 | grep job_number: | sed -e 's/^.* *\(.*\)$/\1/') -echo -n . -sleep 1 -done -} +def stop_job(job_id): +""" +Deletes a job with given job id from the grid -case "$1" in -start) +:param job_id: Job id to delete +""" +command = ['qdel', job_id] +subprocess.check_call(command) -echo -n "Starting webservice..." -if [ "$job" != "" ]; then -echo "Webservice already running." -else -if qsub -e $home/error.log -o $home/error.log -i /dev/null -q "webgrid-$server" -l h_vmem=$memlimit -b y -N "$server-$tool" /usr/local/bin/tool-$server >/dev/null 2>&1 ; then -echo " started." -else -echo " failed." -fi -fi -;; -restart) -echo -n "Restarting webservice.." -if [ "$job" != "" ]; then -qdel -j "$job" >/dev/null 2>&1 -waitdown "$job" -else -echo -n . -fi -if qsub -e $home/error.log -o /dev/null -i /dev/null -q "webgrid-$server" -l h_vmem=$memlimit -b y -N "$server-$tool" /usr/local/bin/tool-$server >/dev/null 2>&1; then -echo " restarted." -else -echo " failed." -fi -;; -status) -if [ "$job" != "" ]; then -if [ "$si" != "" ]; then -echo "Your webservice is scheduled:" -echo " $si" -else -echo "Your webservice is running (job $job)." -fi -exit 0 -else -echo "Your webservice is not running." -exit 1 -fi -;; +def qstat_xml(*args): +""" +Executes a qstat call and returns the output in XML format -stop) -if [ "$job" != "" ]; then -echo -n "Stopping webservice.." -qdel -j "$job" >/dev/null 2>&1 -waitdown "$job" -echo " stopped." -e
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/176292 Change subject: Fixed spacing .. Fixed spacing - Added/removed spaces around parenthesis - Added newline in empty blocks - Added space after switch/foreach/function - Use tabs at begin of line - Add newline at end of file Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d --- M includes/CdbCompat.php M includes/Status.php M includes/api/ApiOpenSearch.php M includes/cache/LocalisationCache.php M includes/db/Database.php M includes/filebackend/FSFileBackend.php M includes/media/Bitmap.php M includes/parser/Parser.php M includes/profiler/ProfilerStandard.php M includes/profiler/ProfilerXhprof.php M includes/profiler/SectionProfiler.php M includes/profiler/output/ProfilerOutputText.php M includes/utils/AutoloadGenerator.php M maintenance/backupTextPass.inc M tests/phpunit/includes/media/FormatMetadataTest.php M tests/phpunit/maintenance/backupTextPassTest.php 16 files changed, 36 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/176292/1 diff --git a/includes/CdbCompat.php b/includes/CdbCompat.php index 0c00b39..0074cc9 100644 --- a/includes/CdbCompat.php +++ b/includes/CdbCompat.php @@ -29,14 +29,17 @@ /** * @deprecated since 1.25 */ -abstract class CdbReader extends \Cdb\Reader {} +abstract class CdbReader extends \Cdb\Reader { +} /** * @deprecated since 1.25 */ -abstract class CdbWriter extends \Cdb\Writer {} +abstract class CdbWriter extends \Cdb\Writer { +} /** * @deprecated since 1.25 */ -class CdbException extends \Cdb\Exception {} +class CdbException extends \Cdb\Exception { +} diff --git a/includes/Status.php b/includes/Status.php index 265eae1..fb267bd 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -469,7 +469,7 @@ public function __toString() { $status = $this->isOK() ? "OK" : "Error"; if ( count( $this->errors ) ) { - $errorcount = "collected " . ( count($this->errors) ) . " error(s) on the way"; + $errorcount = "collected " . ( count( $this->errors ) ) . " error(s) on the way"; } else { $errorcount = "no errors detected"; } @@ -486,16 +486,16 @@ $errorcount, $valstr ); - if ( count ($this->errors ) > 0 ) { + if ( count( $this->errors ) > 0 ) { $hdr = sprintf( "+-%'-4s-+-%'-25s-+-%'-40s-+\n", "", "", "" ); $i = 1; $out .= "\n"; $out .= $hdr; - foreach( $this->getStatusArray() as $stat ) { + foreach ( $this->getStatusArray() as $stat ) { $out .= sprintf( "| %4d | %-25.25s | %-40.40s |\n", $i, $stat[0], - implode(" ", array_slice( $stat, 1 ) ) + implode( " ", array_slice( $stat, 1 ) ) ); $i += 1; } diff --git a/includes/api/ApiOpenSearch.php b/includes/api/ApiOpenSearch.php index 4a9e216..2235ba9 100644 --- a/includes/api/ApiOpenSearch.php +++ b/includes/api/ApiOpenSearch.php @@ -59,7 +59,7 @@ } public function getCustomPrinter() { - switch( $this->getFormat() ) { + switch ( $this->getFormat() ) { case 'json': return $this->getMain()->createPrinterByName( 'json' . $this->fm ); diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index 2a3cd38..4dbe26e 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -23,6 +23,7 @@ use Cdb\Exception as CdbException; use Cdb\Reader as CdbReader; use Cdb\Writer as CdbWriter; + /** * Class for caching the contents of localisation files, Messages*.php * and *.i18n.php. diff --git a/includes/db/Database.php b/includes/db/Database.php index fc13eeb..cbfad07 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1003,7 +1003,7 @@ if ( $queryProf != '' ) { $queryStartTime = microtime( true ); $queryProfile = new ScopedCallback( - function() use ( $queryStartTime, $queryProf, $isMaster ) { + function () use ( $queryStartTime, $queryProf, $isMaster ) { $trxProfiler = Profiler::instance()->getTransactionProfiler(); $trxProfiler->recordQueryCompletion( $queryProf, $quer
[MediaWiki-commits] [Gerrit] PostgreSQL: Port update-keys.sql to PostgreSQL - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/176291 Change subject: PostgreSQL: Port update-keys.sql to PostgreSQL .. PostgreSQL: Port update-keys.sql to PostgreSQL This fixes the same bug in PostgreSQL that was reported against Oracle as bug 71040, using the same method of copying the update-keys.sql script into maintenance/postgres. Since all three copies of this file do the same thing, perhaps we should find lowest-common-denominator syntax that works in all databases to avoid redundant copies that can get out of sync with each other. (The Oracle and PostgreSQL versions are already identical to each other). The comments in the file are confusing and ungrammatical, but they are a copy of the same language from the other copies. Since I don't know what it is trying to say, I can't fix it. I have verified that this patch fixes the problem where mediawiki could not be installed with PostgreSQL using either the CLI or the web installer, due to SQL syntax errors. I haven't tested the the update-keys actually accomplishes whatever it was introduced to accomplish, though. Bug: 72834 Change-Id: I2a0cfa3dd0751b9fb65450b1537b6e77be60009a (cherry picked from commit 44b4b45bfa49f88f5ec92c4a445cdfe405841969) --- A maintenance/postgres/update-keys.sql 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/91/176291/1 diff --git a/maintenance/postgres/update-keys.sql b/maintenance/postgres/update-keys.sql new file mode 100644 index 000..7761d0c --- /dev/null +++ b/maintenance/postgres/update-keys.sql @@ -0,0 +1,29 @@ +-- SQL to insert update keys into the initial tables after a +-- fresh installation of MediaWiki's database. +-- This is read and executed by the install script; you should +-- not have to run it by itself unless doing a manual install. +-- Insert keys here if either the unnecessary would cause heavy +-- processing or could potentially cause trouble by lowering field +-- sizes, adding constraints, etc. +-- When adjusting field sizes, it is recommended removing old +-- patches but to play safe, update keys should also inserted here. + +-- The /*_*/ comments in this and other files are +-- replaced with the defined table prefix by the installer +-- and updater scripts. If you are installing or running +-- updates manually, you will need to manually insert the +-- table prefix if any when running these scripts. +-- + +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'image-img_major_mime-patch-img_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_properties-up_property-patch-up_property.sql', null ); -- To view, visit https://gerrit.wikimedia.org/r/176291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a0cfa3dd0751b9fb65450b1537b6e77be60009a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_24 Gerrit-Owner: Legoktm Gerrit-Reviewer: Jjanes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] PostgreSQL: Port update-keys.sql to PostgreSQL - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: PostgreSQL: Port update-keys.sql to PostgreSQL .. PostgreSQL: Port update-keys.sql to PostgreSQL This fixes the same bug in PostgreSQL that was reported against Oracle as bug 71040, using the same method of copying the update-keys.sql script into maintenance/postgres. Since all three copies of this file do the same thing, perhaps we should find lowest-common-denominator syntax that works in all databases to avoid redundant copies that can get out of sync with each other. (The Oracle and PostgreSQL versions are already identical to each other). The comments in the file are confusing and ungrammatical, but they are a copy of the same language from the other copies. Since I don't know what it is trying to say, I can't fix it. I have verified that this patch fixes the problem where mediawiki could not be installed with PostgreSQL using either the CLI or the web installer, due to SQL syntax errors. I haven't tested the the update-keys actually accomplishes whatever it was introduced to accomplish, though. Bug: 72834 Change-Id: I2a0cfa3dd0751b9fb65450b1537b6e77be60009a --- A maintenance/postgres/update-keys.sql 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: Tim Landscheidt: Looks good to me, but someone else must approve Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/postgres/update-keys.sql b/maintenance/postgres/update-keys.sql new file mode 100644 index 000..7761d0c --- /dev/null +++ b/maintenance/postgres/update-keys.sql @@ -0,0 +1,29 @@ +-- SQL to insert update keys into the initial tables after a +-- fresh installation of MediaWiki's database. +-- This is read and executed by the install script; you should +-- not have to run it by itself unless doing a manual install. +-- Insert keys here if either the unnecessary would cause heavy +-- processing or could potentially cause trouble by lowering field +-- sizes, adding constraints, etc. +-- When adjusting field sizes, it is recommended removing old +-- patches but to play safe, update keys should also inserted here. + +-- The /*_*/ comments in this and other files are +-- replaced with the defined table prefix by the installer +-- and updater scripts. If you are installing or running +-- updates manually, you will need to manually insert the +-- table prefix if any when running these scripts. +-- + +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'image-img_major_mime-patch-img_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null ); +INSERT INTO /*_*/updatelog (ul_key, ul_value) + VALUES( 'user_properties-up_property-patch-up_property.sql', null ); -- To view, visit https://gerrit.wikimedia.org/r/170395 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a0cfa3dd0751b9fb65450b1537b6e77be60009a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jjanes Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Springle Gerrit-Reviewer: Tim Landscheidt Gerrit-Reviewer: jenkins-bot <> Gerrit-Reviewer: saper ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] graphite/txstatsd: re-introduce require_package - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: graphite/txstatsd: re-introduce require_package .. graphite/txstatsd: re-introduce require_package We need require_package as the two classes have overlapping package needs; however when using require_package, the resource is not always declared within the same module, so we just require to have the stub class require_package creates Change-Id: I8ce1727d4ebf180d98d507fe0d41147887e3579b Signed-off-by: Giuseppe Lavagetto --- M modules/graphite/manifests/init.pp M modules/txstatsd/manifests/init.pp 2 files changed, 12 insertions(+), 8 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/graphite/manifests/init.pp b/modules/graphite/manifests/init.pp index a27918a..41a27ed 100644 --- a/modules/graphite/manifests/init.pp +++ b/modules/graphite/manifests/init.pp @@ -13,8 +13,8 @@ $storage_schemas, $storage_aggregation = {}, $storage_dir = '/var/lib/carbon', -) { -package { ['graphite-carbon', 'python-whisper']: } +) { +require_package('graphite-carbon', 'python-whisper') $carbon_service_defaults = { log_updates => false, @@ -41,24 +41,24 @@ group => '_graphite', mode=> '0755', before => Service['carbon'], -require => Package['graphite-carbon'], +require => Class['packages::graphite_carbon'], } file { '/etc/carbon/storage-schemas.conf': content => configparser_format($storage_schemas), -require => Package['graphite-carbon'], +require => Class['packages::graphite_carbon'], notify => Service['carbon'], } file { '/etc/carbon/carbon.conf': content => configparser_format($carbon_defaults, $carbon_settings), -require => Package['graphite-carbon'], +require => Class['packages::graphite_carbon'], notify => Service['carbon'], } file { '/etc/carbon/storage-aggregation.conf': content => configparser_format($storage_aggregation), -require => Package['graphite-carbon'], +require => Class['packages::graphite_carbon'], notify => Service['carbon'], } diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index 1b8923f..e2af1c7 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -23,7 +23,7 @@ # } # class txstatsd($settings) { -package { ['python-txstatsd', 'python-twisted-web']: } +require_package('python-txstatsd', 'python-twisted-web', 'graphite-carbon') file { '/etc/init/txstatsd.conf': source => 'puppet:///modules/txstatsd/txstatsd.conf', @@ -56,7 +56,11 @@ subscribe => File['/etc/txstatsd/txstatsd.cfg'], require => [ File['/etc/init/txstatsd.conf'], -Package['python-txstatsd', 'python-twisted-web'], +Class[ + 'packages::python_txstatsd', + 'packages::python_twisted_web', + 'packages::graphite_carbon' + ], User['txstatsd'], ], } -- To view, visit https://gerrit.wikimedia.org/r/176289 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ce1727d4ebf180d98d507fe0d41147887e3579b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix PHP Notice in Special:Version - change (mediawiki...SyntaxHighlight_GeSHi)
jenkins-bot has submitted this change and it was merged. Change subject: Fix PHP Notice in Special:Version .. Fix PHP Notice in Special:Version Follow-up to broken revert Ic724f6fe1b1c Change-Id: I61d19394997cc3499fa084d1b3dc8a7706a499d1 --- M SyntaxHighlight_GeSHi.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, but someone else must approve Reedy: Looks good to me, approved GOIII: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php index 7b0ef4b..32e2235 100644 --- a/SyntaxHighlight_GeSHi.php +++ b/SyntaxHighlight_GeSHi.php @@ -42,7 +42,7 @@ include_once __DIR__ . '/SyntaxHighlight_GeSHi.langs.php'; -$wgExtensionCredits['parserhook'][] = array( +$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array( 'path' => __FILE__, 'name' => 'SyntaxHighlight', 'author' => array( 'Brion Vibber', 'Tim Starling', 'Rob Church', 'Niklas Laxström' ), -- To view, visit https://gerrit.wikimedia.org/r/174923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61d19394997cc3499fa084d1b3dc8a7706a499d1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: GOIII Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Reedy Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Also propagate moves/deletions from non-Wikibase enabled nam... - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/176290 Change subject: Also propagate moves/deletions from non-Wikibase enabled namespaces .. Also propagate moves/deletions from non-Wikibase enabled namespaces Per discussion with Lydia: If we start with invalid data, but end up with valid data there's no reason not to propagate the move. Same goes for deletions. Change-Id: I02ecfffa1c69b230171a89c44a7859ecba9eda3f --- M client/includes/hooks/UpdateRepoHookHandlers.php 1 file changed, 1 insertion(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/90/176290/1 diff --git a/client/includes/hooks/UpdateRepoHookHandlers.php b/client/includes/hooks/UpdateRepoHookHandlers.php index 2ad721e..a1b2180 100644 --- a/client/includes/hooks/UpdateRepoHookHandlers.php +++ b/client/includes/hooks/UpdateRepoHookHandlers.php @@ -205,11 +205,6 @@ * @return bool */ private function doArticleDeleteComplete( Title $title, User $user ) { - if ( !$this->isWikibaseEnabled( $title->getNamespace() ) ) { - // shorten out - return true; - } - if ( $this->propagateChangesToRepo !== true ) { return true; } @@ -249,8 +244,7 @@ * @return bool */ private function doTitleMoveComplete( Title $oldTitle, Title $newTitle, User $user ) { - if ( !$this->isWikibaseEnabled( $oldTitle->getNamespace() ) - && !$this->isWikibaseEnabled( $newTitle->getNamespace() ) ) { + if ( !$this->isWikibaseEnabled( $newTitle->getNamespace() ) ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/176290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02ecfffa1c69b230171a89c44a7859ecba9eda3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] graphite/txstatsd: re-introduce require_package - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/176289 Change subject: graphite/txstatsd: re-introduce require_package .. graphite/txstatsd: re-introduce require_package We need require_package as the two classes have overlapping package needs; however when using require_package, the resource is not always declared within the same module, so we just require to have the stub class require_package creates Change-Id: I8ce1727d4ebf180d98d507fe0d41147887e3579b Signed-off-by: Giuseppe Lavagetto --- M modules/graphite/manifests/init.pp M modules/txstatsd/manifests/init.pp 2 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/176289/1 diff --git a/modules/graphite/manifests/init.pp b/modules/graphite/manifests/init.pp index a27918a..1a88ec1 100644 --- a/modules/graphite/manifests/init.pp +++ b/modules/graphite/manifests/init.pp @@ -13,8 +13,8 @@ $storage_schemas, $storage_aggregation = {}, $storage_dir = '/var/lib/carbon', -) { -package { ['graphite-carbon', 'python-whisper']: } +) { +require_package('graphite-carbon', 'python-whisper') $carbon_service_defaults = { log_updates => false, @@ -41,24 +41,24 @@ group => '_graphite', mode=> '0755', before => Service['carbon'], -require => Package['graphite-carbon'], +require => Class['package::graphite_carbon'], } file { '/etc/carbon/storage-schemas.conf': content => configparser_format($storage_schemas), -require => Package['graphite-carbon'], +require => Class['package::graphite_carbon'], notify => Service['carbon'], } file { '/etc/carbon/carbon.conf': content => configparser_format($carbon_defaults, $carbon_settings), -require => Package['graphite-carbon'], +require => Class['package::graphite_carbon'], notify => Service['carbon'], } file { '/etc/carbon/storage-aggregation.conf': content => configparser_format($storage_aggregation), -require => Package['graphite-carbon'], +require => Class['package::graphite_carbon'], notify => Service['carbon'], } diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index 1b8923f..699ea7b 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -23,7 +23,7 @@ # } # class txstatsd($settings) { -package { ['python-txstatsd', 'python-twisted-web']: } +require_package('python-txstatsd', 'python-twisted-web', 'graphite-carbon') file { '/etc/init/txstatsd.conf': source => 'puppet:///modules/txstatsd/txstatsd.conf', @@ -56,7 +56,7 @@ subscribe => File['/etc/txstatsd/txstatsd.cfg'], require => [ File['/etc/init/txstatsd.conf'], -Package['python-txstatsd', 'python-twisted-web'], +Class['package::python_txstatsd', 'package::python_twisted_web', 'package::graphite_carbon'], User['txstatsd'], ], } -- To view, visit https://gerrit.wikimedia.org/r/176289 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ce1727d4ebf180d98d507fe0d41147887e3579b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix crash while expanding templates on older wikis - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Fix crash while expanding templates on older wikis .. Fix crash while expanding templates on older wikis * They still put the wikitext in *, which resulted in the input to the tokenizer being undefined. * Here we ensure it's a string. * Introduced in c4ae060af704d5c981e7c69df791b0c18a1d6567. Bug: T75526 Change-Id: I1f4b5f6a16f0f2b25a89b64f6bd3ae8243865868 --- M lib/mediawiki.ApiRequest.js M lib/mediawiki.tokenizer.peg.js 2 files changed, 76 insertions(+), 72 deletions(-) Approvals: Marcoil: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mediawiki.ApiRequest.js b/lib/mediawiki.ApiRequest.js index cc088d8..a0fcde4 100644 --- a/lib/mediawiki.ApiRequest.js +++ b/lib/mediawiki.ApiRequest.js @@ -404,42 +404,43 @@ util.inherits( PreprocessorRequest, ApiRequest ); PreprocessorRequest.prototype._handleJSON = function ( error, data ) { + if ( !error && !(data && data.expandtemplates) ) { + error = new Error( util.format('Expanding template for %s: %s', + this.title, this.text) ); + } + if ( error ) { - this.env.log("error", error); + this.env.log( "error", error ); this._processListeners( error, '' ); return; } var src = ''; - try { + if ( data.expandtemplates.wikitext !== undefined ) { src = data.expandtemplates.wikitext; - } catch ( e2 ) { - error = new DoesNotExistError( 'Did not find page revisions in the returned body for ' + - this.title + e2 ); + } else if ( data.expandtemplates["*"] !== undefined ) { + // For backwards compatibility. Older wikis still put the data here. + src = data.expandtemplates["*"]; } - if ( !error ) { - //console.warn( 'Page ' + title + ': got ' + src ); - this.env.tp( 'Expanded ', this.text, src ); + this.env.tp( 'Expanded ', this.text, src ); - // Add the categories which were added by parser functions directly - // into the page and not as in-text links. - if (data.expandtemplates.categories) { - for (var i in data.expandtemplates.categories) { - var category = data.expandtemplates.categories[i]; - src += '\n[[Category:' + category['*']; - if (category.sortkey) { - src += "|" + category.sortkey; - } - src += ']]'; + // Add the categories which were added by parser functions directly + // into the page and not as in-text links. + if (data.expandtemplates.categories) { + for (var i in data.expandtemplates.categories) { + var category = data.expandtemplates.categories[i]; + src += '\n[[Category:' + category['*']; + if (category.sortkey) { + src += "|" + category.sortkey; } + src += ']]'; } - - // Add the source to the cache - this.env.pageCache[this.text] = src; } - //console.log( this.listeners('src') ); + // Add the source to the cache + this.env.pageCache[this.text] = src; + this._processListeners( error, src ); }; @@ -510,72 +511,72 @@ var dummyDoc = domino.createDocument(); PHPParseRequest.prototype._handleJSON = function ( error, data ) { + if ( !error && !(data && data.parse) ) { + error = new Error( util.format('Parsing extension for %s: %s', + this.title, this.text) ); + } + if ( error ) { + this.env.log( "error", error ); this._processListeners( error, '' ); return; } var parsedHtml = ''; - try { - // Strip paragraph wrapper from the html + if ( data.parse.text['*'] !== undefined ) { parsedHtml = data.parse.text['*']; - } catch ( e2 ) { - error = new DoesNotExistError( 'Could not expand extension content for ' + - this.title + e2 ); } - if ( !error ) { - // Strip two trailing newlines that action=parse adds after any - // extension output - parsedHtml = parsedHtml.replace(/\n\n$/, ''); - // Also strip a paragraph wrapper, if any - parsedHtml = parsedHtml.replace(/(^)|(<\/p>$)/g, ''); + // Strip two trailing newlines that action=parse adds after any + // extension output + parsedHtml = parsedH
[MediaWiki-commits] [Gerrit] Restore default configuration for ruwikisource bureaucrats - change (operations/mediawiki-config)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/176287 Change subject: Restore default configuration for ruwikisource bureaucrats .. Restore default configuration for ruwikisource bureaucrats Change-Id: Ie4f5b3bb710a5ca542dfbd999484210f43e34117 Task: T44105 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/87/176287/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 40fabab..813f127 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8976,7 +8976,7 @@ 'sysop' => array( 'autoeditor' ) ), '+ruwikisource' => array( - 'bureaucrat' => array( 'sysop', 'bureaucrat', 'autoeditor', 'rollbacker' ), + 'bureaucrat' => array( 'autoeditor', 'rollbacker' ), 'sysop' => array( 'autoeditor', 'rollbacker', 'abusefilter', 'flood' ), ), '+ruwikivoyage' => array( -- To view, visit https://gerrit.wikimedia.org/r/176287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4f5b3bb710a5ca542dfbd999484210f43e34117 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make Validator::validate methods return Status object - change (mediawiki...CirrusSearch)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/176286 Change subject: Make Validator::validate methods return Status object .. Make Validator::validate methods return Status object This makes it possible to return the exact error message at that point, so we can remove the error() method in Validator. Change-Id: I1e77ad5334938e312b2907542dce7046a7009db8 --- M includes/Maintenance/Validators/AnalyzersValidator.php M includes/Maintenance/Validators/CacheWarmersValidator.php M includes/Maintenance/Validators/MappingValidator.php M includes/Maintenance/Validators/MaxShardsPerNodeValidator.php M includes/Maintenance/Validators/NumberOfShardsValidator.php M includes/Maintenance/Validators/ReplicaRangeValidator.php M includes/Maintenance/Validators/ShardAllocationValidator.php M includes/Maintenance/Validators/Validator.php M maintenance/updateOneSearchIndexConfig.php 9 files changed, 85 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/86/176286/1 diff --git a/includes/Maintenance/Validators/AnalyzersValidator.php b/includes/Maintenance/Validators/AnalyzersValidator.php index 85cb59f..25f552a 100644 --- a/includes/Maintenance/Validators/AnalyzersValidator.php +++ b/includes/Maintenance/Validators/AnalyzersValidator.php @@ -5,6 +5,8 @@ use CirrusSearch\Maintenance\AnalysisConfigBuilder; use CirrusSearch\Maintenance\Maintenance; use Elastica\Index; +use RawMessage; +use Status; class AnalyzersValidator extends Validator { /** @@ -29,6 +31,9 @@ $this->analysisConfigBuilder = $analysisConfigBuilder; } + /** +* @return Status +*/ public function validate() { $this->outputIndented( "Validating analyzers..." ); $settings = $this->index->getSettings()->get(); @@ -37,9 +42,12 @@ $this->output( "ok\n" ); } else { $this->output( "cannot correct\n" ); - return false; + return Status::newFatal( new RawMessage( + "This script encountered an index difference that requires that the index be\n" . + "copied, indexed to, and then the old index removed. Re-run this script with the\n" . + "--reindexAndRemoveOk --indexIdentifier=now parameters to do this." ) ); } - return true; + return Status::newGood(); } } diff --git a/includes/Maintenance/Validators/CacheWarmersValidator.php b/includes/Maintenance/Validators/CacheWarmersValidator.php index 5204ab2..5a3e231 100644 --- a/includes/Maintenance/Validators/CacheWarmersValidator.php +++ b/includes/Maintenance/Validators/CacheWarmersValidator.php @@ -9,6 +9,8 @@ use Elastica; use Elastica\Exception\ResponseException; use Elastica\Type; +use RawMessage; +use Status; use Title; class CacheWarmersValidator extends Validator { @@ -35,7 +37,7 @@ } /** -* @return bool +* @return Status */ public function validate() { $this->outputIndented( "Validating cache warmers...\n" ); @@ -46,8 +48,11 @@ $warmersToUpdate = $this->diff( $expectedWarmers, $actualWarmers ); $warmersToDelete = array_diff_key( $actualWarmers, $expectedWarmers ); - return $this->updateWarmers( $warmersToUpdate ) - && $this->deleteWarmers( $warmersToDelete ); + $status = $this->updateWarmers( $warmersToUpdate ); + $status2 = $this->deleteWarmers( $warmersToDelete ); + + $status->merge( $status2 ); + return $status; } private function buildExpectedWarmers() { @@ -114,18 +119,18 @@ } catch ( ResponseException $e ) { if ( preg_match( '/dynamic scripting for \\[.*\\] disabled/', $e->getResponse()->getError() ) ) { $this->output( "couldn't create dynamic script!\n" ); - $this->error( "Couldn't create the dynamic script required for Cirrus to work properly. " . + return Status::newFatal( new RawMessage( + "Couldn't create the dynamic script required for Cirrus to work properly. " . "For now, Cirrus requires dynamic scripting. It'll switch to sandboxed Groovy when it " . "updates to support Elasticsearch 1.3.1 we promise. For now enable dynamic scripting and " . "keep Elasticsearch safely not accessible to people yo
[MediaWiki-commits] [Gerrit] Move validateMapping code into separate class - change (mediawiki...CirrusSearch)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/176285 Change subject: Move validateMapping code into separate class .. Move validateMapping code into separate class Meanwhile removed the now unused checkConfig methods Change-Id: I0c7192c59198a92d9ba3e22bf1b44db3522b2c24 --- M CirrusSearch.php A includes/Maintenance/Validators/MappingValidator.php M maintenance/updateOneSearchIndexConfig.php 3 files changed, 131 insertions(+), 120 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/85/176285/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index 7f1b6ff..55a81ae 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -583,6 +583,7 @@ $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\NumberOfShardsValidator'] = $maintenanceDir . '/Validators/NumberOfShardsValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\ReplicaRangeValidator'] = $maintenanceDir . '/Validators/ReplicaRangeValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\AnalyzersValidator'] = $maintenanceDir . '/Validators/AnalyzersValidator.php'; +$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\MappingValidator'] = $maintenanceDir . '/Validators/MappingValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\UpdateVersionIndex'] = __DIR__ . '/maintenance/updateVersionIndex.php'; $wgAutoloadClasses['CirrusSearch\NearMatchPicker'] = $includes . 'NearMatchPicker.php'; $wgAutoloadClasses['CirrusSearch\OtherIndexes'] = $includes . 'OtherIndexes.php'; diff --git a/includes/Maintenance/Validators/MappingValidator.php b/includes/Maintenance/Validators/MappingValidator.php new file mode 100644 index 000..32a1fc0 --- /dev/null +++ b/includes/Maintenance/Validators/MappingValidator.php @@ -0,0 +1,119 @@ +index = $index; + $this->optimizeIndexForExperimentalHighlighter = $optimizeIndexForExperimentalHighlighter; + $this->availablePlugins = $availablePlugins; + $this->mappingConfig = $mappingConfig; + $this->pageType = $pageType; + $this->namespaceType = $namespaceType; + } + + public function validate() { + $this->outputIndented( "Validating mappings..." ); + if ( $this->optimizeIndexForExperimentalHighlighter && + !in_array( 'experimental highlighter', $this->availablePlugins ) ) { + $this->output( "impossible!\n" ); + $this->error( "wgCirrusSearchOptimizeIndexForExperimentalHighlighter is set to true but the " . + "'experimental highlighter' plugin is not installed on all hosts.", 1 ); + return false; + } + + $requiredMappings = $this->mappingConfig; + if ( !$this->checkMapping( $requiredMappings ) ) { + // TODO Conflict resolution here might leave old portions of mappings + $pageAction = new Mapping( $this->pageType ); + foreach ( $requiredMappings[ 'page' ] as $key => $value ) { + $pageAction->setParam( $key, $value ); + } + $namespaceAction = new Mapping( $this->namespaceType ); + foreach ( $requiredMappings[ 'namespace' ] as $key => $value ) { + $namespaceAction->setParam( $key, $value ); + } + try { + $pageAction->send(); + $namespaceAction->send(); + $this->output( "corrected\n" ); + } catch ( ExceptionInterface $e ) { + $this->output( "failed!\n" ); + $message = ElasticsearchIntermediary::extractMessage( $e ); + $this->error( "Couldn't update mappings. Here is elasticsearch's error message: $message\n", 1 ); + return false; + } + } + + return true; + } + + /** +* Check that the mapping returned from Elasticsearch is as we want it. +* +* @param array $requiredMappings the mappings we want +* @return bool is the mapping good enough for us? +*/ + private function checkMapping( $requiredMappings ) { + $actualMappings = $this->index->getMapping(); + $this->output( "\n" ); + $this->outputIndented( "\tValidating mapping..." ); + if ( $this->checkConfig( $actualMappings, $requiredMappings ) ) { + $this->output( "ok\n" ); + return true; + } else { +
[MediaWiki-commits] [Gerrit] remove outdated README - change (mediawiki...CentralNotice)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/176284 Change subject: remove outdated README .. remove outdated README Nothing in here was true any more. We could use a new README, and it should link to the full documentation on mediawiki.org. Change-Id: Ieaadb53d1034481f03997f3dde39b715eaedfabc --- D README 1 file changed, 0 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/84/176284/1 diff --git a/README b/README deleted file mode 100644 index aa26ccb..000 --- a/README +++ /dev/null @@ -1,55 +0,0 @@ -FIXME: this document is very out-of-date. - -Wiki page HTML contains an unchanging bit that just sets JS variables -about what site this is, then calls an external
[MediaWiki-commits] [Gerrit] indentation fix - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176281 Change subject: indentation fix .. indentation fix Bug: T75898 Change-Id: I9c39fb71c4db63e32b963efeb18024bdf4e654ef --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/env.rb 2 files changed, 8 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/81/176281/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 180695b..3587a1b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,11 +10,6 @@ Style/GlobalVars: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -Style/IndentationWidth: - Enabled: false - # Offense count: 2 # Cop supports --auto-correct. Style/LeadingCommentSpace: diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index a63aa60..a6fbec7 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -84,14 +84,14 @@ end def sauce_api(json, session_id) -RestClient::Request.execute( - method: :put, - url: "https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{session_id}", - user: ENV['SAUCE_ONDEMAND_USERNAME'], - password: ENV['SAUCE_ONDEMAND_ACCESS_KEY'], - headers: {content_type: 'application/json'}, - payload: json -) + RestClient::Request.execute( +method: :put, +url: "https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{session_id}", +user: ENV['SAUCE_ONDEMAND_USERNAME'], +password: ENV['SAUCE_ONDEMAND_ACCESS_KEY'], +headers: {content_type: 'application/json'}, +payload: json + ) end WebDriver_Capabilities = Selenium::WebDriver::Remote::Capabilities -- To view, visit https://gerrit.wikimedia.org/r/176281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c39fb71c4db63e32b963efeb18024bdf4e654ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add empty lines (per rubocop style) - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176276 Change subject: add empty lines (per rubocop style) .. add empty lines (per rubocop style) Bug: T75898 Change-Id: I92a45c476124f9b76b25bbce87d410137a000f44 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/env.rb M lib/mediawiki_selenium/support/pages/login_page.rb 3 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/76/176276/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 86f936e..26ee827 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,12 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 8 -# Cop supports --auto-correct. -# Configuration parameters: AllowAdjacentOneLineDefs. -Style/EmptyLineBetweenDefs: - Enabled: false - # Offense count: 1 # Cop supports --auto-correct. Style/EmptyLines: diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index 61482ac..98035c4 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -30,6 +30,7 @@ local_browser(configuration) end end + def browser_name if ENV['BROWSER'] ENV['BROWSER'].to_sym @@ -37,6 +38,7 @@ :firefox end end + def environment if ENV['SAUCE_ONDEMAND_USERNAME'] && ENV['SAUCE_ONDEMAND_ACCESS_KEY'] && ENV['BROWSER'] != 'phantomjs' && ENV['HEADLESS'] != 'true' @@ -45,6 +47,7 @@ :local end end + def local_browser(configuration) if ENV['BROWSER_TIMEOUT'] && browser_name == :firefox timeout = ENV['BROWSER_TIMEOUT'].to_i @@ -79,6 +82,7 @@ set_cookie(browser) browser end + def sauce_api(json, session_id) RestClient::Request.execute( :method => :put, @@ -89,7 +93,9 @@ :payload => json ) end + WebDriver_Capabilities = Selenium::WebDriver::Remote::Capabilities + def sauce_browser(test_name, configuration) if (ENV['BROWSER'] == nil) || (ENV['PLATFORM'] == nil) || (ENV['VERSION'] == nil) abort 'Environment variables BROWSER, PLATFORM and VERSION have to be set' @@ -139,9 +145,11 @@ browser end + def set_cookie(_browser) # rubocop:disable Style/AccessorMethodName # implement this method in env.rb of the repository where it is needed end + def test_name(scenario) if scenario.respond_to? :feature "#{scenario.feature.title}: #{scenario.title}" diff --git a/lib/mediawiki_selenium/support/pages/login_page.rb b/lib/mediawiki_selenium/support/pages/login_page.rb index 42d73b9..bc3954b 100644 --- a/lib/mediawiki_selenium/support/pages/login_page.rb +++ b/lib/mediawiki_selenium/support/pages/login_page.rb @@ -26,6 +26,7 @@ def logged_in_as_element @browser.div(id: 'mw-content-text').p.b end + def login_with(username, password, wait_for_logout_element = true) self.username_element.when_present.send_keys(username) self.password_element.when_present.send_keys(password) -- To view, visit https://gerrit.wikimedia.org/r/176276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92a45c476124f9b76b25bbce87d410137a000f44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove extra blank line - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176277 Change subject: remove extra blank line .. remove extra blank line Change-Id: I455b7d78f19745da5c5601abb3870b9338487d51 --- M .rubocop_todo.yml M lib/mediawiki_selenium/step_definitions/upload_file_steps.rb 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/77/176277/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 26ee827..3489b24 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -7,11 +7,6 @@ # Offense count: 1 # Cop supports --auto-correct. -Style/EmptyLines: - Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. Style/EmptyLinesAroundBody: Enabled: false diff --git a/lib/mediawiki_selenium/step_definitions/upload_file_steps.rb b/lib/mediawiki_selenium/step_definitions/upload_file_steps.rb index 17c4cbb..8bf72bb 100644 --- a/lib/mediawiki_selenium/step_definitions/upload_file_steps.rb +++ b/lib/mediawiki_selenium/step_definitions/upload_file_steps.rb @@ -12,7 +12,6 @@ on(UploadPage).select_file = path end - When(/^upload file (.+)$/) do |file_name| require 'tempfile' path = "#{Dir.tmpdir}/#{file_name}" -- To view, visit https://gerrit.wikimedia.org/r/176277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I455b7d78f19745da5c5601abb3870b9338487d51 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove extra blank line (per rubocop) - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176278 Change subject: remove extra blank line (per rubocop) .. remove extra blank line (per rubocop) Change-Id: Ia6f8932396eb0fdded5188f4c463fbbfbe554529 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/sauce.rb 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/78/176278/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3489b24..3ae7f98 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,11 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -# Cop supports --auto-correct. -Style/EmptyLinesAroundBody: - Enabled: false - # Offense count: 7 # Configuration parameters: AllowedVariables. Style/GlobalVars: diff --git a/lib/mediawiki_selenium/support/sauce.rb b/lib/mediawiki_selenium/support/sauce.rb index 9384b00..5086f43 100644 --- a/lib/mediawiki_selenium/support/sauce.rb +++ b/lib/mediawiki_selenium/support/sauce.rb @@ -13,7 +13,6 @@ module Formatter # Sauce Lab specific cucumber formatter class Sauce < Junit - private def format_exception(exception) -- To view, visit https://gerrit.wikimedia.org/r/176278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6f8932396eb0fdded5188f4c463fbbfbe554529 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update hash syntax per rubocop - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176280 Change subject: update hash syntax per rubocop .. update hash syntax per rubocop Bug: T75898 Change-Id: Ibf78b4c4cda89eba2082e8fd4e42ce39d6a951f8 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/env.rb 2 files changed, 10 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/80/176280/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7465f21..180695b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,12 +10,6 @@ Style/GlobalVars: Enabled: false -# Offense count: 12 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/HashSyntax: - Enabled: false - # Offense count: 1 # Cop supports --auto-correct. Style/IndentationWidth: diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index 98035c4..a63aa60 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -58,7 +58,7 @@ profile = Selenium::WebDriver::Firefox::Profile.new profile['dom.max_script_run_time'] = timeout profile['dom.max_chrome_script_run_time'] = timeout -browser = Watir::Browser.new browser_name, :http_client => client, :profile => profile +browser = Watir::Browser.new browser_name, http_client: client, profile: profile elsif configuration && configuration[:language] && browser_name == :firefox profile = Selenium::WebDriver::Firefox::Profile.new profile['intl.accept_languages'] = configuration[:language] @@ -85,12 +85,12 @@ def sauce_api(json, session_id) RestClient::Request.execute( - :method => :put, - :url => "https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{session_id}", - :user => ENV['SAUCE_ONDEMAND_USERNAME'], - :password => ENV['SAUCE_ONDEMAND_ACCESS_KEY'], - :headers => {:content_type => 'application/json'}, - :payload => json + method: :put, + url: "https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{session_id}", + user: ENV['SAUCE_ONDEMAND_USERNAME'], + password: ENV['SAUCE_ONDEMAND_ACCESS_KEY'], + headers: {content_type: 'application/json'}, + payload: json ) end @@ -110,11 +110,11 @@ profile = Selenium::WebDriver::Firefox::Profile.new profile['dom.max_script_run_time'] = timeout profile['dom.max_chrome_script_run_time'] = timeout -caps = WebDriver_Capabilities.firefox(:firefox_profile => profile) +caps = WebDriver_Capabilities.firefox(firefox_profile: profile) elsif configuration && configuration[:language] && ENV['BROWSER'] == 'firefox' profile = Selenium::WebDriver::Firefox::Profile.new profile['intl.accept_languages'] = configuration[:language] -caps = WebDriver_Capabilities.firefox(:firefox_profile => profile) +caps = WebDriver_Capabilities.firefox(firefox_profile: profile) elsif configuration && configuration[:language] && ENV['BROWSER'] == 'chrome' profile = Selenium::WebDriver::Chrome::Profile.new profile['intl.accept_languages'] = configuration[:language] @@ -122,7 +122,7 @@ elsif configuration && configuration[:user_agent] && ENV['BROWSER'] == 'firefox' profile = Selenium::WebDriver::Firefox::Profile.new profile['general.useragent.override'] = configuration[:user_agent] -caps = WebDriver_Capabilities.firefox(:firefox_profile => profile) +caps = WebDriver_Capabilities.firefox(firefox_profile: profile) else caps = WebDriver_Capabilities.send(ENV['BROWSER']) end -- To view, visit https://gerrit.wikimedia.org/r/176280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf78b4c4cda89eba2082e8fd4e42ce39d6a951f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove nil comparison per rubocop - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176283 Change subject: remove nil comparison per rubocop .. remove nil comparison per rubocop Bug: T75898 Change-Id: Id239bfc2d7b3eb673e18749c275d850259627d61 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/env.rb 2 files changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/83/176283/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ddbf57b..2d01a0a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,11 +10,6 @@ Style/GlobalVars: Enabled: false -# Offense count: 3 -# Cop supports --auto-correct. -Style/NilComparison: - Enabled: false - # Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index a6fbec7..ea9c8f8 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -97,7 +97,7 @@ WebDriver_Capabilities = Selenium::WebDriver::Remote::Capabilities def sauce_browser(test_name, configuration) - if (ENV['BROWSER'] == nil) || (ENV['PLATFORM'] == nil) || (ENV['VERSION'] == nil) + if ENV['BROWSER'].nil? || ENV['PLATFORM'].nil? || ENV['VERSION'].nil? abort 'Environment variables BROWSER, PLATFORM and VERSION have to be set' end -- To view, visit https://gerrit.wikimedia.org/r/176283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id239bfc2d7b3eb673e18749c275d850259627d61 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use guard clause per rubocop - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176279 Change subject: use guard clause per rubocop .. use guard clause per rubocop Bug: T75898 Change-Id: I782716d40d3a484a188f412c978540410b7152fe --- M .rubocop_todo.yml M lib/mediawiki_selenium/warnings_formatter.rb 2 files changed, 10 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/79/176279/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3ae7f98..7465f21 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,11 +10,6 @@ Style/GlobalVars: Enabled: false -# Offense count: 2 -# Configuration parameters: MinBodyLength. -Style/GuardClause: - Enabled: false - # Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/lib/mediawiki_selenium/warnings_formatter.rb b/lib/mediawiki_selenium/warnings_formatter.rb index 2b2b19d..c4fc1f2 100644 --- a/lib/mediawiki_selenium/warnings_formatter.rb +++ b/lib/mediawiki_selenium/warnings_formatter.rb @@ -11,23 +11,20 @@ end def after_feature(feature) - if feature.mw_warnings.any? -feature.mw_warnings.each do |type, messages| - messages.each { |msg| @io.puts format_string(msg, :pending) } - @warning_counts[type] += messages.length -end - -@io.puts + return unless feature.mw_warnings.any? + feature.mw_warnings.each do |type, messages| +messages.each { |msg| @io.puts format_string(msg, :pending) } +@warning_counts[type] += messages.length end + @io.puts end def after_features(_features) - if @warning_counts.any? -@warning_counts.each do |type, count| - message = "#{count} warning#{count > 1 ? 's' : ''}" - message += " due to #{type}" unless type == :default - @io.puts format_string(message, :pending) -end + return unless @warning_counts.any? + @warning_counts.each do |type, count| +message = "#{count} warning#{count > 1 ? 's' : ''}" +message += " due to #{type}" unless type == :default +@io.puts format_string(message, :pending) end end -- To view, visit https://gerrit.wikimedia.org/r/176279 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I782716d40d3a484a188f412c978540410b7152fe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add basic documentation comments (per rubocop) - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176275 Change subject: add basic documentation comments (per rubocop) .. add basic documentation comments (per rubocop) Bug:T75898 Change-Id: Ibd5047e7872f77540e784f2a050f75ce113d9723 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/modules/sauce_helper.rb M lib/mediawiki_selenium/support/modules/url_module.rb M lib/mediawiki_selenium/support/pages/api_page.rb M lib/mediawiki_selenium/support/pages/login_page.rb M lib/mediawiki_selenium/support/pages/random_page.rb M lib/mediawiki_selenium/support/pages/reset_preferences_page.rb M lib/mediawiki_selenium/support/sauce.rb M lib/mediawiki_selenium/version.rb M lib/mediawiki_selenium/warnings_formatter.rb 10 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/75/176275/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 167c1ec..86f936e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,10 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 10 -Style/Documentation: - Enabled: false - # Offense count: 8 # Cop supports --auto-correct. # Configuration parameters: AllowAdjacentOneLineDefs. diff --git a/lib/mediawiki_selenium/support/modules/sauce_helper.rb b/lib/mediawiki_selenium/support/modules/sauce_helper.rb index 0cb9902..53916ed 100644 --- a/lib/mediawiki_selenium/support/modules/sauce_helper.rb +++ b/lib/mediawiki_selenium/support/modules/sauce_helper.rb @@ -1,4 +1,5 @@ module MediawikiSelenium + # Common Sauce Labs code module SauceHelper # The current Sauce session ID. # diff --git a/lib/mediawiki_selenium/support/modules/url_module.rb b/lib/mediawiki_selenium/support/modules/url_module.rb index 3a68814..65c5e82 100644 --- a/lib/mediawiki_selenium/support/modules/url_module.rb +++ b/lib/mediawiki_selenium/support/modules/url_module.rb @@ -7,6 +7,7 @@ # mediawiki_selenium top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. +# Common URL definitions module URL def self.url(name) if ENV['MEDIAWIKI_URL'] diff --git a/lib/mediawiki_selenium/support/pages/api_page.rb b/lib/mediawiki_selenium/support/pages/api_page.rb index 943bff8..44fc08f 100644 --- a/lib/mediawiki_selenium/support/pages/api_page.rb +++ b/lib/mediawiki_selenium/support/pages/api_page.rb @@ -1,5 +1,6 @@ require 'mediawiki_api' +# Simplified interface for pages class APIPage include PageObject diff --git a/lib/mediawiki_selenium/support/pages/login_page.rb b/lib/mediawiki_selenium/support/pages/login_page.rb index e75056a..42d73b9 100644 --- a/lib/mediawiki_selenium/support/pages/login_page.rb +++ b/lib/mediawiki_selenium/support/pages/login_page.rb @@ -7,6 +7,7 @@ # mediawiki_selenium top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. +# login page specific functions class LoginPage include PageObject diff --git a/lib/mediawiki_selenium/support/pages/random_page.rb b/lib/mediawiki_selenium/support/pages/random_page.rb index 3d78fd1..fa90b5e 100644 --- a/lib/mediawiki_selenium/support/pages/random_page.rb +++ b/lib/mediawiki_selenium/support/pages/random_page.rb @@ -7,6 +7,7 @@ # mediawiki_selenium top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. +# constants for load random page function class RandomPage include PageObject diff --git a/lib/mediawiki_selenium/support/pages/reset_preferences_page.rb b/lib/mediawiki_selenium/support/pages/reset_preferences_page.rb index 2ddb338..49de79e 100644 --- a/lib/mediawiki_selenium/support/pages/reset_preferences_page.rb +++ b/lib/mediawiki_selenium/support/pages/reset_preferences_page.rb @@ -7,6 +7,7 @@ # mediawiki_selenium top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. +# constants for reset preferences page class ResetPreferencesPage include PageObject include URL diff --git a/lib/mediawiki_selenium/support/sauce.rb b/lib/mediawiki_selenium/support/sauce.rb index 74e5b90..9384b00 100644 --- a/lib/mediawiki_selenium/support/sauce.rb +++ b/lib/mediawiki_selenium/support/sauce.rb @@ -11,6 +11,7 @@ module Cucumber module Formatter +# Sauce Lab specific cucumber formatter class Sauce < Junit private diff --git a/lib/mediawiki_selenium/version.rb b/lib/mediawiki_selenium/version.rb index 57dc2c5..5330a83 100644 --- a/lib/mediawiki_selenium/version.rb +++ b/lib/mediawiki_selenium/version.rb @@ -7,6 +7,7 @@ # mediawiki_selenium top-level directory and at # https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. +# Common code for using Selenium with Media Wiki module MediawikiSelenium VERSION = '0.4.1' end dif
[MediaWiki-commits] [Gerrit] disable cop in this instance only - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176282 Change subject: disable cop in this instance only .. disable cop in this instance only Bug: T75898 Change-Id: Icfcbb9e036994c96b0bf2a0673dbd36a59e6463c --- M .rubocop_todo.yml M Gemfile 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/82/176282/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3587a1b..ddbf57b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,11 +10,6 @@ Style/GlobalVars: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -Style/LeadingCommentSpace: - Enabled: false - # Offense count: 3 # Cop supports --auto-correct. Style/NilComparison: diff --git a/Gemfile b/Gemfile index 136a71d..7a99a20 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,8 @@ +# rubocop:disable Style/LeadingCommentSpace +# rvm seems to require no space so disable specifically here only #ruby=ruby-2.1.1 #ruby-gemset=mediawiki_selenium +# rubocop:enable Style/LeadingCommentSpace source 'https://rubygems.org' -- To view, visit https://gerrit.wikimedia.org/r/176282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfcbb9e036994c96b0bf2a0673dbd36a59e6463c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikidata - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata .. Update Wikidata Change-Id: I2ac829935a34696118d098859c9f592e744a25f3 --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/Wikidata b/extensions/Wikidata index c0eea89..33433d6 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit c0eea89e6532aecc46358f48db071bbaadcc81f5 +Subproject commit 33433d6e1ccda7fc5f4296e2c97efce104733c26 -- To view, visit https://gerrit.wikimedia.org/r/176274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ac829935a34696118d098859c9f592e744a25f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf10 Gerrit-Owner: Hoo man Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set "displayStatementsOnProperties" for wikidata/testwikidata - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Set "displayStatementsOnProperties" for wikidata/testwikidata .. Set "displayStatementsOnProperties" for wikidata/testwikidata Change-Id: I89767a37ca5e812fc3708e1bdf9d7aecda93d9af --- M wmf-config/Wikibase.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php index 707f710..b299305 100644 --- a/wmf-config/Wikibase.php +++ b/wmf-config/Wikibase.php @@ -57,8 +57,10 @@ if ( $wgDBname === 'testwikidatawiki' ) { $wgWBRepoSettings['specialSiteLinkGroups'][] = 'testwikidata'; + $wgWBRepoSettings['displayStatementsOnProperties'] = true; } else { $wgWBRepoSettings['specialSiteLinkGroups'][] = 'wikidata'; + $wgWBRepoSettings['displayStatementsOnProperties'] = false; } if ( $wgDBname === 'testwikidatawiki' ) { -- To view, visit https://gerrit.wikimedia.org/r/176271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89767a37ca5e812fc3708e1bdf9d7aecda93d9af Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hoo man Gerrit-Reviewer: Hoo man 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 Wikidata - change (mediawiki/core)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/176274 Change subject: Update Wikidata .. Update Wikidata Change-Id: I2ac829935a34696118d098859c9f592e744a25f3 --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/176274/1 diff --git a/extensions/Wikidata b/extensions/Wikidata index c0eea89..33433d6 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit c0eea89e6532aecc46358f48db071bbaadcc81f5 +Subproject commit 33433d6e1ccda7fc5f4296e2c97efce104733c26 -- To view, visit https://gerrit.wikimedia.org/r/176274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ac829935a34696118d098859c9f592e744a25f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf10 Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikibase and WikibaseDataModel - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikibase and WikibaseDataModel .. Update Wikibase and WikibaseDataModel Change-Id: Ic3d71792cf9980f6557ca8ff17ee327397dff56b --- M composer.lock M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M extensions/Wikibase/repo/config/Wikibase.default.php M extensions/Wikibase/repo/i18n/en.json M extensions/Wikibase/repo/includes/ItemView.php M extensions/Wikibase/repo/includes/PropertyView.php M extensions/Wikibase/repo/includes/View/ClaimsView.php M extensions/Wikibase/repo/includes/View/EntityViewFactory.php M vendor/composer/autoload_files.php M vendor/composer/autoload_psr4.php M vendor/composer/installed.json M vendor/wikibase/data-model/RELEASE-NOTES.md M vendor/wikibase/data-model/WikibaseDataModel.php M vendor/wikibase/data-model/src/Claim/Claim.php M vendor/wikibase/data-model/src/Entity/Property.php M vendor/wikibase/data-model/src/Statement/Statement.php M vendor/wikibase/data-model/src/Statement/StatementList.php M vendor/wikibase/data-model/tests/unit/Statement/StatementListTest.php 18 files changed, 242 insertions(+), 222 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 950e593..e3fe9fa 100644 --- a/composer.lock +++ b/composer.lock @@ -897,16 +897,16 @@ }, { "name": "wikibase/data-model", -"version": "2.4.0", +"version": "2.4.1", "source": { "type": "git", "url": "https://github.com/wmde/WikibaseDataModel.git";, -"reference": "66de8e091eeb93bd201d9fdf52ebda958fae5b2a" +"reference": "6223a24ac1df8688c0d429995ebe71ba37e26cd5" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wmde/WikibaseDataModel/zipball/66de8e091eeb93bd201d9fdf52ebda958fae5b2a";, -"reference": "66de8e091eeb93bd201d9fdf52ebda958fae5b2a", +"url": "https://api.github.com/repos/wmde/WikibaseDataModel/zipball/6223a24ac1df8688c0d429995ebe71ba37e26cd5";, +"reference": "6223a24ac1df8688c0d429995ebe71ba37e26cd5", "shasum": "" }, "require": { @@ -947,7 +947,7 @@ "wikibase", "wikidata" ], -"time": "2014-11-23 00:54:35" +"time": "2014-11-26 21:29:26" }, { "name": "wikibase/data-model-javascript", @@ -1188,12 +1188,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "e8d02191319edc1f8c1821fb8c7adfa68cb20e2d" +"reference": "9a20e61a5c862a31bb7da1de661691f73e740124" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e8d02191319edc1f8c1821fb8c7adfa68cb20e2d";, -"reference": "e8d02191319edc1f8c1821fb8c7adfa68cb20e2d", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/9a20e61a5c862a31bb7da1de661691f73e740124";, +"reference": "9a20e61a5c862a31bb7da1de661691f73e740124", "shasum": "" }, "require": { @@ -1259,7 +1259,7 @@ "wikibaserepo", "wikidata" ], -"time": "2014-11-25 19:41:13" +"time": "2014-11-27 14:51:02" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index dbdb1d4..2e7eabd 100644 --- a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -105,7 +105,7 @@ var entityType = this.options.value.getType(); if( entityType === 'item' - || entityType === 'property' && mw.config.get( 'wbExperimentalFeatures' ) + || entityType === 'property' && this.element.find( '.wb-claimlistview' ).length === 1 ) { this._initClaims(); } diff --git a/extensions/Wikibase/repo/config/Wikibase.default.php b/extensions/Wikibase/repo/config/Wikibase.default.php index 1eb1e3d..8187aa1 100644 --- a/extensions/Wikibase/repo/config/Wikibase.default.php +++ b/extensions/Wikibase/repo/config/Wikibase.default.php @@ -94,6 +94,8 @@ 'useRedirectTargetColumn' => true
[MediaWiki-commits] [Gerrit] Add 'move-subpages' right to "closer" and "filemover" user g... - change (operations/mediawiki-config)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/176273 Change subject: Add 'move-subpages' right to "closer" and "filemover" user groups at ruwiki .. Add 'move-subpages' right to "closer" and "filemover" user groups at ruwiki Change-Id: I0d006a94f20d2c607e774aa7901a02568b2538b3 Task: T76131 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/73/176273/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 40fabab..817ee05 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7579,6 +7579,7 @@ 'upload' => true, 'reupload-own' => true, 'reupload' => true, + 'move-subpages' => true, // T76131 ), 'filemover' => array( // bug 30984 'movefile' => true, @@ -7587,6 +7588,7 @@ 'reupload-own' => true, 'reupload' => true, 'move-categorypages' => true, // bug 66871 + 'move-subpages' => true, // T76131 ), 'suppressredirect' => array( // bug 38408, 66871 'suppressredirect' => true, -- To view, visit https://gerrit.wikimedia.org/r/176273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d006a94f20d2c607e774aa7901a02568b2538b3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'move-subpages' right to "closer" and "filemover" groups... - change (operations/mediawiki-config)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/176272 Change subject: Add 'move-subpages' right to "closer" and "filemover" groups at ruwiki .. Add 'move-subpages' right to "closer" and "filemover" groups at ruwiki Change-Id: I31b397cefb072cd542389646a33095d729a07901 Task: T76131 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/72/176272/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 40fabab..817ee05 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -7579,6 +7579,7 @@ 'upload' => true, 'reupload-own' => true, 'reupload' => true, + 'move-subpages' => true, // T76131 ), 'filemover' => array( // bug 30984 'movefile' => true, @@ -7587,6 +7588,7 @@ 'reupload-own' => true, 'reupload' => true, 'move-categorypages' => true, // bug 66871 + 'move-subpages' => true, // T76131 ), 'suppressredirect' => array( // bug 38408, 66871 'suppressredirect' => true, -- To view, visit https://gerrit.wikimedia.org/r/176272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31b397cefb072cd542389646a33095d729a07901 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set "displayStatementsOnProperties" for wikidata/testwikidata - change (operations/mediawiki-config)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/176271 Change subject: Set "displayStatementsOnProperties" for wikidata/testwikidata .. Set "displayStatementsOnProperties" for wikidata/testwikidata Change-Id: I89767a37ca5e812fc3708e1bdf9d7aecda93d9af --- M wmf-config/Wikibase.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/71/176271/1 diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php index 707f710..b299305 100644 --- a/wmf-config/Wikibase.php +++ b/wmf-config/Wikibase.php @@ -57,8 +57,10 @@ if ( $wgDBname === 'testwikidatawiki' ) { $wgWBRepoSettings['specialSiteLinkGroups'][] = 'testwikidata'; + $wgWBRepoSettings['displayStatementsOnProperties'] = true; } else { $wgWBRepoSettings['specialSiteLinkGroups'][] = 'wikidata'; + $wgWBRepoSettings['displayStatementsOnProperties'] = false; } if ( $wgDBname === 'testwikidatawiki' ) { -- To view, visit https://gerrit.wikimedia.org/r/176271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89767a37ca5e812fc3708e1bdf9d7aecda93d9af Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move wikidata jobs to regular labs slaves. - change (integration/config)
JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/176270 Change subject: Move wikidata jobs to regular labs slaves. .. Move wikidata jobs to regular labs slaves. After this the special wikidata jenkins slaves can be removed. T73419 Change-Id: I2590254ef5499572d94f1302e54052f02b2151a8 --- M jjb/wikidata.yaml 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/70/176270/1 diff --git a/jjb/wikidata.yaml b/jjb/wikidata.yaml index 6b6b0f5..4e990e9 100644 --- a/jjb/wikidata.yaml +++ b/jjb/wikidata.yaml @@ -1,8 +1,9 @@ - builder: name: wd-mw-composer-install-ext builders: -- shell: 'cd "$WORKSPACE/extensions/{extension}" && -timeout 300 /usr/local/bin/composer install --prefer-source -vvv' +- shell: | +composer=/srv/deployment/integration/composer/vendor/bin/composer +cd "$WORKSPACE/extensions/{extension}" && timeout 300 $composer install --prefer-source -vvv - builder: name: wd-wikibase-apply-settings @@ -26,7 +27,7 @@ - job-template: name: 'mwext-Wikibase-{kind}-tests' -node: Wikidata +node: contintLabsSlave && UbuntuPrecise concurrent: true defaults: use-zuul-for-mw-ext triggers: @@ -51,7 +52,7 @@ - job-template: name: 'mwext-Wikibase-qunit' -node: Wikidata +node: contintLabsSlave && UbuntuPrecise concurrent: true defaults: use-zuul-for-mw-ext triggers: @@ -74,7 +75,7 @@ - job-template: name: 'mwext-Wikidata-{kind}-tests' -node: Wikidata # As this does not use composer there is no reason it can not also use regular slaves +node: contintLabsSlave && UbuntuPrecise defaults: use-zuul-for-mw-ext triggers: - zuul @@ -96,7 +97,7 @@ - job-template: name: 'mwext-Wikidata-qunit' -node: Wikidata +node: contintLabsSlave && UbuntuPrecise concurrent: true defaults: use-zuul-for-mw-ext triggers: -- To view, visit https://gerrit.wikimedia.org/r/176270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2590254ef5499572d94f1302e54052f02b2151a8 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: JanZerebecki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikibase and WikibaseDataModel - change (mediawiki...Wikidata)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/176269 Change subject: Update Wikibase and WikibaseDataModel .. Update Wikibase and WikibaseDataModel Change-Id: Ic3d71792cf9980f6557ca8ff17ee327397dff56b --- M composer.lock M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M extensions/Wikibase/repo/config/Wikibase.default.php M extensions/Wikibase/repo/i18n/en.json M extensions/Wikibase/repo/includes/ItemView.php M extensions/Wikibase/repo/includes/PropertyView.php M extensions/Wikibase/repo/includes/View/ClaimsView.php M extensions/Wikibase/repo/includes/View/EntityViewFactory.php M vendor/composer/autoload_files.php M vendor/composer/autoload_psr4.php M vendor/composer/installed.json M vendor/wikibase/data-model/RELEASE-NOTES.md M vendor/wikibase/data-model/WikibaseDataModel.php M vendor/wikibase/data-model/src/Claim/Claim.php M vendor/wikibase/data-model/src/Entity/Property.php M vendor/wikibase/data-model/src/Statement/Statement.php M vendor/wikibase/data-model/src/Statement/StatementList.php M vendor/wikibase/data-model/tests/unit/Statement/StatementListTest.php 18 files changed, 242 insertions(+), 222 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/69/176269/1 diff --git a/composer.lock b/composer.lock index 950e593..e3fe9fa 100644 --- a/composer.lock +++ b/composer.lock @@ -897,16 +897,16 @@ }, { "name": "wikibase/data-model", -"version": "2.4.0", +"version": "2.4.1", "source": { "type": "git", "url": "https://github.com/wmde/WikibaseDataModel.git";, -"reference": "66de8e091eeb93bd201d9fdf52ebda958fae5b2a" +"reference": "6223a24ac1df8688c0d429995ebe71ba37e26cd5" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wmde/WikibaseDataModel/zipball/66de8e091eeb93bd201d9fdf52ebda958fae5b2a";, -"reference": "66de8e091eeb93bd201d9fdf52ebda958fae5b2a", +"url": "https://api.github.com/repos/wmde/WikibaseDataModel/zipball/6223a24ac1df8688c0d429995ebe71ba37e26cd5";, +"reference": "6223a24ac1df8688c0d429995ebe71ba37e26cd5", "shasum": "" }, "require": { @@ -947,7 +947,7 @@ "wikibase", "wikidata" ], -"time": "2014-11-23 00:54:35" +"time": "2014-11-26 21:29:26" }, { "name": "wikibase/data-model-javascript", @@ -1188,12 +1188,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "e8d02191319edc1f8c1821fb8c7adfa68cb20e2d" +"reference": "9a20e61a5c862a31bb7da1de661691f73e740124" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e8d02191319edc1f8c1821fb8c7adfa68cb20e2d";, -"reference": "e8d02191319edc1f8c1821fb8c7adfa68cb20e2d", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/9a20e61a5c862a31bb7da1de661691f73e740124";, +"reference": "9a20e61a5c862a31bb7da1de661691f73e740124", "shasum": "" }, "require": { @@ -1259,7 +1259,7 @@ "wikibaserepo", "wikidata" ], -"time": "2014-11-25 19:41:13" +"time": "2014-11-27 14:51:02" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index dbdb1d4..2e7eabd 100644 --- a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -105,7 +105,7 @@ var entityType = this.options.value.getType(); if( entityType === 'item' - || entityType === 'property' && mw.config.get( 'wbExperimentalFeatures' ) + || entityType === 'property' && this.element.find( '.wb-claimlistview' ).length === 1 ) { this._initClaims(); } diff --git a/extensions/Wikibase/repo/config/Wikibase.default.php b/extensions/Wikibase/repo/config/Wikibase.default.php index 1eb1e3d..8187aa1 100644 --- a/extensions/Wikibase/repo/config/Wikibase.default.php +++ b/extensions/Wikibase/repo/config/Wikibase.default.php @@ -94,6 +94,8
[MediaWiki-commits] [Gerrit] Always use 'wikibase-statements' as statement section header - change (mediawiki...Wikibase)
Hoo man has submitted this change and it was merged. Change subject: Always use 'wikibase-statements' as statement section header .. Always use 'wikibase-statements' as statement section header Change-Id: I1f4093ca07c13b6588461ded5f8998c62514e174 --- M repo/i18n/en.json M repo/includes/ItemView.php M repo/includes/PropertyView.php M repo/includes/View/ClaimsView.php 4 files changed, 4 insertions(+), 13 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 5b82521..42b79a6 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -48,9 +48,7 @@ "wikibase-description-input-help-message": "Enter a short description for this entity in $1.", "wikibase-fingerprintgroupview-input-help-message": "Enter a label of this entity, a short description and aliases per language.", "wikibase-fingerprintview-input-help-message": "Enter the label of this entity, a short description and aliases in $1.", - "wikibase-claims": "Claims", "wikibase-statements": "Statements", - "wikibase-attributes": "Attributes", "wikibase-terms": "In other languages", "wikibase-sitelinkgroupview-input-help-message": "Add a site link by specifying a site and a page of that site, edit or remove existing site links.", "wikibase-sitelinks-empty": "No page is linked to this item yet.", diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php index e506d21..f791ebd 100644 --- a/repo/includes/ItemView.php +++ b/repo/includes/ItemView.php @@ -35,8 +35,7 @@ $html = parent::getMainHtml( $entityRevision, $entityInfo, $editable ); $html .= $this->claimsView->getHtml( $item->getStatements()->toArray(), - $entityInfo, - 'wikibase-statements' + $entityInfo ); return $html; diff --git a/repo/includes/PropertyView.php b/repo/includes/PropertyView.php index 71eb388..40105fa 100644 --- a/repo/includes/PropertyView.php +++ b/repo/includes/PropertyView.php @@ -59,8 +59,7 @@ if ( $this->displayStatementsOnProperties ) { $html .= $this->claimsView->getHtml( $property->getStatements()->toArray(), - $entityInfo, - 'wikibase-attributes' + $entityInfo ); } diff --git a/repo/includes/View/ClaimsView.php b/repo/includes/View/ClaimsView.php index 6ba6369..451c9e4 100644 --- a/repo/includes/View/ClaimsView.php +++ b/repo/includes/View/ClaimsView.php @@ -5,12 +5,8 @@ use Linker; use Wikibase\ClaimHtmlGenerator; use Wikibase\DataModel\Claim\Claim; -use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Snak\Snak; -use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityTitleLookup; -use Wikibase\ReferencedEntitiesFinder; /** * Generates HTML to display claims. @@ -67,10 +63,9 @@ * * @param Claim[] $claims the claims to render * @param array $entityInfo -* @param string $heading the message key of the heading * @return string */ - public function getHtml( array $claims, array $entityInfo, $heading = 'wikibase-claims' ) { + public function getHtml( array $claims, array $entityInfo ) { // aggregate claims by properties $claimsByProperty = $this->groupClaimsByProperties( $claims ); @@ -82,7 +77,7 @@ $claimgrouplistviewHtml = wfTemplate( 'wb-claimgrouplistview', $claimsHtml, '' ); // TODO: Add link to SpecialPage that allows adding a new claim. - $sectionHeading = $this->getHtmlForSectionHeading( $heading ); + $sectionHeading = $this->getHtmlForSectionHeading( 'wikibase-statements' ); // FIXME: claimgrouplistview should be the topmost claims related template $html = wfTemplate( 'wb-claimlistview', $claimgrouplistviewHtml, '', '' ); return $sectionHeading . $html; -- To view, visit https://gerrit.wikimedia.org/r/176249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f4093ca07c13b6588461ded5f8998c62514e174 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf10 Gerrit-Owner: Hoo man Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite completely broken EntityView tests - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/176268 Change subject: Rewrite completely broken EntityView tests .. Rewrite completely broken EntityView tests Change-Id: Ibc373a9017c25cc2bdacbabeea2b97d283e31b00 --- M repo/tests/phpunit/includes/View/EntityViewTest.php M repo/tests/phpunit/includes/View/ItemViewTest.php M repo/tests/phpunit/includes/View/PropertyViewTest.php 3 files changed, 88 insertions(+), 268 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/68/176268/1 diff --git a/repo/tests/phpunit/includes/View/EntityViewTest.php b/repo/tests/phpunit/includes/View/EntityViewTest.php index 1199d45..c689b99 100644 --- a/repo/tests/phpunit/includes/View/EntityViewTest.php +++ b/repo/tests/phpunit/includes/View/EntityViewTest.php @@ -2,35 +2,11 @@ namespace Wikibase\Test; -use IContextSource; -use InvalidArgumentException; -use Language; -use RequestContext; -use Title; -use ValueFormatters\FormatterOptions; -use Wikibase\DataModel\Claim\Claim; -use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\EntityIdValue; -use Wikibase\DataModel\Entity\Item; -use Wikibase\DataModel\Entity\ItemId; -use Wikibase\DataModel\Entity\Property; -use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\DataModel\Snak\Snak; use Wikibase\DataModel\Statement\Statement; use Wikibase\EntityRevision; -use Wikibase\LanguageFallbackChain; -use Wikibase\Lib\Serializers\SerializationOptions; -use Wikibase\Lib\SnakFormatter; -use Wikibase\Lib\Store\EntityInfoBuilderFactory; -use Wikibase\Lib\Store\EntityTitleLookup; -use Wikibase\ParserOutputJsConfigBuilder; -use Wikibase\ReferencedEntitiesFinder; use Wikibase\Repo\View\EntityView; -use Wikibase\Repo\WikibaseRepo; -use Wikibase\Utils; /** * @covers Wikibase\Repo\View\EntityView @@ -47,166 +23,6 @@ * @author Daniel Kinzler */ abstract class EntityViewTest extends \MediaWikiLangTestCase { - - /** -* @var MockRepository -*/ - private $mockRepository; - - protected function newEntityIdParser() { - // The data provides use P123 and Q123 IDs, so the parser needs to understand these. - return new BasicEntityIdParser(); - } - - public function getTitleForId( EntityId $id ) { - $name = $id->getEntityType() . ':' . $id->getSerialization(); - return Title::makeTitle( NS_MAIN, $name ); - } - - /** -* @return EntityTitleLookup -*/ - protected function getEntityTitleLookupMock() { - $lookup = $this->getMock( 'Wikibase\Lib\Store\EntityTitleLookup' ); - $lookup->expects( $this->any() ) - ->method( 'getTitleForId' ) - ->will( $this->returnCallback( array( $this, 'getTitleForId' ) ) ); - - return $lookup; - } - - /** -* @return SnakFormatter -*/ - protected function newSnakFormatterMock() { - $snakFormatter = $this->getMock( 'Wikibase\Lib\SnakFormatter' ); - - $snakFormatter->expects( $this->any() )->method( 'formatSnak' ) - ->will( $this->returnValue( '(value)' ) ); - - $snakFormatter->expects( $this->any() )->method( 'getFormat' ) - ->will( $this->returnValue( SnakFormatter::FORMAT_HTML_WIDGET ) ); - - $snakFormatter->expects( $this->any() )->method( 'canFormatSnak' ) - ->will( $this->returnValue( true ) ); - - return $snakFormatter; - } - - /** -* @param string $entityType -* @param EntityInfoBuilderFactory $entityInfoBuilderFactory -* @param EntityTitleLookup $entityTitleLookup -* @param IContextSource $context -* @param LanguageFallbackChain $languageFallbackChain -* -* @throws InvalidArgumentException -* @return EntityView -*/ - protected function newEntityView( - $entityType, - EntityInfoBuilderFactory $entityInfoBuilderFactory = null, - EntityTitleLookup $entityTitleLookup = null, - IContextSource $context = null, - LanguageFallbackChain $languageFallbackChain = null - ) { - if ( !is_string( $entityType ) ) { - throw new InvalidArgumentException( '$entityType must be a string!' ); - } - - $langCode = 'en'; - - if ( $context === null ) { - $context = new RequestContext(); - $context->setLanguage( $langCode ); - } - - if ( $languageFallbackChain === null ) { -
[MediaWiki-commits] [Gerrit] Switch Gerrit's 'Report Bug' url to Phabricator - change (operations/puppet)
Hello Chad, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/176267 to review the following change. Change subject: Switch Gerrit's 'Report Bug' url to Phabricator .. Switch Gerrit's 'Report Bug' url to Phabricator Change-Id: If24e1f5f61b4870a578da658769114929243c08a --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/67/176267/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 4a8dd2b..4aa607d 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -1,7 +1,7 @@ [gerrit] basePath = git canonicalWebUrl = <%= @url %> -reportBugUrl = https://bugzilla.wikimedia.org/enter_bug.cgi?product=Wikimedia&component=Git/Gerrit +reportBugUrl = https://phabricator.wikimedia.org/maniphest/task/create/?projects=PHID-PROJ-lc5rwomzjp6fmcdpbw43 [core] packedGitOpenFiles = 4096 packedGitLimit = 500m -- To view, visit https://gerrit.wikimedia.org/r/176267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If24e1f5f61b4870a578da658769114929243c08a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop 'Phabricator' suffix from gerrit's ITS actions - change (operations/puppet)
Hello Chad, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/176266 to review the following change. Change subject: Drop 'Phabricator' suffix from gerrit's ITS actions .. Drop 'Phabricator' suffix from gerrit's ITS actions It's only Phabricator right now. No more bugzilla. So we can now skip the Phabricator suffix. Change-Id: I0ace692a6e5d6f469bb8459f6d47439af264f3ce --- M modules/gerrit/files/its/action.config R modules/gerrit/files/its/templates/DraftPublished.vm R modules/gerrit/files/its/templates/PatchSetCreated.vm M modules/gerrit/manifests/jetty.pp 4 files changed, 19 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/176266/1 diff --git a/modules/gerrit/files/its/action.config b/modules/gerrit/files/its/action.config index 90f6c9f..6f663eb 100644 --- a/modules/gerrit/files/its/action.config +++ b/modules/gerrit/files/its/action.config @@ -5,16 +5,16 @@ association = subject,footer-Bug,footer-bug action = add-standard-comment -[rule "patchSetCreatedPhabricator"] +[rule "patchSetCreated"] event-type = patchset-created status = !,DRAFT is-draft = !,true association = added@subject,added@footer-Bug,added@footer-bug its-name = its-phabricator - action = add-velocity-comment PatchSetCreatedPhabricator + action = add-velocity-comment PatchSetCreated -[rule "changeDraftPublishedPhabricator"] +[rule "changeDraftPublished"] event-type = draft-published association = subject,footer-Bug,footer-bug its-name = its-phabricator - action = add-velocity-comment DraftPublishedPhabricator + action = add-velocity-comment DraftPublished diff --git a/modules/gerrit/files/its/templates/DraftPublishedPhabricator.vm b/modules/gerrit/files/its/templates/DraftPublished.vm similarity index 100% rename from modules/gerrit/files/its/templates/DraftPublishedPhabricator.vm rename to modules/gerrit/files/its/templates/DraftPublished.vm diff --git a/modules/gerrit/files/its/templates/PatchSetCreatedPhabricator.vm b/modules/gerrit/files/its/templates/PatchSetCreated.vm similarity index 100% rename from modules/gerrit/files/its/templates/PatchSetCreatedPhabricator.vm rename to modules/gerrit/files/its/templates/PatchSetCreated.vm diff --git a/modules/gerrit/manifests/jetty.pp b/modules/gerrit/manifests/jetty.pp index 491bca1..4254492 100644 --- a/modules/gerrit/manifests/jetty.pp +++ b/modules/gerrit/manifests/jetty.pp @@ -153,23 +153,27 @@ } file { '/var/lib/gerrit2/review_site/etc/its/templates/DraftPublished.vm': -ensure => absent, +source => 'puppet:///modules/gerrit/its/templates/DraftPublished.vm', +owner => 'gerrit2', +group => 'gerrit2', +mode=> '0755', +require => File['/var/lib/gerrit2/review_site/etc/its/templates'], +} + +file { '/var/lib/gerrit2/review_site/etc/its/templates/PatchSetCreated.vm': +source => 'puppet:///modules/gerrit/its/templates/PatchSetCreated.vm', +owner => 'gerrit2', +group => 'gerrit2', +mode=> '0755', +require => File['/var/lib/gerrit2/review_site/etc/its/templates'], } file { '/var/lib/gerrit2/review_site/etc/its/templates/DraftPublishedPhabricator.vm': -source => 'puppet:///modules/gerrit/its/templates/DraftPublishedPhabricator.vm', -owner => 'gerrit2', -group => 'gerrit2', -mode=> '0755', -require => File['/var/lib/gerrit2/review_site/etc/its/templates'], +ensure => absent, } file { '/var/lib/gerrit2/review_site/etc/its/templates/PatchSetCreatedPhabricator.vm': -source => 'puppet:///modules/gerrit/its/templates/PatchSetCreatedPhabricator.vm', -owner => 'gerrit2', -group => 'gerrit2', -mode=> '0755', -require => File['/var/lib/gerrit2/review_site/etc/its/templates'], +ensure => absent, } file { '/var/lib/gerrit2/review_site/static/page-bkg.jpg': -- To view, visit https://gerrit.wikimedia.org/r/176266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ace692a6e5d6f469bb8459f6d47439af264f3ce Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove hooks-bugzilla configuration - change (operations/puppet)
Hello Chad, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/176265 to review the following change. Change subject: Remove hooks-bugzilla configuration .. Remove hooks-bugzilla configuration The hooks-bugzilla plugin is no longer in use. We only keep the bugzilla commentlink around to linkify bugzilla references and as its-phabricator-from-bugzilla currently uses this commentlink to hook into gerrit. Change-Id: I83457c374ee8499f6b53182430f9a33d6636333c --- M modules/gerrit/files/its/action.config D modules/gerrit/files/its/templates/DraftPublished.vm M modules/gerrit/manifests/jetty.pp M modules/gerrit/templates/gerrit.config.erb 4 files changed, 1 insertion(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/65/176265/1 diff --git a/modules/gerrit/files/its/action.config b/modules/gerrit/files/its/action.config index a7031ab..90f6c9f 100644 --- a/modules/gerrit/files/its/action.config +++ b/modules/gerrit/files/its/action.config @@ -5,22 +5,6 @@ association = subject,footer-Bug,footer-bug action = add-standard-comment -[rule "patchSetCreated"] - event-type = patchset-created - status = !,DRAFT - is-draft = !,true - association = added@subject,added@footer-Bug,added@footer-bug - its-name = its-bugzilla - action = add-standard-comment - action = status PATCH_TO_REVIEW - -[rule "changeDraftPublished"] - event-type = draft-published - association = subject,footer-Bug,footer-bug - its-name = its-bugzilla - action = add-velocity-comment DraftPublished - action = status PATCH_TO_REVIEW - [rule "patchSetCreatedPhabricator"] event-type = patchset-created status = !,DRAFT diff --git a/modules/gerrit/files/its/templates/DraftPublished.vm b/modules/gerrit/files/its/templates/DraftPublished.vm deleted file mode 100644 index f3821d1..000 --- a/modules/gerrit/files/its/templates/DraftPublished.vm +++ /dev/null @@ -1,4 +0,0 @@ -Change $change-number had a related patch set (by $author-name) published: -$subject - -${its.formatLink($change-url)} diff --git a/modules/gerrit/manifests/jetty.pp b/modules/gerrit/manifests/jetty.pp index d5f2c64..491bca1 100644 --- a/modules/gerrit/manifests/jetty.pp +++ b/modules/gerrit/manifests/jetty.pp @@ -153,11 +153,7 @@ } file { '/var/lib/gerrit2/review_site/etc/its/templates/DraftPublished.vm': -source => 'puppet:///modules/gerrit/its/templates/DraftPublished.vm', -owner => 'gerrit2', -group => 'gerrit2', -mode=> '0755', -require => File['/var/lib/gerrit2/review_site/etc/its/templates'], +ensure => absent, } file { '/var/lib/gerrit2/review_site/etc/its/templates/DraftPublishedPhabricator.vm': diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index d5d27f8..4a8dd2b 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -78,7 +78,6 @@ [commentlink "bugzilla"] match = "\\b[bB][uU][gG]\\:?\\s+#?(\\d+)\\b" link = https://bugzilla.wikimedia.org/$1 -association = OPTIONAL [commentlink "codereview"] match = \\br(\\d+)\\b link = https://www.mediawiki.org/wiki/Special:CodeReview/MediaWiki/$1 @@ -142,16 +141,6 @@ [changeMerge] test = true checkFrequency = 0 -[bugzilla] -url = https://bugzilla.wikimedia.org -username = gerritad...@wikimedia.org -commentOnChangeAbandoned = false -commentOnChangeMerged = false -commentOnChangeRestored = false -commentOnChangeCreated = false -commentOnCommentAdded = false -commentOnPatchSetCreated = false -commentOnRefUpdatedGitWeb = false [its-phabricator] url = https://phabricator.wikimedia.org/ username = gerritbot -- To view, visit https://gerrit.wikimedia.org/r/176265 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83457c374ee8499f6b53182430f9a33d6636333c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move gerrit's remaining ITS templates into gerrit module - change (operations/puppet)
Hello Chad, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/176264 to review the following change. Change subject: Move gerrit's remaining ITS templates into gerrit module .. Move gerrit's remaining ITS templates into gerrit module Change-Id: Iad1a12acd159f8c39448fd6be416a0923817e282 --- R modules/gerrit/files/its/templates/DraftPublishedPhabricator.vm R modules/gerrit/files/its/templates/PatchSetCreatedPhabricator.vm M modules/gerrit/manifests/jetty.pp 3 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/64/176264/1 diff --git a/files/gerrit/its/templates/DraftPublishedPhabricator.vm b/modules/gerrit/files/its/templates/DraftPublishedPhabricator.vm similarity index 100% rename from files/gerrit/its/templates/DraftPublishedPhabricator.vm rename to modules/gerrit/files/its/templates/DraftPublishedPhabricator.vm diff --git a/files/gerrit/its/templates/PatchSetCreatedPhabricator.vm b/modules/gerrit/files/its/templates/PatchSetCreatedPhabricator.vm similarity index 100% rename from files/gerrit/its/templates/PatchSetCreatedPhabricator.vm rename to modules/gerrit/files/its/templates/PatchSetCreatedPhabricator.vm diff --git a/modules/gerrit/manifests/jetty.pp b/modules/gerrit/manifests/jetty.pp index a8121bc..d5f2c64 100644 --- a/modules/gerrit/manifests/jetty.pp +++ b/modules/gerrit/manifests/jetty.pp @@ -161,7 +161,7 @@ } file { '/var/lib/gerrit2/review_site/etc/its/templates/DraftPublishedPhabricator.vm': -source => 'puppet:///files/gerrit/its/templates/DraftPublishedPhabricator.vm', +source => 'puppet:///modules/gerrit/its/templates/DraftPublishedPhabricator.vm', owner => 'gerrit2', group => 'gerrit2', mode=> '0755', @@ -169,7 +169,7 @@ } file { '/var/lib/gerrit2/review_site/etc/its/templates/PatchSetCreatedPhabricator.vm': -source => 'puppet:///files/gerrit/its/templates/PatchSetCreatedPhabricator.vm', +source => 'puppet:///modules/gerrit/its/templates/PatchSetCreatedPhabricator.vm', owner => 'gerrit2', group => 'gerrit2', mode=> '0755', -- To view, visit https://gerrit.wikimedia.org/r/176264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad1a12acd159f8c39448fd6be416a0923817e282 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a feature flag for showing Statements on Properties - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add a feature flag for showing Statements on Properties .. Add a feature flag for showing Statements on Properties Bug: T75998 Change-Id: I61f3fa481d69cc3f1621f91a213cfd5a1bbab2ab --- M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M repo/config/Wikibase.default.php M repo/includes/PropertyView.php M repo/includes/View/EntityViewFactory.php 4 files changed, 38 insertions(+), 7 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index 2c462cc..2e7eabd 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -103,7 +103,10 @@ // TODO: Have an itemview and propertyview instead of ugly hack here. var entityType = this.options.value.getType(); - if( entityType === 'item' || entityType === 'property' ) { + if( + entityType === 'item' + || entityType === 'property' && this.element.find( '.wb-claimlistview' ).length === 1 + ) { this._initClaims(); } diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php index 1eb1e3d..8187aa1 100644 --- a/repo/config/Wikibase.default.php +++ b/repo/config/Wikibase.default.php @@ -94,6 +94,8 @@ 'useRedirectTargetColumn' => true, + 'displayStatementsOnProperties' => true, + 'conceptBaseUri' => function() { $uri = $GLOBALS['wgServer']; $uri = preg_replace( '!^//!', 'http://', $uri ); diff --git a/repo/includes/PropertyView.php b/repo/includes/PropertyView.php index a5b71e6..71eb388 100644 --- a/repo/includes/PropertyView.php +++ b/repo/includes/PropertyView.php @@ -6,6 +6,9 @@ use InvalidArgumentException; use Wikibase\DataModel\Entity\Property; use Wikibase\Repo\WikibaseRepo; +use Wikibase\Repo\View\FingerprintView; +use Wikibase\Repo\View\ClaimsView; +use Language; /** * Class for creating views for Property instances. @@ -18,6 +21,23 @@ * @author H. Snater < mediaw...@snater.com > */ class PropertyView extends EntityView { + + /** +* @var bool +*/ + private $displayStatementsOnProperties; + + /** +* @param FingerprintView $fingerprintView +* @param ClaimsView $claimsView +* @param Language $language +* @param bool $displayStatementsOnProperties +*/ + public function __construct( FingerprintView $fingerprintView, ClaimsView $claimsView, Language $language, $displayStatementsOnProperties ) { + parent::__construct($fingerprintView, $claimsView, $language); + + $this->displayStatementsOnProperties = $displayStatementsOnProperties; + } /** * @see EntityView::getMainHtml @@ -36,11 +56,13 @@ $html = parent::getMainHtml( $entityRevision, $entityInfo, $editable ); $html .= $this->getHtmlForDataType( $this->getDataType( $property ) ); - $html .= $this->claimsView->getHtml( - $property->getStatements()->toArray(), - $entityInfo, - 'wikibase-attributes' - ); + if ( $this->displayStatementsOnProperties ) { + $html .= $this->claimsView->getHtml( + $property->getStatements()->toArray(), + $entityInfo, + 'wikibase-attributes' + ); + } $footer = wfMessage( 'wikibase-property-footer' ); diff --git a/repo/includes/View/EntityViewFactory.php b/repo/includes/View/EntityViewFactory.php index 89e3759..92056c0 100644 --- a/repo/includes/View/EntityViewFactory.php +++ b/repo/includes/View/EntityViewFactory.php @@ -21,6 +21,7 @@ use Wikibase\Repo\View\FingerprintView; use Wikibase\Repo\View\SectionEditLinkGenerator; use Wikibase\Repo\View\SnakHtmlGenerator; +use Wikibase\Repo\WikibaseRepo; /** * @since 0.5 @@ -85,7 +86,10 @@ if ( $entityType === 'item' ) { return new ItemView( $fingerprintView, $claimsView, $language ); } elseif ( $entityType === 'property' ) { - return new PropertyView( $fingerprintView, $claimsView, $language ); + $displayStatementsOnProperties = WikibaseRepo::getDefaultInstance()->getSettings() + ->getSetting( 'displayStatementsOnProperties' ); + + return new PropertyView(
[MediaWiki-commits] [Gerrit] Use older version of elastica - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Use older version of elastica .. Use older version of elastica 1.3.4.0 spews deprecation notices which are not trivial to work around while keeping compatibility with 1.3.0.0 used at WMF. Change-Id: If45f12c6521a82d586329e8e647c5d4b8cbde266 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 647b3bc..a80a906 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "cssjanus/cssjanus": "~1.1", "leafo/lessphp": "~0.5", "psr/log": "1.0.0", - "ruflin/elastica": "~1.3", + "ruflin/elastica": "1.3.0.0", "mediawiki/semantic-media-wiki": "@dev", "mediawiki/semantic-maps": "@dev" }, -- To view, visit https://gerrit.wikimedia.org/r/176263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If45f12c6521a82d586329e8e647c5d4b8cbde266 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use older version of elastica - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/176263 Change subject: Use older version of elastica .. Use older version of elastica 1.3.4.0 spews deprecation notices which are not trivial to work around while keeping compatibility with 1.3.0.0 used at WMF. Change-Id: If45f12c6521a82d586329e8e647c5d4b8cbde266 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/63/176263/1 diff --git a/composer.json b/composer.json index 647b3bc..a80a906 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "cssjanus/cssjanus": "~1.1", "leafo/lessphp": "~0.5", "psr/log": "1.0.0", - "ruflin/elastica": "~1.3", + "ruflin/elastica": "1.3.0.0", "mediawiki/semantic-media-wiki": "@dev", "mediawiki/semantic-maps": "@dev" }, -- To view, visit https://gerrit.wikimedia.org/r/176263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If45f12c6521a82d586329e8e647c5d4b8cbde266 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a feature flag for showing Statements on Properties - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/176262 Change subject: Add a feature flag for showing Statements on Properties .. Add a feature flag for showing Statements on Properties Bug: T75998 Change-Id: I61f3fa481d69cc3f1621f91a213cfd5a1bbab2ab --- M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M repo/config/Wikibase.default.php M repo/includes/PropertyView.php M repo/includes/View/EntityViewFactory.php 4 files changed, 38 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/62/176262/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index 2c462cc..2e7eabd 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -103,7 +103,10 @@ // TODO: Have an itemview and propertyview instead of ugly hack here. var entityType = this.options.value.getType(); - if( entityType === 'item' || entityType === 'property' ) { + if( + entityType === 'item' + || entityType === 'property' && this.element.find( '.wb-claimlistview' ).length === 1 + ) { this._initClaims(); } diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php index 1eb1e3d..8187aa1 100644 --- a/repo/config/Wikibase.default.php +++ b/repo/config/Wikibase.default.php @@ -94,6 +94,8 @@ 'useRedirectTargetColumn' => true, + 'displayStatementsOnProperties' => true, + 'conceptBaseUri' => function() { $uri = $GLOBALS['wgServer']; $uri = preg_replace( '!^//!', 'http://', $uri ); diff --git a/repo/includes/PropertyView.php b/repo/includes/PropertyView.php index a5b71e6..71eb388 100644 --- a/repo/includes/PropertyView.php +++ b/repo/includes/PropertyView.php @@ -6,6 +6,9 @@ use InvalidArgumentException; use Wikibase\DataModel\Entity\Property; use Wikibase\Repo\WikibaseRepo; +use Wikibase\Repo\View\FingerprintView; +use Wikibase\Repo\View\ClaimsView; +use Language; /** * Class for creating views for Property instances. @@ -18,6 +21,23 @@ * @author H. Snater < mediaw...@snater.com > */ class PropertyView extends EntityView { + + /** +* @var bool +*/ + private $displayStatementsOnProperties; + + /** +* @param FingerprintView $fingerprintView +* @param ClaimsView $claimsView +* @param Language $language +* @param bool $displayStatementsOnProperties +*/ + public function __construct( FingerprintView $fingerprintView, ClaimsView $claimsView, Language $language, $displayStatementsOnProperties ) { + parent::__construct($fingerprintView, $claimsView, $language); + + $this->displayStatementsOnProperties = $displayStatementsOnProperties; + } /** * @see EntityView::getMainHtml @@ -36,11 +56,13 @@ $html = parent::getMainHtml( $entityRevision, $entityInfo, $editable ); $html .= $this->getHtmlForDataType( $this->getDataType( $property ) ); - $html .= $this->claimsView->getHtml( - $property->getStatements()->toArray(), - $entityInfo, - 'wikibase-attributes' - ); + if ( $this->displayStatementsOnProperties ) { + $html .= $this->claimsView->getHtml( + $property->getStatements()->toArray(), + $entityInfo, + 'wikibase-attributes' + ); + } $footer = wfMessage( 'wikibase-property-footer' ); diff --git a/repo/includes/View/EntityViewFactory.php b/repo/includes/View/EntityViewFactory.php index 89e3759..92056c0 100644 --- a/repo/includes/View/EntityViewFactory.php +++ b/repo/includes/View/EntityViewFactory.php @@ -21,6 +21,7 @@ use Wikibase\Repo\View\FingerprintView; use Wikibase\Repo\View\SectionEditLinkGenerator; use Wikibase\Repo\View\SnakHtmlGenerator; +use Wikibase\Repo\WikibaseRepo; /** * @since 0.5 @@ -85,7 +86,10 @@ if ( $entityType === 'item' ) { return new ItemView( $fingerprintView, $claimsView, $language ); } elseif ( $entityType === 'property' ) { - return new PropertyView( $fingerprintView, $claimsView, $language ); + $displayStatementsOnProperties = WikibaseRepo::getDefaultInstance()->getSettings() + ->getSetting( 'displayStatementsOnProperties'
[MediaWiki-commits] [Gerrit] Also show Statements on Properties in non-experimental mode - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Also show Statements on Properties in non-experimental mode .. Also show Statements on Properties in non-experimental mode Change-Id: I2a1969ff501fe4667fb42f325e9f28bf5aab6e2e (cherry picked from commit e92535ce71e5391ee8bf3d0717f384babe351716) --- M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js M repo/includes/PropertyView.php 2 files changed, 6 insertions(+), 12 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index dbdb1d4..2c462cc 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -103,10 +103,7 @@ // TODO: Have an itemview and propertyview instead of ugly hack here. var entityType = this.options.value.getType(); - if( - entityType === 'item' - || entityType === 'property' && mw.config.get( 'wbExperimentalFeatures' ) - ) { + if( entityType === 'item' || entityType === 'property' ) { this._initClaims(); } diff --git a/repo/includes/PropertyView.php b/repo/includes/PropertyView.php index 6e8786b..a5b71e6 100644 --- a/repo/includes/PropertyView.php +++ b/repo/includes/PropertyView.php @@ -36,14 +36,11 @@ $html = parent::getMainHtml( $entityRevision, $entityInfo, $editable ); $html .= $this->getHtmlForDataType( $this->getDataType( $property ) ); - if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) && WB_EXPERIMENTAL_FEATURES ) { - // @fixme Property::getClaims no longer returns any statements for properties! - $html .= $this->claimsView->getHtml( - $property->getStatements()->toArray(), - $entityInfo, - 'wikibase-attributes' - ); - } + $html .= $this->claimsView->getHtml( + $property->getStatements()->toArray(), + $entityInfo, + 'wikibase-attributes' + ); $footer = wfMessage( 'wikibase-property-footer' ); -- To view, visit https://gerrit.wikimedia.org/r/176250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a1969ff501fe4667fb42f325e9f28bf5aab6e2e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf10 Gerrit-Owner: Hoo man Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] rubocop and/or style fixes - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176258 Change subject: rubocop and/or style fixes .. rubocop and/or style fixes Bug: T75898 Change-Id: I22048e027c3ceef4b227acb9fa1d9ad2345c7e82 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/env.rb 2 files changed, 3 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/58/176258/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6f12914..425b1a8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,12 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/AndOr: - Enabled: false - # Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index 56f7ddc..d2728ce 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -40,8 +40,8 @@ end end def environment - if ENV['SAUCE_ONDEMAND_USERNAME'] and ENV['SAUCE_ONDEMAND_ACCESS_KEY'] and - ENV['BROWSER'] != 'phantomjs' and ENV['HEADLESS'] != 'true' + if ENV['SAUCE_ONDEMAND_USERNAME'] && ENV['SAUCE_ONDEMAND_ACCESS_KEY'] && + ENV['BROWSER'] != 'phantomjs' && ENV['HEADLESS'] != 'true' :saucelabs else :local @@ -93,7 +93,7 @@ end WebDriver_Capabilties = Selenium::WebDriver::Remote::Capabilities def sauce_browser(test_name, configuration) - if (ENV['BROWSER'] == nil) or (ENV['PLATFORM'] == nil) or (ENV['VERSION'] == nil) + if (ENV['BROWSER'] == nil) || (ENV['PLATFORM'] == nil) || (ENV['VERSION'] == nil) abort 'Environment variables BROWSER, PLATFORM and VERSION have to be set' end -- To view, visit https://gerrit.wikimedia.org/r/176258 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22048e027c3ceef4b227acb9fa1d9ad2345c7e82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use % instead of %Q per rubocop - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176259 Change subject: use % instead of %Q per rubocop .. use % instead of %Q per rubocop Bug: T75898 Change-Id: I166106d887c2da7b7ab1476ace2eb3e9cf84bdd6 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/hooks.rb 2 files changed, 3 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/59/176259/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 425b1a8..d49b255 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,12 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/BarePercentLiterals: - Enabled: false - # Offense count: 13 # Cop supports --auto-correct. Style/BlockComments: diff --git a/lib/mediawiki_selenium/support/hooks.rb b/lib/mediawiki_selenium/support/hooks.rb index 3e63a15..cd4150f 100644 --- a/lib/mediawiki_selenium/support/hooks.rb +++ b/lib/mediawiki_selenium/support/hooks.rb @@ -100,9 +100,9 @@ if environment == :saucelabs sid = $session_id || sauce_session_id -sauce_api(%Q{{"passed": #{scenario.passed?}}}, sid) -sauce_api(%Q{{"public": true}}, sid) -sauce_api(%Q{{'build': #{ENV['BUILD_NUMBER']}}}, sid) if ENV['BUILD_NUMBER'] +sauce_api(%{{"passed": #{scenario.passed?}}}, sid) +sauce_api(%{{"public": true}}, sid) +sauce_api(%{{'build': #{ENV['BUILD_NUMBER']}}}, sid) if ENV['BUILD_NUMBER'] end if @browser -- To view, visit https://gerrit.wikimedia.org/r/176259 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I166106d887c2da7b7ab1476ace2eb3e9cf84bdd6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T75898: change compact style module definition to nested (pe... - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176261 Change subject: T75898: change compact style module definition to nested (per rubocop) .. T75898: change compact style module definition to nested (per rubocop) Change-Id: I7967a4f04f559989afbdae7f913b3681cd6ef980 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/sauce.rb 2 files changed, 14 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/61/176261/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f1ffa98..167c1ec 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,11 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/ClassAndModuleChildren: - Enabled: false - # Offense count: 10 Style/Documentation: Enabled: false diff --git a/lib/mediawiki_selenium/support/sauce.rb b/lib/mediawiki_selenium/support/sauce.rb index 3d3e4f9..74e5b90 100644 --- a/lib/mediawiki_selenium/support/sauce.rb +++ b/lib/mediawiki_selenium/support/sauce.rb @@ -9,21 +9,23 @@ require 'cucumber/formatter/junit' -module Cucumber::Formatter - class Sauce < Junit +module Cucumber + module Formatter +class Sauce < Junit -private + private -def format_exception(exception) - if ENV['HEADLESS'] == 'true' -sauce_job_page = '' - elsif $session_id -sauce_job_page = "Sauce Labs job URL: http://saucelabs.com/jobs/#{$session_id}\n"; - else -sauce_job_page = 'Uh-oh. Could not find link to Sauce Labs job URL.' + def format_exception(exception) +if ENV['HEADLESS'] == 'true' + sauce_job_page = '' +elsif $session_id + sauce_job_page = "Sauce Labs job URL: http://saucelabs.com/jobs/#{$session_id}\n"; +else + sauce_job_page = 'Uh-oh. Could not find link to Sauce Labs job URL.' +end +([sauce_job_page] + ["#{exception.message} (#{exception.class})"] + + exception.backtrace).join("\n") end - ([sauce_job_page] + ["#{exception.message} (#{exception.class})"] + -exception.backtrace).join("\n") end end end -- To view, visit https://gerrit.wikimedia.org/r/176261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7967a4f04f559989afbdae7f913b3681cd6ef980 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove non applicable private (per rubocop) - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176254 Change subject: remove non applicable private (per rubocop) .. remove non applicable private (per rubocop) Bug: T75898 Change-Id: I2ac4926bfd4e9bd99cb4c7394709847a46c0460d --- M .rubocop_todo.yml M lib/mediawiki_selenium/warnings_formatter.rb 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/54/176254/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 05e78fc..ee3ef98 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,10 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -Lint/UselessAccessModifier: - Enabled: false - # Offense count: 2 Metrics/CyclomaticComplexity: Max: 16 diff --git a/lib/mediawiki_selenium/warnings_formatter.rb b/lib/mediawiki_selenium/warnings_formatter.rb index 53b730e..ab51b0f 100644 --- a/lib/mediawiki_selenium/warnings_formatter.rb +++ b/lib/mediawiki_selenium/warnings_formatter.rb @@ -34,8 +34,6 @@ feature.extend(FeatureWarnings) end -private - module FeatureWarnings def mw_warn(message, type = :default) mw_warnings[type] ||= [] -- To view, visit https://gerrit.wikimedia.org/r/176254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ac4926bfd4e9bd99cb4c7394709847a46c0460d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] change block comments to # comments (per rubocop) - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176260 Change subject: change block comments to # comments (per rubocop) .. change block comments to # comments (per rubocop) Bug: T75898 Change-Id: Ib397106eea41dfe2d3503d27b07656157cd0fe70 --- M .rubocop_todo.yml M lib/mediawiki_selenium.rb M lib/mediawiki_selenium/step_definitions/login_steps.rb M lib/mediawiki_selenium/step_definitions/navigation_steps.rb M lib/mediawiki_selenium/step_definitions/preferences_steps.rb M lib/mediawiki_selenium/step_definitions/resource_loader_steps.rb M lib/mediawiki_selenium/support/env.rb M lib/mediawiki_selenium/support/hooks.rb M lib/mediawiki_selenium/support/modules/url_module.rb M lib/mediawiki_selenium/support/pages/login_page.rb M lib/mediawiki_selenium/support/pages/random_page.rb M lib/mediawiki_selenium/support/pages/reset_preferences_page.rb M lib/mediawiki_selenium/support/sauce.rb M lib/mediawiki_selenium/version.rb 14 files changed, 104 insertions(+), 135 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/60/176260/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d49b255..f1ffa98 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,11 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 13 -# Cop supports --auto-correct. -Style/BlockComments: - Enabled: false - # Offense count: 1 # Configuration parameters: EnforcedStyle, SupportedStyles. Style/ClassAndModuleChildren: diff --git a/lib/mediawiki_selenium.rb b/lib/mediawiki_selenium.rb index 1779e5f..cc436b5 100644 --- a/lib/mediawiki_selenium.rb +++ b/lib/mediawiki_selenium.rb @@ -1,13 +1,11 @@ -=begin -This file is subject to the license terms in the LICENSE file found in the -mediawiki_selenium top-level directory and at -https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of -mediawiki_selenium, including this file, may be copied, modified, propagated, or -distributed except according to the terms contained in the LICENSE file. -Copyright 2013 by the Mediawiki developers. See the CREDITS file in the -mediawiki_selenium top-level directory and at -https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. -=end +# This file is subject to the license terms in the LICENSE file found in the +# mediawiki_selenium top-level directory and at +# https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of +# mediawiki_selenium, including this file, may be copied, modified, propagated, or +# distributed except according to the terms contained in the LICENSE file. +# Copyright 2013 by the Mediawiki developers. See the CREDITS file in the +# mediawiki_selenium top-level directory and at +# https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. require 'mediawiki_selenium/version' diff --git a/lib/mediawiki_selenium/step_definitions/login_steps.rb b/lib/mediawiki_selenium/step_definitions/login_steps.rb index 1f8e9e5..4ff7978 100644 --- a/lib/mediawiki_selenium/step_definitions/login_steps.rb +++ b/lib/mediawiki_selenium/step_definitions/login_steps.rb @@ -1,13 +1,11 @@ -=begin -This file is subject to the license terms in the LICENSE file found in the -mediawiki_selenium top-level directory and at -https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of -mediawiki_selenium, including this file, may be copied, modified, propagated, or -distributed except according to the terms contained in the LICENSE file. -Copyright 2013 by the Mediawiki developers. See the CREDITS file in the -mediawiki_selenium top-level directory and at -https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. -=end +# This file is subject to the license terms in the LICENSE file found in the +# mediawiki_selenium top-level directory and at +# https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of +# mediawiki_selenium, including this file, may be copied, modified, propagated, or +# distributed except according to the terms contained in the LICENSE file. +# Copyright 2013 by the Mediawiki developers. See the CREDITS file in the +# mediawiki_selenium top-level directory and at +# https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS. Given(/^I am logged in$/) do visit(LoginPage).login_with(ENV['MEDIAWIKI_USER'], ENV['MEDIAWIKI_PASSWORD']) diff --git a/lib/mediawiki_selenium/step_definitions/navigation_steps.rb b/lib/mediawiki_selenium/step_definitions/navigation_steps.rb index 1b66f24..db9f652 100644 --- a/lib/mediawiki_selenium/step_definitions/navigation_steps.rb +++ b/lib/mediawiki_selenium/step_definitions/navigation_steps.rb @@ -1,13 +1,11 @@ -=begin -This file is subject to the license terms in the LICENSE file found in the -mediawiki_selenium top-level directory and at -https://git.wikim
[MediaWiki-commits] [Gerrit] ignore cop because is part of module api - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176257 Change subject: ignore cop because is part of module api .. ignore cop because is part of module api Bug: T75898 Change-Id: I34edaca3a9a673b76190dbad09b43b9d53d33bf0 --- M .rubocop_todo.yml M lib/mediawiki_selenium/support/env.rb 2 files changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/57/176257/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6208958..6f12914 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,10 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -Style/AccessorMethodName: - Enabled: false - # Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index 9f8baa4..56f7ddc 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -141,7 +141,7 @@ browser end -def set_cookie(_browser) +def set_cookie(_browser) # rubocop:disable Style/AccessorMethodName # implement this method in env.rb of the repository where it is needed end def test_name(scenario) -- To view, visit https://gerrit.wikimedia.org/r/176257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34edaca3a9a673b76190dbad09b43b9d53d33bf0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add MediaWiki standard rubocop config - change (mediawiki/selenium)
Stan has uploaded a new change for review. https://gerrit.wikimedia.org/r/176256 Change subject: add MediaWiki standard rubocop config .. add MediaWiki standard rubocop config Bug: T75898 Change-Id: Ie5735fca41fbb6fb5216144ccd6c471d88bde578 --- M .rubocop.yml M .rubocop_todo.yml 2 files changed, 21 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/56/176256/1 diff --git a/.rubocop.yml b/.rubocop.yml index 345b03d..44f44f7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,26 @@ inherit_from: .rubocop_todo.yml +Metrics/ClassLength: + Enabled: false + +Metrics/CyclomaticComplexity: + Enabled: false + Metrics/LineLength: Max: 100 +Metrics/MethodLength: + Enabled: false + +Metrics/ParameterLists: + Enabled: false + +Metrics/PerceivedComplexity: + Enabled: false + +Style/Alias: + Enabled: false + +Style/SignalException: + Enabled: false + diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e2a84f3..6208958 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,19 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 2 -Metrics/CyclomaticComplexity: - Max: 16 - -# Offense count: 2 -# Configuration parameters: CountComments. -Metrics/MethodLength: - Max: 37 - -# Offense count: 2 -Metrics/PerceivedComplexity: - Max: 17 - # Offense count: 1 Style/AccessorMethodName: Enabled: false @@ -110,12 +97,6 @@ # Offense count: 2 # Cop supports --auto-correct. Style/RedundantSelf: - Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/SignalException: Enabled: false # Offense count: 6 -- To view, visit https://gerrit.wikimedia.org/r/176256 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5735fca41fbb6fb5216144ccd6c471d88bde578 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Stan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits