Skip to content
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

Merged
merged 6 commits into from
Jan 5, 2024
Merged

Conversation

JasonPoll
Copy link
Contributor

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.

@@ -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.
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@mattbrictson mattbrictson added the 📚 Docs Improves documentation label Dec 30, 2023
Copy link
Member

@mattbrictson mattbrictson left a 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

EXAMPLES.md Outdated Show resolved Hide resolved
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@mattbrictson mattbrictson enabled auto-merge (squash) January 4, 2024 01:43
@mattbrictson mattbrictson merged commit fe6ac24 into capistrano:master Jan 5, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 Docs Improves documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants