Skip to content

Commit

Permalink
Removed git-rev due to unclear benefit. Removed unused dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
sulkaharo committed Feb 7, 2018
1 parent 93968f3 commit 8742078
Show file tree
Hide file tree
Showing 7 changed files with 749 additions and 1,624 deletions.
11 changes: 0 additions & 11 deletions env.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,6 @@ function setAPISecret() {

function setVersion() {
var software = require('./package.json');
var git = require('git-rev');

if (readENV('APPSETTING_ScmType') === readENV('ScmType') && readENV('ScmType') === 'GitHub') {
env.head = require('./scm-commit-id.json');
console.log('SCM COMMIT ID', env.head);
} else {
git.short(function record_git_head(head) {
console.log('GIT HEAD', head);
env.head = head || readENV('SCM_COMMIT_ID') || readENV('COMMIT_HASH', '');
});
}
env.version = software.version;
env.name = software.name;
}
Expand Down
6 changes: 1 addition & 5 deletions lib/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ function create (env, ctx) {
// set up express app with our options
app.set('name', env.name);
app.set('version', env.version);
// app.set('head', env.head);
function get_head ( ) {
return env.head;
}
wares.get_head = get_head;

app.set('units', env.DISPLAY_UNITS);
// Only allow access to the API if API_SECRET is set on the server.
app.disable('api');
Expand Down
1 change: 0 additions & 1 deletion lib/api/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function configure (app, wares, env, ctx) {
, apiEnabled: app.enabled('api')
, careportalEnabled: app.enabled('api') && env.settings.enable.indexOf('careportal') > -1
, boluscalcEnabled: app.enabled('api') && env.settings.enable.indexOf('boluscalc') > -1
, head: wares.get_head( )
, settings: env.settings
, extendedSettings: app.extendedClientSettings
, authorized: ctx.authorization.authorize(req.query.token || '')
Expand Down
4 changes: 1 addition & 3 deletions lib/data/dataloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ function init(env, ctx) {
var dataloader = { };

dataloader.update = function update(ddata, opts, done) {

console.log("Database is connected: " + ctx.store.client.isConnected());


if (opts && done == null && opts.call) {
done = opts;
opts = { lastUpdated: Date.now( ), frame: false };
Expand Down
1 change: 0 additions & 1 deletion lib/server/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function init (env, ctx, server) {
, apiEnabled: apiEnabled
, careportalEnabled: apiEnabled && env.settings.enable.indexOf('careportal') > -1
, boluscalcEnabled: apiEnabled && env.settings.enable.indexOf('boluscalc') > -1
, head: env.head
, settings: env.settings
, extendedSettings: ctx.plugins && ctx.plugins.extendedClientSettings ? ctx.plugins.extendedClientSettings(env.extendedSettings) : {}
};
Expand Down
Loading

3 comments on commit 8742078

@f87m19
Copy link

@f87m19 f87m19 commented on 8742078 Feb 9, 2018

Choose a reason for hiding this comment

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

This is problematic.. 'forever' is needed!

@kretep
Copy link

@kretep kretep commented on 8742078 Feb 13, 2018

Choose a reason for hiding this comment

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

I tried to deploy this branch to Heroku, but it errored out because 'forever' was not found

@philipgo
Copy link
Contributor

Choose a reason for hiding this comment

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

I just deployed dev and wip/activitydata, both crash with error messages related to forever

Please sign in to comment.