2 Commits

Author SHA1 Message Date
742bf694e4 1.1.3 2016-06-26 04:07:37 +02:00
38165f11db some updates 2016-06-26 04:07:03 +02:00
8 changed files with 19 additions and 5 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ docs/
ts/typings/ ts/typings/
ts/*.js ts/*.js
ts/*.js.map ts/*.js.map
test/temp/

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM hosttoday/ht-docker-node:npmts
COPY ./ /node-app
WORKDIR /node-app
RUN npm install
RUN npmts

View File

@ -18,5 +18,5 @@ export declare class SshKey {
authorized: boolean; authorized: boolean;
type: any; type: any;
read(filePathArg: any): void; read(filePathArg: any): void;
store(dirPathArg?: string): void; store(dirPathArg: string): void;
} }

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "smartssh", "name": "smartssh",
"version": "1.1.2", "version": "1.1.3",
"description": "setups SSH quickly and in a painless manner", "description": "setups SSH quickly and in a painless manner",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
import "typings-test" import "typings-test"
import "should"; import "should";
import smartssh = require("../dist/index"); import smartssh = require("../dist/index");
import path = require("path");
describe("smartssh",function(){ describe("smartssh",function(){
let testSshInstance:smartssh.SshInstance; let testSshInstance:smartssh.SshInstance;
let testSshKey:smartssh.SshKey; let testSshKey:smartssh.SshKey;
@ -24,6 +25,9 @@ describe("smartssh",function(){
}); });
it(".publicKeyBase64 should be public key base 64 encoded",function(){ it(".publicKeyBase64 should be public key base 64 encoded",function(){
testSshKey.pubKeyBase64; testSshKey.pubKeyBase64;
});
it(".store() should store the file to disk",function(){
testSshKey.store(path.join(process.cwd(),"test/temp"));
}) })
}); });
describe(".SshInstance",function(){ describe(".SshInstance",function(){

View File

@ -77,7 +77,7 @@ export class SshKey {
read(filePathArg){ read(filePathArg){
} }
store(dirPathArg?:string){ store(dirPathArg:string){
plugins.fs.ensureDirSync(dirPathArg); plugins.fs.ensureDirSync(dirPathArg);
let fileNameBase = this.host; let fileNameBase = this.host;
if(this._privKey){ if(this._privKey){