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