gapic-generator 0.6.13 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9f0e5ee2a9fd5c53dd43b0cc3d04c0c6c590ce06782dcb0a5eb9a346369d241
4
- data.tar.gz: 7a4787ff915d5a8355677377f60481fa5f714923ccf4d1f65e02f5ef8754dd4d
3
+ metadata.gz: b183bf887e0c6df34d3374b75524ff8b1d4fc55cad3d54951de36fa3a9c58072
4
+ data.tar.gz: 1026bc4ec2ec151a363ce30ff75d7b37324d1f438ef44746ceaede0b482a1901
5
5
  SHA512:
6
- metadata.gz: c01dd5965a8a54e79e802135eb6df543200b338252e7f129a6adddc53e1c9d92ae91043ebe3ad30846ae496b868d489a1190b477b72448f8ecc022abcd1eb6bb
7
- data.tar.gz: df3aed51dc4573c7bde9370f77920434a58bb12b13e4a3388fe741deabee9d0ecefa60f50b165c7ab6856a9ea5c0149d789ab825059bf93d1749de66358298ad
6
+ metadata.gz: 8451fc41ccc52620ed922d0e75c734f824f6f7c411402697332083554598e4add7c65dbd1edd6b1d6692b11b04aceb216f23bb3de96ebc0730334be8433dbeac
7
+ data.tar.gz: 46cc19f65b3f4c6de7ceda0af826828a94ab635ad673d94cc4df5a13c17f0055b43f4b62ff6e3ac0cc22c6f22edce88e88129e5368bf26c87b6fa189017dac4d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Release History for gapic-generator
2
2
 
3
+ ### 0.7.2 / 2021-03-05
4
+
5
+ * No changes.
6
+
7
+ ### 0.7.1 / 2021-02-27
8
+
9
+ * Update generated readmes to reflect that Ruby 2.5 or later is now required.
10
+
11
+ ### 0.7.0 / 2021-02-27
12
+
13
+ * Update minimum Ruby version to 2.5 for generated libraries.
14
+ * Update supported Rubocop to 1.x for generated libraries.
15
+
16
+ ### 0.6.15 / 2021-02-22
17
+
18
+ * Really fixed encoding arguments in executable entrypoints
19
+
20
+ ### 0.6.14 / 2021-02-22
21
+
22
+ * Fixed encoding arguments in executable entrypoints
23
+
3
24
  ### 0.6.13 / 2021-02-22
4
25
 
5
26
  * Remove InputOnly and OutputOnly proto tags from docs to avoid confusing YARD.
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env -S ruby -E UTF-8
1
+ #!/usr/bin/env -S ruby -EUTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
4
  # Copyright 2018 Google LLC
@@ -15,19 +15,19 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
- $LOAD_PATH.unshift ::File.expand_path("../../lib", __FILE__)
18
+ $LOAD_PATH.unshift ::File.expand_path("../lib", __dir__)
19
19
  require "gapic/runner"
20
20
  require "google/protobuf/compiler/plugin.pb"
21
21
 
22
22
  # Ensure that no encoding conversions are done on STDIN and STDOUT
23
23
  # since we are passing binary data back and forth. Otherwise these
24
24
  # streams will be mangled on Windows.
25
- STDIN.binmode
26
- STDOUT.binmode
25
+ $stdin.binmode
26
+ $stdout.binmode
27
27
 
28
- request = Google::Protobuf::Compiler::CodeGeneratorRequest.decode STDIN.read
28
+ request = Google::Protobuf::Compiler::CodeGeneratorRequest.decode $stdin.read
29
29
 
30
30
  # Run the request
31
31
  response = Gapic::Runner.run request
32
32
 
33
- STDOUT.print response.serialize
33
+ $stdout.print response.serialize
@@ -21,7 +21,8 @@ module Gapic
21
21
  ##
22
22
  # File Formatter
23
23
  class FileFormatter
24
- attr_reader :configuration, :files
24
+ attr_reader :configuration
25
+ attr_reader :files
25
26
 
26
27
  ##
27
28
  # Create a new file formatter object
@@ -21,9 +21,9 @@ module Gapic
21
21
  # Various string formatting utils
22
22
  #
23
23
  module FormattingUtils
24
- @brace_detector = /\A(?<pre>[^`]*(`[^`]*`[^`]*)*[^`\\])?\{(?<inside>[^\s][^}]*)\}(?<post>.*)\z/m
25
- @xref_detector = /\A(?<pre>[^`]*(`[^`]*`[^`]*)*)?\[(?<text>[\w\. `-]+)\]\[(?<addr>[\w\.]+)\](?<post>.*)\z/m
26
- @list_element_detector = /\A\s*(\*|\+|-|[0-9a-zA-Z]+\.)\s/
24
+ @brace_detector = /\A(?<pre>[^`]*(?:`[^`]*`[^`]*)*[^`\\])?\{(?<inside>[^\s][^}]*)\}(?<post>.*)\z/m
25
+ @xref_detector = /\A(?<pre>[^`]*(?:`[^`]*`[^`]*)*)?\[(?<text>[\w. `-]+)\]\[(?<addr>[\w.]+)\](?<post>.*)\z/m
26
+ @list_element_detector = /\A\s*(?:\*|\+|-|[0-9a-zA-Z]+\.)\s/
27
27
  @omit_lines = ["@InputOnly\n", "@OutputOnly\n"]
28
28
 
29
29
  class << self
@@ -76,7 +76,7 @@ module Gapic
76
76
  def format_number value
77
77
  return value.to_s if value.abs < 10_000
78
78
  str = value.is_a?(Integer) ? value.to_s : BigDecimal(value.to_f.to_s).to_s("F")
79
- re = /^(-?\d+)(\d\d\d)([_\.][_\.\d]+)?$/
79
+ re = /^(-?\d+)(\d\d\d)([_.][_.\d]+)?$/
80
80
  while (m = re.match str)
81
81
  str = "#{m[1]}_#{m[2]}#{m[3]}"
82
82
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Gapic
18
18
  module Generator
19
- VERSION = "0.6.13"
19
+ VERSION = "0.7.2"
20
20
  end
21
21
  end
@@ -23,7 +23,8 @@ module Gapic
23
23
  # client-side timeout/retry policy
24
24
  #
25
25
  class MethodConfig
26
- attr_reader :timeout_seconds, :retry_policy
26
+ attr_reader :timeout_seconds
27
+ attr_reader :retry_policy
27
28
 
28
29
  ##
29
30
  # Create new MethodConfig
@@ -21,7 +21,10 @@ module Gapic
21
21
  # for the GRPC method invocation. It is embedded into the MethodConfig
22
22
  #
23
23
  class RetryPolicy
24
- attr_reader :initial_delay_seconds, :max_delay_seconds, :multiplier, :status_codes
24
+ attr_reader :initial_delay_seconds
25
+ attr_reader :max_delay_seconds
26
+ attr_reader :multiplier
27
+ attr_reader :status_codes
25
28
 
26
29
  ##
27
30
  # Create new ParsedRetryPolicy.
@@ -22,7 +22,8 @@ module Gapic
22
22
  # applied to the specific methods
23
23
  #
24
24
  class ServiceConfig
25
- attr_reader :service_level_configs, :service_method_level_configs
25
+ attr_reader :service_level_configs
26
+ attr_reader :service_method_level_configs
26
27
 
27
28
  ##
28
29
  # Create new ServiceConfig.
@@ -87,7 +87,7 @@ module Gapic
87
87
  # @private
88
88
  def self.try_capture_complex_resource_id_segment url_pattern
89
89
  complex_resource_id_regex =
90
- %r/^(?<segment_pattern>{(?<name_first>[^\/}]+?)}(?:(?<separator>[_\-~\.]){(?<name_seq>[^\/}]+?)})+)(?:\/|$)/
90
+ %r/^(?<segment_pattern>{(?<name_first>[^\/}]+?)}(?:(?<separator>[_\-~.]){(?<name_seq>[^\/}]+?)})+)(?:\/|$)/
91
91
 
92
92
  return nil, url_pattern unless complex_resource_id_regex.match? url_pattern
93
93
 
@@ -29,7 +29,8 @@ module Gapic
29
29
  # @return [Array<PositionalSegment|ResourceIdSegment|CollectionIdSegment>]
30
30
  # The parsed segments of the path pattern
31
31
  class Pattern
32
- attr_reader :path_pattern, :segments
32
+ attr_reader :path_pattern
33
+ attr_reader :segments
33
34
 
34
35
  def initialize path_pattern, segments
35
36
  @path_pattern = path_pattern
@@ -29,7 +29,10 @@ module Gapic
29
29
  # @return [String] The pattern of the segment, for the positional segment it is also
30
30
  # a pattern of its resource
31
31
  class PositionalSegment
32
- attr_reader :type, :position, :pattern
32
+ attr_reader :type
33
+ attr_reader :position
34
+ attr_reader :pattern
35
+
33
36
  def initialize position, pattern
34
37
  @type = :positional
35
38
  @position = position
@@ -117,7 +120,10 @@ module Gapic
117
120
  # @return [Array<String>] The resource patterns associated with
118
121
  # the resource_names of this segment
119
122
  class ResourceIdSegment
120
- attr_reader :type, :pattern, :resource_names, :resource_patterns
123
+ attr_reader :type
124
+ attr_reader :pattern
125
+ attr_reader :resource_names
126
+ attr_reader :resource_patterns
121
127
 
122
128
  def initialize type, pattern, resource_names, resource_patterns = []
123
129
  @type = type
@@ -216,7 +222,8 @@ module Gapic
216
222
  # @return [String] The pattern of the segment, for the positional segment it is also
217
223
  # a pattern of its resource
218
224
  class CollectionIdSegment
219
- attr_reader :type, :pattern
225
+ attr_reader :type
226
+ attr_reader :pattern
220
227
 
221
228
  def initialize pattern
222
229
  @type = :collection_id
@@ -77,7 +77,7 @@ module Gapic
77
77
  end
78
78
 
79
79
  def package_file_path
80
- package_require + ".rb"
80
+ "#{package_require}.rb"
81
81
  end
82
82
 
83
83
  def package_directory_name
@@ -89,7 +89,7 @@ module Gapic
89
89
  end
90
90
 
91
91
  def helpers_file_path
92
- helpers_require + ".rb"
92
+ "#{helpers_require}.rb"
93
93
  end
94
94
 
95
95
  def helpers_file_name
@@ -97,7 +97,7 @@ module Gapic
97
97
  end
98
98
 
99
99
  def helpers_require
100
- package_require + "/_helpers"
100
+ "#{package_require}/_helpers"
101
101
  end
102
102
 
103
103
  ##
@@ -59,7 +59,8 @@ module Gapic
59
59
  @path_string = build_path_string
60
60
  end
61
61
 
62
- attr_reader :pattern, :path_string
62
+ attr_reader :pattern
63
+ attr_reader :path_string
63
64
 
64
65
  def useful_for_helpers?
65
66
  !@parsed_pattern.positional_segments? && !@parsed_pattern.nontrivial_pattern_segments?
@@ -58,7 +58,12 @@ module Gapic
58
58
  # Representation of a request field.
59
59
  #
60
60
  class RequestField
61
- attr_reader :field, :value, :input_parameter, :comment, :value_is_file
61
+ attr_reader :field
62
+ attr_reader :value
63
+ attr_reader :input_parameter
64
+ attr_reader :comment
65
+ attr_reader :value_is_file
66
+
62
67
  def initialize field
63
68
  @field = field["field"]
64
69
  @value = convert field["value"]
@@ -144,7 +144,7 @@ module Gapic
144
144
  end
145
145
 
146
146
  def service_file_path
147
- service_require + ".rb"
147
+ "#{service_require}.rb"
148
148
  end
149
149
 
150
150
  def service_file_name
@@ -180,7 +180,7 @@ module Gapic
180
180
  end
181
181
 
182
182
  def client_file_path
183
- client_require + ".rb"
183
+ "#{client_require}.rb"
184
184
  end
185
185
 
186
186
  def client_file_name
@@ -220,7 +220,7 @@ module Gapic
220
220
  end
221
221
 
222
222
  def credentials_file_path
223
- credentials_require + ".rb"
223
+ "#{credentials_require}.rb"
224
224
  end
225
225
 
226
226
  def credentials_file_name
@@ -232,7 +232,7 @@ module Gapic
232
232
  end
233
233
 
234
234
  def helpers_file_path
235
- helpers_require + ".rb"
235
+ "#{helpers_require}.rb"
236
236
  end
237
237
 
238
238
  def helpers_file_name
@@ -260,7 +260,7 @@ module Gapic
260
260
  end
261
261
 
262
262
  def paths_file_path
263
- paths_require + ".rb"
263
+ "#{paths_require}.rb"
264
264
  end
265
265
 
266
266
  def paths_file_name
@@ -308,7 +308,7 @@ module Gapic
308
308
  end
309
309
 
310
310
  def operations_file_path
311
- operations_require + ".rb"
311
+ "#{operations_require}.rb"
312
312
  end
313
313
 
314
314
  def operations_file_name
@@ -39,7 +39,8 @@ module Gapic
39
39
  # @return [Array<Enum>] The top level enums seen across all files in
40
40
  # this API.
41
41
  class Api
42
- attr_accessor :request, :files
42
+ attr_accessor :request
43
+ attr_accessor :files
43
44
 
44
45
  # Initializes an API object with the file descriptors that represent the
45
46
  # API.
@@ -50,7 +51,7 @@ module Gapic
50
51
  # The request parameters schema to use
51
52
  # @param error_output [IO] An IO to write any errors/warnings to.
52
53
  # @param configuration [Hash] Optional override of configuration.
53
- def initialize request, parameter_schema: nil, error_output: STDERR, configuration: nil
54
+ def initialize request, parameter_schema: nil, error_output: $stderr, configuration: nil
54
55
  @request = request
55
56
  loader = Loader.new
56
57
  @files = request.proto_file.map do |fd|
@@ -359,7 +360,7 @@ module Gapic
359
360
  # split the string on periods, but map backslash-escaped periods to
360
361
  # literal periods.
361
362
  def parse_key str
362
- str.scan(/\.|\\.|[^\.\\]+/)
363
+ str.scan(/\.|\\.|[^.\\]+/)
363
364
  .each_with_object([String.new]) do |tok, arr|
364
365
  if tok == "."
365
366
  arr.append String.new
@@ -19,7 +19,10 @@ module Gapic
19
19
  # Contains information about known parameter names
20
20
  # and the types expected to be parsed from the request options string
21
21
  class ParameterSchema
22
- attr_accessor :bool_params, :string_params, :array_params, :map_params
22
+ attr_accessor :bool_params
23
+ attr_accessor :string_params
24
+ attr_accessor :array_params
25
+ attr_accessor :map_params
23
26
 
24
27
  # Creates a schema with given alias-parameter maps
25
28
  # @param bool_params [Hash{String => String}]
@@ -19,7 +19,11 @@ module Gapic
19
19
  # Encapsulates information that is parsed from a single command line parameter
20
20
  # from the plugin_opt command line
21
21
  class RequestParameter
22
- attr_reader :input_str, :input_name, :input_value, :config_name, :config_value
22
+ attr_reader :input_str
23
+ attr_reader :input_name
24
+ attr_reader :input_value
25
+ attr_reader :config_name
26
+ attr_reader :config_value
23
27
 
24
28
  # @param input_str [String] the input string containing parameter and value
25
29
  # that the parameter and value were parsed from
@@ -80,7 +80,11 @@ module Gapic
80
80
  # of locations could be recorded in the future.
81
81
  class Proto
82
82
  extend Forwardable
83
- attr_reader :descriptor, :address, :docs
83
+
84
+ attr_reader :descriptor
85
+ attr_reader :address
86
+ attr_reader :docs
87
+
84
88
  attr_accessor :parent
85
89
 
86
90
  # Initializes a Proto object.
@@ -228,6 +232,7 @@ module Gapic
228
232
  # @ return [Enumerable<Method>] The methods of this service.
229
233
  class Service < Proto
230
234
  extend Forwardable
235
+
231
236
  attr_reader :methods
232
237
 
233
238
  # Initializes a Service object.
@@ -292,7 +297,9 @@ module Gapic
292
297
  # @ return [Message] The output message of this method.
293
298
  class Method < Proto
294
299
  extend Forwardable
295
- attr_reader :input, :output
300
+
301
+ attr_reader :input
302
+ attr_reader :output
296
303
 
297
304
  # Initializes a method object.
298
305
  # @param descriptor [Google::Protobuf::MethodDescriptorProto] the
@@ -370,7 +377,12 @@ module Gapic
370
377
  # this file.
371
378
  class File < Proto
372
379
  extend Forwardable
373
- attr_reader :messages, :enums, :services, :resources, :registry
380
+
381
+ attr_reader :messages
382
+ attr_reader :enums
383
+ attr_reader :services
384
+ attr_reader :resources
385
+ attr_reader :registry
374
386
 
375
387
  # Initializes a message object.
376
388
  # @param descriptor [Google::Protobuf::DescriptorProto] the protobuf
@@ -447,6 +459,7 @@ module Gapic
447
459
  # @ return [EnumValue] the EnumValues contained in this file.
448
460
  class Enum < Proto
449
461
  extend Forwardable
462
+
450
463
  attr_reader :values
451
464
 
452
465
  # Initializes a message object.
@@ -479,17 +492,6 @@ module Gapic
479
492
  class EnumValue < Proto
480
493
  extend Forwardable
481
494
 
482
- # Initializes a message object.
483
- # @param descriptor [Google::Protobuf::DescriptorProto] the protobuf
484
- # representation of this service.
485
- # @param address [Enumerable<String>] The address of the proto. See
486
- # #address for more info.
487
- # @param docs [Google::Protobuf::SourceCodeInfo::Location] The docs
488
- # of the proto. See #docs for more info.
489
- def initialize descriptor, address, docs
490
- super descriptor, address, docs
491
- end
492
-
493
495
  # @!method name
494
496
  # @return [String] the unqualified name of the EnumValue
495
497
  # @!method number
@@ -520,7 +522,12 @@ module Gapic
520
522
  # @ return [Enumerable<Enum>] The nested enum declarations of a message.
521
523
  class Message < Proto
522
524
  extend Forwardable
523
- attr_reader :fields, :extensions, :resource, :nested_messages, :nested_enums
525
+
526
+ attr_reader :fields
527
+ attr_reader :extensions
528
+ attr_reader :resource
529
+ attr_reader :nested_messages
530
+ attr_reader :nested_enums
524
531
 
525
532
  # Initializes a message object.
526
533
  # @param descriptor [Google::Protobuf::DescriptorProto] the protobuf
@@ -583,8 +590,9 @@ module Gapic
583
590
  # otherwise.
584
591
  class Field < Proto
585
592
  extend Forwardable
586
- attr_reader :message, :enum
587
- attr_writer :message, :enum
593
+
594
+ attr_accessor :message
595
+ attr_accessor :enum
588
596
 
589
597
  # Initializes a message object.
590
598
  # @param descriptor [Google::Protobuf::FieldDescriptorProto] the
@@ -784,7 +792,12 @@ module Gapic
784
792
  # @return [Array<Gapic::Schema::Resource>] Parent resources
785
793
  class Resource
786
794
  extend Forwardable
787
- attr_reader :descriptor, :parsed_patterns, :parsed_parent_patterns, :parent_resources
795
+
796
+ attr_reader :descriptor
797
+ attr_reader :parsed_patterns
798
+ attr_reader :parsed_parent_patterns
799
+ attr_reader :parent_resources
800
+
788
801
  attr_accessor :parent
789
802
 
790
803
  # Initializes a resource object.
@@ -25,13 +25,11 @@ module Gapic
25
25
  # @return [Array<Segment|String>] The segments of the parsed path pattern.
26
26
  module Parser
27
27
  # @private
28
- # /((?<positional>\*\*?)|{(?<name>[^\/]+?)(?:=(?<template>.+?))?})/
28
+ # `/(?<positional>\*\*?)|{(?<name>[^\/]+?)(?:=(?<template>.+?))?}/`
29
29
  URI_TEMPLATE = %r{
30
- (
31
- (?<positional>\*\*?)
32
- |
33
- {(?<name>[^\/]+?)(?:=(?<template>.+?))?}
34
- )
30
+ (?<positional>\*\*?)
31
+ |
32
+ {(?<name>[^/]+?)(?:=(?<template>.+?))?}
35
33
  }x.freeze
36
34
 
37
35
  def self.parse_arguments uri_template
@@ -21,13 +21,13 @@ Gem::Specification.new do |gem|
21
21
  <%= gem.extra_files.inspect %>
22
22
  gem.require_paths = ["lib"]
23
23
 
24
- gem.required_ruby_version = ">= 2.4"
24
+ gem.required_ruby_version = ">= 2.5"
25
25
 
26
26
  <%- gem.dependency_list.each do |name, requirements| -%>
27
27
  gem.add_dependency <%= name.inspect %>, <%= requirements.map { |v| v.inspect }.join ", " %>
28
28
  <%- end -%>
29
29
 
30
- gem.add_development_dependency "google-style", "~> 1.24.0"
30
+ gem.add_development_dependency "google-style", "~> 1.25.1"
31
31
  gem.add_development_dependency "minitest", "~> 5.14"
32
32
  gem.add_development_dependency "minitest-focus", "~> 1.1"
33
33
  gem.add_development_dependency "minitest-rg", "~> 5.2"
@@ -28,11 +28,11 @@ response = client.<%= method.name %> request
28
28
 
29
29
  ## Supported Ruby Versions
30
30
 
31
- This library is supported on Ruby 2.4+.
31
+ This library is supported on Ruby 2.5+.
32
32
 
33
33
  Google provides official support for Ruby versions that are actively supported
34
34
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
35
- in security maintenance, and not end of life. Currently, this means Ruby 2.4
35
+ in security maintenance, and not end of life. Currently, this means Ruby 2.5
36
36
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
37
37
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
38
38
  about the Ruby support schedule.
@@ -8,14 +8,14 @@ AllCops:
8
8
  - "proto_docs/**/*"
9
9
  - "test/**/*"
10
10
 
11
+ Layout/LineLength:
12
+ Enabled: false
11
13
  Metrics/AbcSize:
12
14
  Enabled: false
13
15
  Metrics/ClassLength:
14
16
  Enabled: false
15
17
  Metrics/CyclomaticComplexity:
16
18
  Enabled: false
17
- Metrics/LineLength:
18
- Enabled: false
19
19
  Metrics/MethodLength:
20
20
  Enabled: false
21
21
  Metrics/ModuleLength:
@@ -25,13 +25,3 @@ Metrics/PerceivedComplexity:
25
25
  Naming/FileName:
26
26
  Exclude:
27
27
  - "lib/<%= gem.name %>.rb"
28
- Naming/PredicateName:
29
- Enabled: false
30
- Style/AsciiComments:
31
- Enabled: false
32
- Style/CaseEquality:
33
- Enabled: false
34
- Style/IfUnlessModifier:
35
- Enabled: false
36
- Style/ModuleFunction:
37
- Enabled: false
@@ -115,7 +115,7 @@ class Configuration
115
115
  def rpcs
116
116
  @rpcs ||= begin
117
117
  parent_rpcs = nil
118
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
118
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
119
119
  Rpcs.new parent_rpcs
120
120
  end
121
121
  end
@@ -149,7 +149,7 @@ class Configuration
149
149
  # @private
150
150
  def initialize parent_rpcs = nil
151
151
  <%- method_service.methods.each do |method| -%>
152
- <%= method.name %>_config = parent_rpcs&.<%= method.name %> if parent_rpcs&.respond_to? :<%= method.name %>
152
+ <%= method.name %>_config = parent_rpcs.<%= method.name %> if parent_rpcs.respond_to? :<%= method.name %>
153
153
  @<%= method.name %> = ::Gapic::Config::Method.new <%= method.name %>_config
154
154
  <%- end -%>
155
155
 
@@ -65,7 +65,7 @@ def test_<%= method.name %>
65
65
  end
66
66
 
67
67
  # Use protobuf object with options
68
- client.<%= method.name %> <%= method.request_type %>.new(<%= fields.map(&:as_kwarg).join ", " %>), grpc_options do |response, operation|
68
+ client.<%= method.name %>(<%= method.request_type %>.new(<%= fields.map(&:as_kwarg).join ", " %>), grpc_options) do |response, operation|
69
69
  <%= indent_tail render(partial: "service/test/method/assert_response", locals: { method: method }), 6 %>
70
70
  end
71
71
 
@@ -79,7 +79,7 @@ def test_<%= method.name %>
79
79
  end
80
80
 
81
81
  # Use protobuf object with options
82
- client.<%= method.name %> <%= method.request_type %>.new(<%= fields.map(&:as_kwarg).join ", " %>), grpc_options do |response, operation|
82
+ client.<%= method.name %>(<%= method.request_type %>.new(<%= fields.map(&:as_kwarg).join ", " %>), grpc_options) do |response, operation|
83
83
  assert_kind_of Enumerable, response
84
84
  response.to_a.each do |r|
85
85
  assert_kind_of <%= method.return_type %>, r
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gapic-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.13
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernest Landrito
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-02-23 00:00:00.000000000 Z
13
+ date: 2021-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -46,28 +46,28 @@ dependencies:
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: 1.24.0
49
+ version: 1.25.1
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: 1.24.0
56
+ version: 1.25.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: grpc-tools
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 1.30.1
63
+ version: 1.36.0
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 1.30.1
70
+ version: 1.36.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: minitest
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -341,14 +341,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
341
341
  requirements:
342
342
  - - ">="
343
343
  - !ruby/object:Gem::Version
344
- version: '0'
344
+ version: '2.5'
345
345
  required_rubygems_version: !ruby/object:Gem::Requirement
346
346
  requirements:
347
347
  - - ">="
348
348
  - !ruby/object:Gem::Version
349
349
  version: '0'
350
350
  requirements: []
351
- rubygems_version: 3.1.4
351
+ rubygems_version: 3.2.11
352
352
  signing_key:
353
353
  specification_version: 4
354
354
  summary: An API Client Generator for Ruby in Ruby!