Merge pull request #45 from tbetbetbe/ruby-auth-release-0.4.2
Ruby auth release 0.4.2
This commit is contained in:
commit
38bd991ac7
|
@ -13,13 +13,3 @@ Metrics/AbcSize:
|
|||
# Configuration parameters: CountComments.
|
||||
Metrics/MethodLength:
|
||||
Max: 13
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Performance/ParallelAssignment:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/TrailingUnderscoreVariable:
|
||||
Enabled: false
|
||||
|
|
19
.travis.yml
19
.travis.yml
|
@ -1,3 +1,4 @@
|
|||
sudo: false
|
||||
language: ruby
|
||||
rvm:
|
||||
- 2.2
|
||||
|
@ -7,10 +8,24 @@ rvm:
|
|||
- rbx-2
|
||||
- jruby
|
||||
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:
|
||||
- gem update bundler
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install idn
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
|
|
23
CHANGELOG.md
23
CHANGELOG.md
|
@ -1,3 +1,19 @@
|
|||
## 0.4.2 (05/08/2015)
|
||||
|
||||
### Changes
|
||||
|
||||
* Updated UserRefreshCredentials hash to use string keys ([@haabator][])
|
||||
[#36](https://github.com/google/google-auth-library-ruby/issues/36)
|
||||
|
||||
* Add support for a system default credentials file. ([@mr-salty][])
|
||||
[#33](https://github.com/google/google-auth-library-ruby/issues/33)
|
||||
|
||||
* Fix bug when loading credentials from ENV ([@dwilkie][])
|
||||
[#31](https://github.com/google/google-auth-library-ruby/issues/31)
|
||||
|
||||
* Relax the constraint of dependent version of multi_json ([@igrep][])
|
||||
[#30](https://github.com/google/google-auth-library-ruby/issues/30)
|
||||
|
||||
### Changes
|
||||
|
||||
* Enables passing credentials via environment variables. ([@haabaato][])
|
||||
|
@ -23,6 +39,9 @@
|
|||
* makes the scope parameter's optional in all APIs. ([@tbetbetbe][])
|
||||
* changes the scope parameter's position in various constructors. ([@tbetbetbe][])
|
||||
|
||||
[@tbetbetbe]: https://github.com/tbetbetbe
|
||||
[@joneslee85]: https://github.com/joneslee85
|
||||
[@dwilkie]: https://github.com/dwilkie
|
||||
[@haabaato]: https://github.com/haabaato
|
||||
[@igrep]: https://github.com/igrep
|
||||
[@joneslee85]: https://github.com/joneslee85
|
||||
[@mr-salty]: https://github.com/mr-salty
|
||||
[@tbetbetbe]: https://github.com/tbetbetbe
|
||||
|
|
|
@ -91,7 +91,8 @@ module Google
|
|||
#
|
||||
# @param scope [string|array|nil] the scope(s) to access
|
||||
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]
|
||||
base = File.join('.config', base) unless windows?
|
||||
path = File.join(root, base)
|
||||
|
|
|
@ -31,6 +31,6 @@ module Google
|
|||
# Module Auth provides classes that provide Google-specific authorization
|
||||
# used to access Google APIs.
|
||||
module Auth
|
||||
VERSION = '0.4.1'
|
||||
VERSION = '0.4.2'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -71,10 +71,10 @@ describe '#get_application_default' do
|
|||
{ 'Metadata-Flavor' => 'Google' },
|
||||
'']
|
||||
end
|
||||
end # GCE not detected
|
||||
end # GCE not detected
|
||||
Dir.mktmpdir do |dir|
|
||||
ENV.delete(@var_name) unless ENV[@var_name].nil? # no env var
|
||||
ENV['HOME'] = dir # no config present in this tmp dir
|
||||
ENV['HOME'] = dir # no config present in this tmp dir
|
||||
c = Faraday.new do |b|
|
||||
b.adapter(:test, stubs)
|
||||
end
|
||||
|
@ -127,10 +127,10 @@ describe '#get_application_default' do
|
|||
{ 'Metadata-Flavor' => 'Google' },
|
||||
'']
|
||||
end
|
||||
end # GCE detected
|
||||
end # GCE detected
|
||||
Dir.mktmpdir do |dir|
|
||||
ENV.delete(@var_name) unless ENV[@var_name].nil? # no env var
|
||||
ENV['HOME'] = dir # no config present in this tmp dir
|
||||
ENV['HOME'] = dir # no config present in this tmp dir
|
||||
c = Faraday.new do |b|
|
||||
b.adapter(:test, stubs)
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ shared_examples 'jwt header auth' do
|
|||
expect(hdr).to_not be_nil
|
||||
expect(hdr.start_with?(auth_prefix)).to be true
|
||||
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['iss']).to eq(client_email)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue