Fixes styles issues before releasing

- also update .travis.yml to use new infrastructure
This commit is contained in:
Tim Emiola 2015-08-05 16:45:49 -07:00
parent 1463e5f5f9
commit 19b32b47d8
5 changed files with 24 additions and 18 deletions

View File

@ -13,13 +13,3 @@ Metrics/AbcSize:
# Configuration parameters: CountComments. # Configuration parameters: CountComments.
Metrics/MethodLength: Metrics/MethodLength:
Max: 13 Max: 13
# Offense count: 1
# Cop supports --auto-correct.
Performance/ParallelAssignment:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/TrailingUnderscoreVariable:
Enabled: false

View File

@ -1,3 +1,4 @@
sudo: false
language: ruby language: ruby
rvm: rvm:
- 2.2 - 2.2
@ -7,10 +8,24 @@ rvm:
- rbx-2 - rbx-2
- jruby - jruby
script: "bundle exec rake" script: "bundle exec rake"
addons:
apt:
packages:
- idn
- build-essential # this and below attempt allow rubinius to be setup ok
- bison
- ruby-dev
- rake zlib1g-dev
- libyaml-dev
- libssl-dev
- libreadline-dev
- libncurses5-dev
- llvm
- llvm-dev
- libeditline-dev
- libedit-dev
before_install: before_install:
- gem update bundler - gem update bundler
- sudo apt-get update
- sudo apt-get install idn
notifications: notifications:
email: email:
recipients: recipients:

View File

@ -91,7 +91,8 @@ module Google
# #
# @param scope [string|array|nil] the scope(s) to access # @param scope [string|array|nil] the scope(s) to access
def from_well_known_path(scope = nil) def from_well_known_path(scope = nil)
home_var, base = windows? ? 'APPDATA' : 'HOME', WELL_KNOWN_PATH home_var = windows? ? 'APPDATA' : 'HOME'
base = WELL_KNOWN_PATH
root = ENV[home_var].nil? ? '' : ENV[home_var] root = ENV[home_var].nil? ? '' : ENV[home_var]
base = File.join('.config', base) unless windows? base = File.join('.config', base) unless windows?
path = File.join(root, base) path = File.join(root, base)

View File

@ -54,7 +54,7 @@ shared_examples 'jwt header auth' do
expect(hdr).to_not be_nil expect(hdr).to_not be_nil
expect(hdr.start_with?(auth_prefix)).to be true expect(hdr.start_with?(auth_prefix)).to be true
authorization = hdr[auth_prefix.length..-1] authorization = hdr[auth_prefix.length..-1]
payload, _ = JWT.decode(authorization, @key.public_key) payload, = JWT.decode(authorization, @key.public_key)
expect(payload['aud']).to eq(test_uri) expect(payload['aud']).to eq(test_uri)
expect(payload['iss']).to eq(client_email) expect(payload['iss']).to eq(client_email)
end end