Skip to content

Commit

Permalink
Merge 58cc3ed into 4fbf3aa
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeper[bot] committed Jan 29, 2018
2 parents 4fbf3aa + 58cc3ed commit ac9fb1d
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 68 deletions.
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ try {

const Robot = require('uptime-robot')

/**
* HueStatus Module
* @extends BaseModule
*/
class HueTimeRobot extends BaseModule {
/**
* Generate instance name based on project and organisation
Expand Down Expand Up @@ -84,7 +88,7 @@ class HueTimeRobot extends BaseModule {
* @return {Promise}
*/
async _ok () {
await this.change('ok', `${this.config.uptimeRobotApiKey[0] === 'm' ? 'Monitor' : 'All monitors'} up`)
return this.change('ok', `${this.config.uptimeRobotApiKey[0] === 'm' ? 'Monitor' : 'All monitors'} up`)
}

/**
Expand All @@ -94,7 +98,7 @@ class HueTimeRobot extends BaseModule {
*/
async _alert (monitorNames) {
monitorNames = monitorNames.join(', ')
await this.change('alert', `${monitorNames} monitor(s) down`)
return this.change('alert', `${monitorNames} monitor(s) down`)
}

/**
Expand All @@ -104,15 +108,15 @@ class HueTimeRobot extends BaseModule {
*/
async _working (monitorNames) {
monitorNames = monitorNames.join(', ')
await this.change('working', `${monitorNames} monitor(s) not checked yet`)
return this.change('working', `${monitorNames} monitor(s) not checked yet`)
}

/**
* Set the status to warning if no monitors are found
* @return {Promise}
*/
async _warning () {
await this.change('warning', 'No monitor(s) found')
return this.change('warning', 'No monitor(s) found')
}
}

Expand Down
132 changes: 69 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"uptime-robot": "^1.3.0"
},
"devDependencies": {
"apc-style": "^0.4.3",
"apc-style": "^1.0.1",
"apc-test": "^1.0.0"
},
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"env": {
"mocha": true
},
"rules": {
"require-jsdoc": 0
}
}

0 comments on commit ac9fb1d

Please sign in to comment.