gapic-generator 0.5.0 → 0.5.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aaec7f146400572f3b4ad346c8a69849ff3903073eadabd7eec6f6e882d6bb9
|
|
4
|
+
data.tar.gz: 39987ab08fe97c6e4acdcfe3357e398df99db73f2ab95960c8c1015456f79224
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87bfd8d75d938d8e82ff4fc5b17aab92260dedb745faf47c5abda914920145d85a0415c43ddc57126bd7942fe1b76801ed53d4a2d0b14f851adb3539ce34d0c6
|
|
7
|
+
data.tar.gz: 89e9820c8f7ba98c77165e3ff0fb38ae2b84b333873bf458ca7c87dca1e0a38c7a09f5940027fe081a2589ef429488ebd7bad94284bc343b918faf414486296b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Release History for gapic-generator
|
|
2
2
|
|
|
3
|
+
### 0.5.1 / 2020-05-21
|
|
4
|
+
|
|
5
|
+
* Support a configuration for overriding service module names.
|
|
6
|
+
* Operations client honors the quota_project setting.
|
|
7
|
+
|
|
3
8
|
### 0.5.0 / 2020-05-19
|
|
4
9
|
|
|
5
10
|
* Add quota_project to the generated configs.
|
|
@@ -89,7 +89,7 @@ module Gapic
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def name
|
|
92
|
-
@service.name
|
|
92
|
+
@api.fix_service_name @service.name
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# The namespace of the protos. This may be different from the client
|
|
@@ -102,7 +102,7 @@ module Gapic
|
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
def proto_service_name_full
|
|
105
|
-
name_full = "#{proto_namespace}::#{name}"
|
|
105
|
+
name_full = "#{proto_namespace}::#{@service.name}"
|
|
106
106
|
@api.override_proto_namespaces? ? fix_namespace(@api, name_full) : name_full
|
|
107
107
|
end
|
|
108
108
|
|
|
@@ -200,10 +200,6 @@ module Gapic
|
|
|
200
200
|
default_config(:oauth_scopes)
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
-
def client_proto_name
|
|
204
|
-
@service.address.join "."
|
|
205
|
-
end
|
|
206
|
-
|
|
207
203
|
def credentials_name
|
|
208
204
|
"Credentials"
|
|
209
205
|
end
|
data/lib/gapic/schema/api.rb
CHANGED
|
@@ -91,6 +91,13 @@ module Gapic
|
|
|
91
91
|
configuration[:overrides][:namespace].fetch str, str
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
+
def fix_service_name str
|
|
95
|
+
str = String str
|
|
96
|
+
return str if configuration[:overrides].nil?
|
|
97
|
+
return str if configuration[:overrides][:service].nil?
|
|
98
|
+
configuration[:overrides][:service].fetch str, str
|
|
99
|
+
end
|
|
100
|
+
|
|
94
101
|
def generate_files
|
|
95
102
|
@files.select(&:generate?)
|
|
96
103
|
end
|
|
@@ -64,6 +64,8 @@ class <%= service.operations_name %>
|
|
|
64
64
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
|
65
65
|
credentials = Credentials.new credentials, scope: @config.scope
|
|
66
66
|
end
|
|
67
|
+
@quota_project_id = @config.quota_project
|
|
68
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
67
69
|
|
|
68
70
|
@<%= service.lro_service.stub_name %> = ::Gapic::ServiceStub.new(
|
|
69
71
|
<%= service.lro_service.proto_service_stub_name_full %>,
|
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.5.
|
|
4
|
+
version: 0.5.1
|
|
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-05-
|
|
13
|
+
date: 2020-05-25 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: actionpack
|