deg-yard 0.8.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +39 -0
- data/.yardopts +25 -0
- data/.yardopts_guide +19 -0
- data/.yardopts_i18n +22 -0
- data/Gemfile +35 -0
- data/LEGAL +66 -0
- data/LICENSE +22 -0
- data/README.md +609 -0
- data/Rakefile +66 -0
- data/benchmarks/builtins_vs_eval.rb +23 -0
- data/benchmarks/concat_vs_join.rb +12 -0
- data/benchmarks/erb_vs_erubis.rb +53 -0
- data/benchmarks/format_args.rb +46 -0
- data/benchmarks/generation.rb +37 -0
- data/benchmarks/marshal_vs_dbm.rb +63 -0
- data/benchmarks/parsing.rb +46 -0
- data/benchmarks/pathname_vs_string.rb +50 -0
- data/benchmarks/rdoc_vs_yardoc.rb +10 -0
- data/benchmarks/registry_store_types.rb +48 -0
- data/benchmarks/ri_vs_yri.rb +18 -0
- data/benchmarks/ripper_parser.rb +12 -0
- data/benchmarks/splat_vs_flatten.rb +12 -0
- data/benchmarks/template_erb.rb +22 -0
- data/benchmarks/template_format.rb +6 -0
- data/benchmarks/template_profile.rb +17 -0
- data/benchmarks/yri_cache.rb +19 -0
- data/bin/yard +12 -0
- data/bin/yardoc +12 -0
- data/bin/yri +12 -0
- data/docs/CodeObjects.md +115 -0
- data/docs/GettingStarted.md +592 -0
- data/docs/Handlers.md +152 -0
- data/docs/Overview.md +61 -0
- data/docs/Parser.md +191 -0
- data/docs/Tags.md +282 -0
- data/docs/TagsArch.md +123 -0
- data/docs/Templates.md +496 -0
- data/docs/WhatsNew.md +1244 -0
- data/docs/images/code-objects-class-diagram.png +0 -0
- data/docs/images/handlers-class-diagram.png +0 -0
- data/docs/images/overview-class-diagram.png +0 -0
- data/docs/images/parser-class-diagram.png +0 -0
- data/docs/images/tags-class-diagram.png +0 -0
- data/docs/templates/default/fulldoc/html/full_list_tag.erb +7 -0
- data/docs/templates/default/fulldoc/html/setup.rb +6 -0
- data/docs/templates/default/layout/html/setup.rb +8 -0
- data/docs/templates/default/layout/html/tag_list.erb +11 -0
- data/docs/templates/default/yard_tags/html/list.erb +18 -0
- data/docs/templates/default/yard_tags/html/setup.rb +27 -0
- data/docs/templates/plugin.rb +65 -0
- data/lib/rubygems_plugin.rb +4 -0
- data/lib/yard/autoload.rb +290 -0
- data/lib/yard/cli/command.rb +84 -0
- data/lib/yard/cli/command_parser.rb +92 -0
- data/lib/yard/cli/config.rb +136 -0
- data/lib/yard/cli/diff.rb +270 -0
- data/lib/yard/cli/display.rb +68 -0
- data/lib/yard/cli/gems.rb +83 -0
- data/lib/yard/cli/graph.rb +126 -0
- data/lib/yard/cli/help.rb +18 -0
- data/lib/yard/cli/i18n.rb +69 -0
- data/lib/yard/cli/list.rb +22 -0
- data/lib/yard/cli/markup_types.rb +33 -0
- data/lib/yard/cli/server.rb +253 -0
- data/lib/yard/cli/stats.rb +213 -0
- data/lib/yard/cli/yardoc.rb +752 -0
- data/lib/yard/cli/yardopts_command.rb +109 -0
- data/lib/yard/cli/yri.rb +214 -0
- data/lib/yard/code_objects/base.rb +585 -0
- data/lib/yard/code_objects/class_object.rb +143 -0
- data/lib/yard/code_objects/class_variable_object.rb +8 -0
- data/lib/yard/code_objects/constant_object.rb +13 -0
- data/lib/yard/code_objects/extended_method_object.rb +23 -0
- data/lib/yard/code_objects/extra_file_object.rb +128 -0
- data/lib/yard/code_objects/macro_object.rb +172 -0
- data/lib/yard/code_objects/method_object.rb +191 -0
- data/lib/yard/code_objects/module_object.rb +18 -0
- data/lib/yard/code_objects/namespace_object.rb +200 -0
- data/lib/yard/code_objects/proxy.rb +258 -0
- data/lib/yard/code_objects/root_object.rb +17 -0
- data/lib/yard/config.rb +269 -0
- data/lib/yard/core_ext/array.rb +15 -0
- data/lib/yard/core_ext/file.rb +65 -0
- data/lib/yard/core_ext/hash.rb +15 -0
- data/lib/yard/core_ext/insertion.rb +60 -0
- data/lib/yard/core_ext/module.rb +19 -0
- data/lib/yard/core_ext/string.rb +67 -0
- data/lib/yard/core_ext/symbol_hash.rb +73 -0
- data/lib/yard/docstring.rb +362 -0
- data/lib/yard/docstring_parser.rb +321 -0
- data/lib/yard/globals.rb +18 -0
- data/lib/yard/handlers/base.rb +597 -0
- data/lib/yard/handlers/c/alias_handler.rb +15 -0
- data/lib/yard/handlers/c/attribute_handler.rb +13 -0
- data/lib/yard/handlers/c/base.rb +110 -0
- data/lib/yard/handlers/c/class_handler.rb +26 -0
- data/lib/yard/handlers/c/constant_handler.rb +12 -0
- data/lib/yard/handlers/c/handler_methods.rb +166 -0
- data/lib/yard/handlers/c/init_handler.rb +18 -0
- data/lib/yard/handlers/c/method_handler.rb +35 -0
- data/lib/yard/handlers/c/mixin_handler.rb +13 -0
- data/lib/yard/handlers/c/module_handler.rb +16 -0
- data/lib/yard/handlers/c/override_comment_handler.rb +30 -0
- data/lib/yard/handlers/c/path_handler.rb +10 -0
- data/lib/yard/handlers/c/struct_handler.rb +12 -0
- data/lib/yard/handlers/c/symbol_handler.rb +7 -0
- data/lib/yard/handlers/processor.rb +201 -0
- data/lib/yard/handlers/ruby/alias_handler.rb +41 -0
- data/lib/yard/handlers/ruby/attribute_handler.rb +82 -0
- data/lib/yard/handlers/ruby/base.rb +164 -0
- data/lib/yard/handlers/ruby/class_condition_handler.rb +86 -0
- data/lib/yard/handlers/ruby/class_handler.rb +121 -0
- data/lib/yard/handlers/ruby/class_variable_handler.rb +16 -0
- data/lib/yard/handlers/ruby/comment_handler.rb +9 -0
- data/lib/yard/handlers/ruby/constant_handler.rb +45 -0
- data/lib/yard/handlers/ruby/dsl_handler.rb +14 -0
- data/lib/yard/handlers/ruby/dsl_handler_methods.rb +77 -0
- data/lib/yard/handlers/ruby/exception_handler.rb +26 -0
- data/lib/yard/handlers/ruby/extend_handler.rb +21 -0
- data/lib/yard/handlers/ruby/legacy/alias_handler.rb +34 -0
- data/lib/yard/handlers/ruby/legacy/attribute_handler.rb +60 -0
- data/lib/yard/handlers/ruby/legacy/base.rb +250 -0
- data/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +83 -0
- data/lib/yard/handlers/ruby/legacy/class_handler.rb +111 -0
- data/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +14 -0
- data/lib/yard/handlers/ruby/legacy/comment_handler.rb +9 -0
- data/lib/yard/handlers/ruby/legacy/constant_handler.rb +28 -0
- data/lib/yard/handlers/ruby/legacy/dsl_handler.rb +16 -0
- data/lib/yard/handlers/ruby/legacy/exception_handler.rb +12 -0
- data/lib/yard/handlers/ruby/legacy/extend_handler.rb +20 -0
- data/lib/yard/handlers/ruby/legacy/method_handler.rb +85 -0
- data/lib/yard/handlers/ruby/legacy/mixin_handler.rb +39 -0
- data/lib/yard/handlers/ruby/legacy/module_function_handler.rb +18 -0
- data/lib/yard/handlers/ruby/legacy/module_handler.rb +11 -0
- data/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +21 -0
- data/lib/yard/handlers/ruby/legacy/visibility_handler.rb +16 -0
- data/lib/yard/handlers/ruby/legacy/yield_handler.rb +28 -0
- data/lib/yard/handlers/ruby/method_condition_handler.rb +8 -0
- data/lib/yard/handlers/ruby/method_handler.rb +92 -0
- data/lib/yard/handlers/ruby/mixin_handler.rb +36 -0
- data/lib/yard/handlers/ruby/module_function_handler.rb +26 -0
- data/lib/yard/handlers/ruby/module_handler.rb +11 -0
- data/lib/yard/handlers/ruby/private_constant_handler.rb +36 -0
- data/lib/yard/handlers/ruby/struct_handler_methods.rb +141 -0
- data/lib/yard/handlers/ruby/visibility_handler.rb +24 -0
- data/lib/yard/handlers/ruby/yield_handler.rb +30 -0
- data/lib/yard/i18n/locale.rb +74 -0
- data/lib/yard/i18n/message.rb +56 -0
- data/lib/yard/i18n/messages.rb +55 -0
- data/lib/yard/i18n/pot_generator.rb +280 -0
- data/lib/yard/i18n/text.rb +173 -0
- data/lib/yard/logging.rb +190 -0
- data/lib/yard/options.rb +216 -0
- data/lib/yard/parser/base.rb +56 -0
- data/lib/yard/parser/c/c_parser.rb +231 -0
- data/lib/yard/parser/c/comment_parser.rb +131 -0
- data/lib/yard/parser/c/statement.rb +63 -0
- data/lib/yard/parser/ruby/ast_node.rb +496 -0
- data/lib/yard/parser/ruby/legacy/ruby_lex.rb +1378 -0
- data/lib/yard/parser/ruby/legacy/ruby_parser.rb +31 -0
- data/lib/yard/parser/ruby/legacy/statement.rb +65 -0
- data/lib/yard/parser/ruby/legacy/statement_list.rb +384 -0
- data/lib/yard/parser/ruby/legacy/token_list.rb +71 -0
- data/lib/yard/parser/ruby/ruby_parser.rb +625 -0
- data/lib/yard/parser/source_parser.rb +517 -0
- data/lib/yard/rake/yardoc_task.rb +74 -0
- data/lib/yard/registry.rb +438 -0
- data/lib/yard/registry_store.rb +319 -0
- data/lib/yard/rubygems/backports/LICENSE.txt +57 -0
- data/lib/yard/rubygems/backports/MIT.txt +20 -0
- data/lib/yard/rubygems/backports/gem.rb +9 -0
- data/lib/yard/rubygems/backports/source_index.rb +370 -0
- data/lib/yard/rubygems/backports.rb +8 -0
- data/lib/yard/rubygems/doc_manager.rb +88 -0
- data/lib/yard/rubygems/specification.rb +41 -0
- data/lib/yard/serializers/base.rb +80 -0
- data/lib/yard/serializers/file_system_serializer.rb +90 -0
- data/lib/yard/serializers/process_serializer.rb +24 -0
- data/lib/yard/serializers/stdout_serializer.rb +32 -0
- data/lib/yard/serializers/yardoc_serializer.rb +124 -0
- data/lib/yard/server/adapter.rb +100 -0
- data/lib/yard/server/commands/base.rb +192 -0
- data/lib/yard/server/commands/display_file_command.rb +24 -0
- data/lib/yard/server/commands/display_object_command.rb +58 -0
- data/lib/yard/server/commands/frames_command.rb +15 -0
- data/lib/yard/server/commands/library_command.rb +148 -0
- data/lib/yard/server/commands/library_index_command.rb +24 -0
- data/lib/yard/server/commands/list_command.rb +24 -0
- data/lib/yard/server/commands/search_command.rb +78 -0
- data/lib/yard/server/commands/static_file_command.rb +57 -0
- data/lib/yard/server/doc_server_helper.rb +76 -0
- data/lib/yard/server/doc_server_serializer.rb +33 -0
- data/lib/yard/server/library_version.rb +227 -0
- data/lib/yard/server/rack_adapter.rb +88 -0
- data/lib/yard/server/router.rb +176 -0
- data/lib/yard/server/static_caching.rb +45 -0
- data/lib/yard/server/templates/default/fulldoc/html/css/custom.css +78 -0
- data/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
- data/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +12 -0
- data/lib/yard/server/templates/default/layout/html/breadcrumb.erb +46 -0
- data/lib/yard/server/templates/default/layout/html/script_setup.erb +8 -0
- data/lib/yard/server/templates/default/layout/html/setup.rb +7 -0
- data/lib/yard/server/templates/default/method_details/html/permalink.erb +4 -0
- data/lib/yard/server/templates/default/method_details/html/setup.rb +4 -0
- data/lib/yard/server/templates/doc_server/library_list/html/contents.erb +13 -0
- data/lib/yard/server/templates/doc_server/library_list/html/headers.erb +26 -0
- data/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +12 -0
- data/lib/yard/server/templates/doc_server/library_list/html/setup.rb +3 -0
- data/lib/yard/server/templates/doc_server/library_list/html/title.erb +2 -0
- data/lib/yard/server/templates/doc_server/processing/html/processing.erb +51 -0
- data/lib/yard/server/templates/doc_server/processing/html/setup.rb +3 -0
- data/lib/yard/server/templates/doc_server/search/html/search.erb +18 -0
- data/lib/yard/server/templates/doc_server/search/html/setup.rb +8 -0
- data/lib/yard/server/webrick_adapter.rb +43 -0
- data/lib/yard/server.rb +11 -0
- data/lib/yard/tags/default_factory.rb +176 -0
- data/lib/yard/tags/default_tag.rb +12 -0
- data/lib/yard/tags/directives.rb +599 -0
- data/lib/yard/tags/library.rb +630 -0
- data/lib/yard/tags/option_tag.rb +12 -0
- data/lib/yard/tags/overload_tag.rb +66 -0
- data/lib/yard/tags/ref_tag.rb +7 -0
- data/lib/yard/tags/ref_tag_list.rb +27 -0
- data/lib/yard/tags/tag.rb +57 -0
- data/lib/yard/tags/tag_format_error.rb +6 -0
- data/lib/yard/templates/engine.rb +185 -0
- data/lib/yard/templates/erb_cache.rb +22 -0
- data/lib/yard/templates/helpers/base_helper.rb +212 -0
- data/lib/yard/templates/helpers/filter_helper.rb +26 -0
- data/lib/yard/templates/helpers/html_helper.rb +599 -0
- data/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +59 -0
- data/lib/yard/templates/helpers/markup/rdoc_markdown.rb +22 -0
- data/lib/yard/templates/helpers/markup/rdoc_markup.rb +106 -0
- data/lib/yard/templates/helpers/markup_helper.rb +169 -0
- data/lib/yard/templates/helpers/method_helper.rb +74 -0
- data/lib/yard/templates/helpers/module_helper.rb +19 -0
- data/lib/yard/templates/helpers/text_helper.rb +95 -0
- data/lib/yard/templates/helpers/uml_helper.rb +46 -0
- data/lib/yard/templates/section.rb +106 -0
- data/lib/yard/templates/template.rb +407 -0
- data/lib/yard/templates/template_options.rb +88 -0
- data/lib/yard/verifier.rb +148 -0
- data/lib/yard/version.rb +3 -0
- data/lib/yard.rb +71 -0
- data/po/ja.po +31118 -0
- data/spec/cli/command_parser_spec.rb +43 -0
- data/spec/cli/command_spec.rb +36 -0
- data/spec/cli/config_spec.rb +92 -0
- data/spec/cli/diff_spec.rb +260 -0
- data/spec/cli/display_spec.rb +30 -0
- data/spec/cli/gems_spec.rb +81 -0
- data/spec/cli/graph_spec.rb +17 -0
- data/spec/cli/help_spec.rb +22 -0
- data/spec/cli/i18n_spec.rb +111 -0
- data/spec/cli/list_spec.rb +8 -0
- data/spec/cli/markup_types_spec.rb +22 -0
- data/spec/cli/server_spec.rb +327 -0
- data/spec/cli/stats_spec.rb +90 -0
- data/spec/cli/yardoc_spec.rb +804 -0
- data/spec/cli/yri_spec.rb +99 -0
- data/spec/code_objects/base_spec.rb +438 -0
- data/spec/code_objects/class_object_spec.rb +225 -0
- data/spec/code_objects/code_object_list_spec.rb +33 -0
- data/spec/code_objects/constants_spec.rb +82 -0
- data/spec/code_objects/extra_file_object_spec.rb +147 -0
- data/spec/code_objects/macro_object_spec.rb +148 -0
- data/spec/code_objects/method_object_spec.rb +175 -0
- data/spec/code_objects/module_object_spec.rb +141 -0
- data/spec/code_objects/namespace_object_spec.rb +170 -0
- data/spec/code_objects/proxy_spec.rb +140 -0
- data/spec/code_objects/spec_helper.rb +3 -0
- data/spec/config_spec.rb +176 -0
- data/spec/core_ext/array_spec.rb +14 -0
- data/spec/core_ext/file_spec.rb +68 -0
- data/spec/core_ext/hash_spec.rb +14 -0
- data/spec/core_ext/insertion_spec.rb +37 -0
- data/spec/core_ext/module_spec.rb +15 -0
- data/spec/core_ext/string_spec.rb +42 -0
- data/spec/core_ext/symbol_hash_spec.rb +86 -0
- data/spec/docstring_parser_spec.rb +228 -0
- data/spec/docstring_spec.rb +335 -0
- data/spec/handlers/alias_handler_spec.rb +80 -0
- data/spec/handlers/attribute_handler_spec.rb +94 -0
- data/spec/handlers/base_spec.rb +206 -0
- data/spec/handlers/c/alias_handler_spec.rb +33 -0
- data/spec/handlers/c/attribute_handler_spec.rb +40 -0
- data/spec/handlers/c/class_handler_spec.rb +63 -0
- data/spec/handlers/c/constant_handler_spec.rb +68 -0
- data/spec/handlers/c/init_handler_spec.rb +47 -0
- data/spec/handlers/c/method_handler_spec.rb +229 -0
- data/spec/handlers/c/mixin_handler_spec.rb +27 -0
- data/spec/handlers/c/module_handler_spec.rb +38 -0
- data/spec/handlers/c/override_comment_handler_spec.rb +46 -0
- data/spec/handlers/c/path_handler_spec.rb +35 -0
- data/spec/handlers/c/spec_helper.rb +13 -0
- data/spec/handlers/c/struct_handler_spec.rb +15 -0
- data/spec/handlers/class_condition_handler_spec.rb +67 -0
- data/spec/handlers/class_handler_spec.rb +246 -0
- data/spec/handlers/class_variable_handler_spec.rb +11 -0
- data/spec/handlers/constant_handler_spec.rb +64 -0
- data/spec/handlers/dsl_handler_spec.rb +197 -0
- data/spec/handlers/examples/alias_handler_001.rb.txt +44 -0
- data/spec/handlers/examples/attribute_handler_001.rb.txt +32 -0
- data/spec/handlers/examples/class_condition_handler_001.rb.txt +69 -0
- data/spec/handlers/examples/class_handler_001.rb.txt +120 -0
- data/spec/handlers/examples/class_variable_handler_001.rb.txt +10 -0
- data/spec/handlers/examples/constant_handler_001.rb.txt +25 -0
- data/spec/handlers/examples/dsl_handler_001.rb.txt +125 -0
- data/spec/handlers/examples/exception_handler_001.rb.txt +59 -0
- data/spec/handlers/examples/extend_handler_001.rb.txt +16 -0
- data/spec/handlers/examples/method_condition_handler_001.rb.txt +10 -0
- data/spec/handlers/examples/method_handler_001.rb.txt +126 -0
- data/spec/handlers/examples/mixin_handler_001.rb.txt +37 -0
- data/spec/handlers/examples/module_handler_001.rb.txt +29 -0
- data/spec/handlers/examples/private_constant_handler_001.rb.txt +8 -0
- data/spec/handlers/examples/process_handler_001.rb.txt +11 -0
- data/spec/handlers/examples/visibility_handler_001.rb.txt +32 -0
- data/spec/handlers/examples/yield_handler_001.rb.txt +54 -0
- data/spec/handlers/exception_handler_spec.rb +48 -0
- data/spec/handlers/extend_handler_spec.rb +23 -0
- data/spec/handlers/legacy_base_spec.rb +128 -0
- data/spec/handlers/method_condition_handler_spec.rb +14 -0
- data/spec/handlers/method_handler_spec.rb +184 -0
- data/spec/handlers/mixin_handler_spec.rb +55 -0
- data/spec/handlers/module_function_handler_spec.rb +105 -0
- data/spec/handlers/module_handler_spec.rb +34 -0
- data/spec/handlers/private_constant_handler_spec.rb +24 -0
- data/spec/handlers/processor_spec.rb +34 -0
- data/spec/handlers/ruby/base_spec.rb +94 -0
- data/spec/handlers/ruby/legacy/base_spec.rb +82 -0
- data/spec/handlers/spec_helper.rb +33 -0
- data/spec/handlers/visibility_handler_spec.rb +39 -0
- data/spec/handlers/yield_handler_spec.rb +51 -0
- data/spec/i18n/locale_spec.rb +68 -0
- data/spec/i18n/message_spec.rb +52 -0
- data/spec/i18n/messages_spec.rb +67 -0
- data/spec/i18n/pot_generator_spec.rb +262 -0
- data/spec/i18n/text_spec.rb +180 -0
- data/spec/logging_spec.rb +35 -0
- data/spec/options_spec.rb +171 -0
- data/spec/parser/base_spec.rb +24 -0
- data/spec/parser/c_parser_spec.rb +171 -0
- data/spec/parser/examples/array.c.txt +3887 -0
- data/spec/parser/examples/example1.rb.txt +8 -0
- data/spec/parser/examples/extrafile.c.txt +8 -0
- data/spec/parser/examples/multifile.c.txt +22 -0
- data/spec/parser/examples/override.c.txt +424 -0
- data/spec/parser/examples/parse_in_order_001.rb.txt +2 -0
- data/spec/parser/examples/parse_in_order_002.rb.txt +2 -0
- data/spec/parser/examples/tag_handler_001.rb.txt +8 -0
- data/spec/parser/ruby/ast_node_spec.rb +33 -0
- data/spec/parser/ruby/legacy/statement_list_spec.rb +299 -0
- data/spec/parser/ruby/legacy/token_list_spec.rb +77 -0
- data/spec/parser/ruby/ruby_parser_spec.rb +334 -0
- data/spec/parser/source_parser_spec.rb +717 -0
- data/spec/parser/tag_parsing_spec.rb +18 -0
- data/spec/rake/yardoc_task_spec.rb +101 -0
- data/spec/registry_spec.rb +393 -0
- data/spec/registry_store_spec.rb +315 -0
- data/spec/rubygems/doc_manager_spec.rb +112 -0
- data/spec/serializers/data/serialized_yardoc/checksums +1 -0
- data/spec/serializers/data/serialized_yardoc/objects/Foo/bar_i.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/objects/Foo/baz_i.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/objects/Foo.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/objects/root.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/proxy_types +2 -0
- data/spec/serializers/file_system_serializer_spec.rb +124 -0
- data/spec/serializers/spec_helper.rb +2 -0
- data/spec/serializers/yardoc_serializer_spec.rb +46 -0
- data/spec/server/adapter_spec.rb +38 -0
- data/spec/server/commands/base_spec.rb +87 -0
- data/spec/server/commands/library_command_spec.rb +39 -0
- data/spec/server/commands/static_file_command_spec.rb +84 -0
- data/spec/server/doc_server_helper_spec.rb +53 -0
- data/spec/server/doc_server_serializer_spec.rb +45 -0
- data/spec/server/rack_adapter_spec.rb +20 -0
- data/spec/server/router_spec.rb +122 -0
- data/spec/server/spec_helper.rb +17 -0
- data/spec/server/static_caching_spec.rb +39 -0
- data/spec/server/webrick_servlet_spec.rb +20 -0
- data/spec/server_spec.rb +10 -0
- data/spec/spec_helper.rb +128 -0
- data/spec/tags/default_factory_spec.rb +152 -0
- data/spec/tags/default_tag_spec.rb +11 -0
- data/spec/tags/directives_spec.rb +453 -0
- data/spec/tags/library_spec.rb +34 -0
- data/spec/tags/overload_tag_spec.rb +53 -0
- data/spec/tags/ref_tag_list_spec.rb +53 -0
- data/spec/templates/class_spec.rb +44 -0
- data/spec/templates/constant_spec.rb +40 -0
- data/spec/templates/engine_spec.rb +121 -0
- data/spec/templates/examples/class001.html +280 -0
- data/spec/templates/examples/class001.txt +36 -0
- data/spec/templates/examples/class002.html +35 -0
- data/spec/templates/examples/constant001.txt +25 -0
- data/spec/templates/examples/constant002.txt +7 -0
- data/spec/templates/examples/constant003.txt +11 -0
- data/spec/templates/examples/method001.html +130 -0
- data/spec/templates/examples/method001.txt +35 -0
- data/spec/templates/examples/method002.html +86 -0
- data/spec/templates/examples/method002.txt +20 -0
- data/spec/templates/examples/method003.html +159 -0
- data/spec/templates/examples/method003.txt +45 -0
- data/spec/templates/examples/method004.html +44 -0
- data/spec/templates/examples/method004.txt +10 -0
- data/spec/templates/examples/method005.html +99 -0
- data/spec/templates/examples/method005.txt +33 -0
- data/spec/templates/examples/module001.dot +33 -0
- data/spec/templates/examples/module001.html +825 -0
- data/spec/templates/examples/module001.txt +33 -0
- data/spec/templates/examples/module002.html +318 -0
- data/spec/templates/examples/module003.html +185 -0
- data/spec/templates/examples/module004.html +387 -0
- data/spec/templates/examples/tag001.txt +82 -0
- data/spec/templates/helpers/base_helper_spec.rb +175 -0
- data/spec/templates/helpers/html_helper_spec.rb +612 -0
- data/spec/templates/helpers/html_syntax_highlight_helper_spec.rb +48 -0
- data/spec/templates/helpers/markup/rdoc_markup_spec.rb +93 -0
- data/spec/templates/helpers/markup_helper_spec.rb +135 -0
- data/spec/templates/helpers/method_helper_spec.rb +82 -0
- data/spec/templates/helpers/shared_signature_examples.rb +123 -0
- data/spec/templates/helpers/text_helper_spec.rb +44 -0
- data/spec/templates/method_spec.rb +102 -0
- data/spec/templates/module_spec.rb +181 -0
- data/spec/templates/onefile_spec.rb +64 -0
- data/spec/templates/section_spec.rb +146 -0
- data/spec/templates/spec_helper.rb +73 -0
- data/spec/templates/tag_spec.rb +51 -0
- data/spec/templates/template_spec.rb +409 -0
- data/spec/verifier_spec.rb +106 -0
- data/templates/default/class/dot/setup.rb +6 -0
- data/templates/default/class/dot/superklass.erb +3 -0
- data/templates/default/class/html/constructor_details.erb +8 -0
- data/templates/default/class/html/setup.rb +1 -0
- data/templates/default/class/html/subclasses.erb +4 -0
- data/templates/default/class/setup.rb +36 -0
- data/templates/default/class/text/setup.rb +11 -0
- data/templates/default/class/text/subclasses.erb +5 -0
- data/templates/default/constant/text/header.erb +11 -0
- data/templates/default/constant/text/setup.rb +3 -0
- data/templates/default/docstring/html/abstract.erb +4 -0
- data/templates/default/docstring/html/deprecated.erb +1 -0
- data/templates/default/docstring/html/index.erb +5 -0
- data/templates/default/docstring/html/note.erb +6 -0
- data/templates/default/docstring/html/private.erb +4 -0
- data/templates/default/docstring/html/returns_void.erb +1 -0
- data/templates/default/docstring/html/text.erb +1 -0
- data/templates/default/docstring/html/todo.erb +6 -0
- data/templates/default/docstring/setup.rb +51 -0
- data/templates/default/docstring/text/abstract.erb +2 -0
- data/templates/default/docstring/text/deprecated.erb +2 -0
- data/templates/default/docstring/text/index.erb +2 -0
- data/templates/default/docstring/text/note.erb +4 -0
- data/templates/default/docstring/text/private.erb +2 -0
- data/templates/default/docstring/text/returns_void.erb +1 -0
- data/templates/default/docstring/text/text.erb +1 -0
- data/templates/default/docstring/text/todo.erb +4 -0
- data/templates/default/fulldoc/html/css/common.css +1 -0
- data/templates/default/fulldoc/html/css/full_list.css +57 -0
- data/templates/default/fulldoc/html/css/style.css +338 -0
- data/templates/default/fulldoc/html/frames.erb +28 -0
- data/templates/default/fulldoc/html/full_list.erb +40 -0
- data/templates/default/fulldoc/html/full_list_class.erb +2 -0
- data/templates/default/fulldoc/html/full_list_file.erb +5 -0
- data/templates/default/fulldoc/html/full_list_method.erb +8 -0
- data/templates/default/fulldoc/html/js/app.js +214 -0
- data/templates/default/fulldoc/html/js/full_list.js +178 -0
- data/templates/default/fulldoc/html/js/jquery.js +4 -0
- data/templates/default/fulldoc/html/setup.rb +199 -0
- data/templates/default/layout/dot/header.erb +6 -0
- data/templates/default/layout/dot/setup.rb +14 -0
- data/templates/default/layout/html/breadcrumb.erb +13 -0
- data/templates/default/layout/html/files.erb +11 -0
- data/templates/default/layout/html/footer.erb +5 -0
- data/templates/default/layout/html/headers.erb +14 -0
- data/templates/default/layout/html/index.erb +2 -0
- data/templates/default/layout/html/layout.erb +20 -0
- data/templates/default/layout/html/listing.erb +4 -0
- data/templates/default/layout/html/objects.erb +32 -0
- data/templates/default/layout/html/script_setup.erb +5 -0
- data/templates/default/layout/html/search.erb +8 -0
- data/templates/default/layout/html/setup.rb +71 -0
- data/templates/default/method/html/header.erb +16 -0
- data/templates/default/method/setup.rb +3 -0
- data/templates/default/method/text/header.erb +1 -0
- data/templates/default/method_details/html/header.erb +3 -0
- data/templates/default/method_details/html/method_signature.erb +25 -0
- data/templates/default/method_details/html/source.erb +10 -0
- data/templates/default/method_details/setup.rb +10 -0
- data/templates/default/method_details/text/header.erb +10 -0
- data/templates/default/method_details/text/method_signature.erb +12 -0
- data/templates/default/method_details/text/setup.rb +10 -0
- data/templates/default/module/dot/child.erb +1 -0
- data/templates/default/module/dot/dependencies.erb +3 -0
- data/templates/default/module/dot/header.erb +6 -0
- data/templates/default/module/dot/info.erb +14 -0
- data/templates/default/module/dot/setup.rb +14 -0
- data/templates/default/module/html/attribute_details.erb +10 -0
- data/templates/default/module/html/attribute_summary.erb +8 -0
- data/templates/default/module/html/box_info.erb +37 -0
- data/templates/default/module/html/children.erb +8 -0
- data/templates/default/module/html/constant_summary.erb +13 -0
- data/templates/default/module/html/defines.erb +3 -0
- data/templates/default/module/html/header.erb +5 -0
- data/templates/default/module/html/inherited_attributes.erb +14 -0
- data/templates/default/module/html/inherited_constants.erb +8 -0
- data/templates/default/module/html/inherited_methods.erb +19 -0
- data/templates/default/module/html/item_summary.erb +40 -0
- data/templates/default/module/html/method_details_list.erb +9 -0
- data/templates/default/module/html/method_summary.erb +14 -0
- data/templates/default/module/html/methodmissing.erb +12 -0
- data/templates/default/module/html/pre_docstring.erb +1 -0
- data/templates/default/module/setup.rb +164 -0
- data/templates/default/module/text/children.erb +10 -0
- data/templates/default/module/text/class_meths_list.erb +8 -0
- data/templates/default/module/text/extends.erb +8 -0
- data/templates/default/module/text/header.erb +7 -0
- data/templates/default/module/text/includes.erb +8 -0
- data/templates/default/module/text/instance_meths_list.erb +8 -0
- data/templates/default/module/text/setup.rb +12 -0
- data/templates/default/onefile/html/files.erb +5 -0
- data/templates/default/onefile/html/headers.erb +6 -0
- data/templates/default/onefile/html/layout.erb +17 -0
- data/templates/default/onefile/html/readme.erb +3 -0
- data/templates/default/onefile/html/setup.rb +61 -0
- data/templates/default/root/dot/child.erb +3 -0
- data/templates/default/root/dot/setup.rb +5 -0
- data/templates/default/root/html/setup.rb +1 -0
- data/templates/default/tags/html/example.erb +11 -0
- data/templates/default/tags/html/index.erb +3 -0
- data/templates/default/tags/html/option.erb +24 -0
- data/templates/default/tags/html/overload.erb +14 -0
- data/templates/default/tags/html/see.erb +8 -0
- data/templates/default/tags/html/tag.erb +20 -0
- data/templates/default/tags/setup.rb +55 -0
- data/templates/default/tags/text/example.erb +12 -0
- data/templates/default/tags/text/index.erb +1 -0
- data/templates/default/tags/text/option.erb +20 -0
- data/templates/default/tags/text/overload.erb +19 -0
- data/templates/default/tags/text/see.erb +11 -0
- data/templates/default/tags/text/tag.erb +13 -0
- data/templates/guide/class/html/setup.rb +1 -0
- data/templates/guide/docstring/html/setup.rb +1 -0
- data/templates/guide/fulldoc/html/css/style.css +108 -0
- data/templates/guide/fulldoc/html/js/app.js +33 -0
- data/templates/guide/fulldoc/html/setup.rb +73 -0
- data/templates/guide/layout/html/layout.erb +81 -0
- data/templates/guide/layout/html/setup.rb +28 -0
- data/templates/guide/method/html/header.erb +18 -0
- data/templates/guide/method/html/setup.rb +21 -0
- data/templates/guide/module/html/header.erb +7 -0
- data/templates/guide/module/html/method_list.erb +5 -0
- data/templates/guide/module/html/setup.rb +26 -0
- data/templates/guide/onefile/html/files.erb +4 -0
- data/templates/guide/onefile/html/setup.rb +5 -0
- data/templates/guide/onefile/html/toc.erb +3 -0
- data/templates/guide/tags/html/setup.rb +8 -0
- metadata +689 -0
data/README.md
ADDED
@@ -0,0 +1,609 @@
|
|
1
|
+
# YARD: Yay! A Ruby Documentation Tool
|
2
|
+
|
3
|
+
NOTE: The real version of YARD is made by Loren Segal (lsegal on github). This is a fork by David Grayson which tries to have unicode support.
|
4
|
+
|
5
|
+
**Homepage**: http://yardoc.org
|
6
|
+
|
7
|
+
**IRC**: [irc.freenode.net / #yard](irc://irc.freenode.net/yard)
|
8
|
+
|
9
|
+
**Git**: http://github.com/DavidEGrayson/yard
|
10
|
+
|
11
|
+
**Author**: David Grayson ~~Loren Segal~~
|
12
|
+
|
13
|
+
**Contributors**: http://github.com/lsegal/yard/contributors
|
14
|
+
|
15
|
+
**Copyright**: 2007-2013
|
16
|
+
|
17
|
+
**License**: MIT License
|
18
|
+
|
19
|
+
## Synopsis
|
20
|
+
|
21
|
+
YARD is a documentation generation tool for the Ruby programming language.
|
22
|
+
It enables the user to generate consistent, usable documentation that can be
|
23
|
+
exported to a number of formats very easily, and also supports extending for
|
24
|
+
custom Ruby constructs such as custom class level definitions. Below is a
|
25
|
+
summary of some of YARD's notable features.
|
26
|
+
|
27
|
+
|
28
|
+
## Feature List
|
29
|
+
|
30
|
+
**1. RDoc/SimpleMarkup Formatting Compatibility**: YARD is made to be compatible
|
31
|
+
with RDoc formatting. In fact, YARD does no processing on RDoc documentation
|
32
|
+
strings, and leaves this up to the output generation tool to decide how to
|
33
|
+
render the documentation.
|
34
|
+
|
35
|
+
**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other languages**:
|
36
|
+
YARD uses a '@tag' style definition syntax for meta tags alongside regular code
|
37
|
+
documentation. These tags should be able to happily sit side by side RDoc formatted
|
38
|
+
documentation, but provide a much more consistent and usable way to describe
|
39
|
+
important information about objects, such as what parameters they take and what types
|
40
|
+
they are expected to be, what type a method should return, what exceptions it can
|
41
|
+
raise, if it is deprecated, etc.. It also allows information to be better (and more
|
42
|
+
consistently) organized during the output generation phase. You can find a list
|
43
|
+
of tags in the {file:docs/Tags.md#taglist Tags.md} file.
|
44
|
+
|
45
|
+
YARD also supports an optional "types" declarations for certain tags.
|
46
|
+
This allows the developer to document type signatures for ruby methods and
|
47
|
+
parameters in a non intrusive but helpful and consistent manner. Instead of
|
48
|
+
describing this data in the body of the description, a developer may formally
|
49
|
+
declare the parameter or return type(s) in a single line. Consider the
|
50
|
+
following method documented with YARD formatting:
|
51
|
+
|
52
|
+
# Reverses the contents of a String or IO object.
|
53
|
+
#
|
54
|
+
# @param [String, #read] contents the contents to reverse
|
55
|
+
# @return [String] the contents reversed lexically
|
56
|
+
def reverse(contents)
|
57
|
+
contents = contents.read if respond_to? :read
|
58
|
+
contents.reverse
|
59
|
+
end
|
60
|
+
|
61
|
+
With the above @param tag, we learn that the contents parameter can either be
|
62
|
+
a String or any object that responds to the 'read' method, which is more
|
63
|
+
powerful than the textual description, which says it should be an IO object.
|
64
|
+
This also informs the developer that they should expect to receive a String
|
65
|
+
object returned by the method, and although this may be obvious for a
|
66
|
+
'reverse' method, it becomes very useful when the method name may not be as
|
67
|
+
descriptive.
|
68
|
+
|
69
|
+
**3. Custom Constructs and Extensibility of YARD**: YARD is designed to be
|
70
|
+
extended and customized by plugins. Take for instance the scenario where you
|
71
|
+
need to document the following code:
|
72
|
+
|
73
|
+
class List
|
74
|
+
# Sets the publisher name for the list.
|
75
|
+
cattr_accessor :publisher
|
76
|
+
end
|
77
|
+
|
78
|
+
This custom declaration provides dynamically generated code that is hard for a
|
79
|
+
documentation tool to properly document without help from the developer. To
|
80
|
+
ease the pains of manually documenting the procedure, YARD can be extended by
|
81
|
+
the developer to handle the `cattr_accessor` construct and automatically create
|
82
|
+
an attribute on the class with the associated documentation. This makes
|
83
|
+
documenting external API's, especially dynamic ones, a lot more consistent for
|
84
|
+
consumption by the users.
|
85
|
+
|
86
|
+
YARD is also designed for extensibility everywhere else, allowing you to add
|
87
|
+
support for new programming languages, new data structures and even where/how
|
88
|
+
data is stored.
|
89
|
+
|
90
|
+
**4. Raw Data Output**: YARD also outputs documented objects as raw data (the
|
91
|
+
dumped Namespace) which can be reloaded to do generation at a later date, or
|
92
|
+
even auditing on code. This means that any developer can use the raw data to
|
93
|
+
perform output generation for any custom format, such as YAML, for instance.
|
94
|
+
While YARD plans to support XHTML style documentation output as well as
|
95
|
+
command line (text based) and possibly XML, this may still be useful for those
|
96
|
+
who would like to reap the benefits of YARD's processing in other forms, such
|
97
|
+
as throwing all the documentation into a database. Another useful way of
|
98
|
+
exploiting this raw data format would be to write tools that can auto generate
|
99
|
+
test cases, for example, or show possible unhandled exceptions in code.
|
100
|
+
|
101
|
+
**5. Local Documentation Server**: YARD can serve documentation for projects
|
102
|
+
or installed gems (similar to `gem server`) with the added benefit of dynamic
|
103
|
+
searching, as well as live reloading. Using the live reload feature, you can
|
104
|
+
document your code and immediately preview the results by refreshing the page;
|
105
|
+
YARD will do all the work in re-generating the HTML. This makes writing
|
106
|
+
documentation a much faster process.
|
107
|
+
|
108
|
+
|
109
|
+
## Installing
|
110
|
+
|
111
|
+
To install YARD, use the following command:
|
112
|
+
|
113
|
+
$ gem install yard
|
114
|
+
|
115
|
+
(Add `sudo` if you're installing under a POSIX system as root)
|
116
|
+
|
117
|
+
Alternatively, if you've checked the source out directly, you can call
|
118
|
+
`rake install` from the root project directory.
|
119
|
+
|
120
|
+
**Important Note for Debian/Ubuntu users:** there's a possible chance your Ruby
|
121
|
+
install lacks RDoc, which is occasionally used by YARD to convert markup to HTML.
|
122
|
+
If running `which rdoc` turns up empty, install RDoc by issuing:
|
123
|
+
|
124
|
+
$ sudo apt-get install rdoc
|
125
|
+
|
126
|
+
|
127
|
+
## Usage
|
128
|
+
|
129
|
+
There are a couple of ways to use YARD. The first is via command-line, and the
|
130
|
+
second is the Rake task.
|
131
|
+
|
132
|
+
**1. yard Command-line Tool**
|
133
|
+
|
134
|
+
YARD comes packaged with a executable named `yard` which can control the many
|
135
|
+
functions of YARD, including generating documentation, graphs running the
|
136
|
+
YARD server, and so on. To view a list of available YARD commands, type:
|
137
|
+
|
138
|
+
$ yard --help
|
139
|
+
|
140
|
+
Plugins can also add commands to the `yard` executable to provide extra
|
141
|
+
functionality.
|
142
|
+
|
143
|
+
### Generating Documentation
|
144
|
+
|
145
|
+
<span class="note">The `yardoc` executable is a shortcut for `yard doc`.</span>
|
146
|
+
|
147
|
+
The most common command you will probably use is `yard doc`, or `yardoc`. You
|
148
|
+
can type `yardoc --help` to see the options that YARD provides, but the
|
149
|
+
easiest way to generate docs for your code is to simply type `yardoc` in your
|
150
|
+
project root. This will assume your files are
|
151
|
+
located in the `lib/` directory. If they are located elsewhere, you can specify
|
152
|
+
paths and globs from the commandline via:
|
153
|
+
|
154
|
+
$ yardoc 'lib/**/*.rb' 'app/**/*.rb' ...etc...
|
155
|
+
|
156
|
+
The tool will generate a `.yardoc` file which will store the cached database
|
157
|
+
of your source code and documentation. If you want to re-generate your docs
|
158
|
+
with another template you can simply use the `--use-cache` (or -c)
|
159
|
+
option to speed up the generation process by skipping source parsing.
|
160
|
+
|
161
|
+
YARD will by default only document code in your public visibility. You can
|
162
|
+
document your protected and private code by adding `--protected` or
|
163
|
+
`--private` to the option switches. In addition, you can add `--no-private`
|
164
|
+
to also ignore any object that has the `@private` meta-tag. This is similar
|
165
|
+
to RDoc's ":nodoc:" behaviour, though the distinction is important. RDoc
|
166
|
+
implies that the object with :nodoc: would not be documented, whereas
|
167
|
+
YARD still recommends documenting private objects for the private API (for
|
168
|
+
maintainer/developer consumption).
|
169
|
+
|
170
|
+
You can also add extra informative files (README, LICENSE) by separating
|
171
|
+
the globs and the filenames with '-'.
|
172
|
+
|
173
|
+
$ yardoc 'app/**/*.rb' - README LICENSE FAQ
|
174
|
+
|
175
|
+
If no globs precede the '-' argument, the default glob (`lib/**/*.rb`) is
|
176
|
+
used:
|
177
|
+
|
178
|
+
$ yardoc - README LICENSE FAQ
|
179
|
+
|
180
|
+
Note that the README file can be specified with its own `--readme` switch.
|
181
|
+
|
182
|
+
You can also add a `.yardopts` file to your project directory which lists
|
183
|
+
the switches separated by whitespace (newlines or space) to pass to yardoc
|
184
|
+
whenever it is run. A full overview of the `.yardopts` file can be found in
|
185
|
+
{YARD::CLI::Yardoc}.
|
186
|
+
|
187
|
+
### Queries
|
188
|
+
|
189
|
+
The `yardoc` tool also supports a `--query` argument to only include objects
|
190
|
+
that match a certain data or meta-data query. The query syntax is Ruby, though
|
191
|
+
a few shortcuts are available. For instance, to document only objects that have
|
192
|
+
an "@api" tag with the value "public", all of the following syntaxes would give
|
193
|
+
the same result:
|
194
|
+
|
195
|
+
--query '@api.text == "public"'
|
196
|
+
--query 'object.has_tag?(:api) && object.tag(:api).text == "public"'
|
197
|
+
--query 'has_tag?(:api) && tag(:api).text == "public"'
|
198
|
+
|
199
|
+
Note that the "@tag" syntax returns the first tag named "tag" on the object.
|
200
|
+
To return the array of all tags named "tag", use "@@tag".
|
201
|
+
|
202
|
+
Multiple `--query` arguments are allowed in the command line parameters. The
|
203
|
+
following two lines both check for the existence of a return and param tag:
|
204
|
+
|
205
|
+
--query '@return' --query '@param'
|
206
|
+
--query '@return && @param'
|
207
|
+
|
208
|
+
For more information about the query syntax, see the {YARD::Verifier} class.
|
209
|
+
|
210
|
+
**2. Rake Task**
|
211
|
+
|
212
|
+
The second most obvious is to generate docs via a Rake task. You can do this by
|
213
|
+
adding the following to your `Rakefile`:
|
214
|
+
|
215
|
+
YARD::Rake::YardocTask.new do |t|
|
216
|
+
t.files = ['lib/**/*.rb', OTHER_PATHS] # optional
|
217
|
+
t.options = ['--any', '--extra', '--opts'] # optional
|
218
|
+
end
|
219
|
+
|
220
|
+
both the `files` and `options` settings are optional. `files` will default to
|
221
|
+
`lib/**/*.rb` and `options` will represents any options you might want
|
222
|
+
to add. Again, a full list of options is available by typing `yardoc --help`
|
223
|
+
in a shell. You can also override the options at the Rake command-line with the
|
224
|
+
OPTS environment variable:
|
225
|
+
|
226
|
+
$ rake yard OPTS='--any --extra --opts'
|
227
|
+
|
228
|
+
**3. `yri` RI Implementation**
|
229
|
+
|
230
|
+
The yri binary will use the cached .yardoc database to give you quick ri-style
|
231
|
+
access to your documentation. It's way faster than ri but currently does not
|
232
|
+
work with the stdlib or core Ruby libraries, only the active project. Example:
|
233
|
+
|
234
|
+
$ yri YARD::Handlers::Base#register
|
235
|
+
$ yri File.relative_path
|
236
|
+
|
237
|
+
Note that class methods must not be referred to with the "::" namespace
|
238
|
+
separator. Only modules, classes and constants should use "::".
|
239
|
+
|
240
|
+
You can also do lookups on any installed gems. Just make sure to build the
|
241
|
+
.yardoc databases for installed gems with:
|
242
|
+
|
243
|
+
$ sudo yard gems
|
244
|
+
|
245
|
+
If you don't have sudo access, it will write these files to your `~/.yard`
|
246
|
+
directory. `yri` will also cache lookups there.
|
247
|
+
|
248
|
+
**4. `yard server` Documentation Server**
|
249
|
+
|
250
|
+
The `yard server` command serves documentation for a local project or all installed
|
251
|
+
RubyGems. To serve documentation for a project you are working on, simply run:
|
252
|
+
|
253
|
+
$ yard server
|
254
|
+
|
255
|
+
And the project inside the current directory will be parsed (if the source has
|
256
|
+
not yet been scanned by YARD) and served at [http://localhost:8808](http://localhost:8808).
|
257
|
+
|
258
|
+
### Live Reloading
|
259
|
+
|
260
|
+
If you want to serve documentation on a project while you document it so that
|
261
|
+
you can preview the results, simply pass `--reload` (`-r`) to the above command
|
262
|
+
and YARD will reload any changed files on each request. This will allow you to
|
263
|
+
change any documentation in the source and refresh to see the new contents.
|
264
|
+
|
265
|
+
### Serving Gems
|
266
|
+
|
267
|
+
To serve documentation for all installed gems, call:
|
268
|
+
|
269
|
+
$ yard server --gems
|
270
|
+
|
271
|
+
This will also automatically build documentation for any gems that have not
|
272
|
+
been previously scanned. Note that in this case there will be a slight delay
|
273
|
+
between the first request of a newly parsed gem.
|
274
|
+
|
275
|
+
|
276
|
+
**5. `yard graph` Graphviz Generator**
|
277
|
+
|
278
|
+
You can use `yard graph` to generate dot graphs of your code. This, of course,
|
279
|
+
requires [Graphviz](http://www.graphviz.org) and the `dot` binary. By default
|
280
|
+
this will generate a graph of the classes and modules in the best UML2 notation
|
281
|
+
that Graphviz can support, but without any methods listed. With the `--full`
|
282
|
+
option, methods and attributes will be listed. There is also a `--dependencies`
|
283
|
+
option to show mixin inclusions. You can output to stdout or a file, or pipe directly
|
284
|
+
to `dot`. The same public, protected and private visibility rules apply to `yard graph`.
|
285
|
+
More options can be seen by typing `yard graph --help`, but here is an example:
|
286
|
+
|
287
|
+
$ yard graph --protected --full --dependencies
|
288
|
+
|
289
|
+
|
290
|
+
## Changelog
|
291
|
+
|
292
|
+
- **July.26.13**: 0.8.7 release
|
293
|
+
- Added `--hide-api API` option to hide objects with a given `@api` tag (#685).
|
294
|
+
- Added "Returns ...." prefix to summary when a lone @return tag is used.
|
295
|
+
- Fixed issue that caused ref tags to be added to a docstring twice (#678).
|
296
|
+
- Fixed formatting issue in docstring summaries (#686)
|
297
|
+
|
298
|
+
- **June.27.13**: 0.8.6.2 release
|
299
|
+
- Fixed issue where `yard graph` was not displaying methods
|
300
|
+
|
301
|
+
- **April.14.13**: 0.8.6.1 release
|
302
|
+
- Fixed broken links in File menu on default HTML template
|
303
|
+
- Added --layout switch to `yard display` to wrap output in layout template.
|
304
|
+
- See {file:docs/WhatsNew.md} for more information on added features.
|
305
|
+
|
306
|
+
- **April.13.13**: 0.8.6 release
|
307
|
+
- Various fixes and improved Ruby 2.x compatibility support
|
308
|
+
- Added support for `asciidoc` markup type
|
309
|
+
- Added `yard markups` command to list available markup types
|
310
|
+
- Added `yard display` command to display and format an individual object
|
311
|
+
- See {file:docs/WhatsNew.md} for more information on added features.
|
312
|
+
|
313
|
+
- **February.26.13**: 0.8.5.2 release
|
314
|
+
- Support new keyword argument syntax in method signatures (Ruby 2.x)
|
315
|
+
|
316
|
+
- **February.25.13**: 0.8.5.1 release
|
317
|
+
- Fix `yard diff` of gem files with RubyGems 2.x
|
318
|
+
|
319
|
+
- **February.24.13**: 0.8.5 release
|
320
|
+
- Basic support for Ruby 2.0 (fix compat issues in RDoc 4.0, RubyGems 2.0)
|
321
|
+
- Add CSS styling for tables in default HTML template
|
322
|
+
|
323
|
+
- **February.5.13**: 0.8.4.1 release
|
324
|
+
- Fix regression that broke loading of existing yardoc dbs (#648)
|
325
|
+
|
326
|
+
- **February.4.13**: 0.8.4 release
|
327
|
+
- Add `-B/--bind` switch to yard server (#593, #608)
|
328
|
+
- Add CodeObjects::Base#title for plugins to customize how object
|
329
|
+
links display (#646)
|
330
|
+
- Disable linking objects filtered out by verifiers (#645)
|
331
|
+
- Allow macro expansion on class methods (#632)
|
332
|
+
- Expand newly attached macro on first DSL method call (#631)
|
333
|
+
- Disable RubyGems plugin in Ruby 2.0 (#627)
|
334
|
+
- Fix line range for class/module node bodies (#626)
|
335
|
+
- Search extended modules for attached DSL macros (#553)
|
336
|
+
|
337
|
+
- **October.14.12**: 0.8.3 release
|
338
|
+
- Add `--non-transitive-tag` to disable tag transitivity (#571)
|
339
|
+
- Support --db inside .yardopts for graph/server commands (#583, #586)
|
340
|
+
- Fix handling for =begin/=end docstrings (#577, #578)
|
341
|
+
- Parser only sorts file lists when a glob is provided (#572)
|
342
|
+
- Fix formatting in `{include:Object#method}` syntax (#569)
|
343
|
+
- Fix @option tag inside of module functions (#563)
|
344
|
+
- Fix to `--api` and `--no-api` support (#559)
|
345
|
+
- Fix class nesting issues when path starts with "::" (#552)
|
346
|
+
|
347
|
+
- **June.9.12**: 0.8.2.1 release
|
348
|
+
- Fix a set of regressions in yard server search and dynamic generation
|
349
|
+
|
350
|
+
- **June.7.12**: 0.8.2 release
|
351
|
+
- Added progress style output in tty terminals
|
352
|
+
- Embedded mixins should ignore methods defined on module (#539)
|
353
|
+
- Fixed permalinks for embedded mixins in `yard server` (#540)
|
354
|
+
- Improve parsing in CRuby code (#543)
|
355
|
+
- Ensure Registry.resolve picks module when parsing mixins (#545)
|
356
|
+
- Fixed regression that caused various commands to not show output (#548)
|
357
|
+
- Respect current visibility when parsing class conditions (#551)
|
358
|
+
|
359
|
+
- **May.2.12**: 0.8.1 release
|
360
|
+
- Added `--[no-]api` switch to generate docs for API sets (see {file:docs/WhatsNew.md} for details) (#532)
|
361
|
+
- The `yard list` command now uses cache by default (#533)
|
362
|
+
- Fix `yardoc` generating incorrectly named method list file (#528)
|
363
|
+
- Fix HTML output occasionally showing trailing mdash on options list (#522)
|
364
|
+
|
365
|
+
- **April.30.12**: 0.8.0 release
|
366
|
+
- See {file:docs/WhatsNew.md} for a list of added features
|
367
|
+
- Over 20 bug fixes:
|
368
|
+
- Properly filter hidden setter/getter attributes (#394)
|
369
|
+
- Fix test failures in Linux environments (#397, #472, #473, #512, #513)
|
370
|
+
- Fix attribute inheritance and @private (#432)
|
371
|
+
- Fix attribute parsing (#435)
|
372
|
+
- Allow aliases for attributes (#436)
|
373
|
+
- Fix namespace fetching in `handle_alias()` (#437)
|
374
|
+
- Fix overwritten attributes marked as inherited (#442)
|
375
|
+
- Fix documenting constants defined from C code with `rb_define_const()` (#443)
|
376
|
+
- Do not escape snippets twice (#445)
|
377
|
+
- Ajax method/class search should not fire when a non-printable character is pressed (#446)
|
378
|
+
- Fix yard server crashing when RDoc is not installed (#456)
|
379
|
+
- Fix tags ignored when `(see #foo)` is used (#457)
|
380
|
+
- Fix three "Returns" for two `@overload` tags (#458)
|
381
|
+
- Do not auto-detect DSL methods as method objects if parameter name is not a valid method name (#464)
|
382
|
+
- Fix attaching of macros to Object (#465)
|
383
|
+
- Fix handling of `%w()` source in `[]/[]=` parsed context. (#461, pull in #468)
|
384
|
+
- Don't add default `@return` if `@overload` has `@return`. (#458, pull in #469)
|
385
|
+
- Don't discard tags by (see ...). (#457, pull in #470)
|
386
|
+
- Fix constants listed as inherited when overwritten (#474)
|
387
|
+
- Fix `yardoc --asset` behaving differently on first and subsequent calls. (#477)
|
388
|
+
- `!!!lang` code blocks should set the lang in `<pre>`'s class. (#478, #479)
|
389
|
+
- Fix "File List" search tab error. (#502)
|
390
|
+
- Fix search bar not redirecting to method page. (#509)
|
391
|
+
- Fix server returning exception message bodies as String (#518)
|
392
|
+
|
393
|
+
- **January.31.12**: 0.7.5 release
|
394
|
+
- Various minor bug fixes
|
395
|
+
|
396
|
+
- **December.2.11**: 0.7.4 release
|
397
|
+
- Redcarpet is now the default Markdown formatting library. GFM now works out-of-box (#404)
|
398
|
+
- Fix server side searching for elements that are marked private (#420)
|
399
|
+
- Add 'textile_strict' and 'pre' markup types, reorganize text and none (#416)
|
400
|
+
- Improve encoding line detection (#415)
|
401
|
+
- Add support for `rb_define_alias` in CRuby code (#413)
|
402
|
+
- Fix rendering of some keywords in source view (#410)
|
403
|
+
- Add support for RDoc 3.10+ (#406, #407)
|
404
|
+
- Fix typewriter text being processed in code blocks (#403)
|
405
|
+
- Improve support for has_rdoc in RubyGems 1.8.x (#401)
|
406
|
+
- See the {file:docs/WhatsNew.md} document for details on added features
|
407
|
+
|
408
|
+
- **October.15.11**: 0.7.3 release
|
409
|
+
- Improve support for parsing under Ruby 1.9.2p290 and 1.9.3 (#365, #370)
|
410
|
+
- Add support for SWIG generated CRuby code (#369)
|
411
|
+
- Add support for `rb_define_attr` calls in CRuby code (#362)
|
412
|
+
- Handle file pointers in CRuby code (#358)
|
413
|
+
|
414
|
+
- **June.14.11**: 0.7.2 release
|
415
|
+
- Fix `yard --help` not showing proper output
|
416
|
+
- YARD now expands path to `.yardoc` file in daemon mode for server (#328)
|
417
|
+
- Fix `@overload` tag linking to wrong method (#330)
|
418
|
+
- Fix incorrect return type when using `@macro` (#334)
|
419
|
+
- YARD now requires 'thread' to support RubyGems 1.7+ (#338)
|
420
|
+
- Fix bug in constant documentation when using `%w()` (#348)
|
421
|
+
- Fix YARD style URL links when using autolinking markdown (#353)
|
422
|
+
|
423
|
+
- **May.18.11**: 0.7.1 release
|
424
|
+
- Fixes a bug in `yard server` not displaying class list properly.
|
425
|
+
|
426
|
+
- **May.17.11**: 0.7.0 release
|
427
|
+
- See the {file:docs/WhatsNew.md} document for details on added features
|
428
|
+
- Make sure that Docstring#line_range is filled when possible (#243)
|
429
|
+
- Set #verifier in YardocTask (#282)
|
430
|
+
- Parse BOM in UTF-8 files (#288)
|
431
|
+
- Fix instance attributes not showing up in method list (#302)
|
432
|
+
- Fix rendering of %w() literals in constants (#306)
|
433
|
+
- Ignore keyboard shortcuts when an input is active (#312)
|
434
|
+
- And more...
|
435
|
+
|
436
|
+
- **April.14.11**: 0.6.8 release
|
437
|
+
- Fix regression in RDoc 1.x markup loading
|
438
|
+
- Fix regression in loading of markup libraries for `yard server`
|
439
|
+
|
440
|
+
- **April.6.11**: 0.6.7 release
|
441
|
+
- Fix has_rdoc gem specification issue with new RubyGems plugin API (oops!)
|
442
|
+
|
443
|
+
- **April.6.11**: 0.6.6 release
|
444
|
+
- Fix error message when RDoc is not present (#270)
|
445
|
+
- Add markup type 'none' to perform basic HTML translation (fallback when RDoc is not present)
|
446
|
+
- Add support for RubyGems 1.7.x (#272)
|
447
|
+
- Fix rendering of `{url description}` syntax when description contains newline
|
448
|
+
|
449
|
+
- **March.13.11**: 0.6.5 release
|
450
|
+
- Support `ripper` gem in Ruby 1.8.7
|
451
|
+
- Upgrade jQuery to 1.5.1
|
452
|
+
- Fix handling of alias statements with quoted symbols (#262)
|
453
|
+
- Add CSS styles (#260)
|
454
|
+
- Unhandled exception in YARD::Handlers::Ruby::MixinHandler indexing documentation for eventmachine (#248)
|
455
|
+
- Splice any alias references on method re-definitions into separate methods (#247)
|
456
|
+
- Fix "yard graph" (#245)
|
457
|
+
- Don't process ++ typewriter text inside of HTML attributes (#244)
|
458
|
+
- Prioritize loading of Kramdown before Maruku (#241)
|
459
|
+
- Skip shebang encoding in docstrings (#238)
|
460
|
+
- Fix truncation of references in @deprecated (#232)
|
461
|
+
- Show @api private note when no other tags are present (#231)
|
462
|
+
- Detect docstrings starting with "##" as `Docstring#hash_flag` (#230)
|
463
|
+
- Remove trailing whitespace from freeform tags (#229)
|
464
|
+
- Fix line through for deprecated methods (#225)
|
465
|
+
- Mistake in Tags.md (#223)
|
466
|
+
- Improve database storage by being more efficient with filesystem usage (#222)
|
467
|
+
- Make Registry thread local (#221)
|
468
|
+
- Support `private_constant` class method for 1.9.3 (#219)
|
469
|
+
- Do not assume RDoc is installed (#214)
|
470
|
+
|
471
|
+
- **December.21.10**: 0.6.4 release
|
472
|
+
- Fix yri tool crashing with new Config class (gh-217)
|
473
|
+
- Fix support for ::TopLevelConstants (gh-216)
|
474
|
+
- YARD's test suite is now RSpec2 compatible (gh-215)
|
475
|
+
- Improved documentation for YARD::Server features (gh-207)
|
476
|
+
- Fix displaying of collaped method summary lists (gh-204)
|
477
|
+
- Fix automatic loading of markup providers (gh-206)
|
478
|
+
- Fix keyboard shortcuts for Chrome (gh-203)
|
479
|
+
- Disallow `extend self` inside of a class (gh-202)
|
480
|
+
- Constants now recognized in C extensions (gh-201)
|
481
|
+
|
482
|
+
- **November.21.10**: 0.6.3 release
|
483
|
+
- Fixed regression that caused `yardoc --markup` to silently exit
|
484
|
+
|
485
|
+
- **November.15.10**: 0.6.2 release
|
486
|
+
- **Plugins no longer automatically load, use `--plugin` to load a plugin**
|
487
|
+
- Added YARD::Config and ~/.yard/config YAML configuration file
|
488
|
+
- Added `yard config` command to view/edit YARD configuration file
|
489
|
+
- Fixes for YARD in 1.8.6 (gh-178)
|
490
|
+
- Various HTML template adjustments and fixes (gh-198,199,200)
|
491
|
+
- Improved `yard server -m` multi-project stability (gh-193)
|
492
|
+
- Fixed handling of `yardoc --no-private` with missing class definitions (gh-197)
|
493
|
+
- Added support for constants defined in C extensions (gh-177)
|
494
|
+
- Added support for Structs defined as "Klass = Struct.new(...)" (gh-187)
|
495
|
+
- Improved parsing support for third-party gems (gh-174,180)
|
496
|
+
- Improved support for JRuby 1.6.4+. YARD now passes all specs in JRuby (gh-185)
|
497
|
+
- Improved YARD documentation (gh-172,191,196)
|
498
|
+
|
499
|
+
- **September.06.10**: 0.6.1 release
|
500
|
+
- Fixed TOC showing on top of class/method list in no-frames view
|
501
|
+
- A message now displays when running `yard server` with Rack/Mongrel installed
|
502
|
+
- Improved performance of JS inline search for large class/method lists
|
503
|
+
- Improved link titles for relative object links
|
504
|
+
- Removed `String#camelcase` and `String#underscore` for better Rails compat.
|
505
|
+
- Fixed support for loading .yardoc files under Windows
|
506
|
+
- Fixed inheritance tree arrows not displaying in certain environments
|
507
|
+
|
508
|
+
- **August.29.10**: 0.6.0 release
|
509
|
+
- Added dynamic local documentation server
|
510
|
+
- Added @group/@endgroup declarations to organize methods into groups
|
511
|
+
- Added `yard` executable to serve as main CLI tool with pluggable commands
|
512
|
+
- Added `--asset` switch to `yardoc` to copy files/dirs to output dir
|
513
|
+
- Added ability to register/manipulate tags via CLI (`--tag`, etc.)
|
514
|
+
- Added `yard diff` command
|
515
|
+
- Added statistics to `yardoc` output (and `yard stats` command)
|
516
|
+
- Added Javascript generated Table of Contents to file pages
|
517
|
+
- Updated various APIs
|
518
|
+
- Removed `yard-graph` executable
|
519
|
+
- See more changes in the {file:docs/WhatsNew.md what's new document}
|
520
|
+
|
521
|
+
- **June.22.10**: 0.5.8 release
|
522
|
+
- Merge fix from 0.6 branch for --no-private visibility checking
|
523
|
+
|
524
|
+
- **June.21.10**: 0.5.7 release
|
525
|
+
- Fixed visibility flag parsing in `yardoc`
|
526
|
+
- Updated Parser Architecture documentation with new SourceParser API
|
527
|
+
- Improved Registry documentation for new load commands
|
528
|
+
- Fix loading of .yardoc file as cache (and preserving aliases)
|
529
|
+
- Fix "lib" directory missing when running YARD on installed gems
|
530
|
+
|
531
|
+
- **June.12.10**: 0.5.6 release
|
532
|
+
- Bug fixes for RubyGems plugin, `has_rdoc=false` should now work
|
533
|
+
- New API for registering custom parsers. See {file:docs/WhatsNew.md}
|
534
|
+
|
535
|
+
- **May.22.10**: 0.5.5 release
|
536
|
+
- Various bug fixes
|
537
|
+
|
538
|
+
- **March.22.10**: 0.5.4 release
|
539
|
+
- See {file:docs/WhatsNew.md what's new document} for changes
|
540
|
+
|
541
|
+
- **January.11.10**: 0.5.3 release
|
542
|
+
- See {file:docs/WhatsNew.md what's new document} for changes
|
543
|
+
|
544
|
+
- **December.16.09**: 0.5.2 release
|
545
|
+
- See {file:docs/WhatsNew.md what's new document} for changes
|
546
|
+
|
547
|
+
- **December.15.09**: 0.5.1 release
|
548
|
+
- See {file:docs/WhatsNew.md what's new document} for changes
|
549
|
+
|
550
|
+
- **December.13.09**: 0.5.0 release
|
551
|
+
- See {file:docs/WhatsNew.md what's new document} for changes
|
552
|
+
|
553
|
+
- **November.15.09**: 0.4.0 release
|
554
|
+
- Added new templating engine based on [tadpole](http://github.com/lsegal/tadpole)
|
555
|
+
- Added YARD queries (`--query` CLI argument to yardoc)
|
556
|
+
- Greatly expanded YARD documentation
|
557
|
+
- Added plugin support
|
558
|
+
- New `@abstract` and `@private` tags
|
559
|
+
- Changed default rake task to `rake yard`
|
560
|
+
- Read about changes in {file:docs/WhatsNew.md}
|
561
|
+
|
562
|
+
- **August.13.09**: 0.2.3.5 release
|
563
|
+
- Minor bug fixes.
|
564
|
+
|
565
|
+
- **August.07.09**: 0.2.3.4 release
|
566
|
+
- Minor bug fixes.
|
567
|
+
|
568
|
+
- **July.26.09**: 0.2.3.3 release
|
569
|
+
- Minor bug fixes.
|
570
|
+
|
571
|
+
- **July.06.09**: 0.2.3.2 release
|
572
|
+
- Fix Textile hard-break issues
|
573
|
+
- Add description for @see tag to use as link title in HTML docs.
|
574
|
+
- Add --title CLI option to specify a title for HTML doc files.
|
575
|
+
- Add custom.css file that can be overridden with various custom
|
576
|
+
styelsheet declarations. To use this, simply add `default/fulldoc/html/custom.css`
|
577
|
+
inside your code directory and use the `-t` template directory yardoc CLI
|
578
|
+
option to point to that template directory (the dir holding 'default').
|
579
|
+
- Add support in `yardoc` CLI to specify extra files (formerly --files)
|
580
|
+
by appending "- extra files here" after regular source files. Example:
|
581
|
+
|
582
|
+
yardoc --private lib/**/*.rb - FAQ LICENSE
|
583
|
+
|
584
|
+
- **Jun.13.09**: 0.2.3.1 release.
|
585
|
+
- Add a RubyGems 1.3.2+ plugin to generate YARD documentation instead of
|
586
|
+
RDoc. To take advantage of this plugin, set `has_rdoc = 'yard'` in your
|
587
|
+
.gemspec file.
|
588
|
+
|
589
|
+
- **Jun.07.09**: 0.2.3 release. See the {file:docs/WhatsNew.md} file for a
|
590
|
+
list of important new features.
|
591
|
+
|
592
|
+
- **Jun.16.08**: 0.2.2 release. This is the largest changset since yard's
|
593
|
+
conception and involves a complete overhaul of the parser and API to make it
|
594
|
+
more robust and far easier to extend and use for the developer.
|
595
|
+
|
596
|
+
- **Feb.20.08**: 0.2.1 release.
|
597
|
+
|
598
|
+
- **Feb.24.07**: Released 0.1a experimental version for testing. The goal here is
|
599
|
+
to get people testing YARD on their code because there are too many possible
|
600
|
+
code styles to fit into a sane amount of test cases. It also demonstrates the
|
601
|
+
power of YARD and what to expect from the syntax (Yardoc style meta tags).
|
602
|
+
|
603
|
+
|
604
|
+
## Copyright
|
605
|
+
|
606
|
+
YARD © 2007-2013 by [Loren Segal](mailto:lsegal@soen.ca). YARD is
|
607
|
+
licensed under the MIT license except for some files which come from the
|
608
|
+
RDoc/Ruby distributions. Please see the {file:LICENSE} and {file:LEGAL}
|
609
|
+
documents for more information.
|
data/Rakefile
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/lib/yard'
|
2
|
+
require File.dirname(__FILE__) + '/lib/yard/rubygems/specification'
|
3
|
+
require 'rbconfig'
|
4
|
+
|
5
|
+
YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']
|
6
|
+
|
7
|
+
task :default => :specs
|
8
|
+
|
9
|
+
require 'jeweler'
|
10
|
+
Jeweler::Tasks.new do |gem|
|
11
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
12
|
+
gem.name = "deg-yard"
|
13
|
+
gem.homepage = "http://github.com/DavidEGrayson/yard"
|
14
|
+
gem.license = "MIT"
|
15
|
+
gem.summary = "DavidEGrayson's fork of the YARD gem with unicode support."
|
16
|
+
gem.description = "The real YARD gem is maintained by Loren Segal. This is a fork made by DavidEGrayson to fix some things that were bothering him."
|
17
|
+
gem.email = "davidegrayson@gmail.com"
|
18
|
+
gem.authors = ["David Grayson", "Loren Segal"]
|
19
|
+
gem.version = YARD::VERSION
|
20
|
+
# dependencies defined in Gemfile
|
21
|
+
end
|
22
|
+
Jeweler::RubygemsDotOrgTasks.new
|
23
|
+
|
24
|
+
begin
|
25
|
+
require 'rvm-tester'
|
26
|
+
RVM::Tester::TesterTask.new do |t|
|
27
|
+
t.rubies = %w(1.8.6 ree jruby 1.8.7 1.9.2 1.9.3)
|
28
|
+
t.bundle_install = false # don't need to do this all the time
|
29
|
+
t.verbose = true
|
30
|
+
end
|
31
|
+
rescue LoadError
|
32
|
+
end
|
33
|
+
|
34
|
+
task :travis_ci do
|
35
|
+
ENV['SUITE'] = '1'
|
36
|
+
ENV['CI'] = '1'
|
37
|
+
ENV['LEGACY'] = nil
|
38
|
+
Rake::Task['specs'].execute
|
39
|
+
if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java'
|
40
|
+
puts ""
|
41
|
+
puts "Running specs with in legacy mode"
|
42
|
+
ENV['LEGACY'] = '1'
|
43
|
+
Rake::Task['specs'].execute
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "Run all specs"
|
48
|
+
task :specs do
|
49
|
+
opts = ['rspec', '-c']
|
50
|
+
opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
|
51
|
+
opts += ['-I', YARD::ROOT]
|
52
|
+
if ENV['DEBUG']
|
53
|
+
$DEBUG = true
|
54
|
+
opts += ['-d']
|
55
|
+
end
|
56
|
+
opts += FileList["spec/**/*_spec.rb"].sort
|
57
|
+
cmd = opts.join(' ')
|
58
|
+
puts cmd if Rake.application.options.trace
|
59
|
+
system(cmd)
|
60
|
+
raise "Command failed with status (#{$?.to_i}): #{cmd}" if $?.to_i != 0
|
61
|
+
end
|
62
|
+
task :spec => :specs
|
63
|
+
|
64
|
+
YARD::Rake::YardocTask.new do |t|
|
65
|
+
t.options += ['--title', "YARD #{YARD::VERSION} Documentation"]
|
66
|
+
end
|