From bb2b005113602067195180769bd412744f2e9754 Mon Sep 17 00:00:00 2001 From: Michal Cichra Date: Tue, 29 Dec 2015 17:03:51 +0100 Subject: [PATCH] `SSHKit::Backend::Printer#test` now always returns true which makes --dry-run pass the `deploy:check:linked_files` --- CHANGELOG.md | 2 ++ lib/sshkit/backends/printer.rb | 5 +++++ test/unit/backends/test_printer.rb | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84487ee7..0e96cddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ appear at the top. @steved * `SSHKit::Formatter::Abstract` now accepts an optional Hash of options [PR #308](https://github.com/capistrano/sshkit/pull/308) @mattbrictson + * `SSHKit::Backend::Printer#test` now always returns true + [PR #312](https://github.com/capistrano/sshkit/pull/312) @mikz ## 1.8.1 diff --git a/lib/sshkit/backends/printer.rb b/lib/sshkit/backends/printer.rb index d9c5277d..483a9597 100644 --- a/lib/sshkit/backends/printer.rb +++ b/lib/sshkit/backends/printer.rb @@ -10,6 +10,11 @@ def execute_command(cmd) alias :upload! :execute alias :download! :execute + + def test(*) + super + true + end end end end diff --git a/test/unit/backends/test_printer.rb b/test/unit/backends/test_printer.rb index 9f6d86de..99756eb6 100644 --- a/test/unit/backends/test_printer.rb +++ b/test/unit/backends/test_printer.rb @@ -28,7 +28,7 @@ def test_execute end def test_test_method - printer.test '[ -d /some/file ]' + assert printer.test('[ -d /some/file ]'), 'test should return true' assert_output_lines( ' DEBUG [aaaaaa] Running [ -d /some/file ] on example.com',