lib/shelly/cli/main.rb in shelly-0.5.0 vs lib/shelly/cli/main.rb in shelly-0.5.1
- old
+ new
@@ -281,12 +281,18 @@
rescue Client::ConflictException => e
say_error e[:message]
end
desc "logout", "Logout from Shelly Cloud"
+ method_option :key, :alias => :k, :desc => "Path to specific SSH key",
+ :default => nil
def logout
user = Shelly::User.new
- say "Your public SSH key has been removed from Shelly Cloud" if user.ssh_keys.destroy
+ key = Shelly::SshKey.new(options[:key]) if options[:key]
+ if (key || user.ssh_keys).destroy
+ say "Your public SSH key has been removed from Shelly Cloud"
+ end
+
say "You have been successfully logged out" if user.logout
end
desc "rake TASK", "Run rake task"
method_option :cloud, :type => :string, :aliases => "-c",