Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
5ff996a4c7
|
@ -19,3 +19,4 @@ rules:
|
|||
no-eq-null: 0
|
||||
no-console: 0
|
||||
no-warning-comments: 0
|
||||
no-empty: 0
|
||||
|
|
|
@ -5,14 +5,16 @@ describe('Client', () => {
|
|||
let $componentController;
|
||||
let $state;
|
||||
let controller;
|
||||
let $httpBackend;
|
||||
|
||||
beforeEach(() => {
|
||||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
|
||||
$componentController = _$componentController_;
|
||||
$state = _$state_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
$state.params.addressId = '1234';
|
||||
controller = $componentController('vnAddressEdit', {$state: $state});
|
||||
}));
|
||||
|
@ -20,5 +22,16 @@ describe('Client', () => {
|
|||
it('should define and set address property', () => {
|
||||
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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -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'}));
|
||||
// });
|
||||
// });
|
||||
});
|
||||
});
|
|
@ -121,7 +121,6 @@ describe('Component vnAutocomplete', () => {
|
|||
|
||||
it(`should perform a query if the item id isn't present in the controller.items property`, () => {
|
||||
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}}`);
|
||||
controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}];
|
||||
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`, () => {
|
||||
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}}`);
|
||||
controller.items = [{id: 1, name: 'test1'}, {id: 2, name: 'Bruce Wayne'}];
|
||||
controller.field = 3;
|
||||
|
|
|
@ -259,19 +259,22 @@ describe('Component vnDropDown', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// describe('setScrollPosition()', () => {
|
||||
// it(`should call child.scrollIntoView if defined `, () => {
|
||||
// $element[0].firstChild.setAttribute('class', 'dropdown');
|
||||
// let child = $element[0].firstChild.firstChild;
|
||||
describe('setScrollPosition()', () => {
|
||||
it(`should call child.scrollIntoView if defined `, () => {
|
||||
$element[0].firstChild.setAttribute('class', 'dropdown');
|
||||
$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 = () => {};
|
||||
// spyOn(child, 'scrollIntoView');
|
||||
// controller._activeOption = 0;
|
||||
// controller.setScrollPosition();
|
||||
|
||||
// expect(child.scrollIntoView).toHaveBeenCalledWith();
|
||||
// });
|
||||
// });
|
||||
expect(child.scrollIntoView).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
describe('selectItem()', () => {
|
||||
it(`should pass item to selected and set controller._show to false`, () => {
|
||||
|
|
|
@ -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'});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -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});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -8,7 +8,7 @@ export default class ProductionIndex {
|
|||
this.$http = $http;
|
||||
this.filter = {};
|
||||
this.tickets = [];
|
||||
|
||||
|
||||
this.checkAll = 0;
|
||||
this.footer = {
|
||||
total: null,
|
||||
|
@ -35,58 +35,53 @@ export default class ProductionIndex {
|
|||
}
|
||||
|
||||
// Actions Callbacks
|
||||
_changeState(ids, sateteId, stateName, index) {
|
||||
this.$http.put(`/production/api/TicketStates/${sateteId}/changeState`, {tickets: ids}).then(
|
||||
() => {
|
||||
index.forEach(
|
||||
val => {
|
||||
this.tickets[val].state = stateName;
|
||||
this.tickets[val].stateFk = sateteId;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
_changeState(ids, stateId, stateName, index) {
|
||||
this.$http.put(`/production/api/TicketStates/${stateId}/changeState`, {tickets: ids}).then(() => {
|
||||
index.forEach(val => {
|
||||
this.tickets[val].state = stateName;
|
||||
this.tickets[val].stateFk = stateId;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
_sendMessage(tickets) {
|
||||
this.$http.post(`/production/api/FakeProductions/messageSend`, {tickets: tickets}).then(
|
||||
() => {
|
||||
this.vnApp.showMessage(this.$translate.instant('Success: message send!'));
|
||||
}
|
||||
);
|
||||
this.$http.post(`/production/api/FakeProductions/messageSend`, {tickets: tickets}).then(() => {
|
||||
this.vnApp.showMessage(this.$translate.instant('Success: message send!'));
|
||||
});
|
||||
}
|
||||
|
||||
_changeTime(ids, time, index) {
|
||||
this.$http.put(`/production/api/Tickets/${time}/changeTime`, {tickets: ids}).then(
|
||||
() => {
|
||||
index.forEach(
|
||||
val => {
|
||||
this.tickets[val].hour = time;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
this.$http.put(`/production/api/Tickets/${time}/changeTime`, {tickets: ids}).then(() => {
|
||||
index.forEach(val => {
|
||||
this.tickets[val].hour = time;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
searchTickets(filter) {
|
||||
this.$.index.filter.filter = Object.assign({}, this.filter, filter || {});
|
||||
this.checkAll = 0;
|
||||
this.$.index.accept().then(
|
||||
json => {
|
||||
this.tickets = json.tickets;
|
||||
this.footer.lines = json.lines;
|
||||
this.footer.meters = json.m3;
|
||||
this.footer.total = json.total;
|
||||
}
|
||||
);
|
||||
this.$.index.accept().then(json => {
|
||||
this.tickets = json.tickets;
|
||||
this.footer.lines = json.lines;
|
||||
this.footer.meters = json.m3;
|
||||
this.footer.total = json.total;
|
||||
});
|
||||
}
|
||||
|
||||
refreshTickets() {
|
||||
this.filter = {};
|
||||
this.filter.warehouseFk = this.$.displayValue = this.userProfile.warehouseId;
|
||||
}
|
||||
|
||||
onChangeWareHouse(warehouse) {
|
||||
if (warehouse && warehouse != this.filter.warehouseFk) {
|
||||
this.filter.warehouseFk = warehouse;
|
||||
this.searchTickets(this.filter);
|
||||
}
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
for (let i = 1; i <= 24; i++) {
|
||||
let hour = [i].join('');
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
50
gulpfile.js
50
gulpfile.js
|
@ -98,6 +98,9 @@ gulp.task('install', () => {
|
|||
}));
|
||||
});
|
||||
|
||||
// Gulp install alias
|
||||
gulp.task('i', ['install']);
|
||||
|
||||
// Deployment
|
||||
|
||||
gulp.task('build', ['clean'], () => {
|
||||
|
@ -137,15 +140,50 @@ gulp.task('docker-compose', async () => {
|
|||
|
||||
// Nginx & services
|
||||
|
||||
gulp.task('nginx', ['nginx-conf'], callback => {
|
||||
let command = isWindows ? 'start.cmd' : 'start.sh';
|
||||
command = path.join(`${nginxDir}/${command}`);
|
||||
exec(command, (err, stdout, stderr) => {
|
||||
// if (stderr) console.log(stderr);
|
||||
callback(err);
|
||||
let nginxConf = 'temp/nginx.conf';
|
||||
let nginxTemp = `${nginxDir}/temp`;
|
||||
|
||||
async function nginxGetBin() {
|
||||
if (isWindows)
|
||||
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 () => {
|
||||
const mustache = require('mustache');
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
"angular": {
|
||||
"version": "1.6.8",
|
||||
"resolved": "https://registry.npmjs.org/angular/-/angular-1.6.8.tgz",
|
||||
"integrity": "sha512-9WErZIOw1Cu1V5Yxdvxz/6YpND8ntdP71fdPpufPFJvZodZXqCjQBYrHqEoMZreO5i84O3D/Jw/vepoFt68Azw=="
|
||||
"integrity": "sha1-W+N4pYvpGlSJ54tZxFGM2f0nP/s="
|
||||
},
|
||||
"angular-cookies": {
|
||||
"version": "1.6.4",
|
||||
|
@ -244,7 +244,7 @@
|
|||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=",
|
||||
"dev": true
|
||||
},
|
||||
"archy": {
|
||||
|
@ -1119,7 +1119,7 @@
|
|||
"bluebird": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
|
||||
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==",
|
||||
"integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=",
|
||||
"dev": true
|
||||
},
|
||||
"bn.js": {
|
||||
|
@ -5328,7 +5328,7 @@
|
|||
"fsevents": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
|
||||
"integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
|
||||
"integrity": "sha1-EfgjGPX+e7LNIpZaEI6TBiCCFtg=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -9909,7 +9909,7 @@
|
|||
"jasmine-spec-reporter": {
|
||||
"version": "4.2.1",
|
||||
"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,
|
||||
"requires": {
|
||||
"colors": "1.1.2"
|
||||
|
@ -10051,7 +10051,7 @@
|
|||
"karma": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz",
|
||||
"integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==",
|
||||
"integrity": "sha1-hcwI6eCiLXzpzKN8ShvoJPaisa4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "3.5.1",
|
||||
|
@ -10103,7 +10103,7 @@
|
|||
"karma-chrome-launcher": {
|
||||
"version": "2.2.0",
|
||||
"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,
|
||||
"requires": {
|
||||
"fs-access": "1.0.1",
|
||||
|
@ -10113,7 +10113,7 @@
|
|||
"karma-firefox-launcher": {
|
||||
"version": "1.1.0",
|
||||
"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
|
||||
},
|
||||
"karma-jasmine": {
|
||||
|
@ -10134,7 +10134,7 @@
|
|||
"karma-webpack": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.9.tgz",
|
||||
"integrity": "sha512-F1j3IG/XhiMzcunAXbWXH95uizjzr3WdTzmVWlta8xqxcCtAu9FByCb4sccIMxaVFAefpgnUW9KlCo0oLvIX6A==",
|
||||
"integrity": "sha1-YciAkffdkQY1E0wDKyZqRlr/tX8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "0.9.2",
|
||||
|
@ -11183,7 +11183,7 @@
|
|||
"node-sass": {
|
||||
"version": "4.7.2",
|
||||
"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,
|
||||
"requires": {
|
||||
"async-foreach": "0.1.3",
|
||||
|
@ -11401,7 +11401,7 @@
|
|||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"are-we-there-yet": "1.1.4",
|
||||
|
@ -14654,7 +14654,7 @@
|
|||
"useragent": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
|
||||
"integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==",
|
||||
"integrity": "sha1-IX+UOtVAyyEoZYqyP8lg9qiMmXI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "4.1.1",
|
||||
|
@ -15164,7 +15164,7 @@
|
|||
"wide-align": {
|
||||
"version": "1.1.2",
|
||||
"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,
|
||||
"requires": {
|
||||
"string-width": "1.0.2"
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -18,8 +18,8 @@ jasmine.loadConfig({
|
|||
spec_dir: 'services',
|
||||
spec_files: [
|
||||
'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: [
|
||||
'/services/utils/jasmineHelpers.js'
|
||||
|
|
Loading…
Reference in New Issue