Skip to content

Commit a43c8a1

Browse files
committed
Merge branch 'release/0.5.2'
2 parents 7f6e95e + fda44c9 commit a43c8a1

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

.npmignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules
2+
test
3+
.editorconfig
4+
.gitignore
5+
.jscsrc
6+
.travis.yml
7+
gulpfile.js
8+
9+
# Created by .ignore support plugin (hsz.mobi)
10+
### JetBrains template
11+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
12+
13+
*.iml
14+
15+
## Directory-based project format:
16+
.idea/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ nunit({
221221

222222
## Release Notes
223223

224+
### 0.5.2
225+
226+
- Add check for output file before creating the TeamCity output. ([Mike O'Brien](https://github.com/mikeobrien))
227+
- Clean up publish package with `.npmignore`
228+
224229
### 0.5.1
225230
- Fix #13 Running from Visual Studio Task Runner Fails
226231

index.js renamed to lib/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var _ = require('lodash'),
88
path = require('path'),
99
temp = require('temp'),
1010
fs = require('fs'),
11-
teamcity = require('./lib/teamcity'),
11+
teamcity = require('./teamcity'),
1212

1313
PLUGIN_NAME = 'gulp-nunit-runner',
1414
NUNIT_CONSOLE = 'nunit-console.exe',
@@ -48,7 +48,7 @@ runner.getExecutable = function (options) {
4848
// trim any existing surrounding quotes and then wrap in ""
4949
executable = trim(options.executable, '\\s', '"', "'");
5050
return !path.extname(options.executable) ?
51-
path.join(executable, consoleRunner) : executable;
51+
path.join(executable, consoleRunner) : executable;
5252
};
5353

5454
runner.getArguments = function (options, assemblies) {
@@ -114,7 +114,7 @@ function run(stream, files, options) {
114114

115115
if (!options.options.result && options.teamcity) {
116116
temp.track();
117-
options.options.result = temp.path({suffix: '.xml'});
117+
options.options.result = temp.path({ suffix: '.xml' });
118118
cleanupTempFiles = temp.cleanup;
119119
}
120120

@@ -141,7 +141,11 @@ function run(stream, files, options) {
141141

142142
child.on('close', function (code) {
143143
if (options.teamcity) {
144-
gutil.log.apply(null, teamcity(fs.readFileSync(options.options.result, 'utf8')));
144+
if (fs.existsSync(options.options.result)) {
145+
gutil.log.apply(null, teamcity(fs.readFileSync(options.options.result, 'utf8')));
146+
} else {
147+
fail(stream, 'NUnit output not found: ' + options.options.result);
148+
}
145149
}
146150
if (cleanupTempFiles) {
147151
cleanupTempFiles();

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "gulp-nunit-runner",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"description": "A Gulp.js plugin to facilitate the running of NUnit unit tests on .Net assemblies. ",
5-
"main": "index.js",
5+
"main": "lib/index.js",
66
"scripts": {
77
"test": "gulp"
88
},
@@ -31,16 +31,17 @@
3131
"dependencies": {
3232
"event-stream": "^3.1.7",
3333
"gulp-util": "^3.0.0",
34-
"lodash": "^3.10.1",
34+
"lodash": "^4.3.0",
3535
"sax": "^1.1.1",
3636
"temp": "~0.8.1"
3737
},
3838
"devDependencies": {
3939
"chai": "^3.2.0",
4040
"gulp": "^3.9.0",
4141
"gulp-filter": "^3.0.0",
42-
"gulp-jshint": "^1.11.2",
42+
"gulp-jshint": "^2.0.0",
4343
"gulp-mocha": "^2.1.3",
44+
"jshint": "^2.9.1",
4445
"mocha": "^2.2.5"
4546
}
4647
}

0 commit comments

Comments
 (0)