Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
micha149 committed Aug 29, 2016
2 parents 9ce4a23 + 6df975f commit a7b5c18
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
gulp-maven-deploy
=================

***
**Warning** This readme contains changes for the upcoming 1.0.0 release. For using the 0.x versions, have a look into the [0.x support branch](https://github.com/micha149/gulp-maven-deploy/tree/support/0.x)
***

A [Gulp](//gulpjs.com/) wrapper for the [maven-deploy](https://www.npmjs.org/package/maven-deploy) module. Enables you to have projects which are built with Gulp, but deploys to Maven repositories.

[![Build Status](https://travis-ci.org/micha149/gulp-maven-deploy.svg?branch=master)](https://travis-ci.org/micha149/gulp-maven-deploy)
Expand All @@ -13,7 +9,7 @@ A [Gulp](//gulpjs.com/) wrapper for the [maven-deploy](https://www.npmjs.org/pac

[![NPM](https://nodei.co/npm/gulp-maven-deploy.png?stars=true&downloads=true)](https://npmjs.org/package/gulp-maven-deploy)

All the samples below require a basic understanding of [Gulp](//gulpjs.com/) and [Maven](http://maven.apache.org/). Please look at the documentation for those projects for details.
All the samples below require a basic understanding of [Gulp](//gulpjs.com/) and [Maven](http://maven.apache.org/). Please look at the documentation for those projects for details. This readme refers to 1.x versions. If you are still using the 0.x versions, have a look into the [0.x support branch](https://github.com/micha149/gulp-maven-deploy/tree/support/0.x).

## Installing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-maven-deploy",
"version": "1.0.0-beta.5",
"version": "1.0.0",
"description": "Simple gulp plugin for the maven-deploy module",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/util/buildFileOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ module.exports = function(file, baseOptions) {
// Ensure file to be of new vinyl version
file = new File(file);

var fileOptions = assign({}, baseOptions, {
var fileOptions = assign({}, {
artifactId: file.stem,
type: file.extname.replace(/^\./, '')
});
}, baseOptions);

return fileOptions;
};
18 changes: 18 additions & 0 deletions test/deployTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var plugin = require('../index.js'),
sinon = require('sinon'),
Vinyl = require('vinyl'),
mavenDeploy = require('maven-deploy'),
assign = require('lodash.assign'),
fs = require('fs');

/* globals describe: false, it: false, beforeEach: false, afterEach: false */
Expand Down Expand Up @@ -142,6 +143,23 @@ describe('gulp-maven-deploy plugin', function () {
stream.end();
});

it('uses provided artifactId', function (done) {
var config = assign({}, testConfig);
config.artifactId = 'file';
var stream = plugin.deploy(config);
var expectedOptions = {
artifactId: 'file'
};

stream.on('finish', function() {
expect(mavenDeploy.config).to.be.calledWith(sinon.match(expectedOptions));
done();
});

stream.write(fileA);
stream.end();
});

it('removes temporary file when finished', function(done) {
var stream = plugin.deploy(testConfig);

Expand Down
18 changes: 18 additions & 0 deletions test/installTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var plugin = require('../index.js'),
sinon = require('sinon'),
Vinyl = require('vinyl'),
mavenDeploy = require('maven-deploy'),
assign = require('lodash.assign'),
fs = require('fs');

/* globals describe: false, it: false, beforeEach: false, afterEach: false */
Expand Down Expand Up @@ -94,6 +95,23 @@ describe('gulp-maven-deploy plugin', function () {
stream.end();
});

it('uses provided artifactId', function (done) {
var config = assign({}, testConfig);
config.artifactId = 'file';
var stream = plugin.install(config);
var expectedOptions = {
artifactId: 'file'
};

stream.on('finish', function() {
expect(mavenDeploy.config).to.be.calledWith(sinon.match(expectedOptions));
done();
});

stream.write(fileA);
stream.end();
});

it('ensures to work with old vinyl versions', function (done) {
var stream = plugin.install(testConfig);
var expectedOptions = {
Expand Down

0 comments on commit a7b5c18

Please sign in to comment.