[MediaWiki-commits] [Gerrit] Updating make files per changes to production branch - change (mediawiki...ocg-collection)

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

Change subject: Updating make files per changes to production branch
..


Updating make files per changes to production branch

Change-Id: I635986e8be4a155bf35db1c0aa1744fc6769f49b
---
M Makefile
M unify-package-json.js
2 files changed, 54 insertions(+), 72 deletions(-)

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



diff --git a/Makefile b/Makefile
index 5c92ee5..1973916 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@
 
 core:
export LINK=g++
-   npm install semver when
+   rm -f ./package.json
+   npm cache clear
+   npm install prfun semver
./unify-package-json.js
npm install
npm update
@@ -16,6 +18,4 @@
npm prune
 
 clean:
-   rm -f ./package.json
-   npm cache clear
rm -rf ./node_modules
diff --git a/unify-package-json.js b/unify-package-json.js
index 2234c6a..6791543 100755
--- a/unify-package-json.js
+++ b/unify-package-json.js
@@ -7,36 +7,35 @@
  * It will throw errors if multiple files reference different versions of the
  * same upstream package.
  *
- * Ironically; this script itself has dependencies in the form of the when 
library
- * (because node.js for some stupid reason doesn't include promises anymore)
+ * Ironically; this script itself has dependencies in the form of the `prfun`
+ * library (since we want to use fancy non-standard Promise features).
  */
 
 var child_process = require( 'child_process' ),
semver = require( 'semver' ),
fs = require( 'fs' ),
+   path = require( 'path' ),
util = require( 'util' );
 
 try {
-   var when = require('when');
+   require('prfun');
 } catch ( err ) {
-   console.err( "The 'when' library could not be loaded. Please `npm 
install when`")
+   console.err( "The 'prfun' library could not be loaded. Please `npm 
install prfun`")
 }
 
 function findPackageJson() {
-   return when.promise( function( resolve, reject, notify ) {
-   child_process.exec(
-   'find . -path ./node_modules -prune -o -name 
package.json -print',
-   function( error, stdout, stderr ) {
-   files = stdout.trim().split( '\n' );
-   resolve( files );
-   }
-   )
+   var readdir = Promise.promisify(fs.readdir, fs);
+   return readdir( __dirname ).then( function( files ) {
+   return files.map( function( f ) {
+   return path.join( __dirname, f, "package.json" );
+   } ).filter( function ( f ) {
+   return fs.existsSync( f );
+   } );
} );
 }
 
 function readPackageJson( files ) {
-   return when.map(
-   files,
+   return files.map(
function( file ) {
return require( file );
}
@@ -46,64 +45,45 @@
 function buildDependencies( packageObjs ) {
var glodeps, optdeps, glodevdeps;
var iterate = function iterate( key, arrayObj ) {
-   var unifiedDeps = {};
+   var unifiedDeps = new Map();
 
arrayObj.forEach( function( el ) {
var name = el.name,
-   packdeps = el[key],
-   pkg, glover, pkgver;
+   packdeps = el[key] || {};
 
-   for ( pkg in packdeps ) {
-   if ( !packdeps.hasOwnProperty( pkg ) ) {
-   continue;
+   Object.keys(packdeps).forEach( function( pkg ) {
+   var pkgver = packdeps[pkg];
+   if ( !unifiedDeps.has( pkg ) ) {
+   unifiedDeps.set( pkg, new Map() );
}
-
-   if ( pkg in unifiedDeps ) {
-   // Check to see if the versions are 
compatible
-   glover = unifiedDeps[pkg][0];
-   pkgver = packdeps[pkg];
-
-   // Strict equality is nice; they need 
the same thing
-   if ( glover === pkgver ) {
-   continue;
-   }
-
-   // If either is an approximate version 
(major / minor match) strip
-   // the tidle so semver can process and 
then see if the other requirement matches
-   if ( glover[0] === '~' && 
semver.satisfies( glover.substr( 1 ), pkgver ) ) {
-   continue;
-   }
-   

[MediaWiki-commits] [Gerrit] Makefile defaults to production build - change (mediawiki...ocg-collection)

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

Change subject: Makefile defaults to production build
..


Makefile defaults to production build

Change-Id: I2ea8e79ecfe56af9a75e5c0b521627ff9fab9ef9
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Makefile b/Makefile
index 1973916..00bae24 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all: debug
+all: production
 
 core:
export LINK=g++

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ea8e79ecfe56af9a75e5c0b521627ff9fab9ef9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updating make files per changes to production branch - change (mediawiki...ocg-collection)

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

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

Change subject: Updating make files per changes to production branch
..

Updating make files per changes to production branch

Change-Id: I635986e8be4a155bf35db1c0aa1744fc6769f49b
---
M Makefile
M unify-package-json.js
2 files changed, 54 insertions(+), 72 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/28/138728/1

diff --git a/Makefile b/Makefile
index 5c92ee5..1973916 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@
 
 core:
export LINK=g++
-   npm install semver when
+   rm -f ./package.json
+   npm cache clear
+   npm install prfun semver
./unify-package-json.js
npm install
npm update
@@ -16,6 +18,4 @@
npm prune
 
 clean:
-   rm -f ./package.json
-   npm cache clear
rm -rf ./node_modules
diff --git a/unify-package-json.js b/unify-package-json.js
index 2234c6a..6791543 100755
--- a/unify-package-json.js
+++ b/unify-package-json.js
@@ -7,36 +7,35 @@
  * It will throw errors if multiple files reference different versions of the
  * same upstream package.
  *
- * Ironically; this script itself has dependencies in the form of the when 
library
- * (because node.js for some stupid reason doesn't include promises anymore)
+ * Ironically; this script itself has dependencies in the form of the `prfun`
+ * library (since we want to use fancy non-standard Promise features).
  */
 
 var child_process = require( 'child_process' ),
semver = require( 'semver' ),
fs = require( 'fs' ),
+   path = require( 'path' ),
util = require( 'util' );
 
 try {
-   var when = require('when');
+   require('prfun');
 } catch ( err ) {
-   console.err( "The 'when' library could not be loaded. Please `npm 
install when`")
+   console.err( "The 'prfun' library could not be loaded. Please `npm 
install prfun`")
 }
 
 function findPackageJson() {
-   return when.promise( function( resolve, reject, notify ) {
-   child_process.exec(
-   'find . -path ./node_modules -prune -o -name 
package.json -print',
-   function( error, stdout, stderr ) {
-   files = stdout.trim().split( '\n' );
-   resolve( files );
-   }
-   )
+   var readdir = Promise.promisify(fs.readdir, fs);
+   return readdir( __dirname ).then( function( files ) {
+   return files.map( function( f ) {
+   return path.join( __dirname, f, "package.json" );
+   } ).filter( function ( f ) {
+   return fs.existsSync( f );
+   } );
} );
 }
 
 function readPackageJson( files ) {
-   return when.map(
-   files,
+   return files.map(
function( file ) {
return require( file );
}
@@ -46,64 +45,45 @@
 function buildDependencies( packageObjs ) {
var glodeps, optdeps, glodevdeps;
var iterate = function iterate( key, arrayObj ) {
-   var unifiedDeps = {};
+   var unifiedDeps = new Map();
 
arrayObj.forEach( function( el ) {
var name = el.name,
-   packdeps = el[key],
-   pkg, glover, pkgver;
+   packdeps = el[key] || {};
 
-   for ( pkg in packdeps ) {
-   if ( !packdeps.hasOwnProperty( pkg ) ) {
-   continue;
+   Object.keys(packdeps).forEach( function( pkg ) {
+   var pkgver = packdeps[pkg];
+   if ( !unifiedDeps.has( pkg ) ) {
+   unifiedDeps.set( pkg, new Map() );
}
-
-   if ( pkg in unifiedDeps ) {
-   // Check to see if the versions are 
compatible
-   glover = unifiedDeps[pkg][0];
-   pkgver = packdeps[pkg];
-
-   // Strict equality is nice; they need 
the same thing
-   if ( glover === pkgver ) {
-   continue;
-   }
-
-   // If either is an approximate version 
(major / minor match) strip
-   // the tidle so semver can process and 
then see if the other requirement matches
-   if ( glover[0] === '~' && 
semver.satisfies( glover.substr( 1 ), pkgver ) ) {
-  

[MediaWiki-commits] [Gerrit] Makefile defaults to production build - change (mediawiki...ocg-collection)

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

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

Change subject: Makefile defaults to production build
..

Makefile defaults to production build

Change-Id: I2ea8e79ecfe56af9a75e5c0b521627ff9fab9ef9
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/26/138726/1

diff --git a/Makefile b/Makefile
index 1973916..00bae24 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all: debug
+all: production
 
 core:
export LINK=g++

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ea8e79ecfe56af9a75e5c0b521627ff9fab9ef9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Only unify top-level package.json and let npm resolve any co... - change (mediawiki...ocg-collection)

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

Change subject: Only unify top-level package.json and let npm resolve any 
conflicts found.
..


Only unify top-level package.json and let npm resolve any conflicts found.

Instead of trying to use semver to unify different package versions, just
use the `and` operator (in semver, a space) to combine the versions and
let npm figure it out.  Similarly, don't try to unify *all* the
package.json files; just do the top-level ones and let `npm dedupe` handle
the recursion.

Change-Id: I968afa24edd00c5574317c974749cd54a792ac3f
---
M unify-package-json.js
1 file changed, 39 insertions(+), 58 deletions(-)

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



diff --git a/unify-package-json.js b/unify-package-json.js
index 998cb1e..6791543 100755
--- a/unify-package-json.js
+++ b/unify-package-json.js
@@ -14,6 +14,7 @@
 var child_process = require( 'child_process' ),
semver = require( 'semver' ),
fs = require( 'fs' ),
+   path = require( 'path' ),
util = require( 'util' );
 
 try {
@@ -23,14 +24,13 @@
 }
 
 function findPackageJson() {
-   return new Promise( function( resolve, reject ) {
-   child_process.exec(
-   'find . -path ./node_modules -prune -o -name 
package.json -print',
-   function( error, stdout, stderr ) {
-   files = stdout.trim().split( '\n' );
-   resolve( files );
-   }
-   )
+   var readdir = Promise.promisify(fs.readdir, fs);
+   return readdir( __dirname ).then( function( files ) {
+   return files.map( function( f ) {
+   return path.join( __dirname, f, "package.json" );
+   } ).filter( function ( f ) {
+   return fs.existsSync( f );
+   } );
} );
 }
 
@@ -45,64 +45,45 @@
 function buildDependencies( packageObjs ) {
var glodeps, optdeps, glodevdeps;
var iterate = function iterate( key, arrayObj ) {
-   var unifiedDeps = {};
+   var unifiedDeps = new Map();
 
arrayObj.forEach( function( el ) {
var name = el.name,
-   packdeps = el[key],
-   pkg, glover, pkgver;
+   packdeps = el[key] || {};
 
-   for ( pkg in packdeps ) {
-   if ( !packdeps.hasOwnProperty( pkg ) ) {
-   continue;
+   Object.keys(packdeps).forEach( function( pkg ) {
+   var pkgver = packdeps[pkg];
+   if ( !unifiedDeps.has( pkg ) ) {
+   unifiedDeps.set( pkg, new Map() );
}
-
-   if ( pkg in unifiedDeps ) {
-   // Check to see if the versions are 
compatible
-   glover = unifiedDeps[pkg][0];
-   pkgver = packdeps[pkg];
-
-   // Strict equality is nice; they need 
the same thing
-   if ( glover === pkgver ) {
-   continue;
-   }
-
-   // If either is an approximate version 
(major / minor match) strip
-   // the tidle so semver can process and 
then see if the other requirement matches
-   if ( glover[0] === '~' && 
semver.satisfies( glover.substr( 1 ), pkgver ) ) {
-   continue;
-   }
-   if ( pkgver[0] === '~' && 
semver.satisfies( pkgver.substr( 1 ), glover ) ) {
-   continue;
-   }
-
-   // TODO: Handle greater than / less 
than.
-
-   console.error(
-   util.format(
-   'Could not reconcile 
common dependency on %s. %s requires %s where %s requires %s.',
-   pkg,
-   unifiedDeps[pkg][1], 
glover,
-   name, pkgver
-   )
-   );
-
-   } else {
-   // Not already used, just add it
-   uni

[MediaWiki-commits] [Gerrit] Update `unify-package-json` to use ES6 Promises. - change (mediawiki...ocg-collection)

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

Change subject: Update `unify-package-json` to use ES6 Promises.
..


Update `unify-package-json` to use ES6 Promises.

Change-Id: I04e07418d4a8d757f64281f68b3e1a2424cade8e
---
M Makefile
M unify-package-json.js
2 files changed, 14 insertions(+), 13 deletions(-)

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



diff --git a/Makefile b/Makefile
index 6eb4a80..1973916 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
export LINK=g++
rm -f ./package.json
npm cache clear
-   npm install when semver
+   npm install prfun semver
./unify-package-json.js
npm install
npm update
diff --git a/unify-package-json.js b/unify-package-json.js
index 2234c6a..998cb1e 100755
--- a/unify-package-json.js
+++ b/unify-package-json.js
@@ -7,8 +7,8 @@
  * It will throw errors if multiple files reference different versions of the
  * same upstream package.
  *
- * Ironically; this script itself has dependencies in the form of the when 
library
- * (because node.js for some stupid reason doesn't include promises anymore)
+ * Ironically; this script itself has dependencies in the form of the `prfun`
+ * library (since we want to use fancy non-standard Promise features).
  */
 
 var child_process = require( 'child_process' ),
@@ -17,13 +17,13 @@
util = require( 'util' );
 
 try {
-   var when = require('when');
+   require('prfun');
 } catch ( err ) {
-   console.err( "The 'when' library could not be loaded. Please `npm 
install when`")
+   console.err( "The 'prfun' library could not be loaded. Please `npm 
install prfun`")
 }
 
 function findPackageJson() {
-   return when.promise( function( resolve, reject, notify ) {
+   return new Promise( function( resolve, reject ) {
child_process.exec(
'find . -path ./node_modules -prune -o -name 
package.json -print',
function( error, stdout, stderr ) {
@@ -35,8 +35,7 @@
 }
 
 function readPackageJson( files ) {
-   return when.map(
-   files,
+   return files.map(
function( file ) {
return require( file );
}
@@ -134,16 +133,18 @@
devDependencies: deps.devDependencies
};
 
-   fs.writeFile( 'package.json', JSON.stringify( packageObj, null, 2 ), 
function( err ) {
-   console.log('wrote file');
-   } );
+   var writeFile = Promise.promisify(fs.writeFile, fs);
+   return writeFile( 'package.json', JSON.stringify( packageObj, null, 2 ) 
).
+   then(function() {
+   console.log('wrote file');
+   } );
 }
 
 /* === Glue logic === */
 findPackageJson()
.then( readPackageJson )
-   .then( when.lift( buildDependencies ) )
+   .then( Promise.method( buildDependencies ) )
.then( writePackageJson )
-   .catch( function( err ) { console.error( err ) });
+   .done();
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04e07418d4a8d757f64281f68b3e1a2424cade8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Cscott 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Update commander/es6-shim/request dependencies. - change (mediawiki...ocg-collection)

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

Change subject: Update commander/es6-shim/request dependencies.
..


Update commander/es6-shim/request dependencies.

Change-Id: I7e89f4ea893605ed9d14ec87c9dcf1879c524bb1
---
M mw-ocg-bundler
M mw-ocg-latexer
M mw-ocg-service
M mw-ocg-texter
M node_modules/async/package.json
M node_modules/commander/Readme.md
M node_modules/commander/index.js
M node_modules/commander/package.json
M node_modules/es6-shim/.npmignore
M node_modules/es6-shim/CHANGELOG.md
M node_modules/es6-shim/README.md
M node_modules/es6-shim/bower.json
M node_modules/es6-shim/component.json
M node_modules/es6-shim/es6-shim.js
A node_modules/es6-shim/es6-shim.map
A node_modules/es6-shim/es6-shim.min.js
M node_modules/es6-shim/package.json
D node_modules/es6-shim/testling.html
M node_modules/readable-stream/package.json
A node_modules/request/CHANGELOG.md
M node_modules/request/README.md
D node_modules/request/dns-request.js
M node_modules/request/index.js
A node_modules/request/lib/cookies.js
M node_modules/request/node_modules/form-data/Readme.md
M node_modules/request/node_modules/form-data/lib/form_data.js
R node_modules/request/node_modules/form-data/node_modules/async/.travis.yml
A node_modules/request/node_modules/form-data/node_modules/async/LICENSE
A node_modules/request/node_modules/form-data/node_modules/async/README.md
A node_modules/request/node_modules/form-data/node_modules/async/component.json
A node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
A node_modules/request/node_modules/form-data/node_modules/async/package.json
M node_modules/request/node_modules/form-data/package.json
M node_modules/request/node_modules/hawk/node_modules/boom/package.json
M node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
M node_modules/request/node_modules/hawk/node_modules/hoek/package.json
M node_modules/request/node_modules/hawk/node_modules/sntp/package.json
M node_modules/request/node_modules/hawk/package.json
M 
node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
M 
node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
M 
node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
M node_modules/request/node_modules/oauth-sign/package.json
M node_modules/request/node_modules/tough-cookie/.jshintrc
A node_modules/request/node_modules/tough-cookie/.travis.yml
M node_modules/request/node_modules/tough-cookie/README.md
M node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js
M node_modules/request/node_modules/tough-cookie/lib/cookie.js
M node_modules/request/node_modules/tough-cookie/lib/memstore.js
A node_modules/request/node_modules/tough-cookie/lib/store.js
M node_modules/request/node_modules/tough-cookie/package.json
M node_modules/request/node_modules/tough-cookie/test.js
A node_modules/request/node_modules/tunnel-agent/.jshintrc
M node_modules/request/node_modules/tunnel-agent/index.js
M node_modules/request/node_modules/tunnel-agent/package.json
M node_modules/request/package.json
M node_modules/request/request.js
M node_modules/when/package.json
M package.json
58 files changed, 5,406 insertions(+), 739 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e89f4ea893605ed9d14ec87c9dcf1879c524bb1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Cscott 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Set the contribution_tracking ID in normalized Amazon messages - change (wikimedia...SmashPig)

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

Change subject: Set the contribution_tracking ID in normalized Amazon messages
..


Set the contribution_tracking ID in normalized Amazon messages

TODO:
* Generalize the unit-testing framework.  Currently, you must call like:
  phpunit --bootstrap ../../Tests/BaseSmashPigUnitTestCase.php 
Tests/phpunit/NormalizeTest.php

Change-Id: I2a814dd553b9d1891d2da28f30db7c258666a8ef
---
M PaymentProviders/Amazon/ExpatriatedMessages/SubscriptionSuccessful.php
M PaymentProviders/Amazon/ExpatriatedMessages/TransactionCommon.php
A PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.php
A Tests/BaseSmashPigUnitTestCase.php
4 files changed, 114 insertions(+), 5 deletions(-)

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



diff --git 
a/PaymentProviders/Amazon/ExpatriatedMessages/SubscriptionSuccessful.php 
b/PaymentProviders/Amazon/ExpatriatedMessages/SubscriptionSuccessful.php
index f274687..6f7df1a 100644
--- a/PaymentProviders/Amazon/ExpatriatedMessages/SubscriptionSuccessful.php
+++ b/PaymentProviders/Amazon/ExpatriatedMessages/SubscriptionSuccessful.php
@@ -86,7 +86,6 @@
throw new SmashPigException( "Unhandled transaction 
amount , {$this->transactionAmount}" );
}
 
-   $queueMsg->gateway_txn_id = $this->subscriptionId;
$queueMsg->txn_type = 'subscr_signup';
$queueMsg->last_name = $this->buyerName;
$queueMsg->email = $this->buyerEmail;
@@ -97,15 +96,17 @@
$queueMsg->country = $this->country;
$queueMsg->postal_code = $this->zip;
$queueMsg->currency = $currency;
-   $queueMsg->amount = $amount;
+   $queueMsg->gross = $amount;
$queueMsg->frequency_unit = $frequency_unit;
$queueMsg->frequency_interval = $frequency_interval;
$queueMsg->installments = $installments;
$queueMsg->date = $this->startValidityDate;
$queueMsg->subscr_id = $this->subscriptionId;
$queueMsg->recurring = 1;
+   $queueMsg->gateway_status = $this->status;
+   $queueMsg->contribution_tracking_id = $this->referenceId;
 
-   $queueMsg->correlationId = 
"{$queueMsg->gateway}-{$queueMsg->gateway_txn_id}";
+   $queueMsg->correlationId = 
"{$queueMsg->gateway}-{$queueMsg->subscr_id}";
 
return $queueMsg;
}
diff --git a/PaymentProviders/Amazon/ExpatriatedMessages/TransactionCommon.php 
b/PaymentProviders/Amazon/ExpatriatedMessages/TransactionCommon.php
index 5a61f65..ce8aee7 100644
--- a/PaymentProviders/Amazon/ExpatriatedMessages/TransactionCommon.php
+++ b/PaymentProviders/Amazon/ExpatriatedMessages/TransactionCommon.php
@@ -31,12 +31,12 @@
'signatureVersion',
'signatureMethod',
'subscriptionId',
+   'status',
'tokenId',
'tokenType',
'transactionAmount',
'transactionDate',
'transactionId',
-   'transactionStatus',
);
protected $addressFullName;
protected $addressLine1;
@@ -62,13 +62,13 @@
protected $signature;
protected $signatureVersion;
protected $signatureMethod;
+   protected $status;
protected $subscriptionId;
protected $tokenId;
protected $tokenType;
protected $transactionAmount;
protected $transactionDate;
protected $transactionId;
-   protected $transactionStatus;
 
public function normalizeForQueue() {
$queueMsg = parent::normalizeForQueue();
@@ -80,17 +80,20 @@
throw new SmashPigException( "Unhandled transaction 
amount , {$this->transactionAmount}" );
}
 
+   $queueMsg->contribution_tracking_id = $this->referenceId;
$queueMsg->gateway_txn_id = $this->transactionId;
$queueMsg->last_name = $this->buyerName;
$queueMsg->email = $this->buyerEmail;
$queueMsg->street_address = $this->addressLine1;
$queueMsg->supplemental_address_1 = $this->addressLine2;
$queueMsg->state_province = $this->addressState;
+   $queueMsg->city = ''; //FIXME
$queueMsg->country = $this->addressCountry;
$queueMsg->postal_code = $this->addressZip;
$queueMsg->currency = $currency;
$queueMsg->gross = $amount;
$queueMsg->date = $this->transactionDate;
+   $queueMsg->gateway_status = $this->status;
 
if ( $this->subscriptionId ) {
$queueMsg->subscr_id = $this->subscriptionId;
diff --git a/PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.ph

[MediaWiki-commits] [Gerrit] Switch from `bluebird` to `es6-shim`/`prfun` for Promise imp... - change (mediawiki...bundler)

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

Change subject: Switch from `bluebird` to `es6-shim`/`prfun` for Promise 
implementation.
..


Switch from `bluebird` to `es6-shim`/`prfun` for Promise implementation.

Use standard ES6 promises.

Change-Id: I1c698ed05453f22b1574aa4e59eef7463f5cec59
---
M .jshintrc
M bin/mw-ocg-bundler
M lib/api.js
M lib/authors.js
M lib/db.js
M lib/image.js
M lib/index.js
M lib/metabook.js
M lib/p.js
M lib/parsoid.js
M lib/revisions.js
M lib/siteinfo.js
M package.json
M test/samples.js
14 files changed, 28 insertions(+), 26 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/.jshintrc b/.jshintrc
index 88e79fd..529d30e 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -7,6 +7,7 @@
"QUnit",
 
"Map",
+   "Promise",
"Set"
],
 
diff --git a/bin/mw-ocg-bundler b/bin/mw-ocg-bundler
index e38675f..37e09c8 100755
--- a/bin/mw-ocg-bundler
+++ b/bin/mw-ocg-bundler
@@ -1,12 +1,11 @@
 #!/usr/bin/env node
 require('es6-shim'); // for Map, endsWith, etc.
+require('prfun');
 
 var program = require('commander');
 var bundler = require('../');
 var fs = require('fs');
 var util = require('util');
-
-var Promise = require('bluebird');
 
 var P = require('../lib/p');
 
@@ -59,8 +58,6 @@
console.error('Too many arguments.');
return 1;
 }
-
-if (program.debug) { Promise.longStackTraces(); /* as soon as possible */ }
 
 var Syslog = program.syslog ? require('node-syslog') : {
init: function() { },
diff --git a/lib/api.js b/lib/api.js
index 43a4d11..4efa052 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -1,7 +1,7 @@
 // helpers for making mediawiki api requests
 "use strict";
-
-var Promise = require('bluebird');
+require('es6-shim');
+require('prfun');
 
 var querystring = require('querystring');
 var request = Promise.promisify(require('request'));
diff --git a/lib/authors.js b/lib/authors.js
index 072d8b4..9bd8d6c 100644
--- a/lib/authors.js
+++ b/lib/authors.js
@@ -1,5 +1,7 @@
 // Obtain authorship information for wiki articles.
 "use strict";
+require('es6-shim');
+require('prfun');
 
 var Api = require('./api');
 var P = require('./p');
diff --git a/lib/db.js b/lib/db.js
index 7fa396f..1d9b0c9 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -1,9 +1,10 @@
 // Helpers to create/read key/value mappings in sqlite db
 "use strict";
+require('es6-shim');
+require('prfun');
 
 var sqlite3 = require('sqlite3');
 
-var Promise = require('bluebird');
 var P = require('./p');
 
 var Db = module.exports = function(filename, options) {
diff --git a/lib/image.js b/lib/image.js
index fdf3c5e..7136df5 100644
--- a/lib/image.js
+++ b/lib/image.js
@@ -1,12 +1,12 @@
 // Fetch images and metadata about them.
 "use strict";
+require('es6-shim');
+require('prfun');
 
 var fs = require('fs');
 var path = require('path');
 var request = require('request');
 var tmp = require('tmp');
-
-var Promise = require('bluebird');
 
 var Api = require('./api');
 var P = require('./p');
diff --git a/lib/index.js b/lib/index.js
index e0f4b3e..3c1098c 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,5 +1,6 @@
 "use strict";
-require('es6-shim'); // Map/Set support
+require('es6-shim'); // Map/Set/Promise support
+require('prfun');
 
 var json = require('../package.json');
 
@@ -7,8 +8,6 @@
 var path = require('path');
 var rimraf = require('rimraf');
 var util = require('util');
-
-var Promise = require('bluebird');
 
 var Authors = require('./authors');
 var Db = require('./db');
diff --git a/lib/metabook.js b/lib/metabook.js
index 91c3102..afd0577 100644
--- a/lib/metabook.js
+++ b/lib/metabook.js
@@ -1,7 +1,7 @@
 /** Create a new metabook structure, or fixup a broken/incomplete one. */
 "use strict";
-
-var Promise = require('bluebird');
+require('es6-shim');
+require('prfun');
 
 var Api = require('../lib/api');
 var P = require('../lib/p');
diff --git a/lib/p.js b/lib/p.js
index 0c8e7d9..6365631 100644
--- a/lib/p.js
+++ b/lib/p.js
@@ -1,8 +1,9 @@
 // Helpers for promises.
 "use strict";
+require('es6-shim');
+require('prfun');
 
 var spawn = require('child_process').spawn;
-var Promise = require('bluebird');
 
 var P = module.exports = {};
 
@@ -50,7 +51,6 @@
 // If the optional `p` parameter is provided, wait for that to resolve
 // before starting to process the array contents.
 P.forEachSeq = function(a, f, p) {
-   // Bluebird bug: https://github.com/petkaantonov/bluebird/issues/97
// The initial value must not be undefined.  Arbitrarily choose `true`.
p = p ? p.return(true) : Promise.resolve(true);
return Promise.reduce(a, function(curResult, value, index, total) {
@@ -80,8 +80,8 @@
self = this;
args = arguments;
 
-   return Promise.cast(condition()).then(function(exit) {
-   return Promise.cast(f.apply(self, args)).finally(exit);
+   retu

[MediaWiki-commits] [Gerrit] Updating DI for WorldPay form fix - change (mediawiki/core)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updating DI for WorldPay form fix
..


Updating DI for WorldPay form fix

Change-Id: I6ecb7f0df55fd3345b4514461397891863a3c53a
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index ca2fd4f..910d225 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit ca2fd4fafd97772cbed251e472f6b1a5e319e6a3
+Subproject commit 910d22508fcaed0926df09251418118125998281

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ecb7f0df55fd3345b4514461397891863a3c53a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Updating DI for WorldPay form fix - change (mediawiki/core)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating DI for WorldPay form fix
..

Updating DI for WorldPay form fix

Change-Id: I6ecb7f0df55fd3345b4514461397891863a3c53a
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/138513/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index ca2fd4f..910d225 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit ca2fd4fafd97772cbed251e472f6b1a5e319e6a3
+Subproject commit 910d22508fcaed0926df09251418118125998281

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ecb7f0df55fd3345b4514461397891863a3c53a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into wmf_deploy - change (mediawiki...CentralNotice)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Merge remote-tracking branch 'origin/master' into wmf_deploy
..

Merge remote-tracking branch 'origin/master' into wmf_deploy

* origin/master:
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  i18n: Fix link text
  Localisation updates from https://translatewiki.net.
  i18n: Fix MediaWiki.org URL
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Update i18n shim
  Add a UI for attaching mixins to banners
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.
  Localisation updates from https://translatewiki.net.

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I273542a60336cf6bbd5c5767fb4ddf2de1c2ab6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] FR 1683: Do not submit form if there are errors - change (mediawiki...DonationInterface)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: FR 1683: Do not submit form if there are errors
..

FR 1683: Do not submit form if there are errors

Change-Id: I674992b1c47c277f466ef5aac1d9a18df29cb85e
---
M worldpay_gateway/forms/js/worldpay.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/08/138508/1

diff --git a/worldpay_gateway/forms/js/worldpay.js 
b/worldpay_gateway/forms/js/worldpay.js
index 1fa57ae..935aecc 100644
--- a/worldpay_gateway/forms/js/worldpay.js
+++ b/worldpay_gateway/forms/js/worldpay.js
@@ -33,7 +33,8 @@
 */
function validateClientSide() {
var cardType = $.payment.cardType( $accountNumber.val() ),
-   expiry = $accountExpiry.payment( 'cardExpiryVal' );
+   expiry = $accountExpiry.payment( 'cardExpiryVal' ),
+   personalResult = validate_personal( 
document.getElementById( 'worldpayform' ) );
 
$accountNumber.toggleClass( 'invalid', 
!$.payment.validateCardNumber( $accountNumber.val() ) );
$accountExpiry.toggleClass( 'invalid', 
!$.payment.validateCardExpiry( expiry ) );
@@ -41,7 +42,7 @@
 
validate_cc();
 
-   return ( $( 'input.invalid' ).length === 0 );
+   return ( personalResult && $( 'input.invalid' ).length === 0 );
}
 
/**
@@ -183,7 +184,6 @@
} else {
$( '#paymentSubmitBtn' 
).removeClass('disabled');
}
-   validate_personal( 
document.getElementById('worldpayform') );
return false;
});
});

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I674992b1c47c277f466ef5aac1d9a18df29cb85e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Put email into MerchantReference2 - change (mediawiki...DonationInterface)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Put email into MerchantReference2
..

Put email into MerchantReference2

PaymentTrust cannot search by email, but it can search by
MerchantReference2 (a 60 char field that we aren't using
elsewhere.)

The caveat currently is that PT doesn't allow you to search
an email address in MR2 (it thinks the @ is invalid.)

Another potential problem is that '+' is rejected by PT so
we'll have to clear that out somehow.

And... I lcase'd the email address to make it easier to search
by.

Change-Id: I9849ae778ddf40ad2103c4445a63d3032a2c7b47
---
M gateway_common/DonationData.php
M worldpay_gateway/worldpay.adapter.php
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/02/138502/1

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index c1d4f67..a225f1b 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -712,7 +712,7 @@
$email = 'nob...@wikimedia.org';
}
 
-   $this->setVal( 'email', $email );
+   $this->setVal( 'email', strtolower( $email ) );
$this->expunge( 'emailAdd' );
}
 
diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 5094f4f..9d1c973 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -386,6 +386,7 @@
'ZipCode',
'CountryCode',
'Email',
+   'MerchantReference2',
 
'CVN'
),
@@ -438,6 +439,7 @@
'ZipCode',
'CountryCode',
'Email',
+   'MerchantReference2',
),
'values' => array(
'VersionUsed' => 6,
@@ -699,7 +701,8 @@
'PTTID' => 'wp_pttid',
'UserName'  => 'username',
'UserPassword'  => 'user_password',
-   'MerchantId'=> 'wp_merchant_id'
+   'MerchantId'=> 'wp_merchant_id',
+   'MerchantReference2'=> 'email',
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9849ae778ddf40ad2103c4445a63d3032a2c7b47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Update dependencies. - change (mediawiki...bundler)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Update dependencies.
..


Update dependencies.

Update dependencies on 'commander', 'domino', 'es6-shim', 'request', and
'mocha' packages.

Change-Id: I6b4bf3ee3b5fecf3d79e2257bc4cff4dd20bc874
---
M package.json
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/package.json b/package.json
index f4cb428..64f8bfa 100644
--- a/package.json
+++ b/package.json
@@ -12,18 +12,18 @@
   ],
   "license": "GPLv2",
   "dependencies": {
-"commander": "~2.1.0",
-"domino": "~1.0.15",
-"es6-shim": "~0.9.1",
+"commander": "~2.2.0",
+"domino": "~1.0.17",
+"es6-shim": "~0.12.0",
 "node-syslog": "~1.1.7",
-"request": "~2.31.0",
+"request": "~2.36.0",
 "rimraf": "~2.2.2",
 "sqlite3": "~2.1.19",
 "tmp": "~0.0.23",
 "when": "~3.1.0"
   },
   "devDependencies": {
-"mocha": "1.*"
+"mocha": "~1.20.1"
   },
   "scripts": {
 "test": "mocha"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b4bf3ee3b5fecf3d79e2257bc4cff4dd20bc874
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler
Gerrit-Branch: master
Gerrit-Owner: Cscott 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding texter path - change (mediawiki...ocg-collection)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Adding texter path
..


Adding texter path

Change-Id: I302649ff3b1e54781e34329aeaf52c1ef2036bed
---
M LocalSettings.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/LocalSettings.js b/LocalSettings.js
index fa3e83e..f616732 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -4,6 +4,7 @@
 
config.backend.bundler.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-bundler/bin/mw-ocg-bundler";
config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-latexer/bin/mw-ocg-latexer";
+   config.backend.writers.rdf2text.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-texter/bin/mw-ocg-texter";
 
return config;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I302649ff3b1e54781e34329aeaf52c1ef2036bed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Add jpegtran dependency for metadata manipulation to OCG - change (operations/puppet)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Add jpegtran dependency for metadata manipulation to OCG
..

Add jpegtran dependency for metadata manipulation to OCG

Change-Id: I0d89a6228264ad35b174b703b05964b572af52eb
---
M modules/ocg/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/138361/1

diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index 794ad58..f5a8cf9 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -75,6 +75,7 @@
 'latex-xcolor',
 'lmodern',
 'imagemagick',
+'libjpeg-progs',
 'librsvg2-bin',
 'unzip',
 'zip',

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

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

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


[MediaWiki-commits] [Gerrit] Fix a typo in English TY text - change (wikimedia...crm)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Fix a typo in English TY text
..


Fix a typo in English TY text

Change-Id: I24218752fb84036ecf505104fede6af4b70827df
---
M sites/all/modules/thank_you/templates/html/thank_you.en.html
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/thank_you/templates/html/thank_you.en.html 
b/sites/all/modules/thank_you/templates/html/thank_you.en.html
index d1cdd94..0387cce 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.en.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.en.html
@@ -23,7 +23,7 @@
 Thank you for making this mission possible.
 
 On behalf of half a billion people who read Wikipedia, thousands of 
volunteer editors, and staff
-at the Foundation, I thank you for for keeping Wikipedia online and ad-free 
this year.
+at the Foundation, I thank you for keeping Wikipedia online and ad-free this 
year.
 
 Thank you,
 Lila

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24218752fb84036ecf505104fede6af4b70827df
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix a typo in English TY text - change (wikimedia...crm)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Fix a typo in English TY text
..


Fix a typo in English TY text

Change-Id: I505ffc56600cc8cd622dd1e290ebde51621d4d6f
---
M sites/all/modules/thank_you/templates/html/thank_you.en.html
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/thank_you/templates/html/thank_you.en.html 
b/sites/all/modules/thank_you/templates/html/thank_you.en.html
index d1cdd94..0387cce 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.en.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.en.html
@@ -23,7 +23,7 @@
 Thank you for making this mission possible.
 
 On behalf of half a billion people who read Wikipedia, thousands of 
volunteer editors, and staff
-at the Foundation, I thank you for for keeping Wikipedia online and ad-free 
this year.
+at the Foundation, I thank you for keeping Wikipedia online and ad-free this 
year.
 
 Thank you,
 Lila

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I505ffc56600cc8cd622dd1e290ebde51621d4d6f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Pcoombe 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding texter path - change (mediawiki...ocg-collection)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Adding texter path
..

Adding texter path

Change-Id: I302649ff3b1e54781e34329aeaf52c1ef2036bed
---
M LocalSettings.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/59/138359/1

diff --git a/LocalSettings.js b/LocalSettings.js
index fa3e83e..f616732 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -4,6 +4,7 @@
 
config.backend.bundler.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-bundler/bin/mw-ocg-bundler";
config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-latexer/bin/mw-ocg-latexer";
+   config.backend.writers.rdf2text.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-texter/bin/mw-ocg-texter";
 
return config;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I302649ff3b1e54781e34329aeaf52c1ef2036bed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Add Farsi fonts for OCG - change (operations/puppet)

2014-06-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Add Farsi fonts for OCG
..

Add Farsi fonts for OCG

Change-Id: I8b8cad1b6b17169b5735098f98d64904c4e37f6e
---
M modules/ocg/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/138357/1

diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index 8c771aa..794ad58 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -64,6 +64,7 @@
 'texlive-lang-all',
 'fonts-hosny-amiri',
 'ttf-devanagari-fonts',
+'fonts-farsiweb',
 'fonts-nafees',
 'ttf-indic-fonts-core',
 'ttf-malayalam-fonts',

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

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

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


[MediaWiki-commits] [Gerrit] get published revision of translated page - change (wikimedia...crm)

2014-06-06 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: get published revision of translated page
..


get published revision of translated page

Deployment:
* Must be coordinated with the fr-online team.  They will need to review
all page translation statuses.  We probably have an issue with distinguishing
between "published" and "yes, still published".

Change-Id: Id074915676d500dd8b5196b94ff9d5554d1267dd
---
M sites/all/modules/thank_you/generators/RenderTranslatedPage.php
1 file changed, 92 insertions(+), 84 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php 
b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
index 107aae4..c90ee72 100644
--- a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
+++ b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
@@ -22,6 +22,8 @@
/** @var string API URL to use on source wiki */
protected $api_url = 'https://meta.wikimedia.org/w/api.php';
 
+   protected $review_history;
+
/**
 * @var string[] Translation states that this module will accept as 
acceptable
 * to include in a composite message.
@@ -46,8 +48,9 @@
 }
foreach( $languages as $lang ) {
try {
-   $this->check_translation( $lang );
-   $page_content = $this->get_parsed_page( $lang );
+   $published_revision = 
$this->get_published_revision( $lang );
+
+   $page_content = $this->get_parsed_page( $lang, 
$published_revision );
$page_content = $this->do_replacements( 
$page_content );
$page_content = wordwrap( $page_content, 100 );
 
@@ -155,106 +158,111 @@
}
 
/**
-* Obtain and verify correctness of the translation segments of the
-* working title from MediaWiki.
+* Determine if and when a page has been marked "published", and 
prepare to
+* fetch that revision
 *
 * @param string $lang Language of the translation to be retrieved
 *
 * @throws TranslationException if content could not be retrieved
-* @return bool True if OK
+* @return int revision_id when page was published
 */
-   protected function check_translation( $lang ) {
-   static $expectedParts = array();
+   protected function get_published_revision( $lang ) {
+// No translation workflow for English, just use the most recent rev
+if ( $lang === 'en' ) {
+return $this->get_revision_at_time( null, 'en' );
+}
 
-   $j = $this->do_query(
-   array (
-   'action' => 'query',
-   'list' => 'messagecollection',
-   'mcgroup' => "page-{$this->title}",
-   'mclanguage' => $lang,
-   'mcprop' => array( 'translation', 'properties'),
-   'format' => 'json'
-   )
-   );
+$history = $this->get_page_review_history();
+$ts = null;
+// Grab the most recent publication event
+foreach ( $history as $review_event ) {
+if ( $review_event['language'] === $lang ) {
+if ( $review_event['new-state'] === 'published' ) {
+$ts = $review_event['timestamp'];
+break;
+}
+}
+}
+if ( !$ts ) {
+throw new TranslationException( "Page {$this->title} / $lang has 
never been published" );
+}
 
-   if ( is_array( $j ) ) {
-   // Check for required base elements
-   if ( !array_key_exists( 'query', $j ) ||
-!array_key_exists( 'messagecollection', 
$j['query'] ) ||
-!array_key_exists( 'metadata', $j['query'] ) ||
-!array_key_exists( 'resultsize', 
$j['query']['metadata'] )
-   ) {
-   throw new TranslationException( "Title object 
{$this->title}/$lang was malformed" );
-   }
-
-   // Did we get everything?
-   if ( $j['query']['metadata']['remaining'] > 0 ) {
-   throw new TranslationException(
-   "Title object {$this->title}/$lang was 
not completely fetched"
-   );
-   }
-
-   // Make sure we get everything that should be there
-   $numParts = count( $j['query']['mess

[MediaWiki-commits] [Gerrit] Merge hack patch for DI - change (mediawiki/core)

2014-06-06 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Merge hack patch for DI
..


Merge hack patch for DI

Change-Id: Iacb2441181cfb8c7ecea00d153122a950e971f14
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 2cf972a..ca2fd4f 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 2cf972a43fb88b3c827805c176247970fc8d08df
+Subproject commit ca2fd4fafd97772cbed251e472f6b1a5e319e6a3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iacb2441181cfb8c7ecea00d153122a950e971f14
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge hack patch for DI - change (mediawiki/core)

2014-06-06 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Merge hack patch for DI
..

Merge hack patch for DI

Change-Id: Iacb2441181cfb8c7ecea00d153122a950e971f14
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/137962/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 2cf972a..ca2fd4f 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 2cf972a43fb88b3c827805c176247970fc8d08df
+Subproject commit ca2fd4fafd97772cbed251e472f6b1a5e319e6a3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacb2441181cfb8c7ecea00d153122a950e971f14
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Adding GELF support to LogStash - change (operations/puppet)

2014-06-05 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Adding GELF support to LogStash
..

Adding GELF support to LogStash

GELF is the graylog extended log format which is a structured,
compressable, chunkable format.

Experimenting for using this for logging in NodeJS things.

Change-Id: I49aabe8f32622e0d16726d2ce0eb643d3382ef9c
---
A files/logstash/filter-gelf.conf
M manifests/role/logstash.pp
A modules/logstash/manifests/input/gelf.pp
A modules/logstash/templates/input/gelf.erb
4 files changed, 53 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/137811/1

diff --git a/files/logstash/filter-gelf.conf b/files/logstash/filter-gelf.conf
new file mode 100644
index 000..b3c7385
--- /dev/null
+++ b/files/logstash/filter-gelf.conf
@@ -0,0 +1,8 @@
+filter {
+  if [type] == "gelf" {
+mutate {
+  # tag gelf messages for storage in elasticsearch
+  add_tag => [ "es" ]
+}
+  }
+}
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 664de92..aa9de15 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -67,6 +67,11 @@
 key  => 'logstash',
 }
 
+logstash::input::gelf {
+port => 12201,
+}
+
+
 logstash::conf { 'filter_strip_ansi_color':
 source   => 'puppet:///files/logstash/filter-strip-ansi-color.conf',
 priority => 40,
@@ -81,6 +86,11 @@
 source   => 'puppet:///files/logstash/filter-mw-via-udp2log.conf',
 priority => 50,
 }
+
+logstash::conf { 'filter_gelf':
+source   => 'puppet:///files/logstash/filter-gelf.conf',
+priority => 50,
+}
 
 logstash::conf { 'filter_add_normalized_message':
 source   => 
'puppet:///files/logstash/filter-add-normalized-message.conf',
diff --git a/modules/logstash/manifests/input/gelf.pp 
b/modules/logstash/manifests/input/gelf.pp
new file mode 100644
index 000..3aebaa6
--- /dev/null
+++ b/modules/logstash/manifests/input/gelf.pp
@@ -0,0 +1,28 @@
+# vim:sw=4 ts=4 sts=4 et:
+
+# = Define: logstash::input::udp2log
+#
+# Configure logstash to collect input as a gelf (graylog) listener.
+#
+# == Parameters:
+# - $port: port to listen for gelf input on
+# - $priority: Configuration loading priority. Default '10'.
+# - $ensure: Whether the config should exist.
+#
+# == Sample usage:
+#
+#   logstash::input::gelf {
+#   port => 12201,
+#   }
+#
+define logstash::input::gelf(
+$ensure   = present,
+$port = 12201,
+$priority = 10,
+) {
+logstash::conf { "input-gelf-${title}":
+ensure   => $ensure,
+content  => template('logstash/input/gelf.erb'),
+priority => $priority,
+}
+}
diff --git a/modules/logstash/templates/input/gelf.erb 
b/modules/logstash/templates/input/gelf.erb
new file mode 100644
index 000..9e1356e
--- /dev/null
+++ b/modules/logstash/templates/input/gelf.erb
@@ -0,0 +1,7 @@
+input {
+  # Graylog extended logging format
+  gelf {
+type => "gelf"
+port => <%= @port %>
+  }
+}

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

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

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


[MediaWiki-commits] [Gerrit] Fix type in OCG role - change (operations/puppet)

2014-06-05 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Fix type in OCG role
..

Fix type in OCG role

Change-Id: I7b22e999caf14bbd92cba96421a1ce40a961241a
---
M manifests/role/ocg.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/137743/1

diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 7dc3d72..0bb7033 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -31,7 +31,7 @@
 redis_password => $passwords::redis::main_password,
 temp_dir   => '/srv/deployment/ocg/tmp',
 service_port   => $service_port,
-statsd_server  => $statsd_host,
+statsd_host=> $statsd_host,
 statsd_is_txstatsd => 1
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Updating Multimedia Viewer to master for swat - change (mediawiki/core)

2014-06-04 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating Multimedia Viewer to master for swat
..

Updating Multimedia Viewer to master for swat

Change-Id: Iafceedc3294317bb8725c2ee8318d414298a2dbc
---
M extensions/MultimediaViewer
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/137487/1

diff --git a/extensions/MultimediaViewer b/extensions/MultimediaViewer
index e72ae88..10fcf0d 16
--- a/extensions/MultimediaViewer
+++ b/extensions/MultimediaViewer
-Subproject commit e72ae88404933d3851f0f93d90b8e587ee40fcd1
+Subproject commit 10fcf0d1022ca72c7c5ea38d9f6e2c164d0a71cd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafceedc3294317bb8725c2ee8318d414298a2dbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf7
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] fix a warning about unused 'cancel' param - change (wikimedia...crm)

2014-06-04 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: fix a warning about unused 'cancel' param
..


fix a warning about unused 'cancel' param

Change-Id: Ic19824d2e10990518d7554fbbc82bc8cc55ce01d
---
M sites/all/modules/wmf_civicrm/recurring.inc
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/sites/all/modules/wmf_civicrm/recurring.inc 
b/sites/all/modules/wmf_civicrm/recurring.inc
index e4ffa0f..736515f 100644
--- a/sites/all/modules/wmf_civicrm/recurring.inc
+++ b/sites/all/modules/wmf_civicrm/recurring.inc
@@ -16,6 +16,7 @@
 $msg[ 'frequency_unit' ] = isset( $msg[ 'frequency_unit' ] ) ? $msg[ 
'frequency_unit' ] : 'month';
 $msg[ 'frequency_interval' ] = isset( $msg[ 'frequency_interval' ] ) ? 
(integer) $msg[ 'frequency_interval' ] : 1;
 $msg[ 'installments' ] = isset( $msg[ 'installments' ] ) ? (integer) $msg[ 
'installments' ] : 0;
+$msg['cancel'] = isset( $msg[ 'cancel' ] ) ? (integer) $msg[ 'cancel' ] : 
0;
 
 if ( !isset( $msg[ 'recurring' ] ) && $msg[ 'recurring' ] != 1 ) {
 $error_message = t(
@@ -88,7 +89,7 @@
 'installments' => $msg[ 'installments' ],
 'start_date' => wmf_common_date_unix_to_civicrm( $msg[ 'date' ] ),
 'create_date' => wmf_common_date_unix_to_civicrm( $msg[ 'date' ] ),
-'cancel_date' => ($msg['cancel'] ? wmf_common_date_unix_to_civicrm( 
time() ) : null ),
+'cancel_date' => ($msg['cancel'] ? wmf_common_date_unix_to_civicrm( 
$msg['cancel'] ) : null ),
 #FIXME:
 'processor_id' => 1,
 'cycle_day' => $msg[ 'cycle_day' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic19824d2e10990518d7554fbbc82bc8cc55ce01d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allowing a configurable StatsD server - change (operations/puppet)

2014-06-04 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Allowing a configurable StatsD server
..

Allowing a configurable StatsD server

Arguably this should be in some sort of configuration file
that's not in puppet. But right now that's not quite possible
unless I start introducing the concept of realms into my
versioned config file.

Change-Id: Ib787062bbba93d3fba98f1c51d605548d473eeb0
---
M manifests/role/ocg.pp
M modules/ocg/manifests/init.pp
M modules/ocg/templates/mw-ocg-service.js.erb
3 files changed, 26 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/137278/1

diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 2d6d2ff..4cdfda6 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -18,12 +18,21 @@
 # Default host in the WMF production env... this needs a variable or 
something
 $redis_host = 'rdb1002.eqiad.wmnet'
 }
+
+if ( $::ocg_statsd_server_override != undef ) {
+$statsd_host = $::ocg_statsd_server_override
+} else {
+# Default host in the WMF production env
+$statsd_host = 'statsd.eqiad.wmnet'
+}
 
 class { '::ocg':
-redis_host  => $redis_host,
-redis_password  => $passwords::redis::main_password,
-temp_dir=> '/srv/deployment/ocg/tmp',
-service_port=> $service_port
+redis_host => $redis_host,
+redis_password => $passwords::redis::main_password,
+temp_dir   => '/srv/deployment/ocg/tmp',
+service_port   => $service_port,
+statsd_server  => $statsd_host,
+statsd_is_txstatsd => 1
 }
 
 ferm::service { 'ocg-http':
@@ -47,10 +56,12 @@
 $service_port = 8000
 
 class { '::ocg':
-redis_host  => 'localhost',
-redis_password  => $passwords::redis::ocg_test_password,
-temp_dir=> '/srv/deployment/ocg/tmp',
-service_port=> $service_port
+redis_host => 'localhost',
+redis_password => $passwords::redis::ocg_test_password,
+temp_dir   => '/srv/deployment/ocg/tmp',
+service_port   => $service_port,
+statsd_host=> 'statsd.eqiad.wmnet',
+statsd_is_txstatsd => 1
 }
 
 ferm::service { 'ocg-http':
diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index b472c56..8c771aa 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -16,6 +16,9 @@
 $redis_host = 'localhost',
 $redis_port = 6379,
 $redis_password = '',
+$statsd_host = 'localhost',
+$statsd_port = 8125,
+$statsd_is_txstatsd = 0,
 $temp_dir = '/srv/deployment/ocg/tmp'
 ) {
 deployment::target { 'ocg': }
diff --git a/modules/ocg/templates/mw-ocg-service.js.erb 
b/modules/ocg/templates/mw-ocg-service.js.erb
index 6aa2e29..554912f 100644
--- a/modules/ocg/templates/mw-ocg-service.js.erb
+++ b/modules/ocg/templates/mw-ocg-service.js.erb
@@ -16,6 +16,10 @@
 
config.frontend.port = <%= @service_port %>;
config.backend.temp_dir = "<%= @temp_dir %>";
+   
+   config.reporting.statsd_server = "<%= @statsd_host %>";
+   config.reporting.statsd_port = <%= @statsd_port %>;
+   config.reporting.is_txstatsd = <%= @statsd_is_txstatsd %>;
 
// Import the public local settings
return require("/srv/deployment/ocg/ocg/LocalSettings.js")(config)

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

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

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


[MediaWiki-commits] [Gerrit] Adding Ferm rule for OCG HTTP - change (operations/puppet)

2014-06-03 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Adding Ferm rule for OCG HTTP
..

Adding Ferm rule for OCG HTTP

Things need to be able to talk to port 8000 for OCG.

Change-Id: Id9d51fbf13b71ce33205a8610a22693daaea27e5
---
M manifests/role/ocg.pp
1 file changed, 14 insertions(+), 1 deletion(-)


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

diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 7dae610..444a214 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -9,6 +9,8 @@
 system::role { 'ocg': description => 'offline content generator for 
MediaWiki Collection extension' }
 
 include passwords::redis
+
+$service_port = 8000
 
 if ( $::ocg_redis_server_override != undef ) {
 $redis_host = $::ocg_redis_server_override
@@ -21,6 +23,12 @@
 redis_host  => $redis_host,
 redis_password  => $passwords::redis::main_password,
 temp_dir=> '/srv/deployment/ocg/tmp',
+service_port=> $service_port
+}
+
+ferm::rule { 'ocg-http':
+ensure  => present,
+rule=> "proto tcp dport ${service_port} ACCEPT;"
 }
 
 monitor_service { 'ocg':
@@ -39,9 +47,14 @@
 redis_password  => $passwords::redis::ocg_test_password,
 temp_dir=> '/srv/deployment/ocg/tmp',
 }
+
+ferm::rule { 'ocg-http':
+ensure  => present,
+rule=> "proto tcp dport ${service_port} ACCEPT;"
+}
 
 class { 'redis':
 maxmemory   => '500Mb',
 password=> $passwords::redis::ocg_test_password,
-}
+}4505, 4506
 }

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

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

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


[MediaWiki-commits] [Gerrit] Updating ocg service to master - change (mediawiki...ocg-collection)

2014-06-03 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updating ocg service to master
..


Updating ocg service to master

Change-Id: I2c1bf75053aaa08bbe727b615f84da145c7ebb65
---
M mw-ocg-service
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/mw-ocg-service b/mw-ocg-service
index 91eaf0c..ead65b1 16
--- a/mw-ocg-service
+++ b/mw-ocg-service
-Subproject commit 91eaf0cbda583e299084cc5cf5ec372c452b98fb
+Subproject commit ead65b115c12637104dfe2bb566f78aa923b0c06

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c1bf75053aaa08bbe727b615f84da145c7ebb65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updating ocg service to master - change (mediawiki...ocg-collection)

2014-06-03 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating ocg service to master
..

Updating ocg service to master

Change-Id: I2c1bf75053aaa08bbe727b615f84da145c7ebb65
---
M mw-ocg-service
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/35/137235/1

diff --git a/mw-ocg-service b/mw-ocg-service
index 91eaf0c..ead65b1 16
--- a/mw-ocg-service
+++ b/mw-ocg-service
-Subproject commit 91eaf0cbda583e299084cc5cf5ec372c452b98fb
+Subproject commit ead65b115c12637104dfe2bb566f78aa923b0c06

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c1bf75053aaa08bbe727b615f84da145c7ebb65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updated Makefile and submodules to current masters - change (mediawiki...ocg-collection)

2014-06-03 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updated Makefile and submodules to current masters
..


Updated Makefile and submodules to current masters

Change-Id: I554bdd3903ae4b40644d7c7cea991b15fc51c4a5
---
M .gitignore
M Makefile
M mw-ocg-bundler
M mw-ocg-latexer
M mw-ocg-service
5 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index fe26abb..0acda37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node_modules/*
 
 LocalSettings.js
+package.json
 
 .idea
diff --git a/Makefile b/Makefile
index 56be9fd..5c92ee5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,8 @@
 all: debug
 
 core:
-   rm ./package.json
-   npm cache clear
-   npm install when
+   export LINK=g++
+   npm install semver when
./unify-package-json.js
npm install
npm update
@@ -17,4 +16,6 @@
npm prune
 
 clean:
+   rm -f ./package.json
+   npm cache clear
rm -rf ./node_modules
diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 085d024..3fb0354 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
+Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 9bff3d6..8803c27 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
+Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616
diff --git a/mw-ocg-service b/mw-ocg-service
index 91eaf0c..ead65b1 16
--- a/mw-ocg-service
+++ b/mw-ocg-service
-Subproject commit 91eaf0cbda583e299084cc5cf5ec372c452b98fb
+Subproject commit ead65b115c12637104dfe2bb566f78aa923b0c06

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I554bdd3903ae4b40644d7c7cea991b15fc51c4a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updated Makefile and submodules to current masters - change (mediawiki...ocg-collection)

2014-06-03 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updated Makefile and submodules to current masters
..

Updated Makefile and submodules to current masters

Change-Id: I554bdd3903ae4b40644d7c7cea991b15fc51c4a5
---
M .gitignore
M Makefile
M mw-ocg-bundler
M mw-ocg-latexer
M mw-ocg-service
5 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/34/137234/1

diff --git a/.gitignore b/.gitignore
index fe26abb..0acda37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node_modules/*
 
 LocalSettings.js
+package.json
 
 .idea
diff --git a/Makefile b/Makefile
index 56be9fd..5c92ee5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,8 @@
 all: debug
 
 core:
-   rm ./package.json
-   npm cache clear
-   npm install when
+   export LINK=g++
+   npm install semver when
./unify-package-json.js
npm install
npm update
@@ -17,4 +16,6 @@
npm prune
 
 clean:
+   rm -f ./package.json
+   npm cache clear
rm -rf ./node_modules
diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 085d024..3fb0354 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
+Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 9bff3d6..8803c27 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
+Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616
diff --git a/mw-ocg-service b/mw-ocg-service
index 91eaf0c..ead65b1 16
--- a/mw-ocg-service
+++ b/mw-ocg-service
-Subproject commit 91eaf0cbda583e299084cc5cf5ec372c452b98fb
+Subproject commit ead65b115c12637104dfe2bb566f78aa923b0c06

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I554bdd3903ae4b40644d7c7cea991b15fc51c4a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Adding StatsD Support - change (mediawiki...OfflineContentGenerator)

2014-06-03 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Adding StatsD Support
..

Adding StatsD Support

... and fixing some start up errors where we would crash uncontrollably
with no redis server.
... also added some startup sanity checking on file paths to make sure
they exist (otherwise we crash with no clear warning why).

Change-Id: I38be8c0f8654d98213d4dc4d849818c661922e50
---
M defaults.js
A lib/statsd.js
M lib/threads/backend.js
M lib/threads/frontend.js
M mw-ocg-service.js
M package.json
6 files changed, 315 insertions(+), 31 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator
 refs/changes/31/137231/1

diff --git a/defaults.js b/defaults.js
index 05f8d4c..3b74946 100644
--- a/defaults.js
+++ b/defaults.js
@@ -6,27 +6,31 @@
  * module.exports = function(config) { config.foo = 'bar'; }
  */
 module.exports = {
+   /** Service management thread, coordinates (re)launching threads and 
initial global setup */
"coordinator": {
+   /** The number of frontend threads to spawn. At the moment we 
don't have good data on how
+* many clients can be served via a thread in a production 
environment.
+*/
"frontend_threads": 2,
+   /** The number of backend threads to spawn. These are heavy 
rendering threads and so should
+* be set to some ratio of CPU cores. If set to "auto" the 
coordinator will launch a thread
+* per CPU core.
+*/
"backend_threads": "auto",
-   "runtime_user": null,
 
+   /** Public hostname of this instance for HTTP GET requests for 
locally stored content. */
"hostname": null
},
+   /** Configuration for the frontend HTTP server thread. You can choose 
to serve
+* content via a local socket, or an IP address. If both are null the 
server will
+* bind to all IP addresses.
+*/
"frontend": {
+   "address": null,
"socket": null,
-   "port": 17080,
-   "address": null
+   "port": 17080
},
-   "redis": {
-   "host": "localhost",
-   "port": 6379,
-   "password": null,
-   "retry_max_delay": 6,
-
-   "job_queue_name": "render_job_queue",
-   "status_set_name": "job_status"
-   },
+   /** Configuration for the backend bundling & and rendering process 
threads. */
"backend": {
"bundler": {
"bin": "../mw-ocg-bundler/bin/mw-ocg-bundler",
@@ -45,5 +49,34 @@
},
 
"temp_dir": null
+   },
+   /** Redis is used in both the frontend and backend for queueing jobs 
and job
+* metadata storage.
+*/
+   "redis": {
+   "host": "localhost",
+   "port": 6379,
+   "password": null,
+   "retry_max_delay": 6,
+
+   "job_queue_name": "render_job_queue",
+   "status_set_name": "job_status"
+   },
+   /** Active metric reporting via the StatsD protocol. General health can 
be obtained by querying
+* the frontend with a HTTP GET ?request=health query
+*/
+   "reporting": {
+   /** If true will send UDP packets to the StatsD server. */
+   "enable": false,
+   /** Hostname to send StatsD metrics to. */
+   "statsd_server": "localhost",
+   /** Port to send StatsD metrics to. */
+   "statsd_port": 8125,
+   /** The txstatsd daemon can have non standard behaviour. If 
you're running the
+* ConfigurableCollector set this to true.
+*/
+   "is_txstatsd": false,
+   /** Prefix for all statistics generated by this application */
+   "prefix": "ocg.pdf."
}
 };
diff --git a/lib/statsd.js b/lib/statsd.js
new file mode 100644
index 000..e33dc02
--- /dev/null
+++ b/lib/statsd.js
@@ -0,0 +1,209 @@
+/**
+ * Modified version of https://github.com/sivy/node-statsd/ for WMF specific
+ * txstatsd constraints.
+ *
+ * We've removed increment/decrement and nullified the sets function if 
operating
+ * in txstatsd mode.
+ *
+ * Original license to node-statsd:
+ *
+ * Copyright 2011 Steve Ivy. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furn

[MediaWiki-commits] [Gerrit] typo - change (wikimedia...crm)

2014-06-02 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: typo
..


typo

Change-Id: I7b190341dbd6418ee8bd87b67007db97d9dded9b
---
M sites/all/modules/wmf_campaigns/wmf_campaigns.module
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/sites/all/modules/wmf_campaigns/wmf_campaigns.module 
b/sites/all/modules/wmf_campaigns/wmf_campaigns.module
index e061d7e..f130008 100644
--- a/sites/all/modules/wmf_campaigns/wmf_campaigns.module
+++ b/sites/all/modules/wmf_campaigns/wmf_campaigns.module
@@ -74,7 +74,7 @@
 
 $rows = array();
 foreach ( $optionValues as $value ) {
-$campaign = WmfCampaign::fromValue( $value->value );
+$campaign = WmfCampaign::fromKey( $value->value );
 $rows[] = array(
 l( $value->label, 
"admin/config/wmf_campaigns/edit/{$value->value}" ),
 $value->value,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b190341dbd6418ee8bd87b67007db97d9dded9b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] typo in stupid direct stomp lib call - change (wikimedia...tools)

2014-06-02 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: typo in stupid direct stomp lib call
..


typo in stupid direct stomp lib call

Change-Id: I4603989ebfedcc2e1f822269749fe3ebc487f7a3
TODO: use the facade
---
M AmazonAudit/amazon-audit.py
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/AmazonAudit/amazon-audit.py b/AmazonAudit/amazon-audit.py
index 5819d50..38b7ab2 100755
--- a/AmazonAudit/amazon-audit.py
+++ b/AmazonAudit/amazon-audit.py
@@ -395,11 +395,11 @@
 "payment_submethod": txn['PaymentMethod'],
 }
 
+frame = headers
+frame['body'] = json.dumps(msg)
+
 # Inject the message
-_stompLink.send(
-json.dumps(msg),
-headers
-)
+_stompLink.send(frame)
 
 return ctid
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4603989ebfedcc2e1f822269749fe3ebc487f7a3
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Save a few pixels in environment_indicator, bump down so the... - change (wikimedia...crm)

2014-05-30 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Save a few pixels in environment_indicator, bump down so the 
text is readable
..


Save a few pixels in environment_indicator, bump down so the text is readable

Change-Id: Idcb5c6235a36151fc157983c05398bbb3838e9ec
---
M sites/all/modules/environment_indicator/environment_indicator.css
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/sites/all/modules/environment_indicator/environment_indicator.css 
b/sites/all/modules/environment_indicator/environment_indicator.css
index 3623854..b3dca1d 100644
--- a/sites/all/modules/environment_indicator/environment_indicator.css
+++ b/sites/all/modules/environment_indicator/environment_indicator.css
@@ -10,12 +10,12 @@
   position: absolute;
   top: 0px;
   bottom: 0px;
-  width: 30px;
+  width: 20px;
   color: #FF;
   text-align: center;
   font-weight: bold;
   z-index: 1000;
-  padding-top: 5px;
+  padding-top: 35px;
 }
 body > #environment-indicator {
   position: fixed;
@@ -38,7 +38,7 @@
 }
 
 body.environment-indicator-adjust.environment-indicator-left {
-  margin-left: 30px;
+  margin-left: 20px;
 }
 
 body.environment-indicator-adjust.environment-indicator-right {
@@ -50,8 +50,8 @@
 
body.environment-indicator-adjust.environment-indicator-left.admin-expanded.admin-vertical.admin-sw
 { margin-left:290px; }
 
 body.environment-indicator-adjust.environment-indicator-left 
div#admin-toolbar.nw,
-body.environment-indicator-adjust.environment-indicator-left 
div#admin-toolbar.sw { left:30px; }
-body.environment-indicator-adjust.environment-indicator-left 
div#admin-toolbar.sw .admin-toggle { left:30px; }
+body.environment-indicator-adjust.environment-indicator-left 
div#admin-toolbar.sw { left:20px; }
+body.environment-indicator-adjust.environment-indicator-left 
div#admin-toolbar.sw .admin-toggle { left:20px; }
 body.environment-indicator-adjust.environment-indicator-left.admin-expanded 
div#admin-toolbar.sw .admin-toggle { left:0; }
 
 
@@ -66,7 +66,7 @@
 /* compatability with admin_menu.module */
 body.environment-indicator-adjust.environment-indicator-left #admin-menu 
#admin-menu-wrapper {
   margin-right: 0px;
-  padding-left: 30px;
+  padding-left: 20px;
 }
 
 /* compatability with admin_menu.module */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcb5c6235a36151fc157983c05398bbb3838e9ec
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixing configuration path for latexer - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Fixing configuration path for latexer
..


Fixing configuration path for latexer

Change-Id: Ie0cacc11693ae2c9b911774844d51be7a5635bcc
---
M LocalSettings.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/LocalSettings.js b/LocalSettings.js
index c386205..fa3e83e 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -3,7 +3,7 @@
config.coordinator.backend_threads = "auto";
 
config.backend.bundler.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-bundler/bin/mw-ocg-bundler";
-   config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/ocg-collection/mw-ocg-latexer/bin/mw-ocg-latexer";
+   config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-latexer/bin/mw-ocg-latexer";
 
return config;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0cacc11693ae2c9b911774844d51be7a5635bcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Fixing configuration path for latexer - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Fixing configuration path for latexer
..

Fixing configuration path for latexer

Change-Id: Ie0cacc11693ae2c9b911774844d51be7a5635bcc
---
M LocalSettings.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/55/136255/1

diff --git a/LocalSettings.js b/LocalSettings.js
index c386205..fa3e83e 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -3,7 +3,7 @@
config.coordinator.backend_threads = "auto";
 
config.backend.bundler.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-bundler/bin/mw-ocg-bundler";
-   config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/ocg-collection/mw-ocg-latexer/bin/mw-ocg-latexer";
+   config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-latexer/bin/mw-ocg-latexer";
 
return config;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0cacc11693ae2c9b911774844d51be7a5635bcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] What is going on with masters? - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: What is going on with masters?
..


What is going on with masters?

Change-Id: I5d41c78b07f6dd5d677fd12924f7c2479e006309
---
M mw-ocg-bundler
M mw-ocg-latexer
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 085d024..3fb0354 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
+Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 9bff3d6..8803c27 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
+Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d41c78b07f6dd5d677fd12924f7c2479e006309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] What is going on with masters? - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: What is going on with masters?
..

What is going on with masters?

Change-Id: I5d41c78b07f6dd5d677fd12924f7c2479e006309
---
M mw-ocg-bundler
M mw-ocg-latexer
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/47/136247/1

diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 085d024..3fb0354 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
+Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 9bff3d6..8803c27 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
+Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d41c78b07f6dd5d677fd12924f7c2479e006309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Actually update to latest master? - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Actually update to latest master?
..


Actually update to latest master?

Change-Id: Id2ed403d30aee864c00b9434bca8de91000a7407
---
M mw-ocg-bundler
M mw-ocg-latexer
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 3fb0354..085d024 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
+Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 8803c27..9bff3d6 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616
+Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2ed403d30aee864c00b9434bca8de91000a7407
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Actually update to latest master? - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Actually update to latest master?
..

Actually update to latest master?

Change-Id: Id2ed403d30aee864c00b9434bca8de91000a7407
---
M mw-ocg-bundler
M mw-ocg-latexer
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/31/136231/1

diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 3fb0354..085d024 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
+Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 8803c27..9bff3d6 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616
+Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2ed403d30aee864c00b9434bca8de91000a7407
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updated to latest masters - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updated to latest masters
..


Updated to latest masters

Change-Id: I8735984d093047127358bfb57eee99daf04fc8cb
---
M Makefile
M mw-ocg-bundler
M mw-ocg-latexer
M node_modules/domino/package.json
A node_modules/gammalatex/node_modules/.bin/rimraf
M node_modules/rimraf/package.json
6 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/Makefile b/Makefile
index 56be9fd..6eb4a80 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
 all: debug
 
 core:
-   rm ./package.json
+   export LINK=g++
+   rm -f ./package.json
npm cache clear
-   npm install when
+   npm install when semver
./unify-package-json.js
npm install
npm update
diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 085d024..3fb0354 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
+Subproject commit 3fb0354af5a443f7b31284950193cc9171ff99b5
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 9bff3d6..8803c27 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
+Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616
diff --git a/node_modules/domino/package.json b/node_modules/domino/package.json
index 772e890..72b12af 100644
--- a/node_modules/domino/package.json
+++ b/node_modules/domino/package.json
@@ -29,6 +29,6 @@
   "dist": {
 "shasum": "59bea71fa864ff5c02e3baf1f65fc13fbeb31848"
   },
-  "_from": "domino@~1.0.15",
+  "_from": "domino@1.0.17",
   "_resolved": "https://registry.npmjs.org/domino/-/domino-1.0.17.tgz";
 }
diff --git a/node_modules/gammalatex/node_modules/.bin/rimraf 
b/node_modules/gammalatex/node_modules/.bin/rimraf
new file mode 12
index 000..4cd49a4
--- /dev/null
+++ b/node_modules/gammalatex/node_modules/.bin/rimraf
@@ -0,0 +1 @@
+../rimraf/bin.js
\ No newline at end of file
diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json
index 2a76f99..adb3a65 100644
--- a/node_modules/rimraf/package.json
+++ b/node_modules/rimraf/package.json
@@ -54,6 +54,6 @@
   "dist": {
 "shasum": "43e67e90396f05b9425d2d3c0ea58a691df523fa"
   },
-  "_from": "rimraf@~2.2.2",
+  "_from": "rimraf@2.2.8",
   "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz";
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8735984d093047127358bfb57eee99daf04fc8cb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Write an entire half-line of docstring for each class - change (wikimedia...slander)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Write an entire half-line of docstring for each class
..


Write an entire half-line of docstring for each class

Change-Id: I12802649ef1f564d5bdb5d19763c0dbeda62a75b
---
M brain.py
M irc.py
M job.py
M text.py
4 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/brain.py b/brain.py
index 6cae609..86a32e4 100644
--- a/brain.py
+++ b/brain.py
@@ -4,6 +4,8 @@
 from job import JobQueue
 
 class Brain(object):
+"""Respond to incoming commands"""
+
 def __init__(self, config, sink=None):
 self.config = config
 self.sink = sink
diff --git a/irc.py b/irc.py
index e066202..def1e4d 100644
--- a/irc.py
+++ b/irc.py
@@ -11,7 +11,7 @@
 
 class RelayToIRC(irc.IRCClient):
 """
-Bot brain will spawn listening jobs and then relay results to an irc 
channel.
+Wire bot brain, job queue, and config into a Twisted IRC client
 """
 timestamp = None
 
diff --git a/job.py b/job.py
index bd3951d..c358868 100644
--- a/job.py
+++ b/job.py
@@ -2,6 +2,8 @@
 import copy
 
 class JobQueue(object):
+"""Create and poll jobs"""
+
 threads = []
 jobs_def = []
 
diff --git a/text.py b/text.py
index ee0fabc..ce5bca2 100644
--- a/text.py
+++ b/text.py
@@ -1,3 +1,5 @@
+"""Helpers for text manipulation"""
+
 import re
 from HTMLParser import HTMLParser
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12802649ef1f564d5bdb5d19763c0dbeda62a75b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/slander
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] New message source: tail -f - change (wikimedia...slander)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: New message source: tail -f
..


New message source: tail -f

Change-Id: If6baac611cfe37407782d7c89d073c33f5543bbc
---
A tail.py
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/tail.py b/tail.py
new file mode 100644
index 000..8b54545
--- /dev/null
+++ b/tail.py
@@ -0,0 +1,14 @@
+class TailPoller(object):
+"""Tail -f a file as the message source"""
+
+def __init__(self, path=None):
+print "Initializing file tailer on: [{path}]".format(path=path)
+
+self.path = path
+self.file = file(path, "r")
+
+def check(self):
+data = self.file.readline().strip()
+
+if data:
+yield data

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6baac611cfe37407782d7c89d073c33f5543bbc
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/slander
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Jgreen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 

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


[MediaWiki-commits] [Gerrit] need a .gitreview - change (wikimedia...slander)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: need a .gitreview
..


need a .gitreview

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

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



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

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bb49172e0bd031fbb60ee1fae9cebd50953eec1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/slander
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Allow bundler to understand protocol relative urls - change (mediawiki...bundler)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Allow bundler to understand protocol relative urls
..


Allow bundler to understand protocol relative urls

... this assumes http; might be good to have an option?

Change-Id: I131cce70e7395c1d02027a98655bb2509b7b7737
---
M lib/api.js
1 file changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/lib/api.js b/lib/api.js
index 301d290..c7a33c3 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -16,9 +16,15 @@
if (!nojson) {
queryobj.format = 'json';
}
-   var apiURL =
-   url.resolve(this.wikis[wiki].baseurl + '/', 'api.php') +
-   '?' + querystring.stringify(queryobj);
+
+   var apiURL = this.wikis[wiki].baseurl;
+   if (apiURL.indexOf('//') === 0) {
+   // Protocol relative URL which url.resolve doesn't understand
+   // Assuming http
+   apiURL = 'http:' + apiURL;
+   }
+   apiURL = url.resolve(apiURL + '/', 'api.php') + '?' + 
querystring.stringify(queryobj);
+   
return nodefn.call(request, { url: apiURL, encoding: 'utf8' }).
then(function(result) {
var response = result[0], body = result[1];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I131cce70e7395c1d02027a98655bb2509b7b7737
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Updated to latest masters - change (mediawiki...ocg-collection)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updated to latest masters
..

Updated to latest masters

Change-Id: I8735984d093047127358bfb57eee99daf04fc8cb
---
M Makefile
M mw-ocg-bundler
M mw-ocg-latexer
A node_modules/domino/CHANGELOG.md
M node_modules/domino/lib/Element.js
M node_modules/domino/lib/HTMLParser.js
M node_modules/domino/lib/Node.js
M node_modules/domino/package.json
M node_modules/domino/test/domino.js
A node_modules/gammalatex/node_modules/.bin/rimraf
M node_modules/rimraf/package.json
M node_modules/rimraf/rimraf.js
M node_modules/rimraf/test/run.sh
M node_modules/when/package.json
14 files changed, 370 insertions(+), 147 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/62/136162/1

diff --git a/Makefile b/Makefile
index 56be9fd..6eb4a80 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
 all: debug
 
 core:
-   rm ./package.json
+   export LINK=g++
+   rm -f ./package.json
npm cache clear
-   npm install when
+   npm install when semver
./unify-package-json.js
npm install
npm update
diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index 085d024..f5da3aa 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
+Subproject commit f5da3aae085ff9912ec10190013f0c402c4e0184
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index 9bff3d6..8803c27 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
+Subproject commit 8803c27b6a34a8437531105fb1b1d6ef623ba616
diff --git a/node_modules/domino/CHANGELOG.md b/node_modules/domino/CHANGELOG.md
new file mode 100644
index 000..82bff5b
--- /dev/null
+++ b/node_modules/domino/CHANGELOG.md
@@ -0,0 +1,67 @@
+# domino 1.0.17 (14 May 2014)
+* Brown paper bag bug fix for an HTML parsing regression introduced in
+  domino 1.0.16. (#45)
+* Update `mocha` dependency to 1.18.x and `should` to 3.3.x.
+
+# domino 1.0.16 (13 May 2014)
+**DO NOT USE:** contains parser regression, fixed in 1.0.17.
+* Various performance improvements to the HTML5 parser. (#43, #44)
+* Fix `Element#isHTML` for non-HTML elements. (#41)
+
+# domino 1.0.15 (21 Jan 2014)
+* Implement `Element#matches()`.
+* Fix CSS `[lang]`, `[dir]`, etc selectors.
+* Update `mocha` dependency to 1.17.x.
+
+# domino 1.0.14 (21 Dec 2013)
+* `Element#classList.length` should be 0 if there's no `class`
+  attribute.
+* Add `height`/`width` attributes to `HTMLImageElement`.
+* Fix node 0.11 incompatibility in the w3c test harness.
+* Update `mocha` dependency to 1.16.x; update `should` dependency to 2.1.x.
+
+# domino 1.0.13 (8 Oct 2013)
+* Include `` elements in `HTMLTableRowElement#cells`. (#38, #39)
+* Fix old call to `toLowerCase()` function. (#37)
+* Update `mocha` and `should` dependencies.
+
+# domino 1.0.12 (9 Jul 2013)
+* Fix bug in formatting element adoption agency algorithm. (#36)
+* Coerce `document.createTextNode` argument to a string. (#34, #35)
+* Work around performance regression in node <= 0.6.
+
+# domino 1.0.11 (1 May 2013)
+* Fix rooted element traversal (`Element#nextElement`,
+  `Element#getElementsByTagName`).  (#31, #32)
+* Update zest to fix bugs in `+` and `>` combinators.
+* Don't overflow the stack if attribute values are very large (>64k).
+
+# domino 1.0.10 (12 Apr 2013)
+* Document issues with `Element#attributes`. (#27)
+* Fix `Document#title` to match DOM spec. (#29)
+* Add missing `require('utils')` for `handleErrors`. (#28)
+* Implement `DocumentFragment#querySelector` and
+  `DocumentFragment#querySelectorAll`. (#20, #26)
+* Fix `querySelectorAll` on unparented `Element`s. (#23)
+* Move `outerHTML`/`innerHTML` properties from `HTMLElement` to
+  `Element` to match dom parsing spec. (#21)
+* Update zest selector library to 0.0.4. (#25)
+* Fix regression in node 0.10. (#22, #24)
+* Update `mocha` and `should` dependencies.
+
+# domino 1.0.9 (11 Mar 2013)
+* Support jQuery 1.9.x by allowing `Element#attributes[qname]`.
+* Implement `HTMLElement#outerHTML`. (#18)
+* Only add newlines after ``/``/`` if
+  necessary, to match HTML5 serialization spec. (#16, #17)
+* Mirror node type properties (`ELEMENT_NODE`, etc) into
+  `Node.prototype`. (#14, #15)
+
+# domino 1.0.8
+
+**DO NOT USE:** was inadvertently published identical to domino 1.0.7.
+
+# domino 1.0.7 (16 Jan 2013)
+* Throw `SyntaxError` upon invocation rather than build-time. (#10)
+* Return nodes in document order. (#11)
+* Added a TreeWalker implementation.
diff --git a/node_modules/domino/lib/Element.js 
b/node_modules/domino/lib/Element.js
index f1d9806..35e7e3a 100644
--- a/node_modules/domino/lib/Element.js
+++ b/node_modules/domino/lib/Element.js
@@ -218,7 +218,7 @@
   }},
 
   // Overwritten in the constructor if not in the HTML namespace
-  isHTML: { value: true },
+  isHTML: {

[MediaWiki-commits] [Gerrit] Allow bundler to understand protocol relative urls - change (mediawiki...bundler)

2014-05-29 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Allow bundler to understand protocol relative urls
..

Allow bundler to understand protocol relative urls

Change-Id: I131cce70e7395c1d02027a98655bb2509b7b7737
---
M lib/api.js
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler
 refs/changes/58/136158/1

diff --git a/lib/api.js b/lib/api.js
index 4ebe808..672b730 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -15,9 +15,15 @@
if (!nojson) {
queryobj.format = 'json';
}
-   var apiURL =
-   url.resolve(this.wikis[wiki].baseurl + '/', 'api.php') +
-   '?' + querystring.stringify(queryobj);
+
+   var apiURL = this.wikis[wiki].baseurl;
+   if (apiURL.indexOf('//') === 0) {
+   // Protocol relative URL which url.resolve doesn't understand
+   // Assuming http
+   apiURL = 'http:' + apiURL;
+   }
+   apiURL = url.resolve(apiURL + '/', 'api.php') + '?' + 
querystring.stringify(queryobj);
+   
return nodefn.call(request, { url: apiURL, encoding: 'utf8' }).
then(function(result) {
var response = result[0], body = result[1];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I131cce70e7395c1d02027a98655bb2509b7b7737
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Log incoming and normalized Amazon messages (take 2) - change (wikimedia...SmashPig)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Log incoming and normalized Amazon messages (take 2)
..


Log incoming and normalized Amazon messages (take 2)

Change-Id: I0331d7c54f5d81d5acba38df07ab2bf978563291
---
M Core/Logging/LogEvent.php
M PaymentProviders/Amazon/AmazonListener.php
2 files changed, 12 insertions(+), 1 deletion(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/Core/Logging/LogEvent.php b/Core/Logging/LogEvent.php
index beb6e44..f8c3047 100644
--- a/Core/Logging/LogEvent.php
+++ b/Core/Logging/LogEvent.php
@@ -101,4 +101,4 @@
array_unshift( $stack, $descStr );
return $stack;
}
-}
\ No newline at end of file
+}
diff --git a/PaymentProviders/Amazon/AmazonListener.php 
b/PaymentProviders/Amazon/AmazonListener.php
index ab2aa3b..78da844 100644
--- a/PaymentProviders/Amazon/AmazonListener.php
+++ b/PaymentProviders/Amazon/AmazonListener.php
@@ -10,6 +10,8 @@
 
 /**
  * Dispatches incoming messages accoring to type
+ *
+ * @see 
https://amazonpayments.s3.amazonaws.com/FPS_ASP_Guides/ASP_Advanced_Users_Guide.pdf
  */
 class AmazonListener extends RestListener {
protected $byTypes = array(
@@ -35,6 +37,10 @@
 
protected function parseEnvelope( Request $request ) {
$requestValues = $request->getValues();
+
+   $secureLog = Logger::getTaggedLogger( 'RawData' );
+   $secureLog->info( "Incoming message (raw)", $requestValues );
+
$messages = array();
if ( array_key_exists( 'notificationType', $requestValues ) ) {
$type = $requestValues['notificationType'];
@@ -42,6 +48,8 @@
$klass = $this->byType[$type];
$message = new $klass();
$message->constructFromValues($requestValues);
+
+   $secureLog->debug( "Processed message 
(normalized)", $message );
 
$messages[] = $message;
} else {
@@ -53,6 +61,9 @@
$klass = $this->byStatus[$status];
$message = new $klass();
$message->constructFromValues($requestValues);
+
+   $secureLog->debug( "Processed message 
(normalized)", $message );
+
$messages[] = $message;
} else {
Logger::info( "Message ignored: status = 
{$status}" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0331d7c54f5d81d5acba38df07ab2bf978563291
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add Lato font - change (wikimedia...dash)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Add Lato font
..


Add Lato font

And clean up surrounding css to accommodate.

Change-Id: Ieeb57c71c52d8ddb3e98032942796f3d8a78ebd8
---
M bower.json
M public/css/style.css
A public/javascripts/vendor/lato/.bower.json
A public/javascripts/vendor/lato/Gruntfile.js
A public/javascripts/vendor/lato/README.md
A public/javascripts/vendor/lato/bower.json
A public/javascripts/vendor/lato/css/lato.css
A public/javascripts/vendor/lato/css/lato.min.css
A public/javascripts/vendor/lato/font/lato-black.eot
A public/javascripts/vendor/lato/font/lato-black.svg
A public/javascripts/vendor/lato/font/lato-black.ttf
A public/javascripts/vendor/lato/font/lato-black.woff
A public/javascripts/vendor/lato/font/lato-blackitalic.eot
A public/javascripts/vendor/lato/font/lato-blackitalic.svg
A public/javascripts/vendor/lato/font/lato-blackitalic.ttf
A public/javascripts/vendor/lato/font/lato-blackitalic.woff
A public/javascripts/vendor/lato/font/lato-bold.eot
A public/javascripts/vendor/lato/font/lato-bold.svg
A public/javascripts/vendor/lato/font/lato-bold.ttf
A public/javascripts/vendor/lato/font/lato-bold.woff
A public/javascripts/vendor/lato/font/lato-bolditalic.eot
A public/javascripts/vendor/lato/font/lato-bolditalic.svg
A public/javascripts/vendor/lato/font/lato-bolditalic.ttf
A public/javascripts/vendor/lato/font/lato-bolditalic.woff
A public/javascripts/vendor/lato/font/lato-hairline.eot
A public/javascripts/vendor/lato/font/lato-hairline.svg
A public/javascripts/vendor/lato/font/lato-hairline.ttf
A public/javascripts/vendor/lato/font/lato-hairline.woff
A public/javascripts/vendor/lato/font/lato-hairlineitalic.eot
A public/javascripts/vendor/lato/font/lato-hairlineitalic.svg
A public/javascripts/vendor/lato/font/lato-hairlineitalic.ttf
A public/javascripts/vendor/lato/font/lato-hairlineitalic.woff
A public/javascripts/vendor/lato/font/lato-italic.eot
A public/javascripts/vendor/lato/font/lato-italic.svg
A public/javascripts/vendor/lato/font/lato-italic.ttf
A public/javascripts/vendor/lato/font/lato-italic.woff
A public/javascripts/vendor/lato/font/lato-light.eot
A public/javascripts/vendor/lato/font/lato-light.svg
A public/javascripts/vendor/lato/font/lato-light.ttf
A public/javascripts/vendor/lato/font/lato-light.woff
A public/javascripts/vendor/lato/font/lato-lightitalic.eot
A public/javascripts/vendor/lato/font/lato-lightitalic.svg
A public/javascripts/vendor/lato/font/lato-lightitalic.ttf
A public/javascripts/vendor/lato/font/lato-lightitalic.woff
A public/javascripts/vendor/lato/font/lato-regular.eot
A public/javascripts/vendor/lato/font/lato-regular.svg
A public/javascripts/vendor/lato/font/lato-regular.ttf
A public/javascripts/vendor/lato/font/lato-regular.woff
A public/javascripts/vendor/lato/less/lato-black.less
A public/javascripts/vendor/lato/less/lato-blackitalic.less
A public/javascripts/vendor/lato/less/lato-bold.less
A public/javascripts/vendor/lato/less/lato-bolditalic.less
A public/javascripts/vendor/lato/less/lato-hairline.less
A public/javascripts/vendor/lato/less/lato-hairlineitalic.less
A public/javascripts/vendor/lato/less/lato-italic.less
A public/javascripts/vendor/lato/less/lato-light.less
A public/javascripts/vendor/lato/less/lato-lightitalic.less
A public/javascripts/vendor/lato/less/lato-regular.less
A public/javascripts/vendor/lato/less/lato.less
A public/javascripts/vendor/lato/less/variables.less
A public/javascripts/vendor/lato/package.json
A public/javascripts/vendor/lato/scss/lato-black.scss
A public/javascripts/vendor/lato/scss/lato-blackitalic.scss
A public/javascripts/vendor/lato/scss/lato-bold.scss
A public/javascripts/vendor/lato/scss/lato-bolditalic.scss
A public/javascripts/vendor/lato/scss/lato-hairline.scss
A public/javascripts/vendor/lato/scss/lato-hairlineitalic.scss
A public/javascripts/vendor/lato/scss/lato-italic.scss
A public/javascripts/vendor/lato/scss/lato-light.scss
A public/javascripts/vendor/lato/scss/lato-lightitalic.scss
A public/javascripts/vendor/lato/scss/lato-regular.scss
A public/javascripts/vendor/lato/scss/lato.scss
A public/javascripts/vendor/lato/scss/variables.scss
M public/views/nav.js
M public/views/templates/mainNav.html
M public/views/templates/widgets/donationsByBracketWidget.html
M public/views/widgetViews/DonationsByBracket.js
77 files changed, 48,109 insertions(+), 10 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieeb57c71c52d8ddb3e98032942796f3d8a78ebd8
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ssmith 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-com

[MediaWiki-commits] [Gerrit] Revert "Log incoming and normalized Amazon messages" - change (wikimedia...SmashPig)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Revert "Log incoming and normalized Amazon messages"
..


Revert "Log incoming and normalized Amazon messages"

This reverts commit 03015f3827fedea9d0f89c791604ad08ec97ba71.

Change-Id: I7fbdaa451166d940bf7a13791b2d2f3005c26380
---
M Core/Logging/LogEvent.php
M PaymentProviders/Amazon/AmazonListener.php
2 files changed, 2 insertions(+), 13 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/Core/Logging/LogEvent.php b/Core/Logging/LogEvent.php
index cc63225..beb6e44 100644
--- a/Core/Logging/LogEvent.php
+++ b/Core/Logging/LogEvent.php
@@ -51,7 +51,7 @@
if ( $data instanceof JsonSerializableObject ) {
$jdata = $data->toJson();
} else {
-   $jdata = json_encode( $data, JSON_PRETTY_PRINT 
);
+   $jdata = json_encode( $data );
}
 
if ( $jdata ) {
@@ -101,4 +101,4 @@
array_unshift( $stack, $descStr );
return $stack;
}
-}
+}
\ No newline at end of file
diff --git a/PaymentProviders/Amazon/AmazonListener.php 
b/PaymentProviders/Amazon/AmazonListener.php
index 78da844..ab2aa3b 100644
--- a/PaymentProviders/Amazon/AmazonListener.php
+++ b/PaymentProviders/Amazon/AmazonListener.php
@@ -10,8 +10,6 @@
 
 /**
  * Dispatches incoming messages accoring to type
- *
- * @see 
https://amazonpayments.s3.amazonaws.com/FPS_ASP_Guides/ASP_Advanced_Users_Guide.pdf
  */
 class AmazonListener extends RestListener {
protected $byTypes = array(
@@ -37,10 +35,6 @@
 
protected function parseEnvelope( Request $request ) {
$requestValues = $request->getValues();
-
-   $secureLog = Logger::getTaggedLogger( 'RawData' );
-   $secureLog->info( "Incoming message (raw)", $requestValues );
-
$messages = array();
if ( array_key_exists( 'notificationType', $requestValues ) ) {
$type = $requestValues['notificationType'];
@@ -48,8 +42,6 @@
$klass = $this->byType[$type];
$message = new $klass();
$message->constructFromValues($requestValues);
-
-   $secureLog->debug( "Processed message 
(normalized)", $message );
 
$messages[] = $message;
} else {
@@ -61,9 +53,6 @@
$klass = $this->byStatus[$status];
$message = new $klass();
$message->constructFromValues($requestValues);
-
-   $secureLog->debug( "Processed message 
(normalized)", $message );
-
$messages[] = $message;
} else {
Logger::info( "Message ignored: status = 
{$status}" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fbdaa451166d940bf7a13791b2d2f3005c26380
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add base views and supporting libs - change (wikimedia...dash)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Add base views and supporting libs
..


Add base views and supporting libs

Still just setting things up.

Change-Id: I685ace72176c771523ebaed47b3bd3a1540fc7df
---
M public/css/style.css
A public/javascripts/vendor/chartjs/.bower.json
A public/javascripts/vendor/chartjs/.gitignore
A public/javascripts/vendor/chartjs/Chart.js
A public/javascripts/vendor/chartjs/Chart.min.js
A public/javascripts/vendor/chartjs/LICENSE.md
A public/javascripts/vendor/chartjs/component.json
A public/javascripts/vendor/chartjs/docs/Chart.js
A public/javascripts/vendor/chartjs/docs/index.html
A public/javascripts/vendor/chartjs/docs/prettify.css
A public/javascripts/vendor/chartjs/docs/prettify.js
A public/javascripts/vendor/chartjs/docs/prettify.less
A public/javascripts/vendor/chartjs/docs/styles.css
A public/javascripts/vendor/chartjs/docs/styles.less
A public/javascripts/vendor/chartjs/readme.md
A public/javascripts/vendor/chartjs/samples/bar.html
A public/javascripts/vendor/chartjs/samples/doughnut.html
A public/javascripts/vendor/chartjs/samples/line.html
A public/javascripts/vendor/chartjs/samples/pie.html
A public/javascripts/vendor/chartjs/samples/polarArea.html
A public/javascripts/vendor/chartjs/samples/radar.html
A public/javascripts/vendor/chartjs/samples/sixup.html
A public/javascripts/vendor/chartjs/site/assets/6charts.png
A public/javascripts/vendor/chartjs/site/assets/Chart.js
A public/javascripts/vendor/chartjs/site/assets/effects.js
A public/javascripts/vendor/chartjs/site/assets/excanvas.js
A public/javascripts/vendor/chartjs/site/assets/html.png
A public/javascripts/vendor/chartjs/site/assets/simple.png
A public/javascripts/vendor/chartjs/site/index.html
A public/javascripts/vendor/chartjs/site/styles.css
M public/main.js
A public/routers/approuter.js
A public/routers/index.js
D public/routers/routes.js
D public/templates/main.html
A public/utils/colors.js
M public/views/app.js
A public/views/appContent.js
A public/views/library.js
A public/views/nav.js
A public/views/pieChartWidget.js
A public/views/templates/appContent.html
D public/views/templates/config.jade
M public/views/templates/index.jade
D public/views/templates/layout.jade
A public/views/templates/library.html
D public/views/templates/library.jade
A public/views/templates/mainNav.html
A public/views/templates/tests.html
D public/views/templates/tests.jade
A public/views/templates/widgets/donationsByBracketWidget.html
D public/views/view.js
A public/views/widgetViews/DonationsByBracket.js
M server.js
54 files changed, 8,825 insertions(+), 116 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I685ace72176c771523ebaed47b3bd3a1540fc7df
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ssmith 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] bit of junk discovered during rebase - change (wikimedia...dash)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: bit of junk discovered during rebase
..


bit of junk discovered during rebase

Change-Id: Ie97db7e8de2ab55d49eb886112725404e51f23bc
---
A public/views/templates/config.jade
R public/views/templates/index.jade
R public/views/templates/layout.jade
R public/views/templates/library.jade
R public/views/templates/tests.jade
M public/views/view.js
M server.js
7 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/public/views/templates/config.jade 
b/public/views/templates/config.jade
new file mode 100644
index 000..cd19a81
--- /dev/null
+++ b/public/views/templates/config.jade
@@ -0,0 +1,3 @@
+script(data-main="javascripts/config", src='javascripts/require.js')
+
+h1 configuration page!
\ No newline at end of file
diff --git a/public/views/index.jade b/public/views/templates/index.jade
similarity index 100%
rename from public/views/index.jade
rename to public/views/templates/index.jade
diff --git a/public/views/layout.jade b/public/views/templates/layout.jade
similarity index 100%
rename from public/views/layout.jade
rename to public/views/templates/layout.jade
diff --git a/public/views/library.jade b/public/views/templates/library.jade
similarity index 100%
rename from public/views/library.jade
rename to public/views/templates/library.jade
diff --git a/public/views/tests.jade b/public/views/templates/tests.jade
similarity index 100%
rename from public/views/tests.jade
rename to public/views/templates/tests.jade
diff --git a/public/views/view.js b/public/views/view.js
index ce0875f..06edb53 100644
--- a/public/views/view.js
+++ b/public/views/view.js
@@ -5,6 +5,7 @@
 'models/model',
 'text!templates/main.html'],
 function($, _, Backbone, model, template){
+
   var View = Backbone.View.extend({
 el: 'body',
 initialize: function(){
@@ -19,4 +20,5 @@
   });
 
   return new View();
+
 });
diff --git a/server.js b/server.js
index fb39778..89c39c0 100644
--- a/server.js
+++ b/server.js
@@ -29,7 +29,7 @@
 }
 
 app.configure(function(){
-  app.set( 'views', __dirname + '/public/views' );
+  app.set( 'views', __dirname + '/public/views/templates' );
   app.set( 'view engine', 'jade' );
   app.set( 'view options', { pretty: true } );
   app.use( express.bodyParser() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie97db7e8de2ab55d49eb886112725404e51f23bc
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ssmith 
Gerrit-Reviewer: Mwalker 
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 drush API incompatibility - change (wikimedia...crm)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Fix drush API incompatibility
..


Fix drush API incompatibility

I guess we're using drush options from the future.

Change-Id: Ib2958e85a533648762035b337b7d8ea3278c5cd8
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
1 file changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git 
a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
index 6e28e0f..2820946 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
@@ -24,11 +24,7 @@
 'test' => 'Test the audit scripts, but do not generate stomp messages. 
No data will be changed.',
'fakedb' => 'Fake the database information. This will cause the 
script to avoid looking up the actual contribution id.',
'makemissing' => 'Will reconstruct the un-rebuildable 
transactions found in the wr1, with default values. USE WITH CAUTION.',
-   'charlimit' => array(
-'description' => 'Will cause echoing to line break after the given 
number of characters',
-'value' => 'required',
-'example_value' => '50',
-),
+   'charlimit' => 'Will cause echoing to line break after the 
given number of characters',
'mismatch_override' => 'Won\'t die on a keygrind mismatch',
'verbose' => 'Verbose output',
 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2958e85a533648762035b337b7d8ea3278c5cd8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] typo in drush script - change (wikimedia...crm)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: typo in drush script
..


typo in drush script

Change-Id: I2893f8d8170b07afd924830e97f4b7921f17473e
---
M sites/all/modules/wmf_unsubscribe/unsub_make.drush.inc
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/wmf_unsubscribe/unsub_make.drush.inc 
b/sites/all/modules/wmf_unsubscribe/unsub_make.drush.inc
index 722e09c..6b62f0d 100755
--- a/sites/all/modules/wmf_unsubscribe/unsub_make.drush.inc
+++ b/sites/all/modules/wmf_unsubscribe/unsub_make.drush.inc
@@ -18,7 +18,7 @@
 $items = array();
 
 $items['unsub-make'] = array(
-'bootstrap' => DRUSH_BOOTSTRAP_FULL,
+'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
 'description' => 'Generates translated versions of the unsubscription 
pages from the i18n files',
 'examples' => array(
 'drush unsub-make' => '# Make translations',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2893f8d8170b07afd924830e97f4b7921f17473e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Explicitly fail on required message fields - change (wikimedia...tools)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Explicitly fail on required message fields
..


Explicitly fail on required message fields

Change-Id: I427a9d513ee48b83f84b95254d441ee78ca78cfd
---
M audit/paypal/SarFile.py
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/audit/paypal/SarFile.py b/audit/paypal/SarFile.py
index 14c42eb..bb3ab79 100644
--- a/audit/paypal/SarFile.py
+++ b/audit/paypal/SarFile.py
@@ -26,6 +26,21 @@
 ppreport.read(self.path, self.VERSION, self.parse_line)
 
 def parse_line(self, row):
+required_fields = [
+"Period 3 Amount",
+"Subscription Currency",
+"Subscription ID",
+"Subscription Payer Name",
+"Subscription Period 3",
+]
+
+missing_fields = []
+for field in required_fields:
+if not field in row or row[field] == '':
+missing_fields.append(field)
+if missing_fields:
+raise RuntimeError("Message is missing some important fields: 
[{fields}]".format(fields=", ".join(missing_fields)))
+
 names = row['Subscription Payer Name'].split(' ')
 
 out = {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I427a9d513ee48b83f84b95254d441ee78ca78cfd
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] test - change (mediawiki...DonationInterface)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: test
..

test

Change-Id: Iffc7772230612b658b8d3f4259bda9026375faed
---
A foo
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/21/135821/1

diff --git a/foo b/foo
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/foo

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffc7772230612b658b8d3f4259bda9026375faed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deploy-payments_1.22
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Add Belgium to countries supported by WorldPay - change (mediawiki/core)

2014-05-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Add Belgium to countries supported by WorldPay
..


Add Belgium to countries supported by WorldPay

Change-Id: I277f79cc0b5b5771968f958f47feba807e20064c
---
M DonationInterfaceFormSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ssmith: Looks good to me, approved
  Mwalker: Verified; Looks good to me, approved



diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index f53c0db..ab1c7a2 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -486,12 +486,12 @@
 /**
  * WorldPay *
  **/
-// This is at the bottom so that we prefer GC over adyen
+// This is at the bottom so that we prefer GC over WorldPay
 if ( $wgDonationInterfaceEnableWorldPay === true ) {
$forms_whitelist['worldpay'] = array(
'file' => $form_dirs['worldpay'] . '/worldpay.html',
'gateway' => 'worldpay',
-   'countries' => array( '+' => array( 'US', 'FR' ) ),
+   'countries' => array( '+' => array( 'BE', 'FR', 'US' ) ),
'currencies' => array( '+' => 'ALL' ),
'payment_methods' => array( 'cc' => 'ALL' ),
'selection_weight' => 0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I277f79cc0b5b5771968f958f47feba807e20064c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 

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


[MediaWiki-commits] [Gerrit] Updating configuration to point to absolute puppet paths - change (mediawiki...ocg-collection)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updating configuration to point to absolute puppet paths
..


Updating configuration to point to absolute puppet paths

Change-Id: Ic79e3f22fba659aff37a4879cd8bb33b0bb9252f
---
M LocalSettings.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/LocalSettings.js b/LocalSettings.js
index eff37e8..c386205 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -2,6 +2,9 @@
config.coordinator.frontend_threads = 2;
config.coordinator.backend_threads = "auto";
 
+   config.backend.bundler.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-bundler/bin/mw-ocg-bundler";
+   config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/ocg-collection/mw-ocg-latexer/bin/mw-ocg-latexer";
+
return config;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic79e3f22fba659aff37a4879cd8bb33b0bb9252f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updating configuration to point to absolute puppet paths - change (mediawiki...ocg-collection)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating configuration to point to absolute puppet paths
..

Updating configuration to point to absolute puppet paths

Change-Id: Ic79e3f22fba659aff37a4879cd8bb33b0bb9252f
---
M LocalSettings.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/37/135737/1

diff --git a/LocalSettings.js b/LocalSettings.js
index eff37e8..c386205 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -2,6 +2,9 @@
config.coordinator.frontend_threads = 2;
config.coordinator.backend_threads = "auto";
 
+   config.backend.bundler.bin = 
"/srv/deployment/ocg/ocg/mw-ocg-bundler/bin/mw-ocg-bundler";
+   config.backend.writers.rdf2latex.bin = 
"/srv/deployment/ocg/ocg/ocg-collection/mw-ocg-latexer/bin/mw-ocg-latexer";
+
return config;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic79e3f22fba659aff37a4879cd8bb33b0bb9252f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updating submodule pointer for node_modules - change (wikimedia...dash)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updating submodule pointer for node_modules
..


Updating submodule pointer for node_modules

Change-Id: I6a745fb34c2d76dcbf7b69489fe234af1519ca99
---
M node_modules
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/node_modules b/node_modules
index 8dc02e2..bc969bf 16
--- a/node_modules
+++ b/node_modules
-Subproject commit 8dc02e2de56492119bdcb14fbf622162a7467aea
+Subproject commit bc969bf4036c2fe3747e8b7f23c53bbb7667234e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a745fb34c2d76dcbf7b69489fe234af1519ca99
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Updating submodule pointer for node_modules - change (wikimedia...dash)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating submodule pointer for node_modules
..

Updating submodule pointer for node_modules

Change-Id: I6a745fb34c2d76dcbf7b69489fe234af1519ca99
---
M node_modules
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/36/135736/1

diff --git a/node_modules b/node_modules
index 8dc02e2..bc969bf 16
--- a/node_modules
+++ b/node_modules
-Subproject commit 8dc02e2de56492119bdcb14fbf622162a7467aea
+Subproject commit bc969bf4036c2fe3747e8b7f23c53bbb7667234e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a745fb34c2d76dcbf7b69489fe234af1519ca99
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Adding some git metadata - change (wikimedia...dash)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Adding some git metadata
..


Adding some git metadata

Attempt to make the test pass by destroying node_modules

Change-Id: I4142e14f8b6689e2c28c8e3605cc03e71bdf376c
---
A .gitmodules
M .gitreview
2 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..d1a97f0
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "node_modules"]
+   path = node_modules
+   url = 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/dash/node_modules
diff --git a/.gitreview b/.gitreview
index ba0c44e..b9e4f52 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=wikimedia/fundraising/dash.git
-defaultbranch=master
+defaultbranch=deployment
 defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4142e14f8b6689e2c28c8e3605cc03e71bdf376c
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding some git metadata - change (wikimedia...dash)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Adding some git metadata
..

Adding some git metadata

Change-Id: I4142e14f8b6689e2c28c8e3605cc03e71bdf376c
---
A .gitmodules
M .gitreview
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/00/135700/1

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..085fe0a
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "node_modules"]
+path = node_modules
+url = 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/dash/node_modules
+
diff --git a/.gitreview b/.gitreview
index ba0c44e..b9e4f52 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=wikimedia/fundraising/dash.git
-defaultbranch=master
+defaultbranch=deployment
 defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4142e14f8b6689e2c28c8e3605cc03e71bdf376c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Adding .gitmodules file - change (wikimedia...dash)

2014-05-27 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Adding .gitmodules file
..

Adding .gitmodules file

Change-Id: I3094ecc3f79b775ee74b9f70313069649e7c6965
---
A .gitmodules
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/98/135698/1

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..085fe0a
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "node_modules"]
+path = node_modules
+url = 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/dash/node_modules
+

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

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

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


[MediaWiki-commits] [Gerrit] Stuff refunded txn id into both parent and child ids - change (wikimedia...tools)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Stuff refunded txn id into both parent and child ids
..


Stuff refunded txn id into both parent and child ids

Change-Id: Iea06e3eff578391c18d42ac1d413eeafe5eec9fe
---
M audit/worldpay/TransactionReconciliationFile.py
M audit/worldpay/parse_nightly
2 files changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/audit/worldpay/TransactionReconciliationFile.py 
b/audit/worldpay/TransactionReconciliationFile.py
index 31112c9..68eeda1 100644
--- a/audit/worldpay/TransactionReconciliationFile.py
+++ b/audit/worldpay/TransactionReconciliationFile.py
@@ -256,6 +256,8 @@
 if queue == "refund":
 msg["gross_currency"] = msg["currency"]
 msg["gateway_parent_id"] = msg["gateway_txn_id"]
+# Note that we do not have a new txn id for the refund
+msg["gateway_refund_id"] = msg["gateway_txn_id"]
 # FIXME: chargeback vs refund info is not available in this file.
 msg["type"] = "refund"
 
log.info("+Sending\t{id}\t{date}\t{type}".format(id=msg["gateway_parent_id"], 
date=iso_date, type=msg["type"]))
diff --git a/audit/worldpay/parse_nightly b/audit/worldpay/parse_nightly
index abd3c34..91796f2 100755
--- a/audit/worldpay/parse_nightly
+++ b/audit/worldpay/parse_nightly
@@ -38,6 +38,6 @@
 path = os.path.join(config.incoming_path, filename)
 if os.path.isfile(path):
 parse(path)
-#archive(path)
+archive(path)
 
 lock.end()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea06e3eff578391c18d42ac1d413eeafe5eec9fe
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Failmail includes raw unicode rather than escaped - change (wikimedia...tools)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Failmail includes raw unicode rather than escaped
..


Failmail includes raw unicode rather than escaped

Change-Id: I696285a5117cd90d0fa2a93e9fe798260ebce987
---
M failmail/mailer.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/failmail/mailer.py b/failmail/mailer.py
index 0d53d35..5ff4fae 100644
--- a/failmail/mailer.py
+++ b/failmail/mailer.py
@@ -16,7 +16,7 @@
 body = body + exception_info
 if data:
 if not isinstance(data, basestring):
-data = yaml.safe_dump([data], default_flow_style=False)
+data = yaml.safe_dump([data], default_flow_style=False, 
allow_unicode=True)
 body = body + "\n\nWhile processing:\n{data}".format(data=data)
 
 log.error("sending failmail: " + body)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I696285a5117cd90d0fa2a93e9fe798260ebce987
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] read config from /etc/fundraising - change (wikimedia...tools)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: read config from /etc/fundraising
..


read config from /etc/fundraising

Deployment:
* Stop job.  apply patch and move config. restart

Change-Id: I82a0820b21c5304c9a9af3ff342497650aea922f
---
M FundraiserStatisticsGen/fundstatgen.py
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/FundraiserStatisticsGen/fundstatgen.py 
b/FundraiserStatisticsGen/fundstatgen.py
index 3c4f2cb..21ed704 100644
--- a/FundraiserStatisticsGen/fundstatgen.py
+++ b/FundraiserStatisticsGen/fundstatgen.py
@@ -14,6 +14,8 @@
 import logging
 from logging.handlers import SysLogHandler
 
+CONFIG_DEFAULT_PATH = "/etc/fundraising/fundstatgen.cfg"
+
 def main():
 # Extract any command line options
 parser = OptionParser(usage="usage: %prog [options] ")
@@ -27,8 +29,8 @@
 
 # Load the configuration from the file
 config = SafeConfigParser()
-fileList = ['./fundstatgen.cfg']
-if options.configFile is not None:
+fileList = [CONFIG_DEFAULT_PATH]
+if options.configFile:
 fileList.append(options.configFile)
 config.read(fileList)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82a0820b21c5304c9a9af3ff342497650aea922f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Jgreen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] payflow-audit reads config from /etc/fundraising - change (wikimedia...tools)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: payflow-audit reads config from /etc/fundraising
..


payflow-audit reads config from /etc/fundraising

probably harmless to merge as we are not using.

Change-Id: Id26132d60de0991aa73ee615f970b641ef43488e
---
M audit/payflow/PayflowAudit.php
M audit/payflow/PayflowReports.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/audit/payflow/PayflowAudit.php b/audit/payflow/PayflowAudit.php
index e9f089a..c0dd060 100644
--- a/audit/payflow/PayflowAudit.php
+++ b/audit/payflow/PayflowAudit.php
@@ -54,7 +54,7 @@
 
// Civi lookup function
public function inCivi( $id ) {
-   $conf = parse_ini_file( 'auth.cfg' );
+   $conf = parse_ini_file( '/etc/fundraising/auth.cfg' );
 
$db = mysql_connect( $conf['db_server'], $conf['db_user'], 
$conf['db_pass']);
if ( ! $db ) {
diff --git a/audit/payflow/PayflowReports.php b/audit/payflow/PayflowReports.php
index 79baed0..30ffe37 100644
--- a/audit/payflow/PayflowReports.php
+++ b/audit/payflow/PayflowReports.php
@@ -351,7 +351,7 @@
}
 
public function loadAuthData() {
-   $config = 'auth.cfg';
+   $config = '/etc/fundraising/auth.cfg';
$auth = parse_ini_file( $config );
 
$this->vendor = $auth['vendor'];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id26132d60de0991aa73ee615f970b641ef43488e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Jgreen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make "git review" stick to the deploy branch - change (wikimedia...tools)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Make "git review" stick to the deploy branch
..


Make "git review" stick to the deploy branch

Change-Id: I32cab5ba9329a34221422232e73d3afa489e75d1
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/.gitreview b/.gitreview
index 2363184..3b5090a 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=wikimedia/fundraising/tools.git
-defaultbranch=master
+defaultbranch=deploy
 defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32cab5ba9329a34221422232e73d3afa489e75d1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: deploy
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
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 DI to master for WorldPay - change (mediawiki/core)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Update DI to master for WorldPay
..


Update DI to master for WorldPay

Change-Id: Ia7d3d1890866ce261351ee3718fd8879b44a37a8
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 12c0a9c..2cf972a 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 12c0a9c742a747735f24173c8dfd67e6b669a251
+Subproject commit 2cf972a43fb88b3c827805c176247970fc8d08df

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7d3d1890866ce261351ee3718fd8879b44a37a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
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 DI to master for WorldPay - change (mediawiki/core)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Update DI to master for WorldPay
..

Update DI to master for WorldPay

Change-Id: Ia7d3d1890866ce261351ee3718fd8879b44a37a8
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/135076/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 12c0a9c..2cf972a 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 12c0a9c742a747735f24173c8dfd67e6b669a251
+Subproject commit 2cf972a43fb88b3c827805c176247970fc8d08df

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7d3d1890866ce261351ee3718fd8879b44a37a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Updating DI to master for WorldPay - change (mediawiki/core)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating DI to master for WorldPay
..

Updating DI to master for WorldPay

Change-Id: I298bebdfc0d5b2af55455e37d3ce9654bd77f2be
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/135075/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 5f9c5ee..2cf972a 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 5f9c5ee0bf1d0e1b9af2cce075480bf9b39dcc08
+Subproject commit 2cf972a43fb88b3c827805c176247970fc8d08df

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I298bebdfc0d5b2af55455e37d3ce9654bd77f2be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_22
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] WorldPay Multiple Accounts - change (mediawiki...DonationInterface)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: WorldPay Multiple Accounts
..

WorldPay Multiple Accounts

Yay; it works!

Lots of changed needed to local settings to get this
to work in production through... :p

Conflicts:
tests/TestConfiguration.php

Change-Id: I20d614164bbf234886abdc926c5111614e4a6d3a
---
M worldpay_gateway/worldpay.adapter.php
1 file changed, 52 insertions(+), 21 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/73/135073/1

diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 78156e6..5094f4f 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -186,7 +186,6 @@
$this->staged_vars = array(
'returnto',
'wp_acctname',
-   'wp_storeid',
'iso_currency_id',
'payment_submethod',
'zip',
@@ -197,10 +196,8 @@
function defineAccountInfo() {
$this->accountInfo = array(
'IsTest' => $this->account_config[ 'Test' ],
-   'MerchantId' => $this->account_config[ 'MerchantId' ],
-   'UserName' => $this->account_config[ 'Username' ],
-   'UserPassword' => $this->account_config[ 'Password' ],
-
+   'TokenizingMerchantID' => $this->account_config[ 
'TokenizingMerchantID' ],
+   'MerchantIDs' => $this->account_config[ 'MerchantIDs' ],
'StoreIDs' => $this->account_config[ 'StoreIDs' ],
);
}
@@ -700,11 +697,16 @@
'AcctName'  => 'wp_acctname',
'CVN'   => 'cvv',
'PTTID' => 'wp_pttid',
+   'UserName'  => 'username',
+   'UserPassword'  => 'user_password',
+   'MerchantId'=> 'wp_merchant_id'
);
}
 
public function do_transaction( $transaction ) {
$this->url = $this->getGlobal( 'URL' );
+
+   $this->loadRoutingInfo( $transaction );
 
switch ( $transaction ) {
case 'GenerateToken':
@@ -849,22 +851,6 @@
));
}
 
-   protected function stage_wp_storeid( $type = 'request' ) {
-   $currency = $this->getData_Unstaged_Escaped( 'currency_code' );
-   if ( array_key_exists( $currency, 
$this->accountInfo['StoreIDs'] ) ) {
-   // If we have the currency setup; settle into that
-   $this->staged_data['wp_storeid'] = 
$this->accountInfo['StoreIDs'][$currency];
-   } else {
-   // Otherwise settle into whatever the default it
-   $defaultStore = $this->getGlobal( 'DefaultCurrency' );
-   if ( array_key_exists( $defaultStore, 
$this->accountInfo['StoreIDs'] ) ) {
-   $this->staged_data['wp_storeid'] = 
$this->accountInfo['StoreIDs'][$defaultStore];
-   } elseif ( $this->getCurrentTransaction() === 
'AuthorizePaymentForFraud' ) {
-   throw new MWException( 'Store not configured 
for currency. Cannot perform auth request.' );
-   }
-   }
-   }
-
protected function stage_iso_currency_id( $type = 'request' ) {
$currency = $this->getData_Unstaged_Escaped( 'currency_code' );
if ( array_key_exists( $currency, self::$CURRENCY_CODES ) ) {
@@ -884,6 +870,51 @@
}
}
 
+   protected function loadRoutingInfo( $transaction ) {
+   switch ( $transaction ) {
+   case 'QueryAuthorizeDeposit':
+   break;
+   case 'GenerateToken':
+   case 'QueryTokenData':
+   $mid = 
$this->account_config['TokenizingMerchantID'];
+   $this->staged_data['wp_merchant_id'] = $mid;
+   $this->staged_data['username'] = 
$this->account_config['MerchantIDs'][$mid]['Username'];
+   $this->staged_data['user_password'] = 
$this->account_config['MerchantIDs'][$mid]['Password'];
+   break;
+   default:
+   $submethod = $this->getData_Unstaged_Escaped( 
'payment_submethod' );
+   $country = $this->getData_Unstaged_Escaped( 
'country' );
+   $currency = $this->getData_Unstaged_Escaped( 
'currency_cod

[MediaWiki-commits] [Gerrit] Validate form fields using element ID - change (mediawiki...DonationInterface)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Validate form fields using element ID
..

Validate form fields using element ID

... instead of form. because the worldpay form doesn't
use the names.

As an aside; TODO: cleanup in this file is heavily needed.

Change-Id: If70f5669890dbcf0a0d9c81af6b8d3ed27aaa4a7
---
M modules/validate_input.js
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/72/135072/1

diff --git a/modules/validate_input.js b/modules/validate_input.js
index e0b040b..2bafba8 100644
--- a/modules/validate_input.js
+++ b/modules/validate_input.js
@@ -131,18 +131,19 @@
}
 
// validate email address
-   if ( $.trim( document.getElementById( 'emailAdd' ).value ) && 
document.getElementById( 'emailAdd' ).value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
+   var $emailAdd = document.getElementById( 'emailAdd' );
+   if ( $.trim( $emailAdd.value ) && $emailAdd.value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
var invalid = false;
 
-var apos = form.emailAdd.value.indexOf("@");
-   var dotpos = form.emailAdd.value.lastIndexOf(".");
+var apos = $emailAdd.value.indexOf("@");
+   var dotpos = $emailAdd.value.lastIndexOf(".");

if( apos < 1 || dotpos-apos < 2 ) {
output += mw.msg( 'donate_interface-error-msg-email' ) 
+ '.\r\n';
 invalid = true;
}
 
-var domain = form.emailAdd.value.substring( apos + 1 );
+var domain = $emailAdd.value.substring( apos + 1 );
 
 var invalids = ["..", "/", "\\", ",", "<", ">"];
 
@@ -212,9 +213,10 @@
}
 
// validate email address
-   if ( $.trim( document.getElementById( 'emailAdd' ).value ) && 
document.getElementById( 'emailAdd' ).value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
-   var apos = form.emailAdd.value.indexOf("@");
-   var dotpos = form.emailAdd.value.lastIndexOf(".");
+   var $emailAdd = document.getElementById( 'emailAdd' );
+   if ( $.trim( $emailAdd.value ) && $emailAdd.value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
+   var apos = $emailAdd.value.indexOf("@");
+   var dotpos = $emailAdd.value.lastIndexOf(".");

if( apos < 1 || dotpos-apos < 2 ) {
output += mw.msg( 'donate_interface-error-msg-email' ) 
+ '.\r\n';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If70f5669890dbcf0a0d9c81af6b8d3ed27aaa4a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deploy-payments_1.22
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (mediawiki...DonationInterface)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Localisation updates from https://translatewiki.net.
..

Localisation updates from https://translatewiki.net.

Change-Id: I138f55220456627d088f1e11195bf81c1f5900a1
---
A adyen_gateway/i18n/pt.json
A amazon_gateway/i18n/pt.json
M gateway_common/i18n/interface/pt.json
M globalcollect_gateway/i18n/pt.json
M paypal_gateway/i18n/pt.json
A worldpay_gateway/i18n/pt.json
6 files changed, 50 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/71/135071/1

diff --git a/adyen_gateway/i18n/pt.json b/adyen_gateway/i18n/pt.json
new file mode 100644
index 000..4e2196f
--- /dev/null
+++ b/adyen_gateway/i18n/pt.json
@@ -0,0 +1,10 @@
+{
+   "@metadata": {
+   "authors": [
+   "Fúlvio"
+   ]
+   },
+   "adyengateway": "Faça sua doação agora",
+   "adyen_gateway-desc": "Processamento de pagamentos Adyen",
+   "adyen_gateway-response-default": "Houve um erro ao processar sua 
transação.\nPor favor, tente novamente mais tarde."
+}
diff --git a/amazon_gateway/i18n/pt.json b/amazon_gateway/i18n/pt.json
new file mode 100644
index 000..8bb0fa2
--- /dev/null
+++ b/amazon_gateway/i18n/pt.json
@@ -0,0 +1,9 @@
+{
+   "@metadata": {
+   "authors": [
+   "Fúlvio"
+   ]
+   },
+   "amazongateway": "Faça sua doação agora",
+   "amazon_gateway-desc": "Processamento de pagamentos Amazon"
+}
diff --git a/gateway_common/i18n/interface/pt.json 
b/gateway_common/i18n/interface/pt.json
index 457db52..9ea5f79 100644
--- a/gateway_common/i18n/interface/pt.json
+++ b/gateway_common/i18n/interface/pt.json
@@ -16,7 +16,8 @@
"Ppena",
"SandroHc",
"Imperadeiro98",
-   "Vitorvicentevalente"
+   "Vitorvicentevalente",
+   "Fúlvio"
]
},
"donate_interface": "Apoie a Wikimedia",
@@ -32,10 +33,14 @@
"donate_interface-comment-label": "Comentário:",
"donate_interface-email-agreement": "Concordo em receber atualizações 
ocasionais da Wikimedia Foundation por correio eletrónico.",
"donate_interface-comment-title": "Comentário público",
+   "donate_interface-donation-description": "Doação à Wikimedia 
Foundation",
+   "donate_interface-monthly-donation-description": "Doação mensal à 
Wikimedia Foundation",
"donate_interface-amount-error": "Por favor, insira um montante válido",
"donate_interface-smallamount-error": "O montante mínimo é $1",
"donate_interface-bigamount-error": "Não podemos aceitar donativos 
superiores a 10.000 USD ($1  $2) através do nosso site. Entre em contato com a 
nossa equipa de donativos no endereço $3.",
"donate_interface-processing-error": "Ocorreu um erro no processamento 
do seu pedido.\nNenhuma das plataformas está disponível.",
+   "donate_interface-fallback-currency-notice": "Sua moeda não é 
suportada. Se decidir continuar, o processamento acontecerá utilizando $1.",
+   "donate_interface-maintenance-notice": "Desculpe-nos, mas este tipo de 
pagamento está temporariamente desabilitado.",
"donate_interface-AED": "Dirham dos Emirados Árabes Unidos",
"donate_interface-ARS": "Peso argentino",
"donate_interface-AUD": "Dólar australiano",
@@ -122,6 +127,7 @@
"donate_interface-accessible": "Esta página só é acessível a partir da 
página de donativos.",
"donate_interface-paypal-button": "Donativos via PayPal",
"donate_interface-paypal-redirect": "A redirecionar para a PayPal…",
+   "donate_interface-amazon-button": "Doar via Amazon",
"donate_interface-cc-button": "Donativos por cartão de crédito",
"donate_interface-ccdc-button": "Donativos por cartão de crédito ou 
débito",
"donate_interface-dd-button": "Donativos por débito direto",
@@ -169,6 +175,7 @@
"donate_interface-error-msg-general": "Ocorreu um erro ao processar o 
seu pedido.",
"donate_interface-error-msg-nopaypal": "Devido a um erro técnico, não 
podemos enviar o seu pedido para o PayPal. Tente utilizar o nosso formulário 
normal para donativos por cartão de crédito, por favor.",
"donate_interface-error-msg": "Por favor, introduza $1",
+   "donate_interface-error-msg-field-correction": "Por favor, corrija os 
erros no seu $1",
"donate_interface-error-msg-js": "Por favor introduza",
"donate_interface-error-msg-validation": "Corrija os erros no 
formulário, por favor.",
"donate_interface-error-msg-invalid-amount": "Por favor, introduza um 
montante válido",
@@ -195,12 +202,19 @@
"donate_interface-error-msg-account_name": "Nome da conta",
  

[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (mediawiki...DonationInterface)

2014-05-23 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Localisation updates from https://translatewiki.net.
..

Localisation updates from https://translatewiki.net.

Change-Id: I7e45110a3278a8fb458e1ed7289b4cc39665ca94
---
M gateway_common/i18n/interface/nl.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gateway_common/i18n/interface/nl.json 
b/gateway_common/i18n/interface/nl.json
index 11bc3ec..bba0482 100644
--- a/gateway_common/i18n/interface/nl.json
+++ b/gateway_common/i18n/interface/nl.json
@@ -284,7 +284,7 @@
"donate_interface-select-year-of-expiration": "Vervaljaar",
"donate_interface-expires-question": "Vervalt?",
"donate_interface-expires": "Vervalt",
-   "donate_interface-card-security-code": "Beveiligingscode kaart",
+   "donate_interface-card-security-code": "Beveiligingscode",
"donate_interface-cvv": "CVV",
"donate_interface-cvv-number-abbreviated": "CVV-nummer",
"donate_interface-cvv2": "CVV2",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e45110a3278a8fb458e1ed7289b4cc39665ca94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deploy-payments_1.22
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: L10n-bot 

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


[MediaWiki-commits] [Gerrit] Enable the new PDF renderer in beta labs - change (operations/mediawiki-config)

2014-05-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Enable the new PDF renderer in beta labs
..

Enable the new PDF renderer in beta labs

Change-Id: I66ad4c22d1c98b7b98276e836a709b2bc4a0adeb
---
M wmf-config/CommonSettings-labs.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 4001c36..e2bff21 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -173,4 +173,12 @@
$wgExtensionEntryPointListFiles[] = "$wmfConfigDir/extension-list-labs";
 }
 
+if ( $wmgUseCollection ) {
+   // MwLib (PediaPress PDF Generation) is still done on the production 
servers
+
+   $wgCollectionFormats['rdf2latex'] = 'WMF PDF';
+   $wgCollectionFormatToServeURL['rdf2latex'] = 
'http://deployment-pdf01:8000';
+   $wgCollectionPortletFormats[] = 'rdf2latex';
+}
+
 } # end safeguard

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

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

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


[MediaWiki-commits] [Gerrit] Move OCG default port to 8000 - change (operations/puppet)

2014-05-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Move OCG default port to 8000
..

Move OCG default port to 8000

Because we cannot open a port less than 1024 without being root
and we really dont want to give NodeJS root, even if I can
drop permissions later...

Change-Id: I82592e01bcff4556ee3c42fbcfe6ad3a6ec2ca88
---
M modules/ocg/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/134975/1

diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index eaa59bc..b9af570 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -12,7 +12,7 @@
 
 class ocg (
 $host_name = $::hostname,
-$service_port = 80,
+$service_port = 8000,
 $redis_host = 'localhost',
 $redis_port = 6379,
 $redis_password = '',

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

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

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


[MediaWiki-commits] [Gerrit] Allow override of redis host - change (operations/puppet)

2014-05-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Allow override of redis host
..

Allow override of redis host

We need this in labs where the redis host is using the
main_password; but I'm still statically pointing to the
redis host in production.

Change-Id: I9d279beb8c370f408d94184d98fc6c4a7066a368
TODO: Find some sort of puppet variable with the puppet lvs hostname
---
M manifests/role/ocg.pp
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/134958/1

diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 33da2f8..4ad66dc 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -10,8 +10,15 @@
 
 include passwords::redis
 
+if ( $::ocg_redis_server_override != undef ) {
+$redis_host = $::ocg_redis_server_override;
+} else {
+# Default host in the WMF production env... this needs a variable or 
something
+$redis_host = 'rdb1002.eqiad.wmnet';
+   }
+
 class { '::ocg':
-redis_host  => 'rdb1002.eqiad.wmnet',
+redis_host  => $redis_host,
 redis_password  => $passwords::redis::main_password,
 temp_dir=> '/srv/deployment/ocg/tmp',
 }
@@ -23,7 +30,7 @@
 }
 
 class role::ocg::test {
-system::role { 'ocg-test': description => 'offline content generator for 
MediaWiki Collection extension (testing)' }
+system::role { 'ocg-test': description => 'offline content generator for 
MediaWiki Collection extension (single host testing)' }
 
 include passwords::redis
 

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

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

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


[MediaWiki-commits] [Gerrit] rip contribution_tracking checks out of the PP listener - change (wikimedia...PaymentsListeners)

2014-05-21 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: rip contribution_tracking checks out of the PP listener
..


rip contribution_tracking checks out of the PP listener

Change-Id: I67652b2719d36f4279fce66577d8a01014a8f219
---
M legacy-paypal/PaypalIPNListener.php
1 file changed, 1 insertion(+), 52 deletions(-)

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



diff --git a/legacy-paypal/PaypalIPNListener.php 
b/legacy-paypal/PaypalIPNListener.php
index b0834a0..eb8dc7a 100644
--- a/legacy-paypal/PaypalIPNListener.php
+++ b/legacy-paypal/PaypalIPNListener.php
@@ -25,21 +25,12 @@
  *  pending_queue => the queue to push pending items to
  *  verified_queue => the queue to push verfiied items to
  *  activemq_stomp_uri => the URI for the activemq broker
- *  contrib_db_host => the hostname where the contribution_tracking table lives
- *  contrib_db_username => the username for the db where contribution_tracking 
lives
- *  contrib_db_password => the pw for accessing the db where 
contribution_tracking lives
- *  conrtib_db_name => the db name where contribution_tracking lives
- *
- * Note that the contrib_db* variables are likely of no use to you, unless 
you're using CiviCRM with Drupal and
- * are using a special contribution tracking module... So if you're not doing 
that, you can likely 
- * leave those out of your config.
  *
  * PayPal IPN docs: 
https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro
  *
  * @author Arthur Richards 
  * @TODO: 
  * add output for DB connection/query
- * abstract out the contribution_tracking stuff so this is more 
flexible?
  */
 
 /** Set available log levels **/
@@ -251,7 +242,7 @@
return; // do not execute the rest
}
 
-   // do the queueing - perhaps move out the tracking checking to 
its own func?
+   // do the queueing
if ( !$this->queue_message( $this->pending_queue, json_encode( 
$contribution ), $headers )) {
$this->out( "There was a problem queueing the message 
to the queue: " . $this->pending_queue );
$this->out( "Message: " . print_r( $contribution, TRUE 
), LOG_LEVEL_DEBUG );
@@ -544,18 +535,7 @@
return $post_data;
}
 
-   // get the database connection to the tracking table
-   $this->contribution_tracking_connection();
-   $tracking_data = $this->get_tracking_data( $post_data['custom'] 
);
-   if ( !$tracking_data ) { //we have a problem! The received 
contribution tracking id does not match anything in the db...
-   $this->out( "There is no contribution ID associated 
with this transaction." );
-   }
-   $contribution['contribution_tracking_id'] = 
$post_data['custom'];
-   $contribution['optout'] = $tracking_data['optout'];
-   $contribution['anonymous'] = $tracking_data['anonymous'];
-   $contribution['comment'] = $tracking_data['note'];
$contribution['email'] = $post_data['payer_email'];
-   $contribution['language'] = $tracking_data['language'];

// Premium info
$contribution['size'] = $post_data['option_selection1'];
@@ -720,37 +700,6 @@
$this->out( "Attempting to pull queued item", LOG_LEVEL_DEBUG );
$message = $this->stomp->readFrame();
return $message;
-   }
-
-   /**
-* Establish a connection with the contribution database.
-*
-* The properties contrib_db_host, contrib_db_username, 
contrib_db_password and 
-* contrib_db_name should be set prior to the execution of this method.
-*/
-   protected function contribution_tracking_connection() {
-   $this->contrib_db = mysql_connect(
-   $this->contrib_db_host,
-   $this->contrib_db_username,
-   $this->contrib_db_password );
-   mysql_select_db( $this->contrib_db_name, $this->contrib_db );
-   }
-
-   /**
-* Fetches tracking data we need to for this transaction from the 
contribution_tracking table
-* 
-* @param int the ID of the transaction we care about
-* @return array containing the key=>value pairs of data from the 
contribution_tracking table
-*/
-   protected function get_tracking_data( $id ) {
-   //sanitize the $id
-   $id = mysql_real_escape_string( $id );
-   $query = "SELECT * FROM contribution_tracking WHERE id=$id";
-   $this->out( "Preparing to run query on contribution_tracking: 
$query", LOG_LEVEL_DEBUG );
-   $result = mysql_query( $query );
-   $row

[MediaWiki-commits] [Gerrit] typo - change (wikimedia...tools)

2014-05-21 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: typo
..


typo

Change-Id: I0a04bdf729e38d319bf07e238f007f3bb37c5eb8
---
M AmazonAudit/amazon-audit.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/AmazonAudit/amazon-audit.py b/AmazonAudit/amazon-audit.py
index 4c0efcf..5819d50 100755
--- a/AmazonAudit/amazon-audit.py
+++ b/AmazonAudit/amazon-audit.py
@@ -42,7 +42,7 @@
 _config.read(fileList)
 
 # === Open up ze STOMP ===
-_stompLink = DistStomp(config.get('Stomp', 'server'), 
config.getint('Stomp', 'port'))
+_stompLink = DistStomp(_config.get('Stomp', 'server'), 
_config.getint('Stomp', 'port'))
 _stompLink.connect()
 
 # === Connection to Amazon ===

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a04bdf729e38d319bf07e238f007f3bb37c5eb8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Tweak jshint configuration; use strict. - change (mediawiki...bundler)

2014-05-20 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Tweak jshint configuration; use strict.
..


Tweak jshint configuration; use strict.

Allow ES6 `Map`/`Set`; tweak settings to match Parsoid, including the
use of strict mode.

Change-Id: Ibeaf906cee3a8caf57d2d92b9a705420fb5f4481
---
M .jshintrc
M lib/api.js
M lib/db.js
M lib/html.js
M lib/image.js
M lib/index.js
M lib/metabook.js
M lib/p.js
M lib/parsoid.js
M lib/revisions.js
M lib/siteinfo.js
M lib/status.js
M samples/featured.js
M test/samples.js
14 files changed, 30 insertions(+), 7 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
index fde1d96..88e79fd 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -4,7 +4,10 @@
 
"setImmediate",
 
-   "QUnit"
+   "QUnit",
+
+   "Map",
+   "Set"
],
 
"bitwise": true,
@@ -18,9 +21,8 @@
"nonew": true,
"regexp": false,
"undef": true,
-   "strict": false,
+   "strict": true,
"trailing": true,
-   "unused":true,
 
"smarttabs": true,
"multistr": true,
diff --git a/lib/api.js b/lib/api.js
index 4ebe808..301d290 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -1,4 +1,5 @@
 // helpers for making mediawiki api requests
+"use strict";
 
 var nodefn = require('when/node/function');
 var querystring = require('querystring');
diff --git a/lib/db.js b/lib/db.js
index 56b41aa..1b228e2 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -1,4 +1,5 @@
 // Helpers to create/read key/value mappings in sqlite db
+"use strict";
 
 var sqlite3 = require('sqlite3');
 var when = require('when');
diff --git a/lib/html.js b/lib/html.js
index 7e51cb6..4878deb 100644
--- a/lib/html.js
+++ b/lib/html.js
@@ -1,4 +1,5 @@
 // Generate contents of html.db
+"use strict";
 var guard = require('when/guard');
 var util = require('util');
 
diff --git a/lib/image.js b/lib/image.js
index f992e8e..bf2b86b 100644
--- a/lib/image.js
+++ b/lib/image.js
@@ -1,3 +1,6 @@
+// Fetch images and metadata about them.
+"use strict";
+
 var fs = require('fs');
 var guard = require('when/guard');
 var path = require('path');
diff --git a/lib/index.js b/lib/index.js
index 95e115d..5df431f 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,3 +1,4 @@
+"use strict";
 require('es6-shim'); // Map/Set support
 
 var json = require('../package.json');
@@ -53,7 +54,7 @@
 
var mkOutputDir = function() {
// fail if output location is not writable
-   return P.call(fs.mkdir, fs, options.output, 
0700).then(function() {
+   return P.call(fs.mkdir, fs, options.output, parseInt('700', 
8)).then(function() {
// don't clean up output dir unless this mkdir succeeded
cleanUpOutput = true;
});
@@ -146,7 +147,7 @@
var imagedir = path.join(options.output, 'images');
 
var mkImageDir = function() {
-   return P.call(fs.mkdir, fs, imagedir, 0777);
+   return P.call(fs.mkdir, fs, imagedir, parseInt('777', 8));
};
 
// returns a promise which is resolved when all images from the imageMap
@@ -251,7 +252,7 @@
status.createStage(0, 'Creating bundle');
if (options.nozip) {
// make the directory readable, then we're done.
-   return P.call(fs.chmod, fs, options.output, 0755);
+   return P.call(fs.chmod, fs, options.output, 
parseInt('755', 8));
}
 
// create zip archive
diff --git a/lib/metabook.js b/lib/metabook.js
index 62d5ab6..9a556e6 100644
--- a/lib/metabook.js
+++ b/lib/metabook.js
@@ -1,4 +1,6 @@
 /** Create a new metabook structure, or fixup a broken/incomplete one. */
+"use strict";
+
 var when = require('when');
 
 var Api = require('../lib/api');
diff --git a/lib/p.js b/lib/p.js
index 1f2a0dc..c40a272 100644
--- a/lib/p.js
+++ b/lib/p.js
@@ -1,4 +1,6 @@
 // Helpers for promises.
+"use strict";
+
 var nodefn = require('when/node/function');
 var spawn = require('child_process').spawn;
 var when = require('when');
diff --git a/lib/parsoid.js b/lib/parsoid.js
index c457737..57918ae 100644
--- a/lib/parsoid.js
+++ b/lib/parsoid.js
@@ -1,4 +1,6 @@
 // Make concurrency-limited parsoid API requests.
+"use strict";
+
 var domino = require('domino');
 var fs = require('fs');
 var guard = require('when/guard');
diff --git a/lib/revisions.js b/lib/revisions.js
index fbe5ebd..2de077c 100644
--- a/lib/revisions.js
+++ b/lib/revisions.js
@@ -1,6 +1,8 @@
 // Generate content of revisions-1.txt
 // this is a particularly grody file, so we also store this in a more
 // sane manner as revisions.db.  hopefully we can deprecate the ugliness.
+"use strict";
+
 var fs = require('fs');
 var guard = require('when/guard');
 var path = require('pat

[MediaWiki-commits] [Gerrit] Updating submodule pointers and unifying the makefile - change (mediawiki...ocg-collection)

2014-05-20 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Updating submodule pointers and unifying the makefile
..


Updating submodule pointers and unifying the makefile

Change-Id: Iadc058fbee6d3fbb92d8647a82339b005feab035
---
M .gitignore
A Makefile
D make.sh
M mw-ocg-bundler
M mw-ocg-latexer
M mw-ocg-service
M mw-ocg-texter
A unify-package-json.js
8 files changed, 171 insertions(+), 24 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 1bc63e8..fe26abb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 node_modules/*
 
 LocalSettings.js
+
+.idea
diff --git a/Makefile b/Makefile
new file mode 100644
index 000..56be9fd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+all: debug
+
+core:
+   rm ./package.json
+   npm cache clear
+   npm install when
+   ./unify-package-json.js
+   npm install
+   npm update
+   npm dedupe
+
+production: core
+   npm prune --production
+   rm -rf ./node_modules/icu-bidi/build
+
+debug: core
+   npm prune
+
+clean:
+   rm -rf ./node_modules
diff --git a/make.sh b/make.sh
deleted file mode 100755
index 5462176..000
--- a/make.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-# Make the node_modules folder
-
-SCRIPTPATH=`dirname $(readlink -f ./make.sh)`
-mkdir -p node_modules
-
-for f in ./mw-ocg*/
-do
-   ln -s $SCRIPTPATH/node_modules $f/node_modules
-   cd $f
-   npm install
-   NPMEXIT=$?
-
-   cd ..
-   #rm $f/node_modules
-
-   if [ $NPMEXIT != 0 ]; then
-   echo "npm install for $f exited with failure"
-   exit $?
-   fi
-done
-
-echo "Done! Apparent success"
-
diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index b44b3b5..085d024 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit b44b3b51fc8b4862b5a2e6486967548920f9ad26
+Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index fcbe016..9bff3d6 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit fcbe016e0ed942552a9b464e329d0fb0698768bd
+Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
diff --git a/mw-ocg-service b/mw-ocg-service
index 1262422..91eaf0c 16
--- a/mw-ocg-service
+++ b/mw-ocg-service
-Subproject commit 1262422a81eb193247ff828090df8a0d71343e63
+Subproject commit 91eaf0cbda583e299084cc5cf5ec372c452b98fb
diff --git a/mw-ocg-texter b/mw-ocg-texter
index 291563f..de48026 16
--- a/mw-ocg-texter
+++ b/mw-ocg-texter
-Subproject commit 291563f95694b60a01ba571945516b58e439c0f3
+Subproject commit de48026939d70695867aa6cd2b44b692ac590ee2
diff --git a/unify-package-json.js b/unify-package-json.js
new file mode 100755
index 000..2234c6a
--- /dev/null
+++ b/unify-package-json.js
@@ -0,0 +1,149 @@
+#!/usr/bin/env nodejs
+
+/**
+ * Make script to composite dependencies of node modules into one big file.
+ *
+ * This will find all package.json files recursively and merge them into one.
+ * It will throw errors if multiple files reference different versions of the
+ * same upstream package.
+ *
+ * Ironically; this script itself has dependencies in the form of the when 
library
+ * (because node.js for some stupid reason doesn't include promises anymore)
+ */
+
+var child_process = require( 'child_process' ),
+   semver = require( 'semver' ),
+   fs = require( 'fs' ),
+   util = require( 'util' );
+
+try {
+   var when = require('when');
+} catch ( err ) {
+   console.err( "The 'when' library could not be loaded. Please `npm 
install when`")
+}
+
+function findPackageJson() {
+   return when.promise( function( resolve, reject, notify ) {
+   child_process.exec(
+   'find . -path ./node_modules -prune -o -name 
package.json -print',
+   function( error, stdout, stderr ) {
+   files = stdout.trim().split( '\n' );
+   resolve( files );
+   }
+   )
+   } );
+}
+
+function readPackageJson( files ) {
+   return when.map(
+   files,
+   function( file ) {
+   return require( file );
+   }
+   );
+}
+
+function buildDependencies( packageObjs ) {
+   var glodeps, optdeps, glodevdeps;
+   var iterate = function iterate( key, arrayObj ) {
+   var unifiedDeps = {};
+
+   arrayObj.forEach( function( el ) {
+   var name = el.name,
+   packdeps = el[key],
+   pkg, glover, pkgver;
+
+   for ( pkg in packdeps ) {
+   if ( !packdeps.hasOwnProperty( pkg ) ) {
+   continue;
+   }
+
+   if ( pkg in unifiedDeps ) {
+  

[MediaWiki-commits] [Gerrit] Updating submodule pointers and unifying the makefile - change (mediawiki...ocg-collection)

2014-05-20 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updating submodule pointers and unifying the makefile
..

Updating submodule pointers and unifying the makefile

Change-Id: Iadc058fbee6d3fbb92d8647a82339b005feab035
---
M .gitignore
A Makefile
D make.sh
M mw-ocg-bundler
M mw-ocg-latexer
M mw-ocg-service
M mw-ocg-texter
A unify-package-json.js
8 files changed, 171 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/23/134523/1

diff --git a/.gitignore b/.gitignore
index 1bc63e8..fe26abb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 node_modules/*
 
 LocalSettings.js
+
+.idea
diff --git a/Makefile b/Makefile
new file mode 100644
index 000..56be9fd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+all: debug
+
+core:
+   rm ./package.json
+   npm cache clear
+   npm install when
+   ./unify-package-json.js
+   npm install
+   npm update
+   npm dedupe
+
+production: core
+   npm prune --production
+   rm -rf ./node_modules/icu-bidi/build
+
+debug: core
+   npm prune
+
+clean:
+   rm -rf ./node_modules
diff --git a/make.sh b/make.sh
deleted file mode 100755
index 5462176..000
--- a/make.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-# Make the node_modules folder
-
-SCRIPTPATH=`dirname $(readlink -f ./make.sh)`
-mkdir -p node_modules
-
-for f in ./mw-ocg*/
-do
-   ln -s $SCRIPTPATH/node_modules $f/node_modules
-   cd $f
-   npm install
-   NPMEXIT=$?
-
-   cd ..
-   #rm $f/node_modules
-
-   if [ $NPMEXIT != 0 ]; then
-   echo "npm install for $f exited with failure"
-   exit $?
-   fi
-done
-
-echo "Done! Apparent success"
-
diff --git a/mw-ocg-bundler b/mw-ocg-bundler
index b44b3b5..085d024 16
--- a/mw-ocg-bundler
+++ b/mw-ocg-bundler
-Subproject commit b44b3b51fc8b4862b5a2e6486967548920f9ad26
+Subproject commit 085d024cdc33d82fb2cc4b9d7a1560a24dd6910c
diff --git a/mw-ocg-latexer b/mw-ocg-latexer
index fcbe016..9bff3d6 16
--- a/mw-ocg-latexer
+++ b/mw-ocg-latexer
-Subproject commit fcbe016e0ed942552a9b464e329d0fb0698768bd
+Subproject commit 9bff3d6da3ad1255f5c9d5f8d8a190756545acfe
diff --git a/mw-ocg-service b/mw-ocg-service
index 1262422..91eaf0c 16
--- a/mw-ocg-service
+++ b/mw-ocg-service
-Subproject commit 1262422a81eb193247ff828090df8a0d71343e63
+Subproject commit 91eaf0cbda583e299084cc5cf5ec372c452b98fb
diff --git a/mw-ocg-texter b/mw-ocg-texter
index 291563f..de48026 16
--- a/mw-ocg-texter
+++ b/mw-ocg-texter
-Subproject commit 291563f95694b60a01ba571945516b58e439c0f3
+Subproject commit de48026939d70695867aa6cd2b44b692ac590ee2
diff --git a/unify-package-json.js b/unify-package-json.js
new file mode 100755
index 000..2234c6a
--- /dev/null
+++ b/unify-package-json.js
@@ -0,0 +1,149 @@
+#!/usr/bin/env nodejs
+
+/**
+ * Make script to composite dependencies of node modules into one big file.
+ *
+ * This will find all package.json files recursively and merge them into one.
+ * It will throw errors if multiple files reference different versions of the
+ * same upstream package.
+ *
+ * Ironically; this script itself has dependencies in the form of the when 
library
+ * (because node.js for some stupid reason doesn't include promises anymore)
+ */
+
+var child_process = require( 'child_process' ),
+   semver = require( 'semver' ),
+   fs = require( 'fs' ),
+   util = require( 'util' );
+
+try {
+   var when = require('when');
+} catch ( err ) {
+   console.err( "The 'when' library could not be loaded. Please `npm 
install when`")
+}
+
+function findPackageJson() {
+   return when.promise( function( resolve, reject, notify ) {
+   child_process.exec(
+   'find . -path ./node_modules -prune -o -name 
package.json -print',
+   function( error, stdout, stderr ) {
+   files = stdout.trim().split( '\n' );
+   resolve( files );
+   }
+   )
+   } );
+}
+
+function readPackageJson( files ) {
+   return when.map(
+   files,
+   function( file ) {
+   return require( file );
+   }
+   );
+}
+
+function buildDependencies( packageObjs ) {
+   var glodeps, optdeps, glodevdeps;
+   var iterate = function iterate( key, arrayObj ) {
+   var unifiedDeps = {};
+
+   arrayObj.forEach( function( el ) {
+   var name = el.name,
+   packdeps = el[key],
+   pkg, glover, pkgver;
+
+   for ( pkg in packdeps ) {
+   if ( !packdeps.hasOwnProperty( pkg ) ) {
+   continue;
+ 

[MediaWiki-commits] [Gerrit] most things fixed from preceding comments. still need to fix... - change (mediawiki...FundraisingChart)

2014-05-19 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: most things fixed from preceding comments. still need to fix 
map. pushing for review in interim to get working copy.
..


most things fixed from preceding comments. still need to fix map. pushing for 
review in interim to get working copy.

Change-Id: Ie633af1a2791bdb1cee730e1ed46ee366118f56d
---
M FundraisingChart.php
M fr_chart_body.php
A modules/ext.fundraisingChart.bootstrap/bootstrap.css
D modules/ext.fundraisingChart.bootstrap/bootstrap.min.css
A modules/ext.fundraisingChart.chartsjs/Chart.js
D modules/ext.fundraisingChart.chartsjs/Chart.min.js
A modules/ext.fundraisingChart.d3/d3.v3.js
D modules/ext.fundraisingChart.d3/d3.v3.min.js
M modules/ext.fundraisingChart.datamaps/datamaps.world.js
A resources/js/fundraising_charts.js
10 files changed, 12,654 insertions(+), 110 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie633af1a2791bdb1cee730e1ed46ee366118f56d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/FundraisingChart
Gerrit-Branch: master
Gerrit-Owner: Ssmith 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Refactored post-IRL-code-review. - change (mediawiki...FundraisingChart)

2014-05-19 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Refactored post-IRL-code-review.
..


Refactored post-IRL-code-review.

Several things have changed; there is now only one file for all
javascript, external libs have been broken out into their own modules,
ajax now loads data so it's fresh, and there is more commenting in the correct
formats. New helper functions and general DRYing up. This code needs to
be reviewed for style, consistency with other extensions, library
security, and visual design integration (in progress). It has one glaring issue,
which is its resource loading - please advise on this; I get
inconsistent results with the module loading so everything doesn't
always render. Thanks.

Change-Id: Ie078317191313730cba1ab60c036b7ffb2d2cb1c
---
M FundraisingChart.php
M fr_chart_body.php
R modules/ext.fundraisingChart.bootstrap/bootstrap.min.css
R modules/ext.fundraisingChart.chartsjs/Chart.min.js
R modules/ext.fundraisingChart.d3/d3.v3.min.js
R modules/ext.fundraisingChart.datamaps/datamaps.world.js
R modules/ext.fundraisingChart.topojson/topojson.js
D resources/js/barChart.js
M resources/js/chartFormatHelpers.js
D resources/js/fr_chart.js
D resources/js/jquery.flot.js
D resources/js/lineChart.js
D resources/js/mapChart.js
D resources/js/moment.js
D resources/js/moment.min.js
D resources/js/pieChart.js
D resources/js/underscore.min.js
17 files changed, 290 insertions(+), 5,914 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie078317191313730cba1ab60c036b7ffb2d2cb1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FundraisingChart
Gerrit-Branch: master
Gerrit-Owner: Ssmith 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Mwalker 

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


[MediaWiki-commits] [Gerrit] Validate form fields using element ID - change (mediawiki...DonationInterface)

2014-05-19 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Validate form fields using element ID
..

Validate form fields using element ID

... instead of form. because the worldpay form doesn't
use the names.

As an aside; TODO: cleanup in this file is heavily needed.

Change-Id: If70f5669890dbcf0a0d9c81af6b8d3ed27aaa4a7
---
M modules/validate_input.js
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/45/134245/1

diff --git a/modules/validate_input.js b/modules/validate_input.js
index e0b040b..2bafba8 100644
--- a/modules/validate_input.js
+++ b/modules/validate_input.js
@@ -131,18 +131,19 @@
}
 
// validate email address
-   if ( $.trim( document.getElementById( 'emailAdd' ).value ) && 
document.getElementById( 'emailAdd' ).value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
+   var $emailAdd = document.getElementById( 'emailAdd' );
+   if ( $.trim( $emailAdd.value ) && $emailAdd.value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
var invalid = false;
 
-var apos = form.emailAdd.value.indexOf("@");
-   var dotpos = form.emailAdd.value.lastIndexOf(".");
+var apos = $emailAdd.value.indexOf("@");
+   var dotpos = $emailAdd.value.lastIndexOf(".");

if( apos < 1 || dotpos-apos < 2 ) {
output += mw.msg( 'donate_interface-error-msg-email' ) 
+ '.\r\n';
 invalid = true;
}
 
-var domain = form.emailAdd.value.substring( apos + 1 );
+var domain = $emailAdd.value.substring( apos + 1 );
 
 var invalids = ["..", "/", "\\", ",", "<", ">"];
 
@@ -212,9 +213,10 @@
}
 
// validate email address
-   if ( $.trim( document.getElementById( 'emailAdd' ).value ) && 
document.getElementById( 'emailAdd' ).value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
-   var apos = form.emailAdd.value.indexOf("@");
-   var dotpos = form.emailAdd.value.lastIndexOf(".");
+   var $emailAdd = document.getElementById( 'emailAdd' );
+   if ( $.trim( $emailAdd.value ) && $emailAdd.value != mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
+   var apos = $emailAdd.value.indexOf("@");
+   var dotpos = $emailAdd.value.lastIndexOf(".");

if( apos < 1 || dotpos-apos < 2 ) {
output += mw.msg( 'donate_interface-error-msg-email' ) 
+ '.\r\n';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If70f5669890dbcf0a0d9c81af6b8d3ed27aaa4a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Actually move to the "completed" dir - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Actually move to the "completed" dir
..


Actually move to the "completed" dir

Previously we had been ignoring the new directory and moved files to
a subdir within dirname($current_path).

Change-Id: Iceba7058cc0628a67ccc468ff3f379d517b19b2a
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index a3eca12..82cf7fc 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -1011,8 +1011,8 @@
}   
}

-   $path_info = pathinfo( $file );
-   $newfile = $path_info['dirname'] . '/' . $subdir . '/' . 
$path_info['basename'];
+   $filename = basename( $file );
+   $newfile = $completed_dir . '/' . $filename;

if (!rename( $file, $newfile )){
$message = "Unable to move $file to $newfile";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iceba7058cc0628a67ccc468ff3f379d517b19b2a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Throw an error when a file cannot be opened - change (wikimedia...tools)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Throw an error when a file cannot be opened
..


Throw an error when a file cannot be opened

Change-Id: I6d7a5254e1ed067e508498312d1e61795e66f9d9
---
M audit/globalcollect/Wr1Parser/Wr1DataFile.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/audit/globalcollect/Wr1Parser/Wr1DataFile.php 
b/audit/globalcollect/Wr1Parser/Wr1DataFile.php
index 6aff798..9ebc7e5 100644
--- a/audit/globalcollect/Wr1Parser/Wr1DataFile.php
+++ b/audit/globalcollect/Wr1Parser/Wr1DataFile.php
@@ -102,6 +102,9 @@
$this->setFilePath( $filePath );
// open file
$this->fh = fopen( $this->getFilePath(), 'r' );
+   if ( $this->fh === false ) {
+   throw new Exception( "Failed to open 
'{$this->getFilePath()}'" );
+   }
}

/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d7a5254e1ed067e508498312d1e61795e66f9d9
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] GC audit has separate configuration for incoming and complet... - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: GC audit has separate configuration for incoming and completed 
dirs
..


GC audit has separate configuration for incoming and completed dirs

Change-Id: Ia0574f384a673b39975ecf1546000565ce917b9e
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index 84deef5..a3eca12 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -2,6 +2,7 @@
 
 define( 'CONTRIBUTION_AUDIT_WR1_PARSER_DIR', '/usr/local/src/Wr1Parser/' );
 define( 'CONTRIBUTION_AUDIT_WR1_FILES_DIR', '/usr/local/src/Wr1_files/' );
+define( 'CONTRIBUTION_AUDIT_WR1_COMPLETED_DIR', 
'/usr/local/src/Wr1_files-completed/' );
 define( 'CONTRIBUTION_AUDIT_LOG_FILES_DIR', '/usr/local/src/logs/' );
 define( 'CONTRIBUTION_AUDIT_PLUSMINUS', 7 );
 define( 'CONTRIBUTION_AUDIT_TEST_MODE', true );
@@ -41,9 +42,15 @@
   );
   $form['globalcollect_audit_wr1_files_dir']  = array(
 '#type' => 'textfield',
-'#title' => t( 'Path to directory containing WR1 files' ),
+'#title' => t( 'Directory containing incoming WR1 files' ),
 '#required' => TRUE,
 '#default_value' => variable_get( 'globalcollect_audit_wr1_files_dir', 
CONTRIBUTION_AUDIT_WR1_FILES_DIR ),
+  );
+  $form['globalcollect_audit_wr1_completed_dir']  = array(
+'#type' => 'textfield',
+'#title' => t( 'Directory for completed WR1 files' ),
+'#required' => TRUE,
+'#default_value' => variable_get( 'globalcollect_audit_wr1_completed_dir', 
CONTRIBUTION_AUDIT_WR1_COMPLETED_DIR ),
   );
   $form['globalcollect_audit_log_files_dir']  = array(
 '#type' => 'textfield',
@@ -994,7 +1001,7 @@
if ($nearly){
$subdir .= '-nearly-' . date('Y-m-d', time());
}
-   $files_directory = variable_get( 'globalcollect_audit_wr1_files_dir', 
CONTRIBUTION_AUDIT_WR1_FILES_DIR );
+   $files_directory = variable_get( 
'globalcollect_audit_wr1_completed_dir', CONTRIBUTION_AUDIT_WR1_COMPLETED_DIR );
$completed_dir = $files_directory . '/' . $subdir;
if ( !is_dir( $completed_dir ) ){
if ( !mkdir ( $completed_dir, 0700 )){

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0574f384a673b39975ecf1546000565ce917b9e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'gerrit/master' into deployment - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Merge remote-tracking branch 'gerrit/master' into deployment
..

Merge remote-tracking branch 'gerrit/master' into deployment

* gerrit/master:
  We can now read JSON I18n files from the hook

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/42/133742/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I033dd6f427048f089e43659c9d46fc77570081e4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'gerrit/master' into deployment - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Merge remote-tracking branch 'gerrit/master' into deployment
..


Merge remote-tracking branch 'gerrit/master' into deployment

* gerrit/master:
  We can now read JSON I18n files from the hook

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I033dd6f427048f089e43659c9d46fc77570081e4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] We can now read JSON I18n files from the hook - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: We can now read JSON I18n files from the hook
..


We can now read JSON I18n files from the hook

Change-Id: I31f1399073b90015c31dc07c1d18e53cd9e2285b
---
M sites/all/modules/thank_you/make_thank_you_2011.php
M sites/all/modules/thank_you/thank_you.module
D sites/all/modules/wmf_common/MessageFile.php
M sites/all/modules/wmf_common/wmf_common.module
A sites/all/modules/wmf_communication/MediaWikiMessages.php
M sites/all/modules/wmf_communication/Translation.php
A sites/all/modules/wmf_communication/tests/phpunit/MediaWikiMessagesTest.php
A sites/all/modules/wmf_communication/tests/phpunit/TranslationTest.php
M sites/all/modules/wmf_communication/wmf_communication.info
M sites/all/modules/wmf_unsubscribe/unsub_make.drush.inc
M sites/all/modules/wmf_unsubscribe/wmf_unsubscribe.info
11 files changed, 287 insertions(+), 157 deletions(-)

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



diff --git a/sites/all/modules/thank_you/make_thank_you_2011.php 
b/sites/all/modules/thank_you/make_thank_you_2011.php
index 98cd464..bcf1be4 100755
--- a/sites/all/modules/thank_you/make_thank_you_2011.php
+++ b/sites/all/modules/thank_you/make_thank_you_2011.php
@@ -212,9 +212,7 @@
  * @param $lang string the language that we are rendering
  */
 function replace_tokens( &$file, $lang ){
-   require_once '../wmf_common/MessageFile.php';
-
-   $di_i18n = new MessageFile( 
'../wmf_common/DonationInterface/gateway_common/interface.i18n.php' );
+   $di_i18n = MediaWikiMessages::getInstance();
 
 $pattern = array(
 '/\[first name\]/',
diff --git a/sites/all/modules/thank_you/thank_you.module 
b/sites/all/modules/thank_you/thank_you.module
index 6ba9e37..ca34f1b 100644
--- a/sites/all/modules/thank_you/thank_you.module
+++ b/sites/all/modules/thank_you/thank_you.module
@@ -5,8 +5,6 @@
 use wmf_communication\Translation;
 use Html2Text\Html2Text;
 
-require_once drupal_get_path( 'module', 'wmf_common' ) . '/MessageFile.php';
-
 // TODO:
 // * use more exceptions in place of watchdog/return false
 // * encapsulate template params structure and validation
diff --git a/sites/all/modules/wmf_common/MessageFile.php 
b/sites/all/modules/wmf_common/MessageFile.php
deleted file mode 100644
index a01af9c..000
--- a/sites/all/modules/wmf_common/MessageFile.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- * @license GPLv2 or later
- */
-class MessageFile {
-
-  protected $messages = null;
-
-  /**
-   * Creates a new MessageFile and initializes it with the messages
-   * contained in the specified file.
-   *
-   * @param string $msg_file filename of the file containing the messages
-   * @throws Exception if the messages could not be loaded
-   */
-  public function __construct($msg_file) {
-if (!file_exists($msg_file)) {
-  throw new Exception("Message file does not exist: $msg_file");
-}
-
-// The assumption is made that the included file uses an array called
-// $messages to store the messages.  This is the MediaWiki default.
-$messages = array();
-include $msg_file;
-
-$this->messages = $messages;
-  }
-
-  /**
-   * Gets a message in the specified language, if it exists.  If a translation 
does not
-   * exist, the function attempts to return the requested message in English.  
If the
-   * message still does not exist, the key is returned.
-   *
-   * @param string $key the name of the message to retrieve
-   * @param string $language language code to attempt to retrieve
-   * @return string the message in the requested language, a fallback, or 
finally the key
-   * @throws Exception if the MessageFile is not properly initialized
-   */
-  public function getMsg($key, $language) {
-if($this->messages === null){
-  throw new Exception("MessageFile not initialized");
-}
-// if the requested translation exists, return that
-if ($this->msgExists($key, $language)) {
-  return $this->messages[$language][$key];
-}
-   // try a fallback
-   elseif( strpos( $language, '-' ) !== false &&
-   $this->msgExists( $key, substr( $language, 0, strpos( 
$language, '-' ) ) ) ){
-   return $this->messages[substr( $language, 0, strpos( 
$language, '-' ) )][$key];
-   }
-// if not, but an english version exists, return that
-elseif ($this->msgExists($key, 'en')) {
-  return $this->messages['en'][$key];
-}
-// finally, return the message key itself
-return $key;
-  }
-
-  /**
-   * Determines whether or not a translation exists in the language specified 
for
-   * the message specified.  The function does not take into account any 
fallback
-   * languages defined for the specified language.
-   *
-   * @param string $key the message key for which to search
-   * @param string $language the language code for which to search for a 
translation of the mess

[MediaWiki-commits] [Gerrit] Make jenkins job fail when exception is caught - change (wikimedia...tools)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Make jenkins job fail when exception is caught
..


Make jenkins job fail when exception is caught

We have to return something non zero for it to know it didn't work

Change-Id: Ic4bc525fa660f03b8a2bd64058849d861e5c11ee
---
M FundraiserStatisticsGen/fundstatgen.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/FundraiserStatisticsGen/fundstatgen.py 
b/FundraiserStatisticsGen/fundstatgen.py
index 1ab437e..3c4f2cb 100644
--- a/FundraiserStatisticsGen/fundstatgen.py
+++ b/FundraiserStatisticsGen/fundstatgen.py
@@ -290,3 +290,4 @@
 main()
 except Exception as ex:
 logging.exception('Unexpected exception! Death is me.')
+exit(1)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4bc525fa660f03b8a2bd64058849d861e5c11ee
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into deployment - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Merge remote-tracking branch 'origin/master' into deployment
..


Merge remote-tracking branch 'origin/master' into deployment

* origin/master:
  Polish exchange rates module

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

Approvals:
  Mwalker: Looks good to me, approved




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9d9aea51ead52ba0a3a5cb966bddad91e1e285c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into deployment - change (wikimedia...crm)

2014-05-16 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Merge remote-tracking branch 'origin/master' into deployment
..

Merge remote-tracking branch 'origin/master' into deployment

* origin/master:
  Polish exchange rates module

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/28/133728/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9d9aea51ead52ba0a3a5cb966bddad91e1e285c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Mwalker 

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


<    1   2   3   4   5   6   7   8   9   10   >