gapic-generator-cloud 0.6.5 → 0.6.10

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: d9702682ae24bee4bef6ed80a4390004d36cda7556128c721425379ea57e4f02
4
- data.tar.gz: d32cd24f704afed2e17cdc12378b9dc08089378872d59359da297e8c6301fb07
3
+ metadata.gz: 9adb0645be11ef3c975f469ae2be9befdfce7cfcbf86d557d538308d4d99766e
4
+ data.tar.gz: 12ba32f9420109e109d0f90cfb6d4660f2704012df6497a17496bf81fb68e01d
5
5
  SHA512:
6
- metadata.gz: 0c130a15311ab2e14bc92817819c2fb3b594cac52d0dcd5cda241558675f15558d501d66ad4ab541c7dbd16835cb5aa73b4d02d8ab8e4522318698118f8a2a1a
7
- data.tar.gz: f5343224c9a8bac01b2266d2a6a150140a02eaed1eea5e32d4958ad6829ca2ce8325d1e9b81fc271614554d34f5d2ecd25b3bceb87dbf031b33ea905edda47a5
6
+ metadata.gz: 0a40867091f35b0cde5fdffb5e61a4a40908652183c5b551b2f3e8fcf30d3073ce774f274740ecf8a41db1a2e4f21d260cf18593c8feddacaf0e419821fa2704
7
+ data.tar.gz: 4664240334180131efa2d59b15114a83c2b4bb13b80ba7113fe2d3b522419f873b96e2e5b2f90e2d2acb73484c50fe4e964f1536caa29a41b82c2cd338edcf44
@@ -1,5 +1,26 @@
1
1
  # Release History for gapic-generator-cloud
2
2
 
3
+ ### 0.6.10 / 2021-01-13
4
+
5
+ * Includes changes from gapic-generator 0.6.10.
6
+ * A set of human-readable cloud-specific command-line parameters can now be specified for the gapic-generator-cloud, e.g. `ruby-cloud-gem-name`. These parameters strictly duplicate the existing behaviour of old command-line parameters, e.g. `:gem.:name`.
7
+
8
+ ### 0.6.9 / 2020-12-07
9
+
10
+ * Includes changes from gapic-generator 0.6.9.
11
+
12
+ ### 0.6.8 / 2020-09-16
13
+
14
+ * Includes changes from gapic-generator 0.6.8.
15
+
16
+ ### 0.6.7 / 2020-08-07
17
+
18
+ * Includes changes from gapic-generator 0.6.7.
19
+
20
+ ### 0.6.6 / 2020-08-05
21
+
22
+ * Includes changes from gapic-generator 0.6.6.
23
+
3
24
  ### 0.6.5 / 2020-07-16
4
25
 
5
26
  * Includes changes from gapic-generator 0.6.5.
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # Copyright 2020 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ $LOAD_PATH.unshift ::File.expand_path("../lib", __dir__)
19
+ $LOAD_PATH.unshift ::File.expand_path("../../gapic-generator/lib", __dir__)
20
+
21
+ require "gapic/runner"
22
+ require "google/protobuf/compiler/plugin.pb"
23
+
24
+ # Ensure that no encoding conversions are done on STDIN and STDOUT
25
+ # since we are passing binary data back and forth. Otherwise these
26
+ # streams will be mangled on Windows.
27
+ STDIN.binmode
28
+ STDOUT.binmode
29
+
30
+ request = Google::Protobuf::Compiler::CodeGeneratorRequest.decode STDIN.read
31
+
32
+ # Run the request, specifying the cloud generator
33
+ response = Gapic::Runner.run request, generator: :cloud
34
+
35
+ STDOUT.print response.serialize
@@ -18,7 +18,7 @@
18
18
  module Gapic
19
19
  module Generator
20
20
  module Cloud
21
- VERSION = "0.6.5"
21
+ VERSION = "0.6.10"
22
22
  end
23
23
  end
24
24
  end
@@ -15,6 +15,7 @@
15
15
  # limitations under the License.
16
16
 
17
17
  require "gapic/generators/default_generator"
18
+ require "gapic/generators/cloud_generator_parameters"
18
19
  require "gapic/presenters"
19
20
  require "gapic/presenters/cloud_gem_presenter"
20
21
  require "gapic/presenters/wrapper_gem_presenter"
@@ -101,6 +102,13 @@ module Gapic
101
102
 
102
103
  # rubocop:enable all
103
104
 
105
+ # Schema of the parameters that the generator accepts
106
+ # @return [Gapic::Schema::ParameterSchema]
107
+ def self.parameter_schema
108
+ CloudGeneratorParameters.default_schema
109
+ end
110
+
111
+
104
112
  private
105
113
 
106
114
  ##
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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
+ require "gapic/generators/default_generator_parameters"
18
+
19
+ module Gapic
20
+ module Generators
21
+ # Contains the cloud generator's parameters
22
+ module CloudGeneratorParameters
23
+ BOOL_PARAMETERS_ALIASES = {
24
+ "ruby-cloud-free-tier" => ":gem.:free_tier",
25
+ "ruby-cloud-yard-strict" => ":gem.:yard_strict",
26
+ "ruby-cloud-generic-endpoint" => ":gem.:generic_endpoint"
27
+ }.freeze
28
+
29
+ STRING_PARAMETERS_ALIASES = {
30
+ "ruby-cloud-gem-name" => ":gem.:name",
31
+ "ruby-cloud-gem-namespace" => ":gem.:namespace",
32
+ "ruby-cloud-title" => ":gem.:title",
33
+ "ruby-cloud-description" => ":gem.:description",
34
+ "ruby-cloud-summary" => ":gem.:summary",
35
+ "ruby-cloud-homepage" => ":gem.:homepage",
36
+ "ruby-cloud-env-prefix" => ":gem.:env_prefix",
37
+ "ruby-cloud-wrapper-of" => ":gem.:version_dependencies",
38
+ "ruby-cloud-migration-version" => ":gem.:migration_version",
39
+ "ruby-cloud-product-url" => ":gem.:product_documentation_url",
40
+ "ruby-cloud-issues-url" => ":gem.:issue_tracker_url",
41
+ "ruby-cloud-api-id" => ":gem.:api_id",
42
+ "ruby-cloud-api-shortname" => ":gem.:api_shortname",
43
+ "ruby-cloud-factory-method-suffix" => ":gem.:factory_method_suffix",
44
+ "ruby-cloud-default-service-host" => ":defaults.:service.:default_host",
45
+ "ruby-cloud-grpc-service-config" => "grpc_service_config"
46
+ }.freeze
47
+
48
+ ARRAY_PARAMETERS_ALIASES = {
49
+ "ruby-cloud-default-oauth-scopes" => ":defaults.:service.:oauth_scopes"
50
+ }.freeze
51
+
52
+ MAP_PARAMETERS_ALIASES = {
53
+ "ruby-cloud-common-services" => ":common_services",
54
+ "ruby-cloud-path-override" => ":overrides.:file_path",
55
+ "ruby-cloud-namespace-override" => ":overrides.:namespace",
56
+ "ruby-cloud-service-override" => ":overrides.:service",
57
+ "ruby-cloud-extra-dependencies" => ":gem.:extra_dependencies"
58
+ }.freeze
59
+
60
+ def self.default_schema
61
+ Gapic::Generators::DefaultGeneratorParameters.default_schema.extend_with_aliases(
62
+ bool_aliases: BOOL_PARAMETERS_ALIASES,
63
+ string_aliases: STRING_PARAMETERS_ALIASES,
64
+ array_aliases: ARRAY_PARAMETERS_ALIASES,
65
+ map_aliases: MAP_PARAMETERS_ALIASES
66
+ )
67
+ end
68
+ end
69
+ end
70
+ end
@@ -102,6 +102,40 @@ namespace :acceptance do
102
102
  end
103
103
  end
104
104
 
105
+ task :samples do
106
+ Rake::Task["samples:latest"].invoke
107
+ end
108
+
109
+ namespace :samples do
110
+ task :latest do
111
+ if File.directory? "samples"
112
+ Dir.chdir "samples" do
113
+ Bundler.with_clean_env do
114
+ ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master"
115
+ sh "bundle update"
116
+ sh "bundle exec rake test"
117
+ end
118
+ end
119
+ else
120
+ puts "The <%= gem.name %> gem has no samples to test."
121
+ end
122
+ end
123
+
124
+ task :master do
125
+ if File.directory? "samples"
126
+ Dir.chdir "samples" do
127
+ Bundler.with_clean_env do
128
+ ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master"
129
+ sh "bundle update"
130
+ sh "bundle exec rake test"
131
+ end
132
+ end
133
+ else
134
+ puts "The <%= gem.name %> gem has no samples to test."
135
+ end
136
+ end
137
+ end
138
+
105
139
  require "yard"
106
140
  require "yard/rake/yardoc_task"
107
141
  YARD::Rake::YardocTask.new do |y|
@@ -28,6 +28,10 @@ Metrics/PerceivedComplexity:
28
28
  Naming/FileName:
29
29
  Exclude:
30
30
  - "lib/<%= gem.name %>.rb"
31
+ Naming/PredicateName:
32
+ Enabled: false
33
+ Style/AsciiComments:
34
+ Enabled: false
31
35
  Style/CaseEquality:
32
36
  Enabled: false
33
37
  Style/IfUnlessModifier:
@@ -76,8 +76,8 @@ end
76
76
  # The library version as recorded in instrumentation and logging.
77
77
  # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
78
78
  # An array of interceptors that are run before calls are executed.
79
- # * `timeout` (*type:* `Integer`) -
80
- # Default timeout in milliseconds.
79
+ # * `timeout` (*type:* `Numeric`) -
80
+ # Default timeout in seconds.
81
81
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
82
82
  # Additional gRPC headers to be sent with the call.
83
83
  # * `retry_policy` (*type:* `Hash`) -
@@ -21,3 +21,6 @@ Metrics/BlockLength:
21
21
  Naming/FileName:
22
22
  Exclude:
23
23
  - "lib/<%= gem.name %>.rb"
24
+
25
+ Style/AsciiComments:
26
+ Enabled: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gapic-generator-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.10
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: 2020-07-20 00:00:00.000000000 Z
13
+ date: 2021-01-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.6.5
35
+ version: 0.6.10
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.6.5
42
+ version: 0.6.10
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: google-style
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -153,11 +153,13 @@ files:
153
153
  - CONTRIBUTING.md
154
154
  - LICENSE
155
155
  - README.md
156
+ - bin/protoc-gen-bazel_ruby_cloud
156
157
  - bin/protoc-gen-ruby_cloud
157
158
  - bin/ruby-cloud-docker-entrypoint
158
159
  - cloud-rubocop.yml
159
160
  - lib/gapic/generator/cloud/version.rb
160
161
  - lib/gapic/generators/cloud_generator.rb
162
+ - lib/gapic/generators/cloud_generator_parameters.rb
161
163
  - lib/gapic/presenters/cloud_gem_presenter.rb
162
164
  - lib/gapic/presenters/wrapper_gem_presenter.rb
163
165
  - lib/gapic/presenters/wrapper_service_presenter.rb
@@ -205,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
207
  - !ruby/object:Gem::Version
206
208
  version: '0'
207
209
  requirements: []
208
- rubygems_version: 3.0.3
210
+ rubygems_version: 3.1.2
209
211
  signing_key:
210
212
  specification_version: 4
211
213
  summary: An API Client Generator for Ruby in Ruby!