-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Deprecate deploy-agent in favor of network-agent #21
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,20 @@ | |
| module DeployAgent | ||
| class CLI | ||
|
|
||
| DEPRECATION_NOTICE = <<~MSG | ||
| \e[33m╔══════════════════════════════════════════════════════════════════╗ | ||
| ║ DEPRECATED: deploy-agent will not receive further updates. ║ | ||
| ║ Please migrate to the new agent: ║ | ||
| ║ ║ | ||
| ║ https://github.com/deployhq/network-agent ║ | ||
| ║ ║ | ||
| ║ Fewer dependencies, easier to install. ║ | ||
| ╚══════════════════════════════════════════════════════════════════╝\e[0m | ||
| MSG | ||
|
|
||
| def dispatch(arguments) | ||
| warn DEPRECATION_NOTICE | ||
|
|
||
|
Comment on lines
+19
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update CLI specs for the new unconditional stderr emission. Line 19 now writes to stderr on every command path, but Suggested spec adjustment (outside this file) describe '#dispatch' do
it 'responds to version command' do
- expect { cli.dispatch(['version']) }.to output(/\d+\.\d+\.\d+/).to_stdout
+ expect { cli.dispatch(['version']) }
+ .to output(/\d+\.\d+\.\d+/).to_stdout
+ .and output(/DEPRECATED: deploy-agent/).to_stderr
end
it 'shows usage for invalid command' do
- expect { cli.dispatch(['invalid']) }.to output(/Usage: deploy-agent/).to_stdout
+ expect { cli.dispatch(['invalid']) }
+ .to output(/Usage: deploy-agent/).to_stdout
+ .and output(/DEPRECATED: deploy-agent/).to_stderr
end
it 'shows usage when no arguments provided' do
- expect { cli.dispatch([]) }.to output(/Usage: deploy-agent/).to_stdout
+ expect { cli.dispatch([]) }
+ .to output(/Usage: deploy-agent/).to_stdout
+ .and output(/DEPRECATED: deploy-agent/).to_stderr
end
end🤖 Prompt for AI Agents |
||
| methods = self.public_methods(false).delete_if { |n| n == :dispatch }.sort | ||
|
|
||
| @options = {} | ||
|
|
||
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.
Add frozen string literal pragma for the new heredoc constant.
This file still misses
# frozen_string_literal: true; with this new constant, that remains out of compliance with repo Ruby rules.Suggested fix
As per coding guidelines,
**/*.rb: Enable frozen string literals in Ruby files.🤖 Prompt for AI Agents