-
-
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.
- Loading branch information
vdemedes
committed
Mar 30, 2015
0 parents
commit af794fb
Showing
7 changed files
with
92 additions
and
0 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 @@ | ||
node_modules |
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 @@ | ||
test.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# leeroy-jenkins | ||
|
||
Let Leeroy Jenkins make your boring developer life more fun. | ||
|
||
**Note**: This shit is for Node.js/io.js and only works on OS X (PRs are welcome). | ||
|
||
|
||
### Installation | ||
|
||
``` | ||
$ npm install leeroy-jenkins --save | ||
``` | ||
|
||
|
||
### Usage | ||
|
||
Require `leeroy-jenkins` and get happier every time when an `Error` is thrown. | ||
|
||
```javascript | ||
require('leeroy-jenkins'); | ||
|
||
throw new Error('Oh shit!'); | ||
``` | ||
|
||
|
||
### Tests | ||
|
||
``` | ||
$ npm test | ||
``` | ||
|
||
|
||
### License | ||
|
||
WTFPL. |
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,30 @@ | ||
/** | ||
* Dependencies | ||
*/ | ||
|
||
const spawn = require('child_process').spawn; | ||
|
||
|
||
/** | ||
* Expose Leeroy | ||
*/ | ||
|
||
module.exports = LeeroyJenkinsError; | ||
|
||
|
||
/** | ||
* Leeroy Jenkins himself | ||
*/ | ||
|
||
function LeeroyJenkinsError (message) { | ||
spawn('afplay', [__dirname + '/leeroy.wav']).unref(); | ||
|
||
return new _Error(message); | ||
} | ||
|
||
const _Error = Error; | ||
|
||
LeeroyJenkinsError.prototype = new _Error(); | ||
LeeroyJenkinsError.prototype.constructor = LeeroyJenkinsError; | ||
|
||
global.Error = LeeroyJenkinsError; // oh yeah |
Binary file not shown.
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,22 @@ | ||
{ | ||
"name": "leeroy-jenkins", | ||
"version": "1.0.1", | ||
"description": "Leeeeeroy Jeeeenkins", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "node ./test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/vdemedes/leeroy-jenkins.git" | ||
}, | ||
"keywords": [ | ||
"jenkins" | ||
], | ||
"author": "Vadim Demedes <[email protected]>", | ||
"license": "WTFPL", | ||
"bugs": { | ||
"url": "https://github.com/vdemedes/leeroy-jenkins/issues" | ||
}, | ||
"homepage": "https://github.com/vdemedes/leeroy-jenkins" | ||
} |
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,3 @@ | ||
require('./'); | ||
|
||
throw new Error('Oh shit!'); |