googleauth 0.16.0 → 0.16.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/.github/workflows/ci.yml +55 -0
- data/.github/workflows/{release.yml → release-please.yml} +2 -2
- data/.gitignore +3 -0
- data/.kokoro/populate-secrets.sh +76 -0
- data/.kokoro/release.cfg +7 -49
- data/.kokoro/release.sh +18 -0
- data/.kokoro/trampoline_v2.sh +489 -0
- data/.toys/.toys.rb +45 -0
- data/.toys/ci.rb +43 -0
- data/.toys/kokoro/.toys.rb +66 -0
- data/.toys/kokoro/publish-docs.rb +67 -0
- data/.toys/kokoro/publish-gem.rb +53 -0
- data/.toys/linkinator.rb +43 -0
- data/.trampolinerc +48 -0
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/lib/googleauth/compute_engine.rb +1 -1
- data/lib/googleauth/version.rb +1 -1
- metadata +15 -22
- data/.kokoro/build.bat +0 -16
- data/.kokoro/build.sh +0 -4
- data/.kokoro/continuous/common.cfg +0 -24
- data/.kokoro/continuous/linux.cfg +0 -25
- data/.kokoro/continuous/osx.cfg +0 -8
- data/.kokoro/continuous/post.cfg +0 -30
- data/.kokoro/continuous/windows.cfg +0 -29
- data/.kokoro/osx.sh +0 -4
- data/.kokoro/presubmit/common.cfg +0 -24
- data/.kokoro/presubmit/linux.cfg +0 -24
- data/.kokoro/presubmit/osx.cfg +0 -8
- data/.kokoro/presubmit/windows.cfg +0 -29
- data/.kokoro/trampoline.bat +0 -10
- data/.kokoro/trampoline.sh +0 -4
- data/Rakefile +0 -132
- data/rakelib/devsite_builder.rb +0 -45
- data/rakelib/link_checker.rb +0 -64
- data/rakelib/repo_metadata.rb +0 -59
data/.kokoro/build.bat
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
REM This file runs tests for merges, PRs, and nightlies.
|
2
|
-
REM There are a few rules for what tests are run:
|
3
|
-
REM * PRs run all non-acceptance tests for every library.
|
4
|
-
REM * Merges run all non-acceptance tests for every library, and acceptance tests for all altered libraries.
|
5
|
-
REM * Nightlies run all acceptance tests for every library.
|
6
|
-
REM Currently only runs tests on 2.5.1
|
7
|
-
|
8
|
-
SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/build.bat"
|
9
|
-
|
10
|
-
SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-build.bat"
|
11
|
-
|
12
|
-
SET EXIT_STATUS=1
|
13
|
-
|
14
|
-
%download% && master-build.bat && SET EXIT_STATUS=0
|
15
|
-
|
16
|
-
EXIT %EXIT_STATUS%
|
data/.kokoro/build.sh
DELETED
@@ -1,24 +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
|
-
# Download trampoline resources.
|
11
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
|
12
|
-
|
13
|
-
# Download resources for system tests (service account key, etc.)
|
14
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
|
15
|
-
|
16
|
-
env_vars: {
|
17
|
-
key: "JOB_TYPE"
|
18
|
-
value: "continuous"
|
19
|
-
}
|
20
|
-
|
21
|
-
env_vars: {
|
22
|
-
key: "REPO_DIR"
|
23
|
-
value: "github/google-auth-library-ruby"
|
24
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
2
|
-
|
3
|
-
build_file: "google-auth-library-ruby/.kokoro/trampoline.sh"
|
4
|
-
|
5
|
-
# Configure the docker image for kokoro-trampoline.
|
6
|
-
# Dockerfile is maintained at https://github.com/googleapis/google-cloud-ruby/tree/master/.kokoro/docker/multi
|
7
|
-
env_vars: {
|
8
|
-
key: "TRAMPOLINE_IMAGE"
|
9
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi"
|
10
|
-
}
|
11
|
-
|
12
|
-
env_vars: {
|
13
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
14
|
-
value: "github/google-auth-library-ruby/.kokoro/build.sh"
|
15
|
-
}
|
16
|
-
|
17
|
-
env_vars: {
|
18
|
-
key: "TRAMPOLINE_SCRIPT"
|
19
|
-
value: "trampoline_v1.py"
|
20
|
-
}
|
21
|
-
|
22
|
-
env_vars: {
|
23
|
-
key: "OS"
|
24
|
-
value: "linux"
|
25
|
-
}
|
data/.kokoro/continuous/osx.cfg
DELETED
data/.kokoro/continuous/post.cfg
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
2
|
-
|
3
|
-
build_file: "google-auth-library-ruby/.kokoro/trampoline.sh"
|
4
|
-
|
5
|
-
# Configure the docker image for kokoro-trampoline.
|
6
|
-
# Dockerfile is maintained at https://github.com/googleapis/google-cloud-ruby/tree/master/.kokoro/docker/multi-node
|
7
|
-
env_vars: {
|
8
|
-
key: "TRAMPOLINE_IMAGE"
|
9
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi-node"
|
10
|
-
}
|
11
|
-
|
12
|
-
env_vars: {
|
13
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
14
|
-
value: "github/google-auth-library-ruby/.kokoro/build.sh"
|
15
|
-
}
|
16
|
-
|
17
|
-
env_vars: {
|
18
|
-
key: "TRAMPOLINE_SCRIPT"
|
19
|
-
value: "trampoline_v1.py"
|
20
|
-
}
|
21
|
-
|
22
|
-
env_vars: {
|
23
|
-
key: "OS"
|
24
|
-
value: "linux"
|
25
|
-
}
|
26
|
-
|
27
|
-
env_vars: {
|
28
|
-
key: "JOB_TYPE"
|
29
|
-
value: "post"
|
30
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
2
|
-
|
3
|
-
build_file: "google-auth-library-ruby/.kokoro/trampoline.bat"
|
4
|
-
|
5
|
-
# Configure the docker image for kokoro-trampoline.
|
6
|
-
env_vars: {
|
7
|
-
key: "TRAMPOLINE_IMAGE"
|
8
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/windows"
|
9
|
-
}
|
10
|
-
|
11
|
-
env_vars: {
|
12
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
13
|
-
value: "github/google-auth-library-ruby/.kokoro/build.bat"
|
14
|
-
}
|
15
|
-
|
16
|
-
env_vars: {
|
17
|
-
key: "TRAMPOLINE_SCRIPT"
|
18
|
-
value: "trampoline_windows.py"
|
19
|
-
}
|
20
|
-
|
21
|
-
env_vars: {
|
22
|
-
key: "REPO_DIR"
|
23
|
-
value: "google-auth-library-ruby"
|
24
|
-
}
|
25
|
-
|
26
|
-
env_vars: {
|
27
|
-
key: "OS"
|
28
|
-
value: "windows"
|
29
|
-
}
|
data/.kokoro/osx.sh
DELETED
@@ -1,24 +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
|
-
# Download trampoline resources.
|
11
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
|
12
|
-
|
13
|
-
# Download resources for system tests (service account key, etc.)
|
14
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
|
15
|
-
|
16
|
-
env_vars: {
|
17
|
-
key: "JOB_TYPE"
|
18
|
-
value: "presubmit"
|
19
|
-
}
|
20
|
-
|
21
|
-
env_vars: {
|
22
|
-
key: "REPO_DIR"
|
23
|
-
value: "github/google-auth-library-ruby"
|
24
|
-
}
|
data/.kokoro/presubmit/linux.cfg
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
2
|
-
|
3
|
-
build_file: "google-auth-library-ruby/.kokoro/trampoline.sh"
|
4
|
-
|
5
|
-
# Configure the docker image for kokoro-trampoline.
|
6
|
-
env_vars: {
|
7
|
-
key: "TRAMPOLINE_IMAGE"
|
8
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi"
|
9
|
-
}
|
10
|
-
|
11
|
-
env_vars: {
|
12
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
13
|
-
value: "github/google-auth-library-ruby/.kokoro/build.sh"
|
14
|
-
}
|
15
|
-
|
16
|
-
env_vars: {
|
17
|
-
key: "TRAMPOLINE_SCRIPT"
|
18
|
-
value: "trampoline_v1.py"
|
19
|
-
}
|
20
|
-
|
21
|
-
env_vars: {
|
22
|
-
key: "OS"
|
23
|
-
value: "linux"
|
24
|
-
}
|
data/.kokoro/presubmit/osx.cfg
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
2
|
-
|
3
|
-
build_file: "google-auth-library-ruby/.kokoro/trampoline.bat"
|
4
|
-
|
5
|
-
# Configure the docker image for kokoro-trampoline.
|
6
|
-
env_vars: {
|
7
|
-
key: "TRAMPOLINE_IMAGE"
|
8
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/windows"
|
9
|
-
}
|
10
|
-
|
11
|
-
env_vars: {
|
12
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
13
|
-
value: "github/google-auth-library-ruby/.kokoro/build.bat"
|
14
|
-
}
|
15
|
-
|
16
|
-
env_vars: {
|
17
|
-
key: "TRAMPOLINE_SCRIPT"
|
18
|
-
value: "trampoline_windows.py"
|
19
|
-
}
|
20
|
-
|
21
|
-
env_vars: {
|
22
|
-
key: "REPO_DIR"
|
23
|
-
value: "google-auth-library-ruby"
|
24
|
-
}
|
25
|
-
|
26
|
-
env_vars: {
|
27
|
-
key: "OS"
|
28
|
-
value: "windows"
|
29
|
-
}
|
data/.kokoro/trampoline.bat
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
|
2
|
-
SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/trampoline.bat"
|
3
|
-
|
4
|
-
SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-trampoline.bat"
|
5
|
-
|
6
|
-
SET EXIT_STATUS=1
|
7
|
-
|
8
|
-
%download% && master-trampoline.bat && SET EXIT_STATUS=0
|
9
|
-
|
10
|
-
EXIT %EXIT_STATUS%
|
data/.kokoro/trampoline.sh
DELETED
data/Rakefile
DELETED
@@ -1,132 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
require "json"
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
|
5
|
-
require "rubocop/rake_task"
|
6
|
-
RuboCop::RakeTask.new
|
7
|
-
|
8
|
-
require "rake/testtask"
|
9
|
-
|
10
|
-
desc "Run tests."
|
11
|
-
Rake::TestTask.new do |t|
|
12
|
-
t.libs << "test"
|
13
|
-
t.test_files = FileList["test/**/*_test.rb"]
|
14
|
-
t.warning = false
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Run integration tests."
|
18
|
-
Rake::TestTask.new("integration") do |t|
|
19
|
-
t.libs << "integration"
|
20
|
-
t.test_files = FileList["integration/**/*_test.rb"]
|
21
|
-
t.warning = false
|
22
|
-
end
|
23
|
-
|
24
|
-
task :ci do
|
25
|
-
header "Using Ruby - #{RUBY_VERSION}"
|
26
|
-
sh "bundle exec rubocop"
|
27
|
-
Rake::Task["test"].invoke
|
28
|
-
Rake::Task["integration"].invoke
|
29
|
-
sh "bundle exec rspec"
|
30
|
-
end
|
31
|
-
|
32
|
-
task :release_gem, :tag do |_t, args|
|
33
|
-
tag = args[:tag]
|
34
|
-
raise "You must provide a tag to release." if tag.nil?
|
35
|
-
|
36
|
-
# Verify the tag format "vVERSION"
|
37
|
-
m = tag.match /v(?<version>\S*)/
|
38
|
-
raise "Tag #{tag} does not match the expected format." if m.nil?
|
39
|
-
|
40
|
-
version = m[:version]
|
41
|
-
raise "You must provide a version." if version.nil?
|
42
|
-
|
43
|
-
api_token = ENV["RUBYGEMS_API_TOKEN"]
|
44
|
-
|
45
|
-
require "gems"
|
46
|
-
if api_token
|
47
|
-
::Gems.configure do |config|
|
48
|
-
config.key = api_token
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
Bundler.with_clean_env do
|
53
|
-
sh "rm -rf pkg"
|
54
|
-
sh "bundle update"
|
55
|
-
sh "bundle exec rake build"
|
56
|
-
end
|
57
|
-
|
58
|
-
path_to_be_pushed = "pkg/googleauth-#{version}.gem"
|
59
|
-
gem_was_published = nil
|
60
|
-
if File.file? path_to_be_pushed
|
61
|
-
begin
|
62
|
-
response = ::Gems.push File.new(path_to_be_pushed)
|
63
|
-
puts response
|
64
|
-
raise unless response.include? "Successfully registered gem:"
|
65
|
-
gem_was_published = true
|
66
|
-
puts "Successfully built and pushed googleauth for version #{version}"
|
67
|
-
rescue StandardError => e
|
68
|
-
gem_was_published = false
|
69
|
-
puts "Error while releasing googleauth version #{version}: #{e.message}"
|
70
|
-
end
|
71
|
-
else
|
72
|
-
raise "Cannot build googleauth for version #{version}"
|
73
|
-
end
|
74
|
-
|
75
|
-
Rake::Task["kokoro:publish_docs"].invoke if gem_was_published
|
76
|
-
end
|
77
|
-
|
78
|
-
namespace :kokoro do
|
79
|
-
task :load_env_vars do
|
80
|
-
service_account = "#{ENV['KOKORO_GFILE_DIR']}/service-account.json"
|
81
|
-
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = service_account
|
82
|
-
filename = "#{ENV['KOKORO_GFILE_DIR']}/env_vars.json"
|
83
|
-
env_vars = JSON.parse File.read(filename)
|
84
|
-
env_vars.each { |k, v| ENV[k] = v }
|
85
|
-
end
|
86
|
-
|
87
|
-
task :presubmit do
|
88
|
-
Rake::Task["ci"].invoke
|
89
|
-
end
|
90
|
-
|
91
|
-
task :continuous do
|
92
|
-
Rake::Task["ci"].invoke
|
93
|
-
end
|
94
|
-
|
95
|
-
task :post do
|
96
|
-
require_relative "rakelib/link_checker.rb"
|
97
|
-
|
98
|
-
link_checker = LinkChecker.new
|
99
|
-
link_checker.run
|
100
|
-
exit link_checker.exit_status
|
101
|
-
end
|
102
|
-
|
103
|
-
task :nightly do
|
104
|
-
Rake::Task["ci"].invoke
|
105
|
-
end
|
106
|
-
|
107
|
-
task :release do
|
108
|
-
version = "0.1.0"
|
109
|
-
Bundler.with_clean_env do
|
110
|
-
version = `bundle exec gem list`
|
111
|
-
.split("\n").select { |line| line.include? "googleauth" }
|
112
|
-
.first.split("(").last.split(")").first || "0.1.0"
|
113
|
-
end
|
114
|
-
Rake::Task["kokoro:load_env_vars"].invoke
|
115
|
-
Rake::Task["release_gem"].invoke "v#{version}"
|
116
|
-
end
|
117
|
-
|
118
|
-
task :publish_docs do
|
119
|
-
require_relative "rakelib/devsite_builder.rb"
|
120
|
-
|
121
|
-
DevsiteBuilder.new(__dir__).publish
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
def header str, token = "#"
|
126
|
-
line_length = str.length + 8
|
127
|
-
puts ""
|
128
|
-
puts token * line_length
|
129
|
-
puts "#{token * 3} #{str} #{token * 3}"
|
130
|
-
puts token * line_length
|
131
|
-
puts ""
|
132
|
-
end
|
data/rakelib/devsite_builder.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
require "pathname"
|
2
|
-
|
3
|
-
require_relative "repo_metadata.rb"
|
4
|
-
|
5
|
-
class DevsiteBuilder
|
6
|
-
def initialize master_dir = "."
|
7
|
-
@master_dir = Pathname.new master_dir
|
8
|
-
@output_dir = "doc"
|
9
|
-
@metadata = RepoMetadata.from_source "#{master_dir}/.repo-metadata.json"
|
10
|
-
end
|
11
|
-
|
12
|
-
def build
|
13
|
-
FileUtils.remove_dir @output_dir if Dir.exist? @output_dir
|
14
|
-
markup = "--markup markdown"
|
15
|
-
|
16
|
-
Dir.chdir @master_dir do
|
17
|
-
cmds = ["-o #{@output_dir}", markup]
|
18
|
-
cmd "yard --verbose #{cmds.join ' '}"
|
19
|
-
end
|
20
|
-
@metadata.build @master_dir + @output_dir
|
21
|
-
end
|
22
|
-
|
23
|
-
def upload
|
24
|
-
Dir.chdir @output_dir do
|
25
|
-
opts = [
|
26
|
-
"--credentials=#{ENV['KOKORO_KEYSTORE_DIR']}/73713_docuploader_service_account",
|
27
|
-
"--staging-bucket=#{ENV.fetch 'STAGING_BUCKET', 'docs-staging'}",
|
28
|
-
"--metadata-file=./docs.metadata"
|
29
|
-
]
|
30
|
-
cmd "python3 -m docuploader upload . #{opts.join ' '}"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def publish
|
35
|
-
build
|
36
|
-
upload
|
37
|
-
end
|
38
|
-
|
39
|
-
def cmd line
|
40
|
-
puts line
|
41
|
-
output = `#{line}`
|
42
|
-
puts output
|
43
|
-
output
|
44
|
-
end
|
45
|
-
end
|