Fix a few messages + better consistency in naming actions.

This commit is contained in:
Philippe Pittoli 2024-12-01 21:32:15 +01:00
parent 0397c51adb
commit d7efa01072

View File

@ -79,9 +79,9 @@ parser = OptionParser.new do |parser|
unrecognized_args_to_context_args.call parser, 2
end
parser.on "migration-script", "Adding a batch of users from old code base." do
parser.on "migration-script", "Add a batch of users from old code base." do
parser.banner = "usage: migration-script user-db.txt"
Baguette::Log.info "Adding a batch of users."
Baguette::Log.info "Add a batch of users."
Context.command = "migration-script"
opt_authd_login.call parser
opt_profile.call parser
@ -93,9 +93,9 @@ parser = OptionParser.new do |parser|
parser.on "user", "Operations on users." do
parser.banner = "Usage: user [add | mod | delete | validate | search | get | recover | register ]"
parser.on "add", "Adding a user to the DB." do
parser.on "add", "Add a user to the DB." do
parser.banner = "usage: user add login email [-P profile] [opt]"
Baguette::Log.info "Adding a user to the DB."
Baguette::Log.info "Add a user to the DB."
Context.command = "user-add"
opt_authd_login.call parser
opt_profile.call parser
@ -104,9 +104,9 @@ parser = OptionParser.new do |parser|
unrecognized_args_to_context_args.call parser, 2
end
parser.on "migrate", "Adding a user from old code base." do
parser.banner = "usage: user add login password-hash-brkn"
Baguette::Log.info "Adding a user to the DB."
parser.on "migrate", "Add a user from old code base." do
parser.banner = "usage: user migrate login password-hash-brkn"
Baguette::Log.info "Add a user to the DB from old codebase."
Context.command = "user-migrate"
opt_authd_login.call parser
opt_profile.call parser
@ -171,7 +171,7 @@ parser = OptionParser.new do |parser|
end
parser.on "search", "Search user." do
parser.banner = "Usage: user recover login [opt]"
parser.banner = "Usage: user search login [opt]"
Baguette::Log.info "Search user."
Context.command = "user-search"
opt_authd_login.call parser
@ -186,7 +186,7 @@ parser = OptionParser.new do |parser|
Context.command = "user-recovery"
# No need to be authenticated.
opt_help.call parser
# login email
# login
unrecognized_args_to_context_args.call parser, 1
end