Skip to content

Commit

Permalink
feat(generator): Support for universe_domain in generated clients (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Jan 22, 2024
1 parent 965e622 commit 11688f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions google-apis-generator/google-apis-generator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = ">= 2.5"
gem.add_runtime_dependency "activesupport", ">= 5.0"
gem.add_runtime_dependency "gems", "~> 1.2"
gem.add_runtime_dependency "google-apis-core", ">= 0.11.0", "< 2.a"
gem.add_runtime_dependency "google-apis-discovery_v1", "~> 0.5"
gem.add_runtime_dependency "google-apis-core", ">= 0.12.0", "< 2.a"
gem.add_runtime_dependency "google-apis-discovery_v1", "~> 0.14"
gem.add_runtime_dependency "thor", ">= 0.20", "< 2.a"
end
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]

gem.required_ruby_version = '>= 2.5'
gem.add_runtime_dependency "google-apis-core", ">= 0.11.0", "< 2.a"
gem.add_runtime_dependency "google-apis-core", ">= 0.12.0", "< 2.a"
end
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ module Google
# @see <%= api.documentation_link %>
<% end -%>
class <%= api.service_name %> < Google::Apis::Core::BaseService
DEFAULT_ENDPOINT_TEMPLATE = "<%= api.root_url.to_s.sub '.googleapis.com', '.$UNIVERSE_DOMAIN$' %>"

<% for param in api.parameters.values.reject {|p| p.name == 'fields'} -%>
# @return [<%= param.generated_type %>]
# <%= block_comment(param.description, 8, 2) %>
attr_accessor :<%= param.generated_name %>

<% end -%>
def initialize
super('<%= api.root_url %>', '<%= api.service_path %>',
super(DEFAULT_ENDPOINT_TEMPLATE, '<%= api.service_path %>',
client_name: '<%= api.gem_name %>',
client_version: <%= api.qualified_name %>::GEM_VERSION)
@batch_path = '<%= api.batch_path %>'
Expand Down

0 comments on commit 11688f8

Please sign in to comment.