Class: Mcpeasy::GmailCommands
- Inherits:
-
Gmail::CLI
- Object
- Thor
- Gmail::CLI
- Mcpeasy::GmailCommands
- Defined in:
- lib/mcpeasy/cli.rb
Instance Method Summary collapse
Methods inherited from Gmail::CLI
#add_label, #archive, #list, #mark_read, #mark_unread, #read, #remove_label, #reply, #search, #send, #test, #trash
Instance Method Details
#auth ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/mcpeasy/cli.rb', line 119 def auth require_relative "../utilities/gmail/service" tool = Gmail::Service.new(skip_auth: true) result = tool.authenticate if result[:success] puts "✅ Successfully authenticated with Gmail" else puts "❌ Authentication failed: #{result[:error]}" exit 1 end end |