From 2965e3709d515ad1a1fd15af6da8d8113e3ccfd8 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Wed, 2 May 2012 11:13:06 -0700 Subject: [PATCH] Yard doc cleanup --- Gemfile | 2 +- Rakefile | 15 ++++++++------- gem_rake_helper.rb | 4 ++-- .../middleman-core/core_extensions/extensions.rb | 7 ++++--- .../core_extensions/front_matter.rb | 8 ++++---- middleman-core/lib/middleman-core/extensions.rb | 4 ++-- .../middleman-core/sitemap/extensions/ignores.rb | 16 +++++++++++++--- .../lib/middleman-core/sitemap/store.rb | 5 +++-- middleman-core/lib/middleman-core/templates.rb | 4 ++-- middleman-core/lib/middleman-core/util.rb | 2 +- 10 files changed, 40 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index e4c7586f..a7f19a1a 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ group :development do gem "rake", "~> 0.9.2" gem "rspec", "~> 2.7" gem "rdoc", "~> 3.9" - # gem "yard" + gem "yard", "~> 0.8.0" end group :test do diff --git a/Rakefile b/Rakefile index 1435472a..810d430d 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,6 @@ require 'rubygems' unless defined?(Gem) # require 'fileutils' unless defined?(FileUtils) require 'rake' -# require 'yard' require File.expand_path("../middleman-core/lib/middleman-core/version.rb", __FILE__) @@ -74,6 +73,13 @@ task :publish => :push do Rake::Task["clean"].invoke end +desc "Generate documentation for all middleman gems" +task :doc do + GEM_PATHS.each do |g| + sh "cd #{File.join(ROOT, g)} && #{Gem.ruby} -S rake yard" + end +end + desc "Run tests for all middleman gems" task :test do GEM_PATHS.each do |g| @@ -82,9 +88,4 @@ task :test do end desc "Run tests for all middleman gems" -task :default => :test - -# desc "Generate documentation" -# task :doc do -# YARD::CLI::Yardoc.new.run -# end \ No newline at end of file +task :default => :test \ No newline at end of file diff --git a/gem_rake_helper.rb b/gem_rake_helper.rb index 22fea587..5cb71c65 100644 --- a/gem_rake_helper.rb +++ b/gem_rake_helper.rb @@ -1,7 +1,7 @@ require 'rubygems' unless defined?(Gem) require 'rake' require 'cucumber/rake/task' -# require 'yard' +require 'yard' require 'bundler' Bundler::GemHelper.install_tasks :name => GEM_NAME @@ -20,6 +20,6 @@ Cucumber::Rake::Task.new(:test, 'Run features that should pass') do |t| t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}" end -# YARD::Rake::YardocTask.new +YARD::Rake::YardocTask.new task :default => :test \ No newline at end of file diff --git a/middleman-core/lib/middleman-core/core_extensions/extensions.rb b/middleman-core/lib/middleman-core/core_extensions/extensions.rb index 4889d1f8..f5a22bc7 100644 --- a/middleman-core/lib/middleman-core/core_extensions/extensions.rb +++ b/middleman-core/lib/middleman-core/core_extensions/extensions.rb @@ -62,15 +62,16 @@ module Middleman::CoreExtensions::Extensions # Alias `extensions` to access registered extensions # - # @return [Array] def extensions @extensions ||= [] end # Register a new extension # - # @param [Array] new_extensions Extension modules to register - # @return [Array