Skip to content

Commit

Permalink
feat(wordnik): check for API key
Browse files Browse the repository at this point in the history
throw error if not found
  • Loading branch information
drawnepicenter committed Aug 26, 2016
1 parent c02989d commit bbf9dab
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/define.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/hyphen.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/phrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/pronounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions build/cmds/wordnik_cmds/relate.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ exports.builder = {
}
};
exports.handler = function (argv) {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.');
tools.checkConfig(CFILE);
var config = noon.load(CFILE);
var proceed = false;
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/define.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/hyphen.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/phrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/pronounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down
1 change: 1 addition & 0 deletions src/cmds/wordnik_cmds/relate.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ exports.builder = {
},
}
exports.handler = (argv) => {
if (process.env.WORDNIK === undefined) throw new Error('Put an API key in environment variable WORDNIK per documentation.')
tools.checkConfig(CFILE)
let config = noon.load(CFILE)
let proceed = false
Expand Down

0 comments on commit bbf9dab

Please sign in to comment.