4 CLOBBER.include('wiki')
7 "http://www.gmodules.com/gadgets/proxy/container=default&debug=0&nocache=0/"
10 desc 'Autogenerate wiki pages'
11 task :supported_apis do
13 #summary The list of supported APIs
15 The Google API Client for Ruby is a small flexible client library for accessing
16 the following Google APIs.
20 require 'google/api_client'
21 client = Google::APIClient.new
22 for api in client.discovered_apis
23 if !preferred_apis.has_key?(api.name)
24 preferred_apis[api.name] = api
26 preferred_apis[api.name] = api
29 for api_name, api in preferred_apis
30 if api.documentation.to_s != "" && api.title != ""
32 "||#{CACHE_PREFIX}#{api['icons']['x16']}||" +
33 "[#{api.documentation} #{api.title}]||" +
34 "#{api.description}||\n"
38 output.gsub!(/-32\./, "-16.")
39 wiki_path = File.expand_path(
40 File.join(File.dirname(__FILE__), '../wiki/'))
41 Dir.mkdir(wiki_path) if !File.exist?(wiki_path)
42 File.open(File.join(wiki_path, 'SupportedAPIs.wiki'), 'w') do |file|
47 task 'generate' => ['wiki:supported_apis']
52 File.expand_path(File.join(File.dirname(__FILE__), '../yard/lib'))
54 $LOAD_PATH.unshift(File.expand_path('.'))
58 require 'yard/rake/wikidoc_task'
61 desc 'Generate Wiki Documentation with YARD'
62 YARD::Rake::WikidocTask.new do |yardoc|
63 yardoc.name = 'reference'
66 '--markup', 'markdown',
67 '-e', 'yard/lib/yard-google-code.rb',
68 '-p', 'yard/templates',
73 'lib/**/*.rb', 'ext/**/*.c', '-', 'README.md', 'CHANGELOG.md'
77 task 'generate' => ['wiki:reference', 'wiki:supported_apis']
80 # If yard isn't available, it's not the end of the world
81 warn('YARD unavailable. Cannot fully generate wiki.')