Skip to content

Commit 4064624

Browse files
authored
Merge pull request #232 from Kashoo/issue-230-release
Issue 230: Release of v2.0.0
2 parents 1138012 + 873dec8 commit 4064624

7 files changed

Lines changed: 21 additions & 8 deletions

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Change Log
22
This project adheres to [Semantic Versioning](http://semver.org/). All notable changes will be documented in this file.
33

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

147-
[Unreleased]: https://github.com/Kashoo/synctos/compare/v1.10.0...HEAD
147+
[Unreleased]: https://github.com/Kashoo/synctos/compare/v2.0.0...HEAD
148+
[2.0.0]: https://github.com/Kashoo/synctos/compare/v1.10.0...v2.0.0
148149
[1.10.0]: https://github.com/Kashoo/synctos/compare/v1.9.4...v1.10.0
149150
[1.9.4]: https://github.com/Kashoo/synctos/compare/v1.9.3...v1.9.4
150151
[1.9.3]: https://github.com/Kashoo/synctos/compare/v1.9.2...v1.9.3

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "synctos",
3-
"version": "1.12.0",
3+
"version": "2.0.0",
44
"description": "The Syncmaker. A tool to build comprehensive sync functions for Couchbase Sync Gateway.",
55
"keywords": [
66
"couchbase",

src/testing/test-environment-maker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
exports.init = init;
1010

1111
var fs = require('fs');
12+
var path = require('path');
1213
var vm = require('vm');
1314
var underscore = require('../../lib/underscore/underscore-min');
1415
var simpleMock = require('../../lib/simple-mock/index');
@@ -19,7 +20,8 @@ function init(rawSyncFunction, syncFunctionFile) {
1920
displayErrors: true
2021
};
2122

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

2426
// The test environment includes a placeholder string called "%SYNC_FUNC_PLACEHOLDER%" that is to be replaced with the contents of
2527
// the sync function

src/testing/test-environment-maker.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var expect = require('chai').expect;
2+
var path = require('path');
23
var simpleMock = require('../../lib/simple-mock/index.js');
34
var mockRequire = require('mock-require');
45

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

5051
expect(fsMock.readFileSync.callCount).to.equal(1);
51-
expect(fsMock.readFileSync.calls[0].args).to.eql([ 'templates/test-environment-template.js', 'utf8' ]);
52+
expect(fsMock.readFileSync.calls[0].args).to.eql([
53+
path.resolve(__dirname, '../../templates/test-environment-template.js'),
54+
'utf8'
55+
]);
5256

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

src/validation/validation-environment-maker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
exports.init = init;
1313

1414
var fs = require('fs');
15+
var path = require('path');
1516
var vm = require('vm');
1617
var underscore = require('../../lib/underscore/underscore-min');
1718
var simpleMock = require('../../lib/simple-mock/index');
@@ -22,7 +23,8 @@ function init(docDefinitionsString, originalFilename) {
2223
displayErrors: true
2324
};
2425

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

2729
// The test helper environment includes a placeholder string called "%DOC_DEFINITIONS_PLACEHOLDER%" that is to be replaced with the
2830
// contents of the document definitions

src/validation/validation-environment-maker.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var expect = require('chai').expect;
2+
var path = require('path');
23
var simpleMock = require('../../lib/simple-mock/index');
34
var mockRequire = require('mock-require');
45

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

4243
expect(fsMock.readFileSync.callCount).to.equal(1);
43-
expect(fsMock.readFileSync.calls[0].args).to.eql([ 'templates/validation-environment-template.js', 'utf8' ]);
44+
expect(fsMock.readFileSync.calls[0].args).to.eql([
45+
path.resolve(__dirname, '../../templates/validation-environment-template.js'),
46+
'utf8'
47+
]);
4448

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

0 commit comments

Comments
 (0)