Fixed issue with registering custom discovery URIs.
This commit is contained in:
parent
d27e73605d
commit
7bd5347d55
|
@ -416,7 +416,17 @@ HTML
|
||||||
end
|
end
|
||||||
client = Google::APIClient.new(:authorization => nil)
|
client = Google::APIClient.new(:authorization => nil)
|
||||||
if options[:discovery_uri]
|
if options[:discovery_uri]
|
||||||
client.discovery_uri = options[:discovery_uri]
|
if options[:api] && options[:version]
|
||||||
|
client.register_discovery_uri(
|
||||||
|
options[:api], options[:version], options[:discovery_uri]
|
||||||
|
)
|
||||||
|
else
|
||||||
|
STDERR.puts(
|
||||||
|
'Cannot register a discovery URI without ' +
|
||||||
|
'specifying an API and version.'
|
||||||
|
)
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
version = api_version(api_name, options[:version])
|
version = api_version(api_name, options[:version])
|
||||||
api = client.discovered_api(api_name, version)
|
api = client.discovered_api(api_name, version)
|
||||||
|
|
Loading…
Reference in New Issue