-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tim Kelty
committed
Jan 29, 2015
0 parents
commit 69323c8
Showing
8 changed files
with
103 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,12 @@ | ||
{ | ||
"node": true, | ||
"undef": true, | ||
"unused": true, | ||
"predef": ["-Promise"], | ||
"latedef": "nofunc", | ||
"globals": { | ||
"module": false, | ||
"require": false, | ||
"define": false | ||
} | ||
} |
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 @@ | ||
# shipit-ssh |
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 @@ | ||
module.exports = function (shipit) { | ||
require('./tasks/ssh')(shipit); | ||
}; |
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,6 @@ | ||
module.exports = function getShipit(gruntOrShipit) { | ||
if (gruntOrShipit.shipit) | ||
return gruntOrShipit.shipit; | ||
|
||
return gruntOrShipit; | ||
}; |
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 @@ | ||
var Promise = require('bluebird'); | ||
|
||
module.exports = function registerTask(gruntOrShipit, name, task) { | ||
if (gruntOrShipit.registerTask) { | ||
if (Array.isArray(task)) | ||
return gruntOrShipit.registerTask(name, task); | ||
|
||
return gruntOrShipit.registerTask(name, function () { | ||
var done = this.async(); | ||
var promise = task(); | ||
|
||
if (promise) | ||
promise.nodeify(done); | ||
else | ||
done(); | ||
}); | ||
} | ||
|
||
return gruntOrShipit.blTask(name, task); | ||
}; |
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,47 @@ | ||
{ | ||
"name": "shipit-ssh", | ||
"version": "1.0.0", | ||
"description": "Open a remote shell with a Shipit command.", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "mocha --recursive" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/timkelty/shipit-ssh.git" | ||
}, | ||
"keywords": [ | ||
"shipit", | ||
"database", | ||
"task" | ||
], | ||
"author": { | ||
"name": "Tim Kelty", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/timkelty/shipit-ssh/issues" | ||
}, | ||
"homepage": "https://github.com/timkelty/shipit-ssh", | ||
"devDependencies": { | ||
"chai": "^1.10.0", | ||
"mocha": "^2.1.0", | ||
"rewire": "^2.1.4", | ||
"shipit-cli": "^1.1.0", | ||
"sinon": "^1.12.2", | ||
"sinon-as-promised": "^2.0.3", | ||
"sinon-chai": "^2.6.0" | ||
}, | ||
"dependencies": { | ||
"bluebird": "^2.9.1", | ||
"chalk": "^0.5.1", | ||
"lodash": "^2.4.1", | ||
"path2": "^0.1.0", | ||
"sprintf-js": "^1.0.2" | ||
}, | ||
"readmeFile": "README.md" | ||
} |
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 @@ | ||
module.exports = function (grunt) { | ||
require('./ssh')(grunt); | ||
}; |
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,11 @@ | ||
/* jshint unused:false */ | ||
var registerTask = require('../../lib/register-task'); | ||
var getShipit = require('../../lib/get-shipit'); | ||
|
||
module.exports = function (gruntOrShipit) { | ||
registerTask(gruntOrShipit, 'ssh', task); | ||
|
||
function task() { | ||
var shipit = getShipit(gruntOrShipit); | ||
} | ||
}; |