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