googleauth 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/googleauth.gemspec +1 -0
- data/lib/googleauth/credentials_loader.rb +4 -9
- data/lib/googleauth/signet.rb +1 -1
- data/lib/googleauth/version.rb +1 -1
- data/spec/googleauth/apply_auth_examples.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2b7b1cf21b1190e227d1c6da0e204a2eaf9a562
|
4
|
+
data.tar.gz: e2bb3c3f74e40bea4ff997f3613f07815f8f78ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f268b6486b2638195745c6750f256de0d4e703c9896bc6164b84c626eb6057ef6e6c159471d75215e3110cefe5c07c44180273d1ce6140fa1ffd8274272cb930
|
7
|
+
data.tar.gz: 2cf2c5a305ecc069c01c7a0a3a848e45bceb449cf5a57c3a15906284a96dca9631b86c1e563cb6a5b1b3d25828ad7971e7a1e6315964b838bdbc0cfad8a5d499
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 0.5.1 (06/01/2016)
|
2
|
+
|
3
|
+
### Changes
|
4
|
+
|
5
|
+
* Change header name emitted by `Client#apply` from "Authorization" to "authorization" ([@murgatroid99][])
|
6
|
+
* Fix ADC not working on some windows machines ([@vsubramani][])
|
7
|
+
[#55](https://github.com/google/google-auth-library-ruby/issues/55)
|
8
|
+
|
1
9
|
## 0.5.0 (12/10/2015)
|
2
10
|
|
3
11
|
### Changes
|
@@ -52,3 +60,5 @@
|
|
52
60
|
[@joneslee85]: https://github.com/joneslee85
|
53
61
|
[@mr-salty]: https://github.com/mr-salty
|
54
62
|
[@tbetbetbe]: https://github.com/tbetbetbe
|
63
|
+
[@murgatroid99]: https://github.com/murgatroid99
|
64
|
+
[@vsubramani]: https://github.com/vsubramani
|
data/googleauth.gemspec
CHANGED
@@ -28,6 +28,7 @@
|
|
28
28
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
29
|
|
30
30
|
require 'memoist'
|
31
|
+
require 'os'
|
31
32
|
require 'rbconfig'
|
32
33
|
|
33
34
|
module Google
|
@@ -55,12 +56,6 @@ module Google
|
|
55
56
|
|
56
57
|
SYSTEM_DEFAULT_ERROR = 'Unable to read the system default credential file'
|
57
58
|
|
58
|
-
# determines if the current OS is windows
|
59
|
-
def windows?
|
60
|
-
RbConfig::CONFIG['host_os'] =~ /Windows|mswin/
|
61
|
-
end
|
62
|
-
memoize :windows?
|
63
|
-
|
64
59
|
# make_creds proxies the construction of a credentials instance
|
65
60
|
#
|
66
61
|
# By default, it calls #new on the current class, but this behaviour can
|
@@ -91,10 +86,10 @@ module Google
|
|
91
86
|
#
|
92
87
|
# @param scope [string|array|nil] the scope(s) to access
|
93
88
|
def from_well_known_path(scope = nil)
|
94
|
-
home_var = windows? ? 'APPDATA' : 'HOME'
|
89
|
+
home_var = OS.windows? ? 'APPDATA' : 'HOME'
|
95
90
|
base = WELL_KNOWN_PATH
|
96
91
|
root = ENV[home_var].nil? ? '' : ENV[home_var]
|
97
|
-
base = File.join('.config', base) unless windows?
|
92
|
+
base = File.join('.config', base) unless OS.windows?
|
98
93
|
path = File.join(root, base)
|
99
94
|
return nil unless File.exist?(path)
|
100
95
|
File.open(path) do |f|
|
@@ -108,7 +103,7 @@ module Google
|
|
108
103
|
#
|
109
104
|
# @param scope [string|array|nil] the scope(s) to access
|
110
105
|
def from_system_default_path(scope = nil)
|
111
|
-
if windows?
|
106
|
+
if OS.windows?
|
112
107
|
return nil unless ENV['ProgramData']
|
113
108
|
prefix = File.join(ENV['ProgramData'], 'Google/Auth')
|
114
109
|
else
|
data/lib/googleauth/signet.rb
CHANGED
@@ -32,7 +32,7 @@ require 'signet/oauth_2/client'
|
|
32
32
|
module Signet
|
33
33
|
# OAuth2 supports OAuth2 authentication.
|
34
34
|
module OAuth2
|
35
|
-
AUTH_METADATA_KEY = :
|
35
|
+
AUTH_METADATA_KEY = :authorization
|
36
36
|
# Signet::OAuth2::Client creates an OAuth2 client
|
37
37
|
#
|
38
38
|
# This reopens Client to add #apply and #apply! methods which update a
|
data/lib/googleauth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googleauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Emiola
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.11'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: os
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.9'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.9'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: signet
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|