From 407965be6f440fb4415b8d96ac02b26a9bc57687 Mon Sep 17 00:00:00 2001 From: Viacheslav Rostovtsev <58152857+viacheslav-rostovtsev@users.noreply.github.com> Date: Fri, 7 May 2021 10:47:07 -0700 Subject: [PATCH] [chore] release 0.7.4 (#580) --- gapic-generator-ads/CHANGELOG.md | 4 ++ gapic-generator-ads/Gemfile.lock | 40 +++++++++---------- .../lib/gapic/generator/ads/version.rb | 2 +- gapic-generator-cloud/CHANGELOG.md | 4 ++ gapic-generator-cloud/Gemfile.lock | 40 +++++++++---------- .../lib/gapic/generator/cloud/version.rb | 2 +- gapic-generator/CHANGELOG.md | 5 +++ gapic-generator/Gemfile.lock | 36 ++++++++--------- .../lib/gapic/generator/version.rb | 2 +- .../lib/gapic/presenters/service_presenter.rb | 4 +- gapic-generator/lib/gapic/schema/api.rb | 26 +++++------- .../v1/services/campaign_service/client.rb | 4 +- .../much/trash/garbage_service/operations.rb | 4 +- .../so/much/trash/garbage_service_test.rb | 4 +- .../showcase/v1beta1/echo/operations.rb | 4 +- .../showcase/v1beta1/messaging/operations.rb | 4 +- 16 files changed, 95 insertions(+), 90 deletions(-) diff --git a/gapic-generator-ads/CHANGELOG.md b/gapic-generator-ads/CHANGELOG.md index 06f6f5c91..8e71b8ec2 100644 --- a/gapic-generator-ads/CHANGELOG.md +++ b/gapic-generator-ads/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History for gapic-generator-ads +### 0.7.4 / 2021-05-07 + +* Includes changes from gapic-generator 0.7.4 + ### 0.7.3 / 2021-03-24 * Includes changes from gapic-generator 0.7.3 diff --git a/gapic-generator-ads/Gemfile.lock b/gapic-generator-ads/Gemfile.lock index 71d762633..c35624835 100644 --- a/gapic-generator-ads/Gemfile.lock +++ b/gapic-generator-ads/Gemfile.lock @@ -1,35 +1,35 @@ PATH remote: ../gapic-generator specs: - gapic-generator (0.7.3) + gapic-generator (0.7.4) actionpack (~> 5.2) protobuf (~> 3.8) PATH remote: . specs: - gapic-generator-ads (0.7.3) + gapic-generator-ads (0.7.4) actionpack (~> 5.2) - gapic-generator (= 0.7.3) + gapic-generator (= 0.7.4) protobuf (~> 3.8) GEM remote: https://rubygems.org/ specs: - actionpack (5.2.4.5) - actionview (= 5.2.4.5) - activesupport (= 5.2.4.5) + actionpack (5.2.6) + actionview (= 5.2.6) + activesupport (= 5.2.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.5) - activesupport (= 5.2.4.5) + actionview (5.2.6) + activesupport (= 5.2.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activesupport (5.2.4.5) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -42,23 +42,23 @@ GEM google-style (1.25.1) rubocop (~> 1.9) grpc-tools (1.36.0) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.9.0) + loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) middleware (0.1.0) - mini_portile2 (2.5.0) + mini_portile2 (2.5.1) minitest (5.14.4) minitest-focus (1.2.1) minitest (>= 4, < 6) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogiri (1.11.2-x86_64-linux) + nokogiri (1.11.3-x86_64-linux) racc (~> 1.4) parallel (1.20.1) - parser (3.0.0.0) + parser (3.0.1.1) ast (~> 2.4.1) protobuf (3.10.3) activesupport (>= 3.2) @@ -77,18 +77,18 @@ GEM rainbow (3.0.0) rake (13.0.3) regexp_parser (2.1.1) - rexml (3.2.4) - rubocop (1.11.0) + rexml (3.2.5) + rubocop (1.14.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.2.0, < 2.0) + rubocop-ast (>= 1.5.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) + rubocop-ast (1.5.0) + parser (>= 3.0.1.1) ruby-progressbar (1.11.0) thor (1.1.0) thread_safe (0.3.6) diff --git a/gapic-generator-ads/lib/gapic/generator/ads/version.rb b/gapic-generator-ads/lib/gapic/generator/ads/version.rb index 13e6cf252..e6eb1074e 100644 --- a/gapic-generator-ads/lib/gapic/generator/ads/version.rb +++ b/gapic-generator-ads/lib/gapic/generator/ads/version.rb @@ -18,7 +18,7 @@ module Gapic module Generator module Ads - VERSION = "0.7.3" + VERSION = "0.7.4" end end end diff --git a/gapic-generator-cloud/CHANGELOG.md b/gapic-generator-cloud/CHANGELOG.md index b8e37b7a6..22538793e 100644 --- a/gapic-generator-cloud/CHANGELOG.md +++ b/gapic-generator-cloud/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History for gapic-generator-cloud +### 0.7.4 / 2021-05-07 + +* Includes changes from gapic-generator 0.7.4 + ### 0.7.3 / 2021-03-24 * Includes changes from gapic-generator 0.7.3 diff --git a/gapic-generator-cloud/Gemfile.lock b/gapic-generator-cloud/Gemfile.lock index b58ac00eb..cdce30894 100644 --- a/gapic-generator-cloud/Gemfile.lock +++ b/gapic-generator-cloud/Gemfile.lock @@ -1,36 +1,36 @@ PATH remote: ../gapic-generator specs: - gapic-generator (0.7.3) + gapic-generator (0.7.4) actionpack (~> 5.2) protobuf (~> 3.8) PATH remote: . specs: - gapic-generator-cloud (0.7.3) + gapic-generator-cloud (0.7.4) actionpack (~> 5.2) - gapic-generator (= 0.7.3) + gapic-generator (= 0.7.4) google-style (~> 1.25.1) protobuf (~> 3.8) GEM remote: https://rubygems.org/ specs: - actionpack (5.2.4.5) - actionview (= 5.2.4.5) - activesupport (= 5.2.4.5) + actionpack (5.2.6) + actionview (= 5.2.6) + activesupport (= 5.2.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.5) - activesupport (= 5.2.4.5) + actionview (5.2.6) + activesupport (= 5.2.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activesupport (5.2.4.5) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -43,13 +43,13 @@ GEM google-style (1.25.1) rubocop (~> 1.9) grpc-tools (1.36.0) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.9.0) + loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) middleware (0.1.0) - mini_portile2 (2.5.0) + mini_portile2 (2.5.1) minitest (5.14.4) minitest-autotest (1.1.1) minitest-server (~> 1.0) @@ -58,13 +58,13 @@ GEM minitest (>= 4, < 6) minitest-server (1.0.6) minitest (~> 5.0) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogiri (1.11.2-x86_64-linux) + nokogiri (1.11.3-x86_64-linux) racc (~> 1.4) parallel (1.20.1) - parser (3.0.0.0) + parser (3.0.1.1) ast (~> 2.4.1) path_expander (1.1.0) protobuf (3.10.3) @@ -84,18 +84,18 @@ GEM rainbow (3.0.0) rake (13.0.3) regexp_parser (2.1.1) - rexml (3.2.4) - rubocop (1.11.0) + rexml (3.2.5) + rubocop (1.14.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.2.0, < 2.0) + rubocop-ast (>= 1.5.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) + rubocop-ast (1.5.0) + parser (>= 3.0.1.1) ruby-progressbar (1.11.0) thor (1.1.0) thread_safe (0.3.6) diff --git a/gapic-generator-cloud/lib/gapic/generator/cloud/version.rb b/gapic-generator-cloud/lib/gapic/generator/cloud/version.rb index 65b68e2f4..c16c0c71f 100644 --- a/gapic-generator-cloud/lib/gapic/generator/cloud/version.rb +++ b/gapic-generator-cloud/lib/gapic/generator/cloud/version.rb @@ -18,7 +18,7 @@ module Gapic module Generator module Cloud - VERSION = "0.7.3" + VERSION = "0.7.4" end end end diff --git a/gapic-generator/CHANGELOG.md b/gapic-generator/CHANGELOG.md index 26dc5787b..2783b7e4b 100644 --- a/gapic-generator/CHANGELOG.md +++ b/gapic-generator/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History for gapic-generator +### 0.7.4 / 2021-05-07 + +* Fixed the broken link in the generated libraries' README.md +* Generated libraries with REST transport now use presense testing instead of rejecting defaults to determine which fields to transcode into the query string parameters + ### 0.7.3 / 2021-03-24 * Fixed gapic metadata (drift manifest) generation diff --git a/gapic-generator/Gemfile.lock b/gapic-generator/Gemfile.lock index b0a018f2a..480051790 100644 --- a/gapic-generator/Gemfile.lock +++ b/gapic-generator/Gemfile.lock @@ -1,27 +1,27 @@ PATH remote: . specs: - gapic-generator (0.7.3) + gapic-generator (0.7.4) actionpack (~> 5.2) protobuf (~> 3.8) GEM remote: https://rubygems.org/ specs: - actionpack (5.2.4.5) - actionview (= 5.2.4.5) - activesupport (= 5.2.4.5) + actionpack (5.2.6) + actionview (= 5.2.6) + activesupport (= 5.2.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.5) - activesupport (= 5.2.4.5) + actionview (5.2.6) + activesupport (= 5.2.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activesupport (5.2.4.5) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -34,13 +34,13 @@ GEM google-style (1.25.1) rubocop (~> 1.9) grpc-tools (1.36.0) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.9.0) + loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) middleware (0.1.0) - mini_portile2 (2.5.0) + mini_portile2 (2.5.1) minitest (5.14.4) minitest-autotest (1.1.1) minitest-server (~> 1.0) @@ -49,13 +49,13 @@ GEM minitest (>= 4, < 6) minitest-server (1.0.6) minitest (~> 5.0) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogiri (1.11.2-x86_64-linux) + nokogiri (1.11.3-x86_64-linux) racc (~> 1.4) parallel (1.20.1) - parser (3.0.0.0) + parser (3.0.1.1) ast (~> 2.4.1) path_expander (1.1.0) protobuf (3.10.3) @@ -76,18 +76,18 @@ GEM rake (13.0.3) redcarpet (3.5.1) regexp_parser (2.1.1) - rexml (3.2.4) - rubocop (1.11.0) + rexml (3.2.5) + rubocop (1.14.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.2.0, < 2.0) + rubocop-ast (>= 1.5.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) + rubocop-ast (1.5.0) + parser (>= 3.0.1.1) ruby-progressbar (1.11.0) thor (1.1.0) thread_safe (0.3.6) diff --git a/gapic-generator/lib/gapic/generator/version.rb b/gapic-generator/lib/gapic/generator/version.rb index 9569a54a8..918e2c25e 100644 --- a/gapic-generator/lib/gapic/generator/version.rb +++ b/gapic-generator/lib/gapic/generator/version.rb @@ -16,6 +16,6 @@ module Gapic module Generator - VERSION = "0.7.3" + VERSION = "0.7.4" end end diff --git a/gapic-generator/lib/gapic/presenters/service_presenter.rb b/gapic-generator/lib/gapic/presenters/service_presenter.rb index 30ea1fd63..e4d54975e 100644 --- a/gapic-generator/lib/gapic/presenters/service_presenter.rb +++ b/gapic-generator/lib/gapic/presenters/service_presenter.rb @@ -54,9 +54,7 @@ def package # @return [Enumerable] # def methods - @methods ||= begin - @service.methods.map { |m| MethodPresenter.new self, @api, m } - end + @methods ||= @service.methods.map { |m| MethodPresenter.new self, @api, m } end def address diff --git a/gapic-generator/lib/gapic/schema/api.rb b/gapic-generator/lib/gapic/schema/api.rb index 0589c16eb..bd09bd71e 100644 --- a/gapic-generator/lib/gapic/schema/api.rb +++ b/gapic-generator/lib/gapic/schema/api.rb @@ -144,11 +144,9 @@ def protoc_parameter # @return [Array] # An array of the sample file hashes. def samples - @samples ||= begin - protoc_options["samples"].to_s.split(";").flat_map do |sample_path| - YAML.load_file sample_path - end.compact - end + @samples ||= protoc_options["samples"].to_s.split(";").flat_map do |sample_path| + YAML.load_file sample_path + end.compact end # Structured representation of the standalone samples configuration files. @@ -174,10 +172,10 @@ def standalone_samples # An array of the standalone sample configuration hashes. def standalone_test_samples @standalone_test_samples ||= begin - samples.select { |sample| sample["type"] == "test/samples" } - .select { |sample| sample["schema_version"] == "1" || sample["schema_version"] == 1 } - .map { |sample| sample["samples"] } - .flatten.compact + test_samples = samples.select { |sample| sample["type"] == "test/samples" } + test_samples.select { |sample| sample["schema_version"] == "1" || sample["schema_version"] == 1 } + .map { |sample| sample["samples"] } + .flatten.compact end end @@ -278,9 +276,7 @@ def grpc_service_config_raw # Parsed grpc service config def grpc_service_config - @grpc_service_config ||= begin - Gapic::GrpcServiceConfig::Parser.parse grpc_service_config_raw - end + @grpc_service_config ||= Gapic::GrpcServiceConfig::Parser.parse grpc_service_config_raw end # Get a resource given its type string @@ -290,10 +286,8 @@ def lookup_resource_type resource_type # Given a service, find all common services that use it as a delegate. def common_services_for delegate - @delegate_to_common ||= begin - (configuration[:common_services] || {}).each_with_object({}) do |(c, d), mapping| - (mapping[d] ||= []) << c - end + @delegate_to_common ||= (configuration[:common_services] || {}).each_with_object({}) do |(c, d), mapping| + (mapping[d] ||= []) << c end all_services = services @delegate_to_common.fetch(delegate.address.join("."), []).map do |addr| diff --git a/shared/output/ads/googleads/lib/google/ads/google_ads/v1/services/campaign_service/client.rb b/shared/output/ads/googleads/lib/google/ads/google_ads/v1/services/campaign_service/client.rb index 63e3cfe8e..c2ebcfca5 100644 --- a/shared/output/ads/googleads/lib/google/ads/google_ads/v1/services/campaign_service/client.rb +++ b/shared/output/ads/googleads/lib/google/ads/google_ads/v1/services/campaign_service/client.rb @@ -373,8 +373,8 @@ class Configuration config_attr :endpoint, "googleads.googleapis.com", ::String config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, - ::Signet::OAuth2::Client, nil] + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, + nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end diff --git a/shared/output/gapic/templates/garbage/lib/so/much/trash/garbage_service/operations.rb b/shared/output/gapic/templates/garbage/lib/so/much/trash/garbage_service/operations.rb index 4b8914ca4..a3a958c1a 100644 --- a/shared/output/gapic/templates/garbage/lib/so/much/trash/garbage_service/operations.rb +++ b/shared/output/gapic/templates/garbage/lib/so/much/trash/garbage_service/operations.rb @@ -176,8 +176,8 @@ def list_operations request, options = nil @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, - operation, options, format_resource: wrap_lro_operation + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, + options, format_resource: wrap_lro_operation yield response, operation if block_given? return response end diff --git a/shared/output/gapic/templates/garbage/test/so/much/trash/garbage_service_test.rb b/shared/output/gapic/templates/garbage/test/so/much/trash/garbage_service_test.rb index 48093aa9e..fe5c7221e 100644 --- a/shared/output/gapic/templates/garbage/test/so/much/trash/garbage_service_test.rb +++ b/shared/output/gapic/templates/garbage/test/so/much/trash/garbage_service_test.rb @@ -209,8 +209,8 @@ def test_get_specific_garbage end # Use hash object - client.get_specific_garbage({ name: name, int32: int32, int64: int64, uint32: uint32, uint64: uint64, -bool: bool, float: float, double: double, bytes: bytes, msg: msg, enum: enum, nested: nested }) do |response, operation| + client.get_specific_garbage({ name: name, int32: int32, int64: int64, uint32: uint32, uint64: uint64, bool: bool, +float: float, double: double, bytes: bytes, msg: msg, enum: enum, nested: nested }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end diff --git a/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/echo/operations.rb b/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/echo/operations.rb index 323bd9f88..9c43be748 100644 --- a/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/echo/operations.rb +++ b/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/echo/operations.rb @@ -176,8 +176,8 @@ def list_operations request, options = nil @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, - operation, options, format_resource: wrap_lro_operation + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, + options, format_resource: wrap_lro_operation yield response, operation if block_given? return response end diff --git a/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/messaging/operations.rb b/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/messaging/operations.rb index 6147effc9..03c430bc7 100644 --- a/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/messaging/operations.rb +++ b/shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/messaging/operations.rb @@ -176,8 +176,8 @@ def list_operations request, options = nil @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, - operation, options, format_resource: wrap_lro_operation + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, + options, format_resource: wrap_lro_operation yield response, operation if block_given? return response end