-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from apiaryio/miiila/decaf
Decaffeinate everything
- Loading branch information
Showing
29 changed files
with
868 additions
and
831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
; EditorConfig file: http://EditorConfig.org | ||
; Install the "EditorConfig" plugin into your editor to use | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
'extends': 'airbnb', | ||
'env': { | ||
'node': true, | ||
'mocha': true, | ||
}, | ||
'rules': { | ||
'no-console': 0, | ||
'import/no-amd': 0, | ||
'import/no-extraneous-dependencies': 0, | ||
'comma-dangle': ['error', { | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
functions: 'never', // This is not supported in Node without Babel transform | ||
}], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
node_modules | ||
/npm-debug.log | ||
*.DS_Store | ||
lib/ | ||
*.log | ||
!test/fixtures/config.json | ||
config.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
src | ||
scripts | ||
test | ||
cov.info | ||
README.md | ||
example.coffee | ||
config.json | ||
coffeelint.json | ||
.travis.yml | ||
example.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
# NodeJS supported versions | ||
|
||
- 5.x | ||
- 6.x (LTS) | ||
|
||
# Pager Duty Overrides Checker | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const config = require('./src/config'); | ||
const pd = require('./src/pagerduty'); | ||
|
||
const configPath = `${__dirname}/config.json`; | ||
|
||
config.setupConfig(configPath, (configErr) => { | ||
if (configErr) { console.error(configErr); } | ||
return pd.checkSchedulesIds((checkSchedulesErr, res) => { | ||
if (checkSchedulesErr) { console.error(checkSchedulesErr); } | ||
if (!res) { | ||
return console.error('Check failed'); | ||
} | ||
return pd.processSchedulesFromConfig((err, msg) => { | ||
if (err) { | ||
return console.error(err); | ||
} | ||
return console.log(msg); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const fs = require('fs'); | ||
const nconf = require('nconf'); | ||
|
||
function setupConfig(configPath, cb) { | ||
if (fs.existsSync(configPath)) { | ||
console.log('Loading config from :', configPath); | ||
// Priority order argv before ENV and file as defaults | ||
nconf.argv() | ||
.env() | ||
.file({ file: configPath }); | ||
process.env.DEBUG = nconf.get('DEBUG'); | ||
return cb(); | ||
} | ||
return cb(new Error(`Config does not exist: ${configPath}`)); | ||
} | ||
|
||
module.exports = { | ||
setupConfig, | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.