23 Commits

Author SHA1 Message Date
Thibault Jouan
3cb195c9a0 Update rspec to last version 2014-09-16 21:15:25 +00:00
Thibault Jouan
db91eb06cd Forward standard error stream from remote execution 2014-07-24 17:38:13 +00:00
Thibault Jouan
336003d2d7 Close SSH session before exiting 2014-07-01 19:54:33 +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
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
f44fd56158 Simplify Remote#environment spec 2014-01-20 01:47:20 +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
892a9862fc Implement `file_write' action 2013-12-20 06:26:21 +00:00
Thibault Jouan
ef0307fbb5 Improve small details in specs:
* Fix coding standards;
* Simplify some expectations (eq instead of be matcher);
* Expect identity on block instead of calling;
* Change some before call as oneliners;
* Avoid shadowing variable names;
* Improve wording where needed.
2013-12-19 22:46:56 +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
ef96a2db82 Improve naming in Remote#execute spec 2013-08-06 20:45:42 +00:00
Thibault Jouan
883d4f2e7e Fix coding standards in remote spec 2013-08-06 20:02:27 +00:00
Thibault Jouan
580ad66bab Use new rspec metadata arguments as symbol 2013-08-06 18:34:53 +00:00
Thibault Jouan
cff122432b Refactor Net::SSH spec helpers definition and usages 2013-08-06 17:29:45 +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