Skip to content

Commit 220dcc2

Browse files
authored
chore(workflows): Switch to multi-wrapper owlbot postprocessor (googleapis#18959)
1 parent 18e7b3d commit 220dcc2

6 files changed

Lines changed: 40 additions & 37 deletions

File tree

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
deep-copy-regex:
22
- source: /google/cloud/workflows/[^/]+-ruby/(.*)
3-
dest: /owl-bot-staging/google-cloud-workflows/$1
4-
- source: /google/cloud/workflows/executions/[^/]+-ruby/lib/google/cloud/workflows/executions\.rb
5-
dest: /owl-bot-staging/google-cloud-workflows/lib/google/cloud/workflows/executions.rb
6-
- source: /google/cloud/workflows/executions/[^/]+-ruby/test/google/cloud/workflows/executions/client_test\.rb
7-
dest: /owl-bot-staging/google-cloud-workflows/test/google/cloud/workflows/executions/client_test.rb
3+
dest: /owl-bot-staging/google-cloud-workflows/google-cloud-workflows/$1
4+
- source: /google/cloud/workflows/executions/[^/]+-ruby/(.*)
5+
dest: /owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/$1

google-cloud-workflows/.owlbot-manifest.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
"lib/google-cloud-workflows.rb",
1515
"lib/google/cloud/workflows.rb",
1616
"lib/google/cloud/workflows/executions.rb",
17+
"lib/google/cloud/workflows/executions/version.rb",
1718
"lib/google/cloud/workflows/version.rb",
1819
"test/google/cloud/workflows/client_test.rb",
1920
"test/google/cloud/workflows/executions/client_test.rb",
21+
"test/google/cloud/workflows/executions/version_test.rb",
2022
"test/google/cloud/workflows/version_test.rb",
2123
"test/helper.rb"
2224
],
2325
"static": [
2426
".OwlBot.yaml",
25-
".owlbot.rb",
26-
"lib/google/cloud/workflows/executions/version.rb"
27+
".owlbot.rb"
2728
]
2829
}

google-cloud-workflows/.owlbot.rb

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Modify the gemspec so it includes the executions gem
16-
OwlBot.modifier path: "google-cloud-workflows.gemspec" do |content|
17-
content.sub(
18-
%r{\n gem.add_dependency "google-cloud-workflows-v1beta", "([^\n]+)"\n\n}m,
19-
"\n gem.add_dependency \"google-cloud-workflows-v1beta\", \"\\1\"" \
20-
"\n gem.add_dependency \"google-cloud-workflows-executions-v1\", \">= 0.0\", \"< 2.a\"" \
21-
"\n gem.add_dependency \"google-cloud-workflows-executions-v1beta\", \">= 0.0\", \"< 2.a\"\n\n"
22-
)
23-
end
24-
25-
# Modify the Gemfile so includes the executions gems
26-
OwlBot.modifier path: "Gemfile" do |content|
27-
content.sub(
28-
"\ngem \"google-cloud-workflows-v1beta\", path: \"../google-cloud-workflows-v1beta\"\n",
29-
"\ngem \"google-cloud-workflows-v1beta\", path: \"../google-cloud-workflows-v1beta\"" \
30-
"\ngem \"google-cloud-workflows-executions-v1\", path: \"../google-cloud-workflows-executions-v1\"" \
31-
"\ngem \"google-cloud-workflows-executions-v1beta\", path: \"../google-cloud-workflows-executions-v1beta\"\n"
32-
)
33-
end
34-
35-
# Modify the entrypoint so it requires executions
36-
OwlBot.modifier path: "lib/google-cloud-workflows.rb" do |content|
37-
content.sub(
38-
"\nrequire \"google/cloud/workflows\" unless defined? Google::Cloud::Workflows::VERSION\n",
39-
"\nrequire \"google/cloud/workflows\" unless defined? Google::Cloud::Workflows::VERSION" \
40-
"\nrequire \"google/cloud/workflows/executions\" unless defined? Google::Cloud::Workflows::Executions::VERSION\n"
41-
)
42-
end
15+
OwlBot.prepare_multi_wrapper [
16+
"google-cloud-workflows",
17+
"google-cloud-workflows-executions"
18+
]
4319

4420
OwlBot.move_files

google-cloud-workflows/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ constructing client objects. Reference documentation for the client objects
1717
themselves can be found in the client library documentation for the versioned
1818
client gems:
1919
[google-cloud-workflows-v1](https://googleapis.dev/ruby/google-cloud-workflows-v1/latest),
20-
[google-cloud-workflows-v1beta](https://googleapis.dev/ruby/google-cloud-workflows-v1beta/latest).
20+
[google-cloud-workflows-v1beta](https://googleapis.dev/ruby/google-cloud-workflows-v1beta/latest),
21+
[google-cloud-workflows-executions-v1](https://googleapis.dev/ruby/google-cloud-workflows-executions-v1/latest),
22+
[google-cloud-workflows-executions-v1beta](https://googleapis.dev/ruby/google-cloud-workflows-executions-v1beta/latest).
2123

2224
See also the [Product Documentation](https://cloud.google.com/workflows/)
2325
for more usage information.

google-cloud-workflows/lib/google/cloud/workflows/executions/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module Google
2121
module Cloud
2222
module Workflows
2323
module Executions
24-
# @private
24+
# @private Unused
2525
VERSION = ""
2626
end
2727
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# frozen_string_literal: true
2+
3+
# Copyright 2022 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18+
19+
require "helper"
20+
require "google/cloud/workflows/executions/version"
21+
22+
class Google::Cloud::Workflows::Executions::VersionMinitest < Minitest::Test
23+
def test_has_a_version
24+
refute_nil Google::Cloud::Workflows::Executions::VERSION
25+
end
26+
end

0 commit comments

Comments
 (0)