-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXAMPLES.md corrections #527
Conversation
…s() from EXAMPLES.md
@@ -148,9 +145,6 @@ end | |||
This spares one from having to figure out the correct escaping sequences for | |||
something like "echo(:cat, '...?...', '> /etc/sudoers.d/yolo')". | |||
|
|||
**Note:** The `upload!()` method doesn't honor the values of `within()`, `as()` | |||
etc, this will be improved as the library matures, but we're not there yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and the above) appeared to be inaccurate based on my testing of #524.
@@ -235,16 +230,16 @@ end | |||
|
|||
```ruby | |||
# The default format is pretty, which outputs colored text | |||
SSHKit.config.format = :pretty | |||
SSHKit.config.use_format :pretty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These appeared to have never been updated in 2cb6326.
@@ -254,7 +249,7 @@ module SSHKit | |||
module Formatter | |||
class MyFormatter < SSHKit::Formatter::Abstract | |||
def write(obj) | |||
case obj.is_a? SSHKit::Command | |||
if obj.is_a? SSHKit::Command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least with Ruby 3.2.2, this case
produced an error:
SyntaxError: unexpected `end', expecting `when'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! One small change requested; see comments
@@ -254,7 +249,7 @@ module SSHKit | |||
module Formatter | |||
class MyFormatter < SSHKit::Formatter::Abstract | |||
def write(obj) | |||
case obj.is_a? SSHKit::Command | |||
if obj.is_a? SSHKit::Command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
While reviewing and testing @mattbrictson 's #524, I found myself referencing
EXAMPLES.md
and noted some inaccuracies.Hoping it's ok to open this PR without a corresponding issue discussing this first.