Add tootctl email-domain-blocks (#13589)
* Add tootctl email_domains (block|unblock) * fix codeclimate issues. * fix codeclimate issues. * fix codeclimate issues. * add list subcommand, remove log_action. * fix codeclimate issues. * filter duplicate hostnames,ips before block * rebase from currnet master branch. rename email_domains_cli.rb to email_domain_blocks_cli.rb . rename Mastodon::EmailDomainsCLI to Mastodon::EmailDomainBlocksCLI . rename command email_domains to email-domain-blocks . (Thor recognizes both of - and _ ) rename subcommand block to add . rename subcommand unblock to remove . change the color in list subcommand to while for domain or cyan for childlen. don't use include() in list subcommand. suppress console output about succeeded entry. add console output about count of processed/skipped. remove capitalization in subcommand description. remove long_desc in subcommand 'remove'. remove duplicate where in subcommand 'remove'. * fix codeclimate issue.
This commit is contained in:
parent
62ef6406cd
commit
370e38ee15
2 changed files with 137 additions and 0 deletions
|
@ -12,6 +12,7 @@ require_relative 'mastodon/domains_cli'
|
|||
require_relative 'mastodon/preview_cards_cli'
|
||||
require_relative 'mastodon/cache_cli'
|
||||
require_relative 'mastodon/upgrade_cli'
|
||||
require_relative 'mastodon/email_domain_blocks_cli'
|
||||
require_relative 'mastodon/version'
|
||||
|
||||
module Mastodon
|
||||
|
@ -53,6 +54,9 @@ module Mastodon
|
|||
desc 'upgrade SUBCOMMAND ...ARGS', 'Various version upgrade utilities'
|
||||
subcommand 'upgrade', Mastodon::UpgradeCLI
|
||||
|
||||
desc 'email-domain-blocks SUBCOMMAND ...ARGS', 'Manage E-mail domain blocks'
|
||||
subcommand 'email_domain_blocks', Mastodon::EmailDomainBlocksCLI
|
||||
|
||||
option :dry_run, type: :boolean
|
||||
desc 'self-destruct', 'Erase the server from the federation'
|
||||
long_desc <<~LONG_DESC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue