mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
make naming consistent
This commit is contained in:
parent
ff41f5c425
commit
fd0ac35226
@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
const eventType = require('../eventType');
|
||||
const eventType = require('../event-type');
|
||||
const logger = require('../logger');
|
||||
const NotFoundError = require('../error/NotFoundError');
|
||||
const NotFoundError = require('../error/notfound-error');
|
||||
const FEATURE_COLUMNS = ['name', 'description', 'enabled', 'strategies'];
|
||||
|
||||
module.exports = function (db, eventStore) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
const eventType = require('../eventType');
|
||||
const eventType = require('../event-type');
|
||||
const logger = require('../logger');
|
||||
const NotFoundError = require('../error/NotFoundError');
|
||||
const NotFoundError = require('../error/notfound-error');
|
||||
const STRATEGY_COLUMNS = ['name', 'description', 'parameters_template'];
|
||||
|
||||
module.exports = function (db, eventStore) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
const ValidationError = require('./ValidationError');
|
||||
const ValidationError = require('./validation-error');
|
||||
|
||||
function validateRequest (req) {
|
||||
return new BPromise((resolve, reject) => {
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const eventType = require('./eventType');
|
||||
const eventType = require('./event-type');
|
||||
const diff = require('deep-diff').diff;
|
||||
|
||||
const strategyTypes = [
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const eventDiffer = require('../eventDiffer');
|
||||
const eventDiffer = require('../event-differ');
|
||||
const version = 1;
|
||||
|
||||
module.exports = function (app, config) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
const logger = require('../logger');
|
||||
const eventType = require('../eventType');
|
||||
const ValidationError = require('../error/ValidationError');
|
||||
const validateRequest = require('../error/validateRequest');
|
||||
const eventType = require('../event-type');
|
||||
const ValidationError = require('../error/validation-error');
|
||||
const validateRequest = require('../error/validate-request');
|
||||
|
||||
module.exports = function (app, config) {
|
||||
const featureDb = config.featureDb;
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
const logger = require('../logger');
|
||||
const eventType = require('../eventType');
|
||||
const NameExistsError = require('../error/NameExistsError');
|
||||
const NotFoundError = require('../error/NotFoundError');
|
||||
const ValidationError = require('../error/ValidationError');
|
||||
const validateRequest = require('../error/validateRequest');
|
||||
const extractUser = require('../extractUser');
|
||||
const eventType = require('../event-type');
|
||||
const NameExistsError = require('../error/name-exists-error');
|
||||
const NotFoundError = require('../error/notfound-error');
|
||||
const ValidationError = require('../error/validation-error.js');
|
||||
const validateRequest = require('../error/validate-request');
|
||||
const extractUser = require('../extract-user');
|
||||
|
||||
const legacyFeatureMapper = require('../helper/legacy-feature-mapper');
|
||||
const version = 1;
|
||||
|
@ -1,13 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
const eventType = require('../eventType');
|
||||
const eventType = require('../event-type');
|
||||
const logger = require('../logger');
|
||||
const NameExistsError = require('../error/NameExistsError');
|
||||
const ValidationError = require('../error/ValidationError');
|
||||
const NotFoundError = require('../error/NotFoundError');
|
||||
const validateRequest = require('../error/validateRequest');
|
||||
const extractUser = require('../extractUser');
|
||||
const NameExistsError = require('../error/name-exists-error');
|
||||
const ValidationError = require('../error/validation-error.js');
|
||||
const NotFoundError = require('../error/notfound-error');
|
||||
const validateRequest = require('../error/validate-request');
|
||||
const extractUser = require('../extract-user');
|
||||
const version = 1;
|
||||
|
||||
module.exports = function (app, config) {
|
||||
|
@ -10,11 +10,11 @@ const DEFAULT_OPTIONS = {
|
||||
};
|
||||
|
||||
function createApp (options) {
|
||||
const db = require('./lib/db/dbPool')(options.databaseUri);
|
||||
const db = require('./lib/db/db-pool')(options.databaseUri);
|
||||
|
||||
// Database dependecies (statefull)
|
||||
const eventDb = require('./lib/db/event')(db);
|
||||
const EventStore = require('./lib/eventStore');
|
||||
const EventStore = require('./lib/event-store');
|
||||
const eventStore = new EventStore(eventDb);
|
||||
const featureDb = require('./lib/db/feature')(db, eventStore);
|
||||
const strategyDb = require('./lib/db/strategy')(db, eventStore);
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const request = require('./specHelper').request;
|
||||
const request = require('./test-helper').request;
|
||||
|
||||
describe('The event api', () => {
|
||||
it('returns events', done => {
|
@ -2,7 +2,7 @@
|
||||
|
||||
const logger = require('../../lib/logger');
|
||||
const assert = require('assert');
|
||||
const specHelper = require('./specHelper');
|
||||
const specHelper = require('./test-helper');
|
||||
const request = specHelper.request;
|
||||
const stringify = function (o) {
|
||||
return JSON.stringify(o, null, ' ');
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const assert = require('assert');
|
||||
const specHelper = require('./specHelper');
|
||||
const specHelper = require('./test-helper');
|
||||
const request = specHelper.request;
|
||||
const stringify = function (o) {
|
||||
return JSON.stringify(o, null, ' ');
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const specHelper = require('./specHelper');
|
||||
const specHelper = require('./test-helper');
|
||||
const request = specHelper.request;
|
||||
|
||||
describe('The routes', () => {
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const specHelper = require('./specHelper');
|
||||
const specHelper = require('./test-helper');
|
||||
const request = specHelper.request;
|
||||
|
||||
describe('The strategy api', () => {
|
@ -4,10 +4,10 @@ process.env.NODE_ENV = 'test';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
let request = require('supertest');
|
||||
const databaseUri = require('./databaseConfig').getDatabaseUri();
|
||||
const knex = require('../../lib/db/dbPool')(databaseUri);
|
||||
const databaseUri = require('./database-config').getDatabaseUri();
|
||||
const knex = require('../../lib/db/db-pool')(databaseUri);
|
||||
const eventDb = require('../../lib/db/event')(knex);
|
||||
const EventStore = require('../../lib/eventStore');
|
||||
const EventStore = require('../../lib/event-store');
|
||||
const eventStore = new EventStore(eventDb);
|
||||
const featureDb = require('../../lib/db/feature')(knex, eventStore);
|
||||
const strategyDb = require('../../lib/db/strategy')(knex, eventStore);
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const eventDiffer = require('../../lib/eventDiffer');
|
||||
const eventType = require('../../lib/eventType');
|
||||
const eventDiffer = require('../../lib/event-differ');
|
||||
const eventType = require('../../lib/event-type');
|
||||
const assert = require('assert');
|
||||
|
||||
describe('eventDiffer', () => {
|
Loading…
Reference in New Issue
Block a user