Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Juan Ferrer Toribio 2018-02-05 19:34:12 +01:00
commit 5ff996a4c7
15 changed files with 267 additions and 166 deletions

View File

@ -19,3 +19,4 @@ rules:
no-eq-null: 0 no-eq-null: 0
no-console: 0 no-console: 0
no-warning-comments: 0 no-warning-comments: 0
no-empty: 0

View File

@ -5,14 +5,16 @@ describe('Client', () => {
let $componentController; let $componentController;
let $state; let $state;
let controller; let controller;
let $httpBackend;
beforeEach(() => { beforeEach(() => {
angular.mock.module('client'); angular.mock.module('client');
}); });
beforeEach(angular.mock.inject((_$componentController_, _$state_) => { beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
$componentController = _$componentController_; $componentController = _$componentController_;
$state = _$state_; $state = _$state_;
$httpBackend = _$httpBackend_;
$state.params.addressId = '1234'; $state.params.addressId = '1234';
controller = $componentController('vnAddressEdit', {$state: $state}); controller = $componentController('vnAddressEdit', {$state: $state});
})); }));
@ -20,5 +22,16 @@ describe('Client', () => {
it('should define and set address property', () => { it('should define and set address property', () => {
expect(controller.address.id).toBe(1234); expect(controller.address.id).toBe(1234);
}); });
describe('$onInit()', () => {
it('should perform a GET query to receive the address observations', () => {
let filter = {where: {addressFk: 1234}, include: [{relation: 'observationType'}]};
let json = {data: 'some notes'};
$httpBackend.when('GET', `/client/api/AddressObservations?filter=${JSON.stringify(filter)}`).respond(json);
$httpBackend.expectGET(`/client/api/AddressObservations?filter=${JSON.stringify(filter)}`);
controller.$onInit();
$httpBackend.flush();
});
});
}); });
}); });

View File

@ -0,0 +1,31 @@
import './fiscal-data.js';
describe('Client', () => {
describe('Component vnClientFiscalData', () => {
let $componentController;
let $httpBackend;
let $scope;
let controller;
beforeEach(() => {
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
$scope = $rootScope.$new();
controller = $componentController('vnClientFiscalData', {$scope: $scope});
}));
describe('returnDialogEt()', () => {
it('should request to patch the propagation of tax status', () => {
controller.client = {id: 123, isEqualizated: false};
$httpBackend.when('PATCH', `/client/api/Clients/${controller.client.id}/addressesPropagateRe`, {isEqualizated: controller.client.isEqualizated}).respond('done');
$httpBackend.expectPATCH(`/client/api/Clients/${controller.client.id}/addressesPropagateRe`, {isEqualizated: controller.client.isEqualizated});
controller.returnDialogEt('ACCEPT');
$httpBackend.flush();
});
});
});
});

View File

@ -1,41 +0,0 @@
import './search-panel.js';
describe('Client', () => {
describe('Component vnClientSearchPanel', () => {
let $componentController;
let sessionStorage;
let controller;
beforeEach(() => {
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, _sessionStorage_) => {
$componentController = _$componentController_;
sessionStorage = _sessionStorage_;
controller = $componentController('vnClientSearchPanel', {sessionStorage: sessionStorage});
}));
// describe('onSearch()', () => {
// it('should call setStorageValue() and onSubmit()', () => {
// spyOn(controller, 'setStorageValue');
// spyOn(controller, 'onSubmit');
// controller.setStorageValue();
// controller.onSubmit();
// expect(controller.setStorageValue).toHaveBeenCalledWith();
// expect(controller.onSubmit).toHaveBeenCalledWith();
// });
// });
// describe('$onChanges()', () => {
// it('should set filter properties using the search values', () => {
// expect(controller.filter).not.toBeDefined();
// spyOn(sessionStorage, 'get').and.returnValue({data: 'data'});
// controller.$onChanges();
// expect(controller.filter).toBe(sessionStorage.get({data: 'data'}));
// });
// });
});
});

View File

@ -121,7 +121,6 @@ describe('Component vnAutocomplete', () => {
it(`should perform a query if the item id isn't present in the controller.items property`, () => { it(`should perform a query if the item id isn't present in the controller.items property`, () => {
controller.url = 'test.com'; controller.url = 'test.com';
$httpBackend.whenGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`).respond();
$httpBackend.expectGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`); $httpBackend.expectGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`);
controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}]; controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}];
controller.field = 3; controller.field = 3;
@ -137,7 +136,6 @@ describe('Component vnAutocomplete', () => {
it(`should set field performing a query as the item id isn't present in the controller.items property`, () => { it(`should set field performing a query as the item id isn't present in the controller.items property`, () => {
controller.url = 'test.com'; controller.url = 'test.com';
$httpBackend.whenGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`).respond();
$httpBackend.expectGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`); $httpBackend.expectGET(`${controller.url}?filter={"fields":{"id":true,"name":true},"where":{"id":3}}`);
controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}]; controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}];
controller.field = 3; controller.field = 3;

View File

@ -259,19 +259,22 @@ describe('Component vnDropDown', () => {
}); });
}); });
// describe('setScrollPosition()', () => { describe('setScrollPosition()', () => {
// it(`should call child.scrollIntoView if defined `, () => { it(`should call child.scrollIntoView if defined `, () => {
// $element[0].firstChild.setAttribute('class', 'dropdown'); $element[0].firstChild.setAttribute('class', 'dropdown');
// let child = $element[0].firstChild.firstChild; $element[0].firstChild.firstChild.setAttribute('class', 'active');
let child = $element[0].firstChild.firstChild;
spyOn(child, 'getBoundingClientRect').and.returnValue({top: 100});
let container = $element[0].firstChild;
spyOn(container, 'getBoundingClientRect').and.returnValue({top: 10, height: 70});
child.scrollIntoView = () => {};
spyOn(child, 'scrollIntoView');
controller._activeOption = 0;
controller.setScrollPosition();
// child.scrollIntoView = () => {}; expect(child.scrollIntoView).toHaveBeenCalledWith();
// spyOn(child, 'scrollIntoView'); });
// controller._activeOption = 0; });
// controller.setScrollPosition();
// expect(child.scrollIntoView).toHaveBeenCalledWith();
// });
// });
describe('selectItem()', () => { describe('selectItem()', () => {
it(`should pass item to selected and set controller._show to false`, () => { it(`should pass item to selected and set controller._show to false`, () => {

View File

@ -0,0 +1,33 @@
import './item-card.js';
describe('Item', () => {
describe('Component vnItemCard', () => {
let $componentController;
let $httpBackend;
let $state;
let controller;
beforeEach(() => {
angular.mock.module('item');
});
beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
$state = _$state_;
controller = $componentController('vnItemCard', {$state: $state});
}));
describe('$onInit()', () => {
it('should request to patch the propagation of tax status', () => {
controller.client = {id: 123, isEqualizated: false};
$httpBackend.whenGET('/item/api/Items/undefined?filter={"include":[{"relation":"itemType"},{"relation":"origin"},{"relation":"ink"},{"relation":"producer"},{"relation":"intrastat"},{"relation":"expence"},{"relation":"taxClass"},{"relation":"itemTag","scope":{"order":"priority ASC","include":{"relation":"tag"}}}]}').respond({data: 'item'});
$httpBackend.expectGET('/item/api/Items/undefined?filter={"include":[{"relation":"itemType"},{"relation":"origin"},{"relation":"ink"},{"relation":"producer"},{"relation":"intrastat"},{"relation":"expence"},{"relation":"taxClass"},{"relation":"itemTag","scope":{"order":"priority ASC","include":{"relation":"tag"}}}]}');
controller.$onInit();
$httpBackend.flush();
expect(controller.item).toEqual({data: 'item'});
});
});
});
});

View File

@ -0,0 +1,46 @@
import './item-create.js';
describe('Item', () => {
describe('Component vnItemCreate', () => {
let $componentController;
let $scope;
let $state;
let controller;
beforeEach(() => {
angular.mock.module('item');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
$componentController = _$componentController_;
$scope = $rootScope.$new();
$state = _$state_;
$scope.watcher = {
submit: () => {
return {
then: callback => {
callback({data: {id: 1}});
}
};
}
};
controller = $componentController('vnItemCreate', {$scope: $scope});
}));
it('should define and set scope, state and item properties', () => {
expect(controller.$).toEqual($scope);
expect(controller.$state).toEqual($state);
expect(controller.item).toEqual({relevancy: 0});
});
describe('onSubmit()', () => {
it(`should call submit() on the watcher then expect a callback`, () => {
spyOn($state, 'go');
controller.onSubmit();
expect(controller.$state.go).toHaveBeenCalledWith('item.card.data', {id: 1});
});
});
});
});

View File

@ -8,7 +8,7 @@ export default class ProductionIndex {
this.$http = $http; this.$http = $http;
this.filter = {}; this.filter = {};
this.tickets = []; this.tickets = [];
this.checkAll = 0; this.checkAll = 0;
this.footer = { this.footer = {
total: null, total: null,
@ -35,58 +35,53 @@ export default class ProductionIndex {
} }
// Actions Callbacks // Actions Callbacks
_changeState(ids, sateteId, stateName, index) {
this.$http.put(`/production/api/TicketStates/${sateteId}/changeState`, {tickets: ids}).then( _changeState(ids, stateId, stateName, index) {
() => { this.$http.put(`/production/api/TicketStates/${stateId}/changeState`, {tickets: ids}).then(() => {
index.forEach( index.forEach(val => {
val => { this.tickets[val].state = stateName;
this.tickets[val].state = stateName; this.tickets[val].stateFk = stateId;
this.tickets[val].stateFk = sateteId; });
} });
);
}
);
} }
_sendMessage(tickets) { _sendMessage(tickets) {
this.$http.post(`/production/api/FakeProductions/messageSend`, {tickets: tickets}).then( this.$http.post(`/production/api/FakeProductions/messageSend`, {tickets: tickets}).then(() => {
() => { this.vnApp.showMessage(this.$translate.instant('Success: message send!'));
this.vnApp.showMessage(this.$translate.instant('Success: message send!')); });
}
);
} }
_changeTime(ids, time, index) { _changeTime(ids, time, index) {
this.$http.put(`/production/api/Tickets/${time}/changeTime`, {tickets: ids}).then( this.$http.put(`/production/api/Tickets/${time}/changeTime`, {tickets: ids}).then(() => {
() => { index.forEach(val => {
index.forEach( this.tickets[val].hour = time;
val => { });
this.tickets[val].hour = time; });
}
);
}
);
} }
searchTickets(filter) { searchTickets(filter) {
this.$.index.filter.filter = Object.assign({}, this.filter, filter || {}); this.$.index.filter.filter = Object.assign({}, this.filter, filter || {});
this.checkAll = 0; this.checkAll = 0;
this.$.index.accept().then( this.$.index.accept().then(json => {
json => { this.tickets = json.tickets;
this.tickets = json.tickets; this.footer.lines = json.lines;
this.footer.lines = json.lines; this.footer.meters = json.m3;
this.footer.meters = json.m3; this.footer.total = json.total;
this.footer.total = json.total; });
}
);
} }
refreshTickets() { refreshTickets() {
this.filter = {}; this.filter = {};
this.filter.warehouseFk = this.$.displayValue = this.userProfile.warehouseId; this.filter.warehouseFk = this.$.displayValue = this.userProfile.warehouseId;
} }
onChangeWareHouse(warehouse) { onChangeWareHouse(warehouse) {
if (warehouse && warehouse != this.filter.warehouseFk) { if (warehouse && warehouse != this.filter.warehouseFk) {
this.filter.warehouseFk = warehouse; this.filter.warehouseFk = warehouse;
this.searchTickets(this.filter); this.searchTickets(this.filter);
} }
} }
$onInit() { $onInit() {
for (let i = 1; i <= 24; i++) { for (let i = 1; i <= 24; i++) {
let hour = [i].join(''); let hour = [i].join('');

View File

@ -0,0 +1,39 @@
import './index.js';
describe('Production', () => {
describe('Component vnProductionIndex', () => {
let $componentController;
let $httpBackend;
let $scope;
let controller;
let $element;
let aclConstant;
beforeEach(() => {
angular.mock.module('production');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
$element = angular.element('<div></div>');
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
$scope = $rootScope.$new();
aclConstant = {userProfile: {warehouseId: 1}};
controller = $componentController('vnProductionIndex', {$scope: $scope, $element: $element, aclConstant: aclConstant});
}));
describe('_changeState()', () => {
it('should request to update the ticket state', () => {
let ids = [1, 2, 3, 4];
let stateId = 1;
let stateName = 'the state!';
let index = [];
controller.tickets = ['ticketVal'];
$httpBackend.whenPUT('/production/api/TicketStates/1/changeState', {tickets: ids}).respond({data: 'ticketVal'});
$httpBackend.expectPUT('/production/api/TicketStates/1/changeState', {tickets: ids});
controller._changeState(ids, stateId, stateName, index);
$httpBackend.flush();
});
});
});
});

View File

@ -98,6 +98,9 @@ gulp.task('install', () => {
})); }));
}); });
// Gulp install alias
gulp.task('i', ['install']);
// Deployment // Deployment
gulp.task('build', ['clean'], () => { gulp.task('build', ['clean'], () => {
@ -137,15 +140,50 @@ gulp.task('docker-compose', async () => {
// Nginx & services // Nginx & services
gulp.task('nginx', ['nginx-conf'], callback => { let nginxConf = 'temp/nginx.conf';
let command = isWindows ? 'start.cmd' : 'start.sh'; let nginxTemp = `${nginxDir}/temp`;
command = path.join(`${nginxDir}/${command}`);
exec(command, (err, stdout, stderr) => { async function nginxGetBin() {
// if (stderr) console.log(stderr); if (isWindows)
callback(err); return 'nginx';
try {
let nginxBin = '/usr/sbin/nginx';
await fs.stat(nginxBin);
return nginxBin;
} catch (e) {
return 'nginx';
}
}
gulp.task('nginx', ['nginx-stop'], async () => {
let nginxBin = await nginxGetBin();
if (isWindows)
nginxBin = `start /B ${nginxBin}`;
return new Promise((resolve, reject) => {
exec(`${nginxBin} -c "${nginxConf}" -p "${nginxDir}"`, err => {
if (err) return reject(err);
resolve();
});
}); });
}); });
gulp.task('nginx-stop', ['nginx-conf'], async () => {
try {
let nginxBin = await nginxGetBin();
await fs.stat(`${nginxTemp}/nginx.pid`);
let command = `${nginxBin} -c "${nginxConf}" -p "${nginxDir}" -s stop`;
return new Promise((resolve, reject) => {
exec(command, err => {
if (err) return reject(err);
resolve();
});
});
} catch (e) {}
});
gulp.task('nginx-conf', async () => { gulp.task('nginx-conf', async () => {
const mustache = require('mustache'); const mustache = require('mustache');

26
package-lock.json generated
View File

@ -113,7 +113,7 @@
"angular": { "angular": {
"version": "1.6.8", "version": "1.6.8",
"resolved": "https://registry.npmjs.org/angular/-/angular-1.6.8.tgz", "resolved": "https://registry.npmjs.org/angular/-/angular-1.6.8.tgz",
"integrity": "sha512-9WErZIOw1Cu1V5Yxdvxz/6YpND8ntdP71fdPpufPFJvZodZXqCjQBYrHqEoMZreO5i84O3D/Jw/vepoFt68Azw==" "integrity": "sha1-W+N4pYvpGlSJ54tZxFGM2f0nP/s="
}, },
"angular-cookies": { "angular-cookies": {
"version": "1.6.4", "version": "1.6.4",
@ -244,7 +244,7 @@
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=",
"dev": true "dev": true
}, },
"archy": { "archy": {
@ -1119,7 +1119,7 @@
"bluebird": { "bluebird": {
"version": "3.5.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=",
"dev": true "dev": true
}, },
"bn.js": { "bn.js": {
@ -5328,7 +5328,7 @@
"fsevents": { "fsevents": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
"integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", "integrity": "sha1-EfgjGPX+e7LNIpZaEI6TBiCCFtg=",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
@ -9909,7 +9909,7 @@
"jasmine-spec-reporter": { "jasmine-spec-reporter": {
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz",
"integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", "integrity": "sha1-HWMq7ANBZwrTJPkrqEtLMrNeniI=",
"dev": true, "dev": true,
"requires": { "requires": {
"colors": "1.1.2" "colors": "1.1.2"
@ -10051,7 +10051,7 @@
"karma": { "karma": {
"version": "1.7.1", "version": "1.7.1",
"resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz",
"integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", "integrity": "sha1-hcwI6eCiLXzpzKN8ShvoJPaisa4=",
"dev": true, "dev": true,
"requires": { "requires": {
"bluebird": "3.5.1", "bluebird": "3.5.1",
@ -10103,7 +10103,7 @@
"karma-chrome-launcher": { "karma-chrome-launcher": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
"integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=",
"dev": true, "dev": true,
"requires": { "requires": {
"fs-access": "1.0.1", "fs-access": "1.0.1",
@ -10113,7 +10113,7 @@
"karma-firefox-launcher": { "karma-firefox-launcher": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.1.0.tgz", "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.1.0.tgz",
"integrity": "sha512-LbZ5/XlIXLeQ3cqnCbYLn+rOVhuMIK9aZwlP6eOLGzWdo1UVp7t6CN3DP4SafiRLjexKwHeKHDm0c38Mtd3VxA==", "integrity": "sha1-LEcDBFLwRTHrfRPU/HZpYwu5Mzk=",
"dev": true "dev": true
}, },
"karma-jasmine": { "karma-jasmine": {
@ -10134,7 +10134,7 @@
"karma-webpack": { "karma-webpack": {
"version": "2.0.9", "version": "2.0.9",
"resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.9.tgz", "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.9.tgz",
"integrity": "sha512-F1j3IG/XhiMzcunAXbWXH95uizjzr3WdTzmVWlta8xqxcCtAu9FByCb4sccIMxaVFAefpgnUW9KlCo0oLvIX6A==", "integrity": "sha1-YciAkffdkQY1E0wDKyZqRlr/tX8=",
"dev": true, "dev": true,
"requires": { "requires": {
"async": "0.9.2", "async": "0.9.2",
@ -11183,7 +11183,7 @@
"node-sass": { "node-sass": {
"version": "4.7.2", "version": "4.7.2",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz",
"integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==", "integrity": "sha1-k2Z3i6FGnrAUOKnoWS9CYry2eU4=",
"dev": true, "dev": true,
"requires": { "requires": {
"async-foreach": "0.1.3", "async-foreach": "0.1.3",
@ -11401,7 +11401,7 @@
"npmlog": { "npmlog": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=",
"dev": true, "dev": true,
"requires": { "requires": {
"are-we-there-yet": "1.1.4", "are-we-there-yet": "1.1.4",
@ -14654,7 +14654,7 @@
"useragent": { "useragent": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
"integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "integrity": "sha1-IX+UOtVAyyEoZYqyP8lg9qiMmXI=",
"dev": true, "dev": true,
"requires": { "requires": {
"lru-cache": "4.1.1", "lru-cache": "4.1.1",
@ -15164,7 +15164,7 @@
"wide-align": { "wide-align": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz",
"integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=",
"dev": true, "dev": true,
"requires": { "requires": {
"string-width": "1.0.2" "string-width": "1.0.2"

View File

@ -1,27 +0,0 @@
@echo off
set nginxDir=%~dp0
set nginxTemp=%nginxDir%\temp
set nginxConf=temp\nginx.conf
if "%1"=="" goto caseStart
if "%1"=="start" goto caseStart
if "%1"=="stop" goto caseStop
goto caseUsage
:caseStart
call "%0" stop
echo Starting nginx.
if not exist "%nginxTemp%" (mkdir "%nginxTemp%")
start /I nginx -c "%nginxConf%" -p "%nginxDir%"
goto caseEnd
:caseStop
echo Stoping nginx.
if exist "%nginxTemp%\nginx.pid" (nginx -c "%nginxConf%" -p "%nginxDir%" -s stop)
goto caseEnd
:caseUsage
echo "Usage: %0 [start|stop]"
:caseEnd

View File

@ -1,28 +0,0 @@
#!/bin/bash
nginxDir="$(dirname $0)"
nginxTemp="$nginxDir/temp"
nginxConf="temp/nginx.conf"
nginxBin="/usr/sbin/nginx"
if [ ! -f $nginxBin ]; then
nginxBin="nginx"
fi
case "$1" in
start|"")
$0 stop
echo "Starting nginx."
mkdir -p "$nginxTemp"
"$nginxBin" -c "$nginxConf" -p "$nginxDir"
;;
stop)
echo "Stoping nginx."
if [ -f "$nginxTemp/nginx.pid" ]; then
"$nginxBin" -c "$nginxConf" -p "$nginxDir" -s stop
fi
;;
*)
echo "Usage: `basename "$0"` [start|stop]"
exit 1
esac

View File

@ -18,8 +18,8 @@ jasmine.loadConfig({
spec_dir: 'services', spec_dir: 'services',
spec_files: [ spec_files: [
'auth/server/**/*[sS]pec.js', 'auth/server/**/*[sS]pec.js',
'loopback/common/**/*[sS]pec.js', 'client/common/**/*[sS]pec.js',
'client/common/**/*[sS]pec.js' 'loopback/common/**/*[sS]pec.js'
], ],
helpers: [ helpers: [
'/services/utils/jasmineHelpers.js' '/services/utils/jasmineHelpers.js'