Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-voronenko committed Jul 14, 2017
1 parent 99e9c23 commit e03183f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generators/tasks/templates/common.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ require 'howitzer/gmail_api/client'
desc 'Provides url to authorize application for gmail API usage'
task :'gmail-init' do
Howitzer::GmailApi::Client.new
end
end
5 changes: 3 additions & 2 deletions lib/howitzer/gmail_api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Client
'howitzer-gmail.yaml')
SCOPE = [Google::Apis::GmailV1::AUTH_GMAIL_MODIFY].freeze
USER_ID = 'me'.freeze
MESSAGE = ColorizedString.new('Open the following URL in the browser and enter the ' \
'resulting code after authorization').yellow

def initialize
@service = Google::Apis::GmailV1::GmailService.new
Expand Down Expand Up @@ -57,8 +59,7 @@ def authorize
url = authorizer.get_authorization_url(
base_url: OOB_URI
)
puts ColorizedString.new('Open the following URL in the browser and enter the ' \
'resulting code after authorization').yellow
puts MESSAGE
puts url
code = $stdin.gets
credentials = authorizer.get_and_store_credentials_from_code(
Expand Down

0 comments on commit e03183f

Please sign in to comment.