Sha256: 2205b7feb42942b0846b623def0312d519b0d8073befaec90d221755f0c96444

Contents?: true

Size: 972 Bytes

Versions: 14

Compression:

Stored size: 972 Bytes

Contents

<%- assert_locals service -%>
<% @requires = capture do %>
require "googleauth"
<% end %>
# Credentials for the <%= service.name %> API.
class <%= service.credentials_name %> < Google::Auth::Credentials
  <%- if service.client_scopes.any? -%>
  self.scope = [
  <%- service.client_scopes.each_with_index do |client_scope, index| -%>
    <%- comma = index == service.client_scopes.count - 1 ? "" : "," -%>
    <%= client_scope.inspect %><%= comma %>
  <%- end -%>
  ]
  <%- end -%>
  self.env_vars = [
    "<%= service.gem.env_prefix %>_CREDENTIALS",
    "<%= service.gem.env_prefix %>_KEYFILE",
    "GOOGLE_CLOUD_CREDENTIALS",
    "GOOGLE_CLOUD_KEYFILE",
    "GCLOUD_KEYFILE",
    "<%= service.gem.env_prefix %>_CREDENTIALS_JSON",
    "<%= service.gem.env_prefix %>_KEYFILE_JSON",
    "GOOGLE_CLOUD_CREDENTIALS_JSON",
    "GOOGLE_CLOUD_KEYFILE_JSON",
    "GCLOUD_KEYFILE_JSON"
  ]
  self.paths = [
    "~/.config/google_cloud/application_default_credentials.json"
  ]
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gapic-generator-cloud-0.4.0 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.3.3 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.3.1 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.3.0 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.2.3 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.2.2 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.2.0 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.7 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.5 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.4 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.3 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.2 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.1 templates/cloud/service/client/_credentials.erb
gapic-generator-cloud-0.1.0 templates/cloud/service/client/_credentials.erb