Skip to content

Commit

Permalink
Merge pull request #233 from gruntjs/deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
vladikoff committed Apr 20, 2016
2 parents a5ba9e3 + 02b4370 commit 2e819f2
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"eqeqeq": true,
"eqnull": true,
"immed": true,
"latedef": true,
"latedef": false,
"newcap": true,
"noarg": true,
"node": true,
Expand Down
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
sudo: false

language: node_js

node_js:
- '5'
- '4'
- '0.10'
- "0.10"
- "0.12"
- "4"
- "5"
- "iojs"

matrix:
fast_finish: true

cache:
directories:
- node_modules
31 changes: 20 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
# AppVeyor file
# http://www.appveyor.com/docs/appveyor-yml
clone_depth: 10

version: "{build}"

clone_depth: 10

# What combinations to test
environment:
matrix:
- nodejs_version: "5"
- nodejs_version: "4"
- nodejs_version: "0.10"
platform: x86
- nodejs_version: "0.12"
platform: x86
- nodejs_version: "4"
platform: x64
- nodejs_version: "4"
platform: x86
- nodejs_version: "5"
platform: x86

install:
- ps: Install-Product node $env:nodejs_version
- ps: Install-Product node $env:nodejs_version $env:platform
- npm install

build: off

test_script:
# Output useful info for debugging
- node --version && npm --version
- npm test
# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
- cmd: npm test

build: off

matrix:
fast_finish: true

cache:
- 'node_modules -> package.json' # local npm modules
- node_modules -> package.json
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@
"sprintf-js": "~1.0.3"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-internal": "^0.4.5",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-nodeunit": "^0.4.1",
"grunt-contrib-watch": "^0.6.1"
"grunt": "^1.0.1",
"grunt-contrib-connect": "^1.0.1",
"grunt-contrib-internal": "^1.1.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-watch": "^1.0.0"
},
"keywords": [
"gruntplugin",
Expand Down
26 changes: 13 additions & 13 deletions tasks/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(grunt) {
// node api
var fs = require('fs'),
path = require('path'),
sprintf = require("sprintf-js").sprintf;
sprintf = require('sprintf-js').sprintf;

// npm lib
var phantomjs = require('grunt-lib-phantomjs').init(grunt),
Expand Down Expand Up @@ -45,8 +45,8 @@ module.exports = function(grunt) {
}
};

//With node.js on Windows: use symbols available in terminal default fonts
//https://github.com/visionmedia/mocha/pull/641
// With node.js on Windows: use symbols available in terminal default fonts
// https://github.com/visionmedia/mocha/pull/641
if (process && process.platform === 'win32') {
symbols = {
none: {
Expand All @@ -67,7 +67,7 @@ module.exports = function(grunt) {
};
}

grunt.registerMultiTask('jasmine', 'Run jasmine specs headlessly through PhantomJS.', function() {
grunt.registerMultiTask('jasmine', 'Run Jasmine specs headlessly through PhantomJS.', function() {

// Merge task-specific options with these defaults.
var options = this.options({
Expand All @@ -87,7 +87,7 @@ module.exports = function(grunt) {
ignoreEmpty: grunt.option('force') === true,
display: 'full',
summary: false
});
});

if (grunt.option('debug')) {
grunt.log.debug(options);
Expand Down Expand Up @@ -136,7 +136,7 @@ module.exports = function(grunt) {
file = options.host + options.outfile;
}

grunt.verbose.subhead('Testing jasmine specs via phantom').or.writeln('Testing jasmine specs via PhantomJS');
grunt.verbose.subhead('Testing Jasmine specs via PhantomJS').or.writeln('Testing Jasmine specs via PhantomJS');
grunt.log.writeln('');

phantomjs.spawn(file, {
Expand Down Expand Up @@ -378,14 +378,14 @@ module.exports = function(grunt) {
});

function logSummary(tests) {
grunt.log.writeln('Summary (' + tests.length + ' tests failed)');
_.forEach(tests, function(test) {
grunt.log.writeln(chalk.red(symbols[options.display].error) + ' ' + test.suite + ' ' + test.name);
_.forEach(test.errors, function(error) {
grunt.log.writeln(indent(2) + chalk.red(error.message));
logStack(error.stack, 2);
});
grunt.log.writeln('Summary (' + tests.length + ' tests failed)');
_.forEach(tests, function(test) {
grunt.log.writeln(chalk.red(symbols[options.display].error) + ' ' + test.suite + ' ' + test.name);
_.forEach(test.errors, function(error) {
grunt.log.writeln(indent(2) + chalk.red(error.message));
logStack(error.stack, 2);
});
});
}

function logStack(stack, indentLevel) {
Expand Down
8 changes: 4 additions & 4 deletions tasks/lib/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ exports.init = function(grunt, phantomjs) {
exports.copyTempFile(path.join(__dirname, '/../jasmine/reporters/PhantomReporter.js'), 'reporter.js');

[].concat(jasmineRequire.files.cssFiles, jasmineRequire.files.jsFiles).forEach(function(name) {
var srcPath = path.join(jasmineRequire.files.path, name);
exports.copyTempFile(srcPath, name);
var srcPath = path.join(jasmineRequire.files.path, name);
exports.copyTempFile(srcPath, name);
});

jasmineRequire.files.bootFiles.forEach(function(name) {
var srcPath = path.join(jasmineRequire.files.bootDir, name);
exports.copyTempFile(srcPath, name);
var srcPath = path.join(jasmineRequire.files.bootDir, name);
exports.copyTempFile(srcPath, name);
});

exports.copyTempFile(path.join(jasmineRequire.files.imagesDir, 'jasmine_favicon.png'), 'jasmine_favicon.png');
Expand Down
5 changes: 3 additions & 2 deletions test/jasmine_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

var grunt = require('grunt'),
phantomjs = require('grunt-lib-phantomjs').init(grunt),
jasmine = require('../tasks/lib/jasmine.js').init(grunt, phantomjs);
jasmine = require('../tasks/lib/jasmine.js').init(grunt, phantomjs),
_ = require('lodash');

// Majority of test benefit comes from running the task itself.

function runTemplate(src, context) {
var source = grunt.file.read(src);
return grunt.util._.template(source, context);
return _.template(source, context);
}

// Just strips whitespace for now. Should do a proper min of everything
Expand Down

0 comments on commit 2e819f2

Please sign in to comment.