gulp-maven-deploy
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.0-beta.4
@@ -5,3 +5,4 @@ var through = require('through2'), | ||
assign = require('lodash.assign'), | ||
temp = require('temp').track(); | ||
temp = require('temp').track(), | ||
File = require('vinyl'); | ||
@@ -23,2 +24,4 @@ module.exports = function deploy(options) { | ||
file = new File(file); | ||
var fileOptions = assign({}, options, { | ||
@@ -25,0 +28,0 @@ //artifactId: file.artifactId || file.stem, |
{ | ||
"name": "gulp-maven-deploy", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.4", | ||
"description": "Simple gulp plugin for the maven-deploy module", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -129,2 +129,19 @@ var plugin = require('../index.js'), | ||
it('ensures to work with old vinyl versions', function (done) { | ||
var stream = plugin.deploy(testConfig); | ||
var expectedOptions = { | ||
artifactId: 'fileA' | ||
}; | ||
stream.on('finish', function() { | ||
expect(mavenDeploy.config).to.be.calledWith(sinon.match(expectedOptions)); | ||
done(); | ||
}); | ||
var oldVinyFile = Object.create(fileA, {stem: {}}); | ||
stream.write(oldVinyFile); | ||
stream.end(); | ||
}); | ||
it('falls back to file name as artifact id', function (done) { | ||
@@ -131,0 +148,0 @@ var stream = plugin.deploy(testConfig); |
21300
412