diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-11-18 23:56:25 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-11-18 23:56:25 +0100 |
commit | b23284cba28335f61595f2264685b1bbafc19183 (patch) | |
tree | 696cbfc2b5a609c636e0d1d7a3a2f9ad7a302266 /library/moment/tasks/zones.js | |
parent | 0c163c4d038a4c26335af1bde366d8ef9e53c464 (diff) | |
download | volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.tar.gz volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.tar.bz2 volse-hubzilla-b23284cba28335f61595f2264685b1bbafc19183.zip |
move moment.min.js and remove unneeded files
Diffstat (limited to 'library/moment/tasks/zones.js')
-rw-r--r-- | library/moment/tasks/zones.js | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/library/moment/tasks/zones.js b/library/moment/tasks/zones.js deleted file mode 100644 index 7aa88b1f6..000000000 --- a/library/moment/tasks/zones.js +++ /dev/null @@ -1,70 +0,0 @@ -var fs = require('fs'); - - -module.exports = function (grunt) { - var ZONE_TAB = '/usr/share/zoneinfo/zone.tab'; - - grunt.registerTask('zones', 'Run the unit tests in different timezones.', function () { - var done = this.async(); - - getAllTimezones(function (err, zones) { - if (err != null) { - throw err; - } - (function iterator(i) { - if (i >= zones.length) { - return done(); - } - runTestsInZone(zones[i], function (err) { - if (err != null) { - throw err; - } - iterator(i + 1); - }); - }(0)); - }); - }); - - function getAllTimezones (callback) { - fs.readFile(ZONE_TAB, 'ascii', function (err, content) { - if (err != null) { - callback(err); - } - callback(null, content.split(/\r\n|\r|\n/) - // remove empty and commented lines - .filter(function (line) { - return line && !/^#/.test(line); - }) - // country code TAB coordinates TAB timezone - .map(function (line) { - return line.split('\t')[2]; - })); - }); - } - - function runTestsInZone (zone, next) { - grunt.log.ok('Running tests in zone ' + zone); - grunt.util.spawn({ - cmd: 'grunt', - opts: { - env: { - 'PATH': process.env.PATH, - 'TZ': zone - } - }, - args: ['--no-color', 'nodeunit'] - }, function (err, result, code) { - if (code !== 0) { - grunt.log.error(result.stdout.split(/\r\n|\r|\n/) - .filter(function (line) { - return /^(>>|Warning:|$)/.test(line); - }) - .map(function (line) { - return (line.substr(0, 3) === '>> ' ? line.substr(3) : line); - }) - .join('\n')); - } - next(); - }); - } -}; |