Skip to content

Commit

Permalink
Merge pull request #232 from Kashoo/issue-230-release
Browse files Browse the repository at this point in the history
Issue 230: Release of v2.0.0
  • Loading branch information
dkichler authored Feb 17, 2018
2 parents 1138012 + 873dec8 commit 4064624
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/). All notable changes will be documented in this file.

## [Unreleased]
## [2.0.0] - 2018-02-16
### Added
- [#43](https://github.com/Kashoo/synctos/issues/43): Tool to validate structure and semantics of a document definitions file
- [#189](https://github.com/Kashoo/synctos/issues/189): Automatically create the output sync function file directory if it does not exist
Expand Down Expand Up @@ -144,7 +144,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). All notable c
## [1.0.0] - 2016-07-12
First public release

[Unreleased]: https://github.com/Kashoo/synctos/compare/v1.10.0...HEAD
[Unreleased]: https://github.com/Kashoo/synctos/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/Kashoo/synctos/compare/v1.10.0...v2.0.0
[1.10.0]: https://github.com/Kashoo/synctos/compare/v1.9.4...v1.10.0
[1.9.4]: https://github.com/Kashoo/synctos/compare/v1.9.3...v1.9.4
[1.9.3]: https://github.com/Kashoo/synctos/compare/v1.9.2...v1.9.3
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "synctos",
"version": "1.12.0",
"version": "2.0.0",
"description": "The Syncmaker. A tool to build comprehensive sync functions for Couchbase Sync Gateway.",
"keywords": [
"couchbase",
Expand Down
4 changes: 3 additions & 1 deletion src/testing/test-environment-maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
exports.init = init;

var fs = require('fs');
var path = require('path');
var vm = require('vm');
var underscore = require('../../lib/underscore/underscore-min');
var simpleMock = require('../../lib/simple-mock/index');
Expand All @@ -19,7 +20,8 @@ function init(rawSyncFunction, syncFunctionFile) {
displayErrors: true
};

var environmentTemplate = fs.readFileSync('templates/test-environment-template.js', 'utf8').trim();
var filePath = path.resolve(__dirname, '../../templates/test-environment-template.js');
var environmentTemplate = fs.readFileSync(filePath, 'utf8').trim();

// The test environment includes a placeholder string called "%SYNC_FUNC_PLACEHOLDER%" that is to be replaced with the contents of
// the sync function
Expand Down
6 changes: 5 additions & 1 deletion src/testing/test-environment-maker.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var expect = require('chai').expect;
var path = require('path');
var simpleMock = require('../../lib/simple-mock/index.js');
var mockRequire = require('mock-require');

Expand Down Expand Up @@ -48,7 +49,10 @@ describe('Test environment maker', function() {
expect(result).to.eql(expectedResult);

expect(fsMock.readFileSync.callCount).to.equal(1);
expect(fsMock.readFileSync.calls[0].args).to.eql([ 'templates/test-environment-template.js', 'utf8' ]);
expect(fsMock.readFileSync.calls[0].args).to.eql([
path.resolve(__dirname, '../../templates/test-environment-template.js'),
'utf8'
]);

expect(vmMock.runInThisContext.callCount).to.equal(1);
expect(vmMock.runInThisContext.calls[0].args).to.eql([
Expand Down
4 changes: 3 additions & 1 deletion src/validation/validation-environment-maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
exports.init = init;

var fs = require('fs');
var path = require('path');
var vm = require('vm');
var underscore = require('../../lib/underscore/underscore-min');
var simpleMock = require('../../lib/simple-mock/index');
Expand All @@ -22,7 +23,8 @@ function init(docDefinitionsString, originalFilename) {
displayErrors: true
};

var envTemplateString = fs.readFileSync('templates/validation-environment-template.js', 'utf8').trim();
var filePath = path.resolve(__dirname, '../../templates/validation-environment-template.js');
var envTemplateString = fs.readFileSync(filePath, 'utf8').trim();

// The test helper environment includes a placeholder string called "%DOC_DEFINITIONS_PLACEHOLDER%" that is to be replaced with the
// contents of the document definitions
Expand Down
6 changes: 5 additions & 1 deletion src/validation/validation-environment-maker.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var expect = require('chai').expect;
var path = require('path');
var simpleMock = require('../../lib/simple-mock/index');
var mockRequire = require('mock-require');

Expand Down Expand Up @@ -40,7 +41,10 @@ describe('Validation environment maker', function() {
expect(result).to.eql(expectedResult);

expect(fsMock.readFileSync.callCount).to.equal(1);
expect(fsMock.readFileSync.calls[0].args).to.eql([ 'templates/validation-environment-template.js', 'utf8' ]);
expect(fsMock.readFileSync.calls[0].args).to.eql([
path.resolve(__dirname, '../../templates/validation-environment-template.js'),
'utf8'
]);

expect(vmMock.runInThisContext.callCount).to.equal(1);
expect(vmMock.runInThisContext.calls[0].args).to.eql([
Expand Down

0 comments on commit 4064624

Please sign in to comment.