diff --git a/Gemfile b/Gemfile index 41c45d76ad9..5c94936a02f 100644 --- a/Gemfile +++ b/Gemfile @@ -64,7 +64,7 @@ group :test do gem 'rspec-rails', '1.3.3' gem 'selenium-webdriver', '2.0.1' gem 'webrat', '0.7.2' - gem 'yard', '0.6.3' + gem 'yard', '0.7.2' end group :development do diff --git a/doc/templates/rest/fulldoc/html/setup.rb b/doc/templates/rest/fulldoc/html/setup.rb index 36999040232..7a195d914f9 100644 --- a/doc/templates/rest/fulldoc/html/setup.rb +++ b/doc/templates/rest/fulldoc/html/setup.rb @@ -37,8 +37,6 @@ def init serialize_index serialize_static_pages - raise("TODO: add support for extra files") unless options[:files].empty? - options.delete(:objects) options[:resources].each do |resource, controllers| @@ -63,7 +61,6 @@ def serialize_resource(resource, controllers) end def serialize_index - puts "README: #{options[:readme]}" options[:file] = options[:readme] serialize('index.html') options.delete(:file) @@ -80,7 +77,7 @@ def generate_assets end def serialize_static_pages - %w( basics.md ).each do |file| + %w( basics.md oauth.md ).each do |file| options[:file] = "doc/templates/rest/#{file}" serialize(file.sub(/\..*$/, '.html')) options.delete(:file) diff --git a/doc/templates/rest/layout/html/setup.rb b/doc/templates/rest/layout/html/setup.rb index da73a3adf25..6434fd5cb63 100644 --- a/doc/templates/rest/layout/html/setup.rb +++ b/doc/templates/rest/layout/html/setup.rb @@ -24,8 +24,13 @@ def init @page_title = options[:title] if @file - @contents = File.read_binary(@file) - @file = File.basename(@file) + if @file.is_a?(String) + @contents = File.read(@file) + @file = File.basename(@file) + else + @contents = @file.contents + @file = File.basename(@file.path) + end sections :layout, [:diskfile] elsif options[:controllers] sections :layout, [T('topic')] diff --git a/doc/templates/rest/layout/html/sidebar.erb b/doc/templates/rest/layout/html/sidebar.erb index 8e9756b8011..1411243e9f1 100644 --- a/doc/templates/rest/layout/html/sidebar.erb +++ b/doc/templates/rest/layout/html/sidebar.erb @@ -1,6 +1,7 @@