Skip to content
Permalink
Browse files

Fix generate-api names_out usage (#787)

  • Loading branch information...
blowmage authored and TheRoyalTnetennba committed May 10, 2019
1 parent 812b374 commit ea6fcbe5be2e23994516bfae41569ff39117610b
Showing with 4 additions and 2 deletions.
  1. +4 −2 bin/generate-api
@@ -37,7 +37,9 @@ module Google
generate_from_url(options[:url]) if options[:url]
generate_from_file(options[:file]) if options[:file]
generate_from_discovery(preferred_only: options[:preferred_only]) if options[:from_discovery]
create_file(options[:names_out]) { |*| generator.dump_api_names } if options[:names_out]
if options[:names_out]
create_file(options[:names_out]) { |*| generator.dump_api_names } unless File.exist? options[:names_out]
end
end

desc 'list', 'List public APIs'
@@ -104,7 +106,7 @@ module Google
end

def generator
@generator ||= Google::Apis::Generator.new(api_names: options[:names])
@generator ||= Google::Apis::Generator.new(api_names: options[:names], api_names_out: options[:names_out])
end

def ensure_active_support

0 comments on commit ea6fcbe

Please sign in to comment.
You can’t perform that action at this time.