22 Commits

Author SHA1 Message Date
Thibault Jouan
c8b685b8a3 Fix coding standards 2015-05-12 15:02:44 +00:00
Thibault Jouan
ff0287b545 Refactor Remote#execute 2014-09-27 13:12:02 +00:00
Thibault Jouan
db91eb06cd Forward standard error stream from remote execution 2014-07-24 17:38:13 +00:00
Thibault Jouan
8375890c1b Simplify Remote::Environment 2014-07-01 20:02:35 +00:00
Thibault Jouan
336003d2d7 Close SSH session before exiting 2014-07-01 19:54:33 +00:00
Thibault Jouan
9eed0a8ef8 Replace all raise ruby keyword with fail 2014-06-05 12:37:42 +00:00
Thibault Jouan
0db2d90b72 Show command when remote execution fail 2014-05-25 15:51:33 +00:00
Thibault Jouan
db3644a3e6 Write output from `sh' task action directly:
* Accept output as argument in Remote#execute;
* Modify ShellCommand so that env output is directly handled.
2014-03-05 06:06:42 +00:00
Thibault Jouan
400fa1ee3f Fix unexpected blocking in Remote::execute:
Wait for inactivity on the specific channel we open for the execution
instead of looping the global session.
2014-03-05 05:23:08 +00:00
Thibault Jouan
f45d0b5a20 Modify Remote::FS interface:
* Accept SFTP session in FS constructor;
* Modify Remote to build the session required by FS;
* Change TestEnvHelpers#build_remote in order to provided a test double
  as the remote FS.
2014-03-05 00:07:59 +00:00
Thibault Jouan
bdd09b6ea9 Regroup all require calls in lib source files 2014-02-08 01:24:34 +00:00
Thibault Jouan
4603ce777f Make Remote#hostname attribute read-only 2014-01-20 01:47:19 +00:00
Thibault Jouan
012c776880 Simplify Remote::Environment with factory method:
* Implement .new_from_string factory class method;
* Rename private method #parse_from_string as class method
  .string_to_hash;
* Remove argument kind detection logic in constructor.
2013-12-21 03:08:01 +00:00
Thibault Jouan
9422705ad4 Fix coding standards in Remote (extra parentheses) 2013-12-20 11:24:30 +00:00
Thibault Jouan
85a47df547 Use SSH user name configured for a given target:
When a user is configured for the targeted host name, use it for SSH
authentification instead of the name of current user logged in.

* Modify Remote#user_name to use configured user name.
2013-09-28 20:07:36 +00:00
Thibault Jouan
768a6755de Implement Remote#config:
Load SSH configuration for targeted host name.
2013-09-26 19:22:07 +00:00
Thibault Jouan
9985fceb63 Extract logic for current target ssh user name:
Add Remote#user_name method, with code returning which user name
will be used for SSH authentication.
2013-09-26 18:34:19 +00:00
Thibault Jouan
91f2bc3567 Implement Remote#fs 2013-09-26 00:28:40 +00:00
Thibault Jouan
b0ea7d876e Implement Remote#environment:
Build and return a Remote::Environment instance, with the output of
`env` command execution.
2013-08-20 03:03:07 +00:00
Thibault Jouan
825bdec74d Improve `sh' task action error handling:
Handle exit status code in Remote#execute.
2013-08-07 23:39:49 +00:00
Thibault Jouan
ace5bfb3fa Add basic Remote#execute implementation 2013-08-05 20:03:13 +00:00
Thibault Jouan
6e1ba269eb Implement Remote class 2013-08-05 19:58:17 +00:00