googleauth 0.5.1 → 0.11.0
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 +5 -5
- data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +5 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
- data/.github/ISSUE_TEMPLATE/support_request.md +7 -0
- data/.kokoro/build.bat +16 -0
- data/.kokoro/build.sh +4 -0
- data/.kokoro/continuous/common.cfg +24 -0
- data/.kokoro/continuous/linux.cfg +25 -0
- data/.kokoro/continuous/osx.cfg +8 -0
- data/.kokoro/continuous/post.cfg +30 -0
- data/.kokoro/continuous/windows.cfg +29 -0
- data/.kokoro/osx.sh +4 -0
- data/.kokoro/presubmit/common.cfg +24 -0
- data/.kokoro/presubmit/linux.cfg +24 -0
- data/.kokoro/presubmit/osx.cfg +8 -0
- data/.kokoro/presubmit/windows.cfg +29 -0
- data/.kokoro/release.cfg +94 -0
- data/.kokoro/trampoline.bat +10 -0
- data/.kokoro/trampoline.sh +4 -0
- data/.repo-metadata.json +5 -0
- data/.rubocop.yml +17 -1
- data/CHANGELOG.md +90 -19
- data/CODE_OF_CONDUCT.md +43 -0
- data/Gemfile +16 -13
- data/README.md +58 -18
- data/Rakefile +106 -10
- data/googleauth.gemspec +27 -25
- data/lib/googleauth/application_default.rb +81 -0
- data/lib/googleauth/client_id.rb +21 -19
- data/lib/googleauth/compute_engine.rb +40 -43
- data/lib/googleauth/credentials.rb +375 -0
- data/lib/googleauth/credentials_loader.rb +117 -43
- data/lib/googleauth/default_credentials.rb +93 -0
- data/lib/googleauth/iam.rb +11 -11
- data/lib/googleauth/json_key_reader.rb +46 -0
- data/lib/googleauth/scope_util.rb +12 -12
- data/lib/googleauth/service_account.rb +64 -62
- data/lib/googleauth/signet.rb +53 -12
- data/lib/googleauth/stores/file_token_store.rb +8 -8
- data/lib/googleauth/stores/redis_token_store.rb +22 -22
- data/lib/googleauth/token_store.rb +6 -6
- data/lib/googleauth/user_authorizer.rb +80 -68
- data/lib/googleauth/user_refresh.rb +44 -35
- data/lib/googleauth/version.rb +1 -1
- data/lib/googleauth/web_user_authorizer.rb +77 -68
- data/lib/googleauth.rb +6 -96
- data/rakelib/devsite_builder.rb +45 -0
- data/rakelib/link_checker.rb +64 -0
- data/rakelib/repo_metadata.rb +59 -0
- data/spec/googleauth/apply_auth_examples.rb +47 -46
- data/spec/googleauth/client_id_spec.rb +75 -55
- data/spec/googleauth/compute_engine_spec.rb +60 -43
- data/spec/googleauth/credentials_spec.rb +467 -0
- data/spec/googleauth/get_application_default_spec.rb +149 -111
- data/spec/googleauth/iam_spec.rb +25 -25
- data/spec/googleauth/scope_util_spec.rb +26 -24
- data/spec/googleauth/service_account_spec.rb +261 -143
- data/spec/googleauth/signet_spec.rb +93 -30
- data/spec/googleauth/stores/file_token_store_spec.rb +12 -13
- data/spec/googleauth/stores/redis_token_store_spec.rb +11 -11
- data/spec/googleauth/stores/store_examples.rb +16 -16
- data/spec/googleauth/user_authorizer_spec.rb +153 -124
- data/spec/googleauth/user_refresh_spec.rb +186 -121
- data/spec/googleauth/web_user_authorizer_spec.rb +82 -69
- data/spec/spec_helper.rb +21 -19
- metadata +75 -32
- data/.rubocop_todo.yml +0 -32
- data/.travis.yml +0 -37
@@ -27,133 +27,146 @@
|
|
27
27
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
28
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
29
|
|
30
|
-
spec_dir = File.expand_path
|
31
|
-
$LOAD_PATH.unshift
|
30
|
+
spec_dir = File.expand_path File.join(File.dirname(__FILE__))
|
31
|
+
$LOAD_PATH.unshift spec_dir
|
32
32
|
$LOAD_PATH.uniq!
|
33
33
|
|
34
|
-
require
|
35
|
-
require
|
36
|
-
require
|
37
|
-
require
|
38
|
-
require
|
39
|
-
require
|
34
|
+
require "googleauth"
|
35
|
+
require "googleauth/web_user_authorizer"
|
36
|
+
require "uri"
|
37
|
+
require "multi_json"
|
38
|
+
require "spec_helper"
|
39
|
+
require "rack"
|
40
40
|
|
41
41
|
describe Google::Auth::WebUserAuthorizer do
|
42
42
|
include TestHelpers
|
43
43
|
|
44
|
-
let(:client_id) { Google::Auth::ClientId.new
|
45
|
-
let(:scope) { %w
|
44
|
+
let(:client_id) { Google::Auth::ClientId.new "testclient", "notasecret" }
|
45
|
+
let(:scope) { %w[email profile] }
|
46
46
|
let(:token_store) { DummyTokenStore.new }
|
47
|
-
let
|
48
|
-
Google::Auth::WebUserAuthorizer.new
|
47
|
+
let :authorizer do
|
48
|
+
Google::Auth::WebUserAuthorizer.new client_id, scope, token_store
|
49
49
|
end
|
50
50
|
|
51
|
-
describe
|
52
|
-
let
|
51
|
+
describe "#get_authorization_url" do
|
52
|
+
let :env do
|
53
53
|
Rack::MockRequest.env_for(
|
54
|
-
|
55
|
-
|
54
|
+
"http://example.com:8080/test",
|
55
|
+
"REMOTE_ADDR" => "10.10.10.10"
|
56
|
+
)
|
56
57
|
end
|
57
|
-
let(:request) { Rack::Request.new
|
58
|
-
it
|
59
|
-
url = authorizer.get_authorization_url
|
58
|
+
let(:request) { Rack::Request.new env }
|
59
|
+
it "should include current url in state" do
|
60
|
+
url = authorizer.get_authorization_url request: request
|
60
61
|
expect(url).to match(
|
61
|
-
%r{%22current_uri%22:%22http://example.com:8080/test%22}
|
62
|
+
%r{%22current_uri%22:%22http://example.com:8080/test%22}
|
63
|
+
)
|
62
64
|
end
|
63
65
|
|
64
|
-
it
|
65
|
-
|
66
|
-
url
|
66
|
+
it "should allow adding custom state key-value pairs" do
|
67
|
+
url = authorizer.get_authorization_url request: request, state: { james: "bond", kind: 1 }
|
68
|
+
expect(url).to match(%r{%22james%22:%22bond%22})
|
69
|
+
expect(url).to match(%r{%22kind%22:1})
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should include request forgery token in state" do
|
73
|
+
expect(SecureRandom).to receive(:base64).and_return("aGVsbG8=")
|
74
|
+
url = authorizer.get_authorization_url request: request
|
67
75
|
expect(url).to match(/%22session_id%22:%22aGVsbG8=%22/)
|
68
76
|
end
|
69
77
|
|
70
|
-
it
|
71
|
-
expect(SecureRandom).to receive(:base64).and_return(
|
72
|
-
authorizer.get_authorization_url
|
73
|
-
expect(request.session[
|
78
|
+
it "should include request forgery token in session" do
|
79
|
+
expect(SecureRandom).to receive(:base64).and_return("aGVsbG8=")
|
80
|
+
authorizer.get_authorization_url request: request
|
81
|
+
expect(request.session["g-xsrf-token"]).to eq "aGVsbG8="
|
74
82
|
end
|
75
83
|
|
76
|
-
it
|
77
|
-
url = authorizer.get_authorization_url
|
84
|
+
it "should resolve callback against base URL" do
|
85
|
+
url = authorizer.get_authorization_url request: request
|
78
86
|
expect(url).to match(
|
79
|
-
%r{redirect_uri=http://example.com:8080/oauth2callback}
|
87
|
+
%r{redirect_uri=http://example.com:8080/oauth2callback}
|
88
|
+
)
|
80
89
|
end
|
81
90
|
|
82
|
-
it
|
91
|
+
it "should allow overriding the current URL" do
|
83
92
|
url = authorizer.get_authorization_url(
|
84
|
-
request:
|
85
|
-
redirect_to:
|
93
|
+
request: request,
|
94
|
+
redirect_to: "/foo"
|
95
|
+
)
|
86
96
|
expect(url).to match %r{%22current_uri%22:%22/foo%22}
|
87
97
|
end
|
88
98
|
|
89
|
-
it
|
99
|
+
it "should pass through login hint" do
|
90
100
|
url = authorizer.get_authorization_url(
|
91
|
-
request:
|
92
|
-
login_hint:
|
101
|
+
request: request,
|
102
|
+
login_hint: "user@example.com"
|
103
|
+
)
|
93
104
|
expect(url).to match(/login_hint=user@example.com/)
|
94
105
|
end
|
95
106
|
end
|
96
107
|
|
97
|
-
shared_examples
|
98
|
-
let
|
99
|
-
MultiJson.dump(
|
100
|
-
|
101
|
-
|
108
|
+
shared_examples "handles callback" do
|
109
|
+
let :token_json do
|
110
|
+
MultiJson.dump("access_token" => "1/abc123",
|
111
|
+
"token_type" => "Bearer",
|
112
|
+
"expires_in" => 3600)
|
102
113
|
end
|
103
114
|
|
104
|
-
before
|
105
|
-
stub_request(:post,
|
106
|
-
.to_return(body:
|
107
|
-
status:
|
108
|
-
headers: {
|
115
|
+
before :example do
|
116
|
+
stub_request(:post, "https://oauth2.googleapis.com/token")
|
117
|
+
.to_return(body: token_json,
|
118
|
+
status: 200,
|
119
|
+
headers: { "Content-Type" => "application/json" })
|
109
120
|
end
|
110
121
|
|
111
|
-
let
|
122
|
+
let :env do
|
112
123
|
Rack::MockRequest.env_for(
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
124
|
+
"http://example.com:8080/oauth2callback?code=authcode&"\
|
125
|
+
"state=%7B%22current_uri%22%3A%22%2Ffoo%22%2C%22"\
|
126
|
+
"session_id%22%3A%22abc%22%7D",
|
127
|
+
"REMOTE_ADDR" => "10.10.10.10"
|
128
|
+
)
|
117
129
|
end
|
118
|
-
let(:request) { Rack::Request.new
|
130
|
+
let(:request) { Rack::Request.new env }
|
119
131
|
|
120
|
-
before
|
121
|
-
request.session[
|
132
|
+
before :example do
|
133
|
+
request.session["g-xsrf-token"] = "abc"
|
122
134
|
end
|
123
135
|
|
124
|
-
it
|
136
|
+
it "should return credentials when valid code present" do
|
125
137
|
expect(credentials).to be_instance_of(
|
126
|
-
Google::Auth::UserRefreshCredentials
|
138
|
+
Google::Auth::UserRefreshCredentials
|
139
|
+
)
|
127
140
|
end
|
128
141
|
|
129
|
-
it
|
130
|
-
expect(next_url).to eq
|
142
|
+
it "should return next URL to redirect to" do
|
143
|
+
expect(next_url).to eq "/foo"
|
131
144
|
end
|
132
145
|
|
133
|
-
it
|
134
|
-
request.session[
|
146
|
+
it "should fail if xrsf token in session and does not match request" do
|
147
|
+
request.session["g-xsrf-token"] = "123"
|
135
148
|
expect { credentials }.to raise_error(Signet::AuthorizationError)
|
136
149
|
end
|
137
150
|
end
|
138
151
|
|
139
|
-
describe
|
140
|
-
let(:result) { authorizer.handle_auth_callback
|
152
|
+
describe "#handle_auth_callback" do
|
153
|
+
let(:result) { authorizer.handle_auth_callback "user1", request }
|
141
154
|
let(:credentials) { result[0] }
|
142
155
|
let(:next_url) { result[1] }
|
143
156
|
|
144
|
-
it_behaves_like
|
157
|
+
it_behaves_like "handles callback"
|
145
158
|
end
|
146
159
|
|
147
|
-
describe
|
148
|
-
let
|
149
|
-
Google::Auth::WebUserAuthorizer.handle_auth_callback_deferred
|
160
|
+
describe "#handle_auth_callback_deferred and #get_credentials" do
|
161
|
+
let :next_url do
|
162
|
+
Google::Auth::WebUserAuthorizer.handle_auth_callback_deferred request
|
150
163
|
end
|
151
164
|
|
152
|
-
let
|
165
|
+
let :credentials do
|
153
166
|
next_url
|
154
|
-
authorizer.get_credentials
|
167
|
+
authorizer.get_credentials "user1", request
|
155
168
|
end
|
156
169
|
|
157
|
-
it_behaves_like
|
170
|
+
it_behaves_like "handles callback"
|
158
171
|
end
|
159
172
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -27,17 +27,17 @@
|
|
27
27
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
28
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
29
|
|
30
|
-
spec_dir =
|
31
|
-
root_dir = File.expand_path
|
32
|
-
lib_dir = File.expand_path
|
30
|
+
spec_dir = __dir__
|
31
|
+
root_dir = File.expand_path File.join(spec_dir, "..")
|
32
|
+
lib_dir = File.expand_path File.join(root_dir, "lib")
|
33
33
|
|
34
|
-
$LOAD_PATH.unshift
|
35
|
-
$LOAD_PATH.unshift
|
34
|
+
$LOAD_PATH.unshift spec_dir
|
35
|
+
$LOAD_PATH.unshift lib_dir
|
36
36
|
$LOAD_PATH.uniq!
|
37
37
|
|
38
38
|
# set up coverage
|
39
|
-
require
|
40
|
-
require
|
39
|
+
require "simplecov"
|
40
|
+
require "coveralls"
|
41
41
|
|
42
42
|
SimpleCov.formatters = [
|
43
43
|
Coveralls::SimpleCov::Formatter,
|
@@ -45,18 +45,18 @@ SimpleCov.formatters = [
|
|
45
45
|
]
|
46
46
|
SimpleCov.start
|
47
47
|
|
48
|
-
require
|
49
|
-
require
|
50
|
-
require
|
51
|
-
require
|
52
|
-
require
|
53
|
-
require
|
48
|
+
require "faraday"
|
49
|
+
require "rspec"
|
50
|
+
require "logging"
|
51
|
+
require "rspec/logging_helper"
|
52
|
+
require "webmock/rspec"
|
53
|
+
require "multi_json"
|
54
54
|
|
55
55
|
# Preload adapter to work around Rubinius error with FakeFS
|
56
|
-
MultiJson.use
|
56
|
+
MultiJson.use :json_gem
|
57
57
|
|
58
58
|
# Allow Faraday to support test stubs
|
59
|
-
Faraday::Adapter.load_middleware
|
59
|
+
Faraday::Adapter.load_middleware :test
|
60
60
|
|
61
61
|
# Configure RSpec to capture log messages for each test. The output from the
|
62
62
|
# logs will be stored in the @log_output variable. It is a StringIO instance.
|
@@ -64,6 +64,8 @@ RSpec.configure do |config|
|
|
64
64
|
include RSpec::LoggingHelper
|
65
65
|
config.capture_log_messages
|
66
66
|
config.include WebMock::API
|
67
|
+
config.filter_run focus: true
|
68
|
+
config.run_all_when_everything_filtered = true
|
67
69
|
end
|
68
70
|
|
69
71
|
module TestHelpers
|
@@ -76,15 +78,15 @@ class DummyTokenStore
|
|
76
78
|
@tokens = {}
|
77
79
|
end
|
78
80
|
|
79
|
-
def load
|
81
|
+
def load id
|
80
82
|
@tokens[id]
|
81
83
|
end
|
82
84
|
|
83
|
-
def store
|
85
|
+
def store id, token
|
84
86
|
@tokens[id] = token
|
85
87
|
end
|
86
88
|
|
87
|
-
def delete
|
88
|
-
@tokens.delete
|
89
|
+
def delete id
|
90
|
+
@tokens.delete id
|
89
91
|
end
|
90
92
|
end
|
metadata
CHANGED
@@ -1,71 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googleauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
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: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.9'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: logging
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
19
|
+
version: 0.17.3
|
20
|
+
- - "<"
|
32
21
|
- !ruby/object:Gem::Version
|
33
22
|
version: '2.0'
|
34
23
|
type: :runtime
|
35
24
|
prerelease: false
|
36
25
|
version_requirements: !ruby/object:Gem::Requirement
|
37
26
|
requirements:
|
38
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.17.3
|
30
|
+
- - "<"
|
39
31
|
- !ruby/object:Gem::Version
|
40
32
|
version: '2.0'
|
41
33
|
- !ruby/object:Gem::Dependency
|
42
34
|
name: jwt
|
43
35
|
requirement: !ruby/object:Gem::Requirement
|
44
36
|
requirements:
|
45
|
-
- - "
|
37
|
+
- - ">="
|
46
38
|
- !ruby/object:Gem::Version
|
47
39
|
version: '1.4'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '3.0'
|
48
43
|
type: :runtime
|
49
44
|
prerelease: false
|
50
45
|
version_requirements: !ruby/object:Gem::Requirement
|
51
46
|
requirements:
|
52
|
-
- - "
|
47
|
+
- - ">="
|
53
48
|
- !ruby/object:Gem::Version
|
54
49
|
version: '1.4'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '3.0'
|
55
53
|
- !ruby/object:Gem::Dependency
|
56
54
|
name: memoist
|
57
55
|
requirement: !ruby/object:Gem::Requirement
|
58
56
|
requirements:
|
59
57
|
- - "~>"
|
60
58
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
59
|
+
version: '0.16'
|
62
60
|
type: :runtime
|
63
61
|
prerelease: false
|
64
62
|
version_requirements: !ruby/object:Gem::Requirement
|
65
63
|
requirements:
|
66
64
|
- - "~>"
|
67
65
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
66
|
+
version: '0.16'
|
69
67
|
- !ruby/object:Gem::Dependency
|
70
68
|
name: multi_json
|
71
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,30 +82,50 @@ dependencies:
|
|
84
82
|
name: os
|
85
83
|
requirement: !ruby/object:Gem::Requirement
|
86
84
|
requirements:
|
87
|
-
- - "
|
85
|
+
- - ">="
|
88
86
|
- !ruby/object:Gem::Version
|
89
87
|
version: '0.9'
|
88
|
+
- - "<"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '2.0'
|
90
91
|
type: :runtime
|
91
92
|
prerelease: false
|
92
93
|
version_requirements: !ruby/object:Gem::Requirement
|
93
94
|
requirements:
|
94
|
-
- - "
|
95
|
+
- - ">="
|
95
96
|
- !ruby/object:Gem::Version
|
96
97
|
version: '0.9'
|
98
|
+
- - "<"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '2.0'
|
97
101
|
- !ruby/object:Gem::Dependency
|
98
102
|
name: signet
|
99
103
|
requirement: !ruby/object:Gem::Requirement
|
100
104
|
requirements:
|
101
105
|
- - "~>"
|
102
106
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
107
|
+
version: '0.12'
|
104
108
|
type: :runtime
|
105
109
|
prerelease: false
|
106
110
|
version_requirements: !ruby/object:Gem::Requirement
|
107
111
|
requirements:
|
108
112
|
- - "~>"
|
109
113
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
114
|
+
version: '0.12'
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: yard
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - "~>"
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0.9'
|
122
|
+
type: :development
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - "~>"
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0.9'
|
111
129
|
description: |2
|
112
130
|
Allows simple authorization for accessing Google APIs.
|
113
131
|
Provide support for Application Default Credentials, as described at
|
@@ -117,23 +135,45 @@ executables: []
|
|
117
135
|
extensions: []
|
118
136
|
extra_rdoc_files: []
|
119
137
|
files:
|
138
|
+
- ".github/CONTRIBUTING.md"
|
139
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
140
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
141
|
+
- ".github/ISSUE_TEMPLATE/support_request.md"
|
120
142
|
- ".gitignore"
|
143
|
+
- ".kokoro/build.bat"
|
144
|
+
- ".kokoro/build.sh"
|
145
|
+
- ".kokoro/continuous/common.cfg"
|
146
|
+
- ".kokoro/continuous/linux.cfg"
|
147
|
+
- ".kokoro/continuous/osx.cfg"
|
148
|
+
- ".kokoro/continuous/post.cfg"
|
149
|
+
- ".kokoro/continuous/windows.cfg"
|
150
|
+
- ".kokoro/osx.sh"
|
151
|
+
- ".kokoro/presubmit/common.cfg"
|
152
|
+
- ".kokoro/presubmit/linux.cfg"
|
153
|
+
- ".kokoro/presubmit/osx.cfg"
|
154
|
+
- ".kokoro/presubmit/windows.cfg"
|
155
|
+
- ".kokoro/release.cfg"
|
156
|
+
- ".kokoro/trampoline.bat"
|
157
|
+
- ".kokoro/trampoline.sh"
|
158
|
+
- ".repo-metadata.json"
|
121
159
|
- ".rspec"
|
122
160
|
- ".rubocop.yml"
|
123
|
-
- ".rubocop_todo.yml"
|
124
|
-
- ".travis.yml"
|
125
161
|
- CHANGELOG.md
|
126
|
-
-
|
162
|
+
- CODE_OF_CONDUCT.md
|
127
163
|
- COPYING
|
128
164
|
- Gemfile
|
129
165
|
- README.md
|
130
166
|
- Rakefile
|
131
167
|
- googleauth.gemspec
|
132
168
|
- lib/googleauth.rb
|
169
|
+
- lib/googleauth/application_default.rb
|
133
170
|
- lib/googleauth/client_id.rb
|
134
171
|
- lib/googleauth/compute_engine.rb
|
172
|
+
- lib/googleauth/credentials.rb
|
135
173
|
- lib/googleauth/credentials_loader.rb
|
174
|
+
- lib/googleauth/default_credentials.rb
|
136
175
|
- lib/googleauth/iam.rb
|
176
|
+
- lib/googleauth/json_key_reader.rb
|
137
177
|
- lib/googleauth/scope_util.rb
|
138
178
|
- lib/googleauth/service_account.rb
|
139
179
|
- lib/googleauth/signet.rb
|
@@ -144,9 +184,13 @@ files:
|
|
144
184
|
- lib/googleauth/user_refresh.rb
|
145
185
|
- lib/googleauth/version.rb
|
146
186
|
- lib/googleauth/web_user_authorizer.rb
|
187
|
+
- rakelib/devsite_builder.rb
|
188
|
+
- rakelib/link_checker.rb
|
189
|
+
- rakelib/repo_metadata.rb
|
147
190
|
- spec/googleauth/apply_auth_examples.rb
|
148
191
|
- spec/googleauth/client_id_spec.rb
|
149
192
|
- spec/googleauth/compute_engine_spec.rb
|
193
|
+
- spec/googleauth/credentials_spec.rb
|
150
194
|
- spec/googleauth/get_application_default_spec.rb
|
151
195
|
- spec/googleauth/iam_spec.rb
|
152
196
|
- spec/googleauth/scope_util_spec.rb
|
@@ -171,15 +215,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
215
|
requirements:
|
172
216
|
- - ">="
|
173
217
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
218
|
+
version: 2.4.0
|
175
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
220
|
requirements:
|
177
221
|
- - ">="
|
178
222
|
- !ruby/object:Gem::Version
|
179
223
|
version: '0'
|
180
224
|
requirements: []
|
181
|
-
|
182
|
-
rubygems_version: 2.4.3
|
225
|
+
rubygems_version: 3.0.6
|
183
226
|
signing_key:
|
184
227
|
specification_version: 4
|
185
228
|
summary: Google Auth Library for Ruby
|
@@ -187,6 +230,7 @@ test_files:
|
|
187
230
|
- spec/googleauth/apply_auth_examples.rb
|
188
231
|
- spec/googleauth/client_id_spec.rb
|
189
232
|
- spec/googleauth/compute_engine_spec.rb
|
233
|
+
- spec/googleauth/credentials_spec.rb
|
190
234
|
- spec/googleauth/get_application_default_spec.rb
|
191
235
|
- spec/googleauth/iam_spec.rb
|
192
236
|
- spec/googleauth/scope_util_spec.rb
|
@@ -199,4 +243,3 @@ test_files:
|
|
199
243
|
- spec/googleauth/user_refresh_spec.rb
|
200
244
|
- spec/googleauth/web_user_authorizer_spec.rb
|
201
245
|
- spec/spec_helper.rb
|
202
|
-
has_rdoc:
|
data/.rubocop_todo.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2015-10-14 13:50:41 -0700 using RuboCop version 0.34.2.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 4
|
10
|
-
Metrics/AbcSize:
|
11
|
-
Max: 27
|
12
|
-
|
13
|
-
# Offense count: 1
|
14
|
-
# Configuration parameters: CountComments.
|
15
|
-
Metrics/ClassLength:
|
16
|
-
Max: 109
|
17
|
-
|
18
|
-
# Offense count: 1
|
19
|
-
Metrics/CyclomaticComplexity:
|
20
|
-
Max: 7
|
21
|
-
|
22
|
-
# Offense count: 16
|
23
|
-
# Configuration parameters: CountComments.
|
24
|
-
Metrics/MethodLength:
|
25
|
-
Max: 22
|
26
|
-
|
27
|
-
# Offense count: 2
|
28
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
29
|
-
Style/FormatString:
|
30
|
-
Exclude:
|
31
|
-
- 'lib/googleauth/user_authorizer.rb'
|
32
|
-
- 'lib/googleauth/web_user_authorizer.rb'
|
data/.travis.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.2
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1
|
7
|
-
- 1.9.3
|
8
|
-
- rbx-2
|
9
|
-
- jruby
|
10
|
-
matrix:
|
11
|
-
allow_failures:
|
12
|
-
- rvm: rbx-2 # See rubinius/rubinius#3485 - rubocop segfaults
|
13
|
-
script: "bundle exec rake"
|
14
|
-
addons:
|
15
|
-
apt:
|
16
|
-
packages:
|
17
|
-
- idn
|
18
|
-
- build-essential # this and below attempt allow rubinius to be setup ok
|
19
|
-
- bison
|
20
|
-
- ruby-dev
|
21
|
-
- rake zlib1g-dev
|
22
|
-
- libyaml-dev
|
23
|
-
- libssl-dev
|
24
|
-
- libreadline-dev
|
25
|
-
- libncurses5-dev
|
26
|
-
- llvm
|
27
|
-
- llvm-dev
|
28
|
-
- libeditline-dev
|
29
|
-
- libedit-dev
|
30
|
-
before_install:
|
31
|
-
- gem update bundler
|
32
|
-
notifications:
|
33
|
-
email:
|
34
|
-
recipients:
|
35
|
-
- temiola@google.com
|
36
|
-
on_success: change
|
37
|
-
on_failure: change
|