lib/magellan/cli/command.rb in magellan-cli-0.1.0 vs lib/magellan/cli/command.rb in magellan-cli-0.2.0
- old
+ new
@@ -4,16 +4,19 @@
require 'active_support/core_ext/string/inflections'
module Magellan
module Cli
class Command < Base
+ include Magellan::Cli::FileAccess
{
+ "organization" => "Organization",
+ "team" => "Team",
"project" => "Project",
"stage" => "Stage",
"client_version" => "ClientVersion",
- "function_unit" => "FunctionUnit",
+ "tr" => "TransactionRouter",
"worker" => "WorkerVersion",
"instance" => "HostInstance",
"image" => "ContainerImage",
"container" => "ContainerInstance",
}.each do |name, classname|
@@ -22,8 +25,17 @@
end
desc "direct SUBCOMMAND ...ARGS", "send request directly"
subcommand "direct", ::Magellan::Cli::Direct
+ desc "login", "login to a Magellan API server"
+ def login
+ print "email: "
+ email = STDIN.gets.chomp
+ print "password: "
+ password = STDIN.noecho(&:gets).chomp
+ puts ""
+ update_selections("login" => {"email" => email, "password" => password})
+ end
end
end
end