Skip to content

Commit bf0f352

Browse files
committed
use unless instead of if for real this time
1 parent c8988fa commit bf0f352

File tree

5 files changed

+40
-12
lines changed

5 files changed

+40
-12
lines changed

gapic-generator-ads/Gemfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ GEM
6060
google-cloud-common (1.9.0)
6161
google-protobuf (>= 3.18, < 5.a)
6262
googleapis-common-protos-types (~> 1.20)
63+
google-protobuf (4.33.0-arm64-darwin)
64+
bigdecimal
65+
rake (>= 13)
6366
google-protobuf (4.33.0-x86_64-linux-gnu)
6467
bigdecimal
6568
rake (>= 13)
@@ -87,6 +90,8 @@ GEM
8790
minitest-server (1.0.8)
8891
drb (~> 2.0)
8992
minitest (~> 5.16)
93+
nokogiri (1.18.10-arm64-darwin)
94+
racc (~> 1.4)
9095
nokogiri (1.18.10-x86_64-linux-gnu)
9196
racc (~> 1.4)
9297
parallel (1.27.0)
@@ -142,6 +147,7 @@ GEM
142147
yard (0.9.37)
143148

144149
PLATFORMS
150+
arm64-darwin-24
145151
x86_64-linux
146152

147153
DEPENDENCIES
@@ -156,4 +162,4 @@ DEPENDENCIES
156162
yard (~> 0.9)
157163

158164
BUNDLED WITH
159-
2.6.9
165+
2.7.2

gapic-generator-cloud/Gemfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ GEM
6060
google-cloud-common (1.9.0)
6161
google-protobuf (>= 3.18, < 5.a)
6262
googleapis-common-protos-types (~> 1.20)
63+
google-protobuf (4.33.0-arm64-darwin)
64+
bigdecimal
65+
rake (>= 13)
6366
google-protobuf (4.33.0-x86_64-linux-gnu)
6467
bigdecimal
6568
rake (>= 13)
@@ -87,6 +90,8 @@ GEM
8790
minitest-server (1.0.8)
8891
drb (~> 2.0)
8992
minitest (~> 5.16)
93+
nokogiri (1.18.10-arm64-darwin)
94+
racc (~> 1.4)
9095
nokogiri (1.18.10-x86_64-linux-gnu)
9196
racc (~> 1.4)
9297
parallel (1.27.0)
@@ -142,6 +147,7 @@ GEM
142147
yard (0.9.37)
143148

144149
PLATFORMS
150+
arm64-darwin-24
145151
x86_64-linux
146152

147153
DEPENDENCIES
@@ -156,4 +162,4 @@ DEPENDENCIES
156162
yard (~> 0.9)
157163

158164
BUNDLED WITH
159-
2.6.9
165+
2.7.2

gapic-generator/Gemfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ GEM
5454
google-cloud-common (1.9.0)
5555
google-protobuf (>= 3.18, < 5.a)
5656
googleapis-common-protos-types (~> 1.20)
57+
google-protobuf (4.33.0-arm64-darwin)
58+
bigdecimal
59+
rake (>= 13)
5760
google-protobuf (4.33.0-x86_64-linux-gnu)
5861
bigdecimal
5962
rake (>= 13)
@@ -81,6 +84,8 @@ GEM
8184
minitest-server (1.0.8)
8285
drb (~> 2.0)
8386
minitest (~> 5.16)
87+
nokogiri (1.18.10-arm64-darwin)
88+
racc (~> 1.4)
8489
nokogiri (1.18.10-x86_64-linux-gnu)
8590
racc (~> 1.4)
8691
parallel (1.27.0)
@@ -136,6 +141,7 @@ GEM
136141
yard (0.9.37)
137142

138143
PLATFORMS
144+
arm64-darwin-24
139145
x86_64-linux
140146

141147
DEPENDENCIES
@@ -149,4 +155,4 @@ DEPENDENCIES
149155
yard (~> 0.9)
150156

151157
BUNDLED WITH
152-
2.6.9
158+
2.7.2

gapic-generator/lib/gapic/presenters/service_presenter.rb

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -526,20 +526,30 @@ def grpc_full_name
526526
#
527527
# @return [Hash]
528528
def drift_manifest
529-
h = {
529+
unless @service.api_version.empty?
530+
return {
531+
apiVersion: @service.api_version,
532+
clients: {
533+
grpc: {
534+
libraryClient: client_name_full,
535+
# The methods should grouped by grpc_method_name and then
536+
# their names are returned together in an array.
537+
# For Ruby currently we have 1:1 proto to code
538+
# correspondence for methods, so our generation is easier
539+
rpcs: methods.to_h { |m| [m.grpc_method_name, m.drift_manifest] }
540+
}
541+
}
542+
}
543+
end
544+
545+
{
530546
clients: {
531547
grpc: {
532548
libraryClient: client_name_full,
533-
# The methods should grouped by grpc_method_name and then
534-
# their names are returned together in an array.
535-
# For Ruby currently we have 1:1 proto to code
536-
# correspondence for methods, so our generation is easier
537549
rpcs: methods.to_h { |m| [m.grpc_method_name, m.drift_manifest] }
538550
}
539551
}
540552
}
541-
h[:apiVersion] = @service.api_version unless @service.api_version.empty?
542-
return h
543553
end
544554

545555
##

shared/output/gapic/templates/showcase/gapic_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
}
6666
},
6767
"Echo": {
68+
"apiVersion": "v1_20240408",
6869
"clients": {
6970
"grpc": {
7071
"libraryClient": "::Google::Showcase::V1beta1::Echo::Client",
@@ -126,8 +127,7 @@
126127
}
127128
}
128129
}
129-
},
130-
"apiVersion": "v1_20240408"
130+
}
131131
},
132132
"Identity": {
133133
"clients": {

0 commit comments

Comments
 (0)