googleauth 0.16.1 → 1.0.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 +4 -4
- data/.yardopts +11 -0
- data/CHANGELOG.md +18 -14
- data/README.md +21 -0
- data/SECURITY.md +7 -0
- data/lib/googleauth/application_default.rb +10 -25
- data/lib/googleauth/client_id.rb +10 -25
- data/lib/googleauth/compute_engine.rb +10 -25
- data/lib/googleauth/credentials.rb +10 -25
- data/lib/googleauth/credentials_loader.rb +11 -26
- data/lib/googleauth/default_credentials.rb +10 -25
- data/lib/googleauth/iam.rb +10 -25
- data/lib/googleauth/id_tokens/errors.rb +9 -23
- data/lib/googleauth/id_tokens/key_sources.rb +10 -23
- data/lib/googleauth/id_tokens/verifier.rb +9 -23
- data/lib/googleauth/id_tokens.rb +9 -23
- data/lib/googleauth/json_key_reader.rb +10 -25
- data/lib/googleauth/scope_util.rb +10 -25
- data/lib/googleauth/service_account.rb +30 -39
- data/lib/googleauth/signet.rb +10 -25
- data/lib/googleauth/stores/file_token_store.rb +10 -25
- data/lib/googleauth/stores/redis_token_store.rb +10 -25
- data/lib/googleauth/token_store.rb +10 -25
- data/lib/googleauth/user_authorizer.rb +10 -25
- data/lib/googleauth/user_refresh.rb +10 -25
- data/lib/googleauth/version.rb +11 -26
- data/lib/googleauth/web_user_authorizer.rb +10 -25
- data/lib/googleauth.rb +10 -25
- metadata +23 -88
- data/.github/CODEOWNERS +0 -7
- data/.github/CONTRIBUTING.md +0 -74
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -36
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -21
- data/.github/ISSUE_TEMPLATE/support_request.md +0 -7
- data/.github/workflows/ci.yml +0 -55
- data/.github/workflows/release-please.yml +0 -39
- data/.gitignore +0 -39
- data/.kokoro/populate-secrets.sh +0 -76
- data/.kokoro/release.cfg +0 -52
- data/.kokoro/release.sh +0 -18
- data/.kokoro/trampoline_v2.sh +0 -489
- data/.repo-metadata.json +0 -5
- data/.rspec +0 -2
- data/.rubocop.yml +0 -17
- data/.toys/.toys.rb +0 -45
- data/.toys/ci.rb +0 -43
- data/.toys/kokoro/.toys.rb +0 -66
- data/.toys/kokoro/publish-docs.rb +0 -67
- data/.toys/kokoro/publish-gem.rb +0 -53
- data/.toys/linkinator.rb +0 -43
- data/.trampolinerc +0 -48
- data/Gemfile +0 -25
- data/googleauth.gemspec +0 -39
- data/integration/helper.rb +0 -31
- data/integration/id_tokens/key_source_test.rb +0 -74
- data/spec/googleauth/apply_auth_examples.rb +0 -171
- data/spec/googleauth/client_id_spec.rb +0 -160
- data/spec/googleauth/compute_engine_spec.rb +0 -178
- data/spec/googleauth/credentials_spec.rb +0 -600
- data/spec/googleauth/get_application_default_spec.rb +0 -286
- data/spec/googleauth/iam_spec.rb +0 -80
- data/spec/googleauth/scope_util_spec.rb +0 -77
- data/spec/googleauth/service_account_spec.rb +0 -497
- data/spec/googleauth/signet_spec.rb +0 -142
- data/spec/googleauth/stores/file_token_store_spec.rb +0 -57
- data/spec/googleauth/stores/redis_token_store_spec.rb +0 -50
- data/spec/googleauth/stores/store_examples.rb +0 -58
- data/spec/googleauth/user_authorizer_spec.rb +0 -343
- data/spec/googleauth/user_refresh_spec.rb +0 -359
- data/spec/googleauth/web_user_authorizer_spec.rb +0 -172
- data/spec/spec_helper.rb +0 -92
- data/test/helper.rb +0 -33
- data/test/id_tokens/key_sources_test.rb +0 -240
- data/test/id_tokens/verifier_test.rb +0 -269
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.
|
|
4
|
+
version: 1.0.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: 2021-
|
|
11
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -102,69 +102,36 @@ dependencies:
|
|
|
102
102
|
name: signet
|
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
|
104
104
|
requirements:
|
|
105
|
-
- - "
|
|
105
|
+
- - ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '0.16'
|
|
108
|
+
- - "<"
|
|
106
109
|
- !ruby/object:Gem::Version
|
|
107
|
-
version:
|
|
110
|
+
version: 2.a
|
|
108
111
|
type: :runtime
|
|
109
112
|
prerelease: false
|
|
110
113
|
version_requirements: !ruby/object:Gem::Requirement
|
|
111
114
|
requirements:
|
|
112
|
-
- - "
|
|
113
|
-
- !ruby/object:Gem::Version
|
|
114
|
-
version: '0.14'
|
|
115
|
-
- !ruby/object:Gem::Dependency
|
|
116
|
-
name: yard
|
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
|
118
|
-
requirements:
|
|
119
|
-
- - "~>"
|
|
115
|
+
- - ">="
|
|
120
116
|
- !ruby/object:Gem::Version
|
|
121
|
-
version: '0.
|
|
122
|
-
|
|
123
|
-
prerelease: false
|
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
125
|
-
requirements:
|
|
126
|
-
- - "~>"
|
|
117
|
+
version: '0.16'
|
|
118
|
+
- - "<"
|
|
127
119
|
- !ruby/object:Gem::Version
|
|
128
|
-
version:
|
|
129
|
-
description:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
email: temiola@google.com
|
|
120
|
+
version: 2.a
|
|
121
|
+
description: Implements simple authorization for accessing Google APIs, and provides
|
|
122
|
+
support for Application Default Credentials.
|
|
123
|
+
email:
|
|
124
|
+
- temiola@google.com
|
|
134
125
|
executables: []
|
|
135
126
|
extensions: []
|
|
136
127
|
extra_rdoc_files: []
|
|
137
128
|
files:
|
|
138
|
-
- ".
|
|
139
|
-
- ".github/CONTRIBUTING.md"
|
|
140
|
-
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
141
|
-
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
142
|
-
- ".github/ISSUE_TEMPLATE/support_request.md"
|
|
143
|
-
- ".github/workflows/ci.yml"
|
|
144
|
-
- ".github/workflows/release-please.yml"
|
|
145
|
-
- ".gitignore"
|
|
146
|
-
- ".kokoro/populate-secrets.sh"
|
|
147
|
-
- ".kokoro/release.cfg"
|
|
148
|
-
- ".kokoro/release.sh"
|
|
149
|
-
- ".kokoro/trampoline_v2.sh"
|
|
150
|
-
- ".repo-metadata.json"
|
|
151
|
-
- ".rspec"
|
|
152
|
-
- ".rubocop.yml"
|
|
153
|
-
- ".toys/.toys.rb"
|
|
154
|
-
- ".toys/ci.rb"
|
|
155
|
-
- ".toys/kokoro/.toys.rb"
|
|
156
|
-
- ".toys/kokoro/publish-docs.rb"
|
|
157
|
-
- ".toys/kokoro/publish-gem.rb"
|
|
158
|
-
- ".toys/linkinator.rb"
|
|
159
|
-
- ".trampolinerc"
|
|
129
|
+
- ".yardopts"
|
|
160
130
|
- CHANGELOG.md
|
|
161
131
|
- CODE_OF_CONDUCT.md
|
|
162
|
-
- Gemfile
|
|
163
132
|
- LICENSE
|
|
164
133
|
- README.md
|
|
165
|
-
-
|
|
166
|
-
- integration/helper.rb
|
|
167
|
-
- integration/id_tokens/key_source_test.rb
|
|
134
|
+
- SECURITY.md
|
|
168
135
|
- lib/googleauth.rb
|
|
169
136
|
- lib/googleauth/application_default.rb
|
|
170
137
|
- lib/googleauth/client_id.rb
|
|
@@ -188,29 +155,13 @@ files:
|
|
|
188
155
|
- lib/googleauth/user_refresh.rb
|
|
189
156
|
- lib/googleauth/version.rb
|
|
190
157
|
- lib/googleauth/web_user_authorizer.rb
|
|
191
|
-
- spec/googleauth/apply_auth_examples.rb
|
|
192
|
-
- spec/googleauth/client_id_spec.rb
|
|
193
|
-
- spec/googleauth/compute_engine_spec.rb
|
|
194
|
-
- spec/googleauth/credentials_spec.rb
|
|
195
|
-
- spec/googleauth/get_application_default_spec.rb
|
|
196
|
-
- spec/googleauth/iam_spec.rb
|
|
197
|
-
- spec/googleauth/scope_util_spec.rb
|
|
198
|
-
- spec/googleauth/service_account_spec.rb
|
|
199
|
-
- spec/googleauth/signet_spec.rb
|
|
200
|
-
- spec/googleauth/stores/file_token_store_spec.rb
|
|
201
|
-
- spec/googleauth/stores/redis_token_store_spec.rb
|
|
202
|
-
- spec/googleauth/stores/store_examples.rb
|
|
203
|
-
- spec/googleauth/user_authorizer_spec.rb
|
|
204
|
-
- spec/googleauth/user_refresh_spec.rb
|
|
205
|
-
- spec/googleauth/web_user_authorizer_spec.rb
|
|
206
|
-
- spec/spec_helper.rb
|
|
207
|
-
- test/helper.rb
|
|
208
|
-
- test/id_tokens/key_sources_test.rb
|
|
209
|
-
- test/id_tokens/verifier_test.rb
|
|
210
158
|
homepage: https://github.com/googleapis/google-auth-library-ruby
|
|
211
159
|
licenses:
|
|
212
160
|
- Apache-2.0
|
|
213
|
-
metadata:
|
|
161
|
+
metadata:
|
|
162
|
+
changelog_uri: https://github.com/googleapis/google-auth-library-ruby/blob/master/CHANGELOG.md
|
|
163
|
+
source_code_uri: https://github.com/googleapis/google-auth-library-ruby
|
|
164
|
+
bug_tracker_uri: https://github.com/googleapis/google-auth-library-ruby/issues
|
|
214
165
|
post_install_message:
|
|
215
166
|
rdoc_options: []
|
|
216
167
|
require_paths:
|
|
@@ -226,24 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
226
177
|
- !ruby/object:Gem::Version
|
|
227
178
|
version: '0'
|
|
228
179
|
requirements: []
|
|
229
|
-
rubygems_version: 3.2.
|
|
180
|
+
rubygems_version: 3.2.17
|
|
230
181
|
signing_key:
|
|
231
182
|
specification_version: 4
|
|
232
183
|
summary: Google Auth Library for Ruby
|
|
233
|
-
test_files:
|
|
234
|
-
- spec/googleauth/apply_auth_examples.rb
|
|
235
|
-
- spec/googleauth/client_id_spec.rb
|
|
236
|
-
- spec/googleauth/compute_engine_spec.rb
|
|
237
|
-
- spec/googleauth/credentials_spec.rb
|
|
238
|
-
- spec/googleauth/get_application_default_spec.rb
|
|
239
|
-
- spec/googleauth/iam_spec.rb
|
|
240
|
-
- spec/googleauth/scope_util_spec.rb
|
|
241
|
-
- spec/googleauth/service_account_spec.rb
|
|
242
|
-
- spec/googleauth/signet_spec.rb
|
|
243
|
-
- spec/googleauth/stores/file_token_store_spec.rb
|
|
244
|
-
- spec/googleauth/stores/redis_token_store_spec.rb
|
|
245
|
-
- spec/googleauth/stores/store_examples.rb
|
|
246
|
-
- spec/googleauth/user_authorizer_spec.rb
|
|
247
|
-
- spec/googleauth/user_refresh_spec.rb
|
|
248
|
-
- spec/googleauth/web_user_authorizer_spec.rb
|
|
249
|
-
- spec/spec_helper.rb
|
|
184
|
+
test_files: []
|
data/.github/CODEOWNERS
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Code owners file.
|
|
2
|
-
# This file controls who is tagged for review for any given pull request.
|
|
3
|
-
#
|
|
4
|
-
# For syntax help see:
|
|
5
|
-
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
|
|
6
|
-
|
|
7
|
-
* @googleapis/yoshi-ruby
|
data/.github/CONTRIBUTING.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# How to become a contributor and submit your own code
|
|
2
|
-
|
|
3
|
-
## Contributor License Agreements
|
|
4
|
-
|
|
5
|
-
We'd love to accept your sample apps and patches! Before we can take them, we
|
|
6
|
-
have to jump a couple of legal hurdles.
|
|
7
|
-
|
|
8
|
-
Please fill out either the individual or corporate Contributor License Agreement
|
|
9
|
-
(CLA).
|
|
10
|
-
|
|
11
|
-
* If you are an individual writing original source code and you're sure you
|
|
12
|
-
own the intellectual property, then you'll need to sign an [individual CLA].
|
|
13
|
-
* If you work for a company that wants to allow you to contribute your work,
|
|
14
|
-
then you'll need to sign a [corporate CLA].
|
|
15
|
-
|
|
16
|
-
[individual CLA]: http://code.google.com/legal/individual-cla-v1.0.html
|
|
17
|
-
[corporate CLA]: http://code.google.com/legal/corporate-cla-v1.0.html
|
|
18
|
-
|
|
19
|
-
Follow either of the two links above to access the appropriate CLA and
|
|
20
|
-
instructions for how to sign and return it. Once we receive it, we'll be able to
|
|
21
|
-
accept your pull requests.
|
|
22
|
-
|
|
23
|
-
## Issue reporting
|
|
24
|
-
|
|
25
|
-
* Check that the issue has not already been reported.
|
|
26
|
-
* Check that the issue has not already been fixed in the latest code
|
|
27
|
-
(a.k.a. `master`).
|
|
28
|
-
* Be clear, concise and precise in your description of the problem.
|
|
29
|
-
* Open an issue with a descriptive title and a summary in grammatically correct,
|
|
30
|
-
complete sentences.
|
|
31
|
-
* Include any relevant code to the issue summary.
|
|
32
|
-
|
|
33
|
-
## Pull requests
|
|
34
|
-
|
|
35
|
-
* Read [how to properly contribute to open source projects on Github][2].
|
|
36
|
-
* Fork the project.
|
|
37
|
-
* Use a topic/feature branch to easily amend a pull request later, if necessary.
|
|
38
|
-
* Write [good commit messages][3].
|
|
39
|
-
* Use the same coding conventions as the rest of the project.
|
|
40
|
-
* Commit and push until you are happy with your contribution.
|
|
41
|
-
* Make sure to add tests for it. This is important so I don't break it
|
|
42
|
-
in a future version unintentionally.
|
|
43
|
-
* Add an entry to the [Changelog](CHANGELOG.md) accordingly. See [changelog entry format](#changelog-entry-format).
|
|
44
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to
|
|
45
|
-
have your own version, or is otherwise necessary, that is fine, but please
|
|
46
|
-
isolate to its own commit so I can cherry-pick around it.
|
|
47
|
-
* Make sure the test suite is passing and the code you wrote doesn't produce
|
|
48
|
-
RuboCop offenses.
|
|
49
|
-
* [Squash related commits together][5].
|
|
50
|
-
* Open a [pull request][4] that relates to *only* one subject with a clear title
|
|
51
|
-
and description in grammatically correct, complete sentences.
|
|
52
|
-
|
|
53
|
-
### Changelog entry format
|
|
54
|
-
|
|
55
|
-
Here are a few examples:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
* makes the scope parameter's optional in all APIs. (@tbetbetbe[])
|
|
59
|
-
* [#14](https://github.com/google/google-auth-library-ruby/issues/14): ADC Support for JWT Service Tokens. ([@tbetbetbe][])
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
* Mark it up in [Markdown syntax][6].
|
|
63
|
-
* The entry line should start with `* ` (an asterisk and a space).
|
|
64
|
-
* If the change has a related GitHub issue (e.g. a bug fix for a reported issue), put a link to the issue as `[#123](https://github.com/google/google-auth-library-ruby/issues/11): `.
|
|
65
|
-
* Describe the brief of the change. The sentence should end with a punctuation.
|
|
66
|
-
* At the end of the entry, add an implicit link to your GitHub user page as `([@username][])`.
|
|
67
|
-
* If this is your first contribution to google-auth-library-ruby project, add a link definition for the implicit link to the bottom of the changelog as `[@username]: https://github.com/username`.
|
|
68
|
-
|
|
69
|
-
[1]: https://github.com/google/google-auth-ruby-library/issues
|
|
70
|
-
[2]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
|
|
71
|
-
[3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
|
72
|
-
[4]: https://help.github.com/articles/using-pull-requests
|
|
73
|
-
[5]: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
|
|
74
|
-
[6]: http://daringfireball.net/projects/markdown/syntax
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Thanks for stopping by to let us know something could be better!
|
|
8
|
-
|
|
9
|
-
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
|
|
10
|
-
|
|
11
|
-
Please run down the following list and make sure you've tried the usual "quick fixes":
|
|
12
|
-
|
|
13
|
-
- Search the issues already opened: https://github.com/googleapis/google-auth-library-ruby/issues
|
|
14
|
-
- Search Stack Overflow: https://stackoverflow.com/questions/tagged/google-auth-library-ruby
|
|
15
|
-
|
|
16
|
-
If you are still having issues, please be sure to include as much information as possible:
|
|
17
|
-
|
|
18
|
-
#### Environment details
|
|
19
|
-
|
|
20
|
-
- OS:
|
|
21
|
-
- Ruby version:
|
|
22
|
-
- Gem name and version:
|
|
23
|
-
|
|
24
|
-
#### Steps to reproduce
|
|
25
|
-
|
|
26
|
-
1. ...
|
|
27
|
-
|
|
28
|
-
#### Code example
|
|
29
|
-
|
|
30
|
-
```ruby
|
|
31
|
-
# example
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Making sure to follow these steps will guarantee the quickest resolution possible.
|
|
35
|
-
|
|
36
|
-
Thanks!
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this library
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Thanks for stopping by to let us know something could be better!
|
|
8
|
-
|
|
9
|
-
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
|
|
10
|
-
|
|
11
|
-
**Is your feature request related to a problem? Please describe.**
|
|
12
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
13
|
-
|
|
14
|
-
**Describe the solution you'd like**
|
|
15
|
-
A clear and concise description of what you want to happen.
|
|
16
|
-
|
|
17
|
-
**Describe alternatives you've considered**
|
|
18
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
19
|
-
|
|
20
|
-
**Additional context**
|
|
21
|
-
Add any other context or screenshots about the feature request here.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Support request
|
|
3
|
-
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
|
data/.github/workflows/ci.yml
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
branches:
|
|
5
|
-
- master
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- master
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
jobs:
|
|
11
|
-
CI:
|
|
12
|
-
if: ${{ github.repository == 'googleapis/google-auth-library-ruby' }}
|
|
13
|
-
strategy:
|
|
14
|
-
matrix:
|
|
15
|
-
include:
|
|
16
|
-
- os: ubuntu-latest
|
|
17
|
-
ruby: "2.5"
|
|
18
|
-
task: test , spec
|
|
19
|
-
- os: ubuntu-latest
|
|
20
|
-
ruby: "2.6"
|
|
21
|
-
task: test , spec
|
|
22
|
-
- os: ubuntu-latest
|
|
23
|
-
ruby: "2.7"
|
|
24
|
-
task: test , spec
|
|
25
|
-
- os: ubuntu-latest
|
|
26
|
-
ruby: "3.0"
|
|
27
|
-
task: test , spec
|
|
28
|
-
- os: macos-latest
|
|
29
|
-
ruby: "2.7"
|
|
30
|
-
task: test , spec
|
|
31
|
-
- os: windows-latest
|
|
32
|
-
ruby: "2.7"
|
|
33
|
-
task: test , spec
|
|
34
|
-
- os: ubuntu-latest
|
|
35
|
-
ruby: "2.7"
|
|
36
|
-
task: rubocop , integration , build , yardoc , linkinator
|
|
37
|
-
fail-fast: false
|
|
38
|
-
runs-on: ${{ matrix.os }}
|
|
39
|
-
steps:
|
|
40
|
-
- name: Checkout repo
|
|
41
|
-
uses: actions/checkout@v2
|
|
42
|
-
- name: Install Ruby ${{ matrix.ruby }}
|
|
43
|
-
uses: ruby/setup-ruby@v1
|
|
44
|
-
with:
|
|
45
|
-
ruby-version: "${{ matrix.ruby }}"
|
|
46
|
-
- name: Install NodeJS 14.x
|
|
47
|
-
uses: actions/setup-node@v1
|
|
48
|
-
with:
|
|
49
|
-
node-version: "14.x"
|
|
50
|
-
- name: Install dependencies
|
|
51
|
-
shell: bash
|
|
52
|
-
run: "gem install --no-document toys && bundle install"
|
|
53
|
-
- name: Test ${{ matrix.task }}
|
|
54
|
-
shell: bash
|
|
55
|
-
run: toys do ${{ matrix.task }} < /dev/null
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
on:
|
|
2
|
-
schedule:
|
|
3
|
-
- cron: '29 9 * * *'
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
name: release-please
|
|
7
|
-
jobs:
|
|
8
|
-
release-please:
|
|
9
|
-
env:
|
|
10
|
-
ENABLE_RELEASE_PLEASE: ${{ secrets.ENABLE_RELEASE_PLEASE }}
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: ReleasePlease
|
|
14
|
-
id: release-please
|
|
15
|
-
if: ${{ env.ENABLE_RELEASE_PLEASE || github.event_name == 'workflow_dispatch' }}
|
|
16
|
-
uses: GoogleCloudPlatform/release-please-action@v2
|
|
17
|
-
with:
|
|
18
|
-
command: release-pr
|
|
19
|
-
token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
|
|
20
|
-
fork: true
|
|
21
|
-
release-type: ruby
|
|
22
|
-
package-name: google-auth-library-ruby
|
|
23
|
-
version-file: lib/googleauth/version.rb
|
|
24
|
-
monorepo-tags: true
|
|
25
|
-
bump-minor-pre-major: true
|
|
26
|
-
- name: ReleaseLabel
|
|
27
|
-
id: release-label
|
|
28
|
-
if: ${{ steps.release-please.outputs.pr }}
|
|
29
|
-
uses: actions/github-script@v2
|
|
30
|
-
with:
|
|
31
|
-
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
|
|
32
|
-
script: |
|
|
33
|
-
core.info("Labeling release");
|
|
34
|
-
github.issues.addLabels({
|
|
35
|
-
owner: 'googleapis',
|
|
36
|
-
repo: 'google-auth-library-ruby',
|
|
37
|
-
issue_number: ${{ steps.release-please.outputs.pr }},
|
|
38
|
-
labels: ["autorelease: pending"]
|
|
39
|
-
});
|
data/.gitignore
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
*~
|
|
2
|
-
Gemfile.lock
|
|
3
|
-
*.gem
|
|
4
|
-
*.rbc
|
|
5
|
-
/.config
|
|
6
|
-
/coverage/
|
|
7
|
-
/InstalledFiles
|
|
8
|
-
/pkg/
|
|
9
|
-
/spec/reports/
|
|
10
|
-
/test/tmp/
|
|
11
|
-
/test/version_tmp/
|
|
12
|
-
/tmp/
|
|
13
|
-
|
|
14
|
-
## Specific to RubyMotion:
|
|
15
|
-
.dat*
|
|
16
|
-
.repl_history
|
|
17
|
-
build/
|
|
18
|
-
|
|
19
|
-
## Documentation cache and generated files:
|
|
20
|
-
/.yardoc/
|
|
21
|
-
/_yardoc/
|
|
22
|
-
/doc/
|
|
23
|
-
/rdoc/
|
|
24
|
-
|
|
25
|
-
## Environment normalisation:
|
|
26
|
-
/.bundle/
|
|
27
|
-
/lib/bundler/man/
|
|
28
|
-
|
|
29
|
-
# for a library or gem, you might want to ignore these files since the code is
|
|
30
|
-
# intended to run in multiple environments; otherwise, check them in:
|
|
31
|
-
# Gemfile.lock
|
|
32
|
-
# .ruby-version
|
|
33
|
-
# .ruby-gemset
|
|
34
|
-
|
|
35
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
36
|
-
.rvmrc
|
|
37
|
-
|
|
38
|
-
/node_modules
|
|
39
|
-
/package-lock.json
|
data/.kokoro/populate-secrets.sh
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Copyright 2020 Google LLC.
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
|
|
16
|
-
# This file is called in the early stage of `trampoline_v2.sh` to
|
|
17
|
-
# populate secrets needed for the CI builds.
|
|
18
|
-
|
|
19
|
-
set -eo pipefail
|
|
20
|
-
|
|
21
|
-
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
|
|
22
|
-
function msg { println "$*" >&2 ;}
|
|
23
|
-
function println { printf '%s\n' "$(now) $*" ;}
|
|
24
|
-
|
|
25
|
-
# Populates requested secrets set in SECRET_MANAGER_KEYS
|
|
26
|
-
|
|
27
|
-
# In Kokoro CI builds, we use the service account attached to the
|
|
28
|
-
# Kokoro VM. This means we need to setup auth on other CI systems.
|
|
29
|
-
# For local run, we just use the gcloud command for retrieving the
|
|
30
|
-
# secrets.
|
|
31
|
-
|
|
32
|
-
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
|
|
33
|
-
GCLOUD_COMMANDS=(
|
|
34
|
-
"docker"
|
|
35
|
-
"run"
|
|
36
|
-
"--entrypoint=gcloud"
|
|
37
|
-
"--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR}"
|
|
38
|
-
"gcr.io/google.com/cloudsdktool/cloud-sdk"
|
|
39
|
-
)
|
|
40
|
-
if [[ "${TRAMPOLINE_CI:-}" == "kokoro" ]]; then
|
|
41
|
-
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
|
|
42
|
-
else
|
|
43
|
-
echo "Authentication for this CI system is not implemented yet."
|
|
44
|
-
exit 2
|
|
45
|
-
# TODO: Determine appropriate SECRET_LOCATION and the GCLOUD_COMMANDS.
|
|
46
|
-
fi
|
|
47
|
-
else
|
|
48
|
-
# For local run, use /dev/shm or temporary directory for
|
|
49
|
-
# KOKORO_GFILE_DIR.
|
|
50
|
-
if [[ -d "/dev/shm" ]]; then
|
|
51
|
-
export KOKORO_GFILE_DIR=/dev/shm
|
|
52
|
-
else
|
|
53
|
-
export KOKORO_GFILE_DIR=$(mktemp -d -t ci-XXXXXXXX)
|
|
54
|
-
fi
|
|
55
|
-
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
|
|
56
|
-
GCLOUD_COMMANDS=("gcloud")
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
|
|
60
|
-
mkdir -p ${SECRET_LOCATION}
|
|
61
|
-
|
|
62
|
-
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
|
|
63
|
-
do
|
|
64
|
-
msg "Retrieving secret ${key}"
|
|
65
|
-
"${GCLOUD_COMMANDS[@]}" \
|
|
66
|
-
secrets versions access latest \
|
|
67
|
-
--project cloud-devrel-kokoro-resources \
|
|
68
|
-
--secret $key > \
|
|
69
|
-
"$SECRET_LOCATION/$key"
|
|
70
|
-
if [[ $? == 0 ]]; then
|
|
71
|
-
msg "Secret written to ${SECRET_LOCATION}/${key}"
|
|
72
|
-
else
|
|
73
|
-
msg "Error retrieving secret ${key}"
|
|
74
|
-
exit 2
|
|
75
|
-
fi
|
|
76
|
-
done
|
data/.kokoro/release.cfg
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
|
2
|
-
|
|
3
|
-
# Build logs will be here
|
|
4
|
-
action {
|
|
5
|
-
define_artifacts {
|
|
6
|
-
regex: "**/*sponge_log.xml"
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
# Fetch the token needed for reporting release status to GitHub
|
|
11
|
-
before_action {
|
|
12
|
-
fetch_keystore {
|
|
13
|
-
keystore_resource {
|
|
14
|
-
keystore_config_id: 73713
|
|
15
|
-
keyname: "yoshi-automation-github-key"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
before_action {
|
|
21
|
-
fetch_keystore {
|
|
22
|
-
keystore_resource {
|
|
23
|
-
keystore_config_id: 73713
|
|
24
|
-
keyname: "docuploader_service_account"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
# Download resources for system tests (service account key, etc.)
|
|
30
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
|
|
31
|
-
|
|
32
|
-
# Download trampoline resources.
|
|
33
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
|
|
34
|
-
|
|
35
|
-
# Use the trampoline script to run in docker.
|
|
36
|
-
build_file: "google-auth-library-ruby/.kokoro/trampoline_v2.sh"
|
|
37
|
-
|
|
38
|
-
# Configure the docker image for kokoro-trampoline.
|
|
39
|
-
env_vars: {
|
|
40
|
-
key: "TRAMPOLINE_IMAGE"
|
|
41
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release"
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
env_vars: {
|
|
45
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
|
46
|
-
value: ".kokoro/release.sh"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
env_vars: {
|
|
50
|
-
key: "SECRET_MANAGER_KEYS"
|
|
51
|
-
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
|
|
52
|
-
}
|
data/.kokoro/release.sh
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -eo pipefail
|
|
4
|
-
|
|
5
|
-
# Install gems in the user directory because the default install directory
|
|
6
|
-
# is in a read-only location.
|
|
7
|
-
export GEM_HOME=$HOME/.gem
|
|
8
|
-
export PATH=$GEM_HOME/bin:$PATH
|
|
9
|
-
|
|
10
|
-
python3 -m pip install git+https://github.com/googleapis/releasetool
|
|
11
|
-
python3 -m pip install gcp-docuploader
|
|
12
|
-
gem install --no-document toys
|
|
13
|
-
bundle install
|
|
14
|
-
|
|
15
|
-
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
|
|
16
|
-
|
|
17
|
-
toys kokoro publish-gem < /dev/null
|
|
18
|
-
toys kokoro publish-docs < /dev/null
|