Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions lib/sshkit/backends/printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def execute_command(cmd)

alias :upload! :execute
alias :download! :execute

def test(*)
super
true
end
end
end
end
2 changes: 1 addition & 1 deletion test/unit/backends/test_printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down