rake/documentation.rb in configurability-1.0.1 vs rake/documentation.rb in configurability-1.0.2
- old
+ new
@@ -42,28 +42,37 @@
YARD::Logger.instance
end
end
class YARD::CLI::Base; include YardGlobals; end
+ class YARD::CLI::Command; include YardGlobals; end
class YARD::Parser::SourceParser; extend YardGlobals; include YardGlobals; end
class YARD::Parser::CParser; include YardGlobals; end
class YARD::CodeObjects::Base; include YardGlobals; end
class YARD::Handlers::Base; include YardGlobals; end
class YARD::Handlers::Processor; include YardGlobals; end
class YARD::Serializers::Base; include YardGlobals; end
class YARD::RegistryStore; include YardGlobals; end
class YARD::Docstring; include YardGlobals; end
module YARD::Templates::Helpers::ModuleHelper; include YardGlobals; end
+ module YARD::Templates::Helpers::HtmlHelper; include YardGlobals; end
if vvec(RUBY_VERSION) >= vvec("1.9.1")
# Monkeypatched to allow more than two '#' characters at the beginning
# of the comment line.
# Patched from yard-0.5.8
require 'yard/parser/ruby/ruby_parser'
class YARD::Parser::Ruby::RipperParser < Ripper
def on_comment(comment)
- $stderr.puts "Adding comment: %p" % [ comment ]
visit_ns_token(:comment, comment)
+ case comment
+ when /\A# @group\s+(.+)\s*\Z/
+ @groups.unshift [lineno, $1]
+ return
+ when /\A# @endgroup\s*\Z/
+ @groups.unshift [lineno, nil]
+ return
+ end
comment = comment.gsub(/^\#+\s{0,1}/, '').chomp
append_comment = @comments[lineno - 1]
if append_comment && @comments_last_column == column