templates/cloud/gem/authentication.erb in gapic-generator-cloud-0.8.0 vs templates/cloud/gem/authentication.erb in gapic-generator-cloud-0.9.0
- old
+ new
@@ -20,11 +20,11 @@
1. [Create a service account and credentials](#creating-a-service-account).
2. Set the [environment variable](#environment-variables).
```sh
-export <%= gem.env_prefix %>_CREDENTIALS=path/to/keyfile.json
+export <%= gem.cloud_env_prefix %>_CREDENTIALS=path/to/keyfile.json
```
3. Initialize the client.
```ruby
@@ -67,19 +67,21 @@
The environment variables that <%= gem.name %>
checks for credentials are configured on the service Credentials class (such as
<%= service.credentials_class_xref %>):
-1. `<%= gem.env_prefix %>_CREDENTIALS` - Path to JSON file, or JSON contents
-2. `<%= gem.env_prefix %>_KEYFILE` - Path to JSON file, or JSON contents
-3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
-4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
-5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
+<%- if gem.env_prefix -%>
+* `<%= gem.env_prefix %>_CREDENTIALS` - Path to JSON file, or JSON contents
+* `<%= gem.env_prefix %>_KEYFILE` - Path to JSON file, or JSON contents
+<%- end -%>
+* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
+* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
+* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
```ruby
require "<%= gem.entrypoint_require %>"
-ENV["<%= gem.env_prefix %>_CREDENTIALS"] = "path/to/keyfile.json"
+ENV["<%= gem.cloud_env_prefix %>_CREDENTIALS"] = "path/to/keyfile.json"
client = <%= service.create_client_call %>
```
### Configuration