Fix rubocop Ruby 1.9.3 compatibility issues

This commit is contained in:
Heng Xiong committed 2017-07-12 17:11:49 -07:00
1 parent 374b342ea9
commit 1db30f6db1
8 files changed
+17 -10

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ describe Google::Auth::ScopeUtil do
context 'with scope as Array' do
let(:source) do
%w[email profile openid https://www.googleapis.com/auth/drive]
%w(email profile openid https://www.googleapis.com/auth/drive)
end
it_behaves_like 'normalizes scopes'
end
+2 -2
View File
@@ -41,7 +41,7 @@ describe Google::Auth::UserAuthorizer do
include TestHelpers
let(:client_id) { Google::Auth::ClientId.new('testclient', 'notasecret') }
let(:scope) { %w[email profile] }
let(:scope) { %w(email profile) }
let(:token_store) { DummyTokenStore.new }
let(:callback_uri) { 'https://www.example.com/oauth/callback' }
let(:authorizer) do
@@ -173,7 +173,7 @@ describe Google::Auth::UserAuthorizer do
end
it 'should return credentials with a valid scope' do
expect(credentials.scope).to eq %w[email profile]
expect(credentials.scope).to eq %w(email profile)
end
it 'should return credentials with a valid expiration time' do
+3 -3
View File
@@ -115,7 +115,7 @@ describe Google::Auth::UserRefreshCredentials do
end
it 'fails if the GOOGLE_APPLICATION_CREDENTIALS path file is invalid' do
needed = %w[client_id client_secret refresh_token]
needed = %w(client_id client_secret refresh_token)
needed.each do |missing|
Dir.mktmpdir do |dir|
key_path = File.join(dir, 'my_cert_file')
@@ -169,7 +169,7 @@ describe Google::Auth::UserRefreshCredentials do
end
it 'fails if the file is invalid' do
needed = %w[client_id client_secret refresh_token]
needed = %w(client_id client_secret refresh_token)
needed.each do |missing|
Dir.mktmpdir do |dir|
key_path = File.join(dir, '.config', @known_path)
@@ -208,7 +208,7 @@ describe Google::Auth::UserRefreshCredentials do
end
it 'fails if the file is invalid' do
needed = %w[client_id client_secret refresh_token]
needed = %w(client_id client_secret refresh_token)
needed.each do |missing|
FakeFS do
FileUtils.mkdir_p(File.dirname(@path))
+1 -1
View File
@@ -42,7 +42,7 @@ describe Google::Auth::WebUserAuthorizer do
include TestHelpers
let(:client_id) { Google::Auth::ClientId.new('testclient', 'notasecret') }
let(:scope) { %w[email profile] }
let(:scope) { %w(email profile) }
let(:token_store) { DummyTokenStore.new }
let(:authorizer) do
Google::Auth::WebUserAuthorizer.new(client_id, scope, token_store)