Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
runat-1128988: Rename api.js to system.js
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Walker <[email protected]>
  • Loading branch information
joewalker committed Feb 5, 2015
1 parent 2f57fa9 commit 9c82b30
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gcli.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

exports.gcliHome = __dirname;

var system = require('./lib/gcli/api').createSystem();
var system = require('./lib/gcli/system').createSystem();

/*
* GCLI is built from a number of components (called items) composed as
Expand Down
2 changes: 1 addition & 1 deletion lib/gcli/connectors/direct.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict';

var createSystem = require('../api').createSystem;
var createSystem = require('../system').createSystem;
var Commands = require('../commands/commands').Commands;
var Types = require('../types/types').Types;
var Requisition = require('../cli').Requisition;
Expand Down
2 changes: 1 addition & 1 deletion lib/gcli/connectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict';

var createSystem = require('../api').createSystem;
var createSystem = require('../system').createSystem;
var Commands = require('../commands/commands').Commands;
var Types = require('../types/types').Types;

Expand Down
2 changes: 1 addition & 1 deletion lib/gcli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict';

var createSystem = require('./api').createSystem;
var createSystem = require('./system').createSystem;
var Terminal = require('./ui/terminal').Terminal;

// Patch-up old browsers
Expand Down
18 changes: 9 additions & 9 deletions lib/gcli/api.js → lib/gcli/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ exports.createSystem = function(options) {

var pendingChanges = false;

var api = {
var system = {
addItems: function(items) {
items.forEach(addItem);
},
Expand Down Expand Up @@ -177,40 +177,40 @@ exports.createSystem = function(options) {
}
};

Object.defineProperty(api, 'commands', {
Object.defineProperty(system, 'commands', {
get: function() { return components.command; },
enumerable: true
});

Object.defineProperty(api, 'connectors', {
Object.defineProperty(system, 'connectors', {
get: function() { return components.connector; },
enumerable: true
});

Object.defineProperty(api, 'converters', {
Object.defineProperty(system, 'converters', {
get: function() { return components.converter; },
enumerable: true
});

Object.defineProperty(api, 'fields', {
Object.defineProperty(system, 'fields', {
get: function() { return components.field; },
enumerable: true
});

Object.defineProperty(api, 'languages', {
Object.defineProperty(system, 'languages', {
get: function() { return components.language; },
enumerable: true
});

Object.defineProperty(api, 'settings', {
Object.defineProperty(system, 'settings', {
get: function() { return components.setting; },
enumerable: true
});

Object.defineProperty(api, 'types', {
Object.defineProperty(system, 'types', {
get: function() { return components.type; },
enumerable: true
});

return api;
return system;
};

1 comment on commit 9c82b30

@bgrins
Copy link

@bgrins bgrins commented on 9c82b30 Feb 24, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.