nutshell-crm 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +4 -1
- data/lib/nutshell-crm.rb +274 -6
- data/lib/nutshell-crm/version.rb +1 -1
- data/nutshell-crm.gemspec +1 -0
- data/spec/nutshell-crm_spec.rb +40 -167
- data/vendor/bundle/bin/yard +19 -0
- data/vendor/bundle/bin/yardoc +19 -0
- data/vendor/bundle/bin/yri +19 -0
- data/vendor/bundle/gems/yard-0.7.4/.yardopts +18 -0
- data/vendor/bundle/gems/yard-0.7.4/ChangeLog +10533 -0
- data/vendor/bundle/gems/yard-0.7.4/LEGAL +74 -0
- data/vendor/bundle/gems/yard-0.7.4/LICENSE +22 -0
- data/vendor/bundle/gems/yard-0.7.4/README.md +514 -0
- data/vendor/bundle/gems/yard-0.7.4/Rakefile +99 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/builtins_vs_eval.rb +23 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/concat_vs_join.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/erb_vs_erubis.rb +53 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/format_args.rb +46 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/generation.rb +37 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/marshal_vs_dbm.rb +63 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/parsing.rb +46 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/pathname_vs_string.rb +50 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/rdoc_vs_yardoc.rb +10 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/ri_vs_yri.rb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/ripper_parser.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/splat_vs_flatten.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/template_erb.rb +22 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/template_format.rb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/template_profile.rb +17 -0
- data/vendor/bundle/gems/yard-0.7.4/benchmarks/yri_cache.rb +19 -0
- data/vendor/bundle/gems/yard-0.7.4/bin/yard +4 -0
- data/vendor/bundle/gems/yard-0.7.4/bin/yard-graph +4 -0
- data/vendor/bundle/gems/yard-0.7.4/bin/yard-server +4 -0
- data/vendor/bundle/gems/yard-0.7.4/bin/yardoc +4 -0
- data/vendor/bundle/gems/yard-0.7.4/bin/yri +4 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/CodeObjects.md +115 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/GettingStarted.md +590 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/Glossary.md +12 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/Handlers.md +152 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/Overview.md +61 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/Parser.md +191 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/Tags.md +586 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/Templates.md +518 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/WhatsNew.md +887 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/images/code-objects-class-diagram.png +0 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/images/handlers-class-diagram.png +0 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/images/overview-class-diagram.png +0 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/images/parser-class-diagram.png +0 -0
- data/vendor/bundle/gems/yard-0.7.4/docs/images/tags-class-diagram.png +0 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/rubygems_plugin.rb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard.rb +57 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/autoload.rb +233 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/command.rb +73 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/command_parser.rb +89 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/config.rb +136 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/diff.rb +201 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/gems.rb +83 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/graph.rb +103 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/help.rb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/list.rb +22 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/server.rb +160 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/stats.rb +210 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/yardoc.rb +696 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/yri.rb +193 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/base.rb +513 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/class_object.rb +143 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/class_variable_object.rb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/constant_object.rb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/extended_method_object.rb +23 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/extra_file_object.rb +89 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/macro_object.rb +215 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/method_object.rb +153 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/module_object.rb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/namespace_object.rb +200 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/proxy.rb +252 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/root_object.rb +16 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/config.rb +259 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/array.rb +15 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/file.rb +65 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/hash.rb +15 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/insertion.rb +60 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/module.rb +19 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/string.rb +67 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/symbol_hash.rb +73 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/docstring.rb +331 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/globals.rb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/base.rb +569 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/processor.rb +187 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/alias_handler.rb +43 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/attribute_handler.rb +83 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/base.rb +160 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/class_condition_handler.rb +84 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/class_handler.rb +122 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/class_variable_handler.rb +16 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/constant_handler.rb +45 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/exception_handler.rb +26 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/extend_handler.rb +21 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/alias_handler.rb +37 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/attribute_handler.rb +61 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/base.rb +228 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +81 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/class_handler.rb +110 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/constant_handler.rb +28 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/exception_handler.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/extend_handler.rb +20 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/macro_handler.rb +39 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/method_handler.rb +78 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/mixin_handler.rb +41 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/module_handler.rb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +21 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/visibility_handler.rb +16 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/yield_handler.rb +28 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/macro_handler.rb +40 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/macro_handler_methods.rb +130 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/method_condition_handler.rb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/method_handler.rb +94 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/mixin_handler.rb +36 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/module_handler.rb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/private_constant_handler.rb +36 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/struct_handler_methods.rb +140 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/visibility_handler.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/yield_handler.rb +30 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/logging.rb +77 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/base.rb +56 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/c_parser.rb +501 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/ast_node.rb +399 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/ruby_lex.rb +1376 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/ruby_parser.rb +30 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/statement.rb +60 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/statement_list.rb +390 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/token_list.rb +66 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/ruby_parser.rb +542 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/source_parser.rb +517 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rake/yardoc_task.rb +75 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/registry.rb +400 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/registry_store.rb +252 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports.rb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/LICENSE.txt +57 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/MIT.txt +20 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/gem.rb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/source_index.rb +353 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/doc_manager.rb +75 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/specification.rb +41 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/base.rb +80 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/file_system_serializer.rb +92 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/process_serializer.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/stdout_serializer.rb +32 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/yardoc_serializer.rb +122 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server.rb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/adapter.rb +100 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/base.rb +192 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/display_file_command.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/display_object_command.rb +51 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/frames_command.rb +32 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/library_command.rb +100 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/library_index_command.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/list_command.rb +48 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/search_command.rb +72 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/static_file_command.rb +50 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/doc_server_helper.rb +40 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/doc_server_serializer.rb +31 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/library_version.rb +227 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/rack_adapter.rb +83 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/router.rb +180 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/static_caching.rb +45 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/css/custom.css +78 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +12 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/js/live.js +32 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/layout/html/breadcrumb.erb +46 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/layout/html/headers.erb +16 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/layout/html/setup.rb +7 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/frames/html/frames.erb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/frames/html/setup.rb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/full_list/html/full_list.erb +34 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/full_list/html/setup.rb +20 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/contents.erb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/headers.erb +26 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/setup.rb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/title.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/processing/html/processing.erb +51 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/processing/html/setup.rb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/search/html/search.erb +19 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/search/html/setup.rb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/webrick_adapter.rb +42 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/default_factory.rb +141 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/default_tag.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/library.rb +201 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/option_tag.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/overload_tag.rb +65 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/ref_tag.rb +7 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/ref_tag_list.rb +27 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/tag.rb +57 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/tag_format_error.rb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/engine.rb +173 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/erb_cache.rb +22 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/base_helper.rb +206 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/filter_helper.rb +26 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/html_helper.rb +520 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +59 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/markup/rdoc_markup.rb +85 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/markup_helper.rb +164 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/method_helper.rb +72 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/module_helper.rb +19 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/text_helper.rb +95 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/uml_helper.rb +46 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/section.rb +106 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/template.rb +366 -0
- data/vendor/bundle/gems/yard-0.7.4/lib/yard/verifier.rb +148 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/command_parser_spec.rb +43 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/command_spec.rb +36 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/config_spec.rb +92 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/diff_spec.rb +172 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/gems_spec.rb +81 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/help_spec.rb +22 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/list_spec.rb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/server_spec.rb +171 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/stats_spec.rb +90 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/yardoc_spec.rb +628 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/cli/yri_spec.rb +87 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/base_spec.rb +334 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/class_object_spec.rb +225 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/code_object_list_spec.rb +33 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/constants_spec.rb +81 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/extra_file_object_spec.rb +132 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/macro_object_spec.rb +154 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/method_object_spec.rb +152 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/module_object_spec.rb +141 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/namespace_object_spec.rb +170 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/proxy_spec.rb +124 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/spec_helper.rb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/config_spec.rb +167 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/array_spec.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/file_spec.rb +68 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/hash_spec.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/insertion_spec.rb +37 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/module_spec.rb +15 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/string_spec.rb +42 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/symbol_hash_spec.rb +86 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/docstring_spec.rb +400 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/alias_handler_spec.rb +80 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/attribute_handler_spec.rb +94 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/base_spec.rb +197 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/class_condition_handler_spec.rb +62 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/class_handler_spec.rb +246 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/class_variable_handler_spec.rb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/constant_handler_spec.rb +64 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/alias_handler_001.rb.txt +44 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/attribute_handler_001.rb.txt +32 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/class_condition_handler_001.rb.txt +61 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/class_handler_001.rb.txt +120 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/class_variable_handler_001.rb.txt +10 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/constant_handler_001.rb.txt +25 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/exception_handler_001.rb.txt +59 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/extend_handler_001.rb.txt +16 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/macro_handler_001.rb.txt +83 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/method_condition_handler_001.rb.txt +10 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/method_handler_001.rb.txt +122 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/mixin_handler_001.rb.txt +33 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/module_handler_001.rb.txt +29 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/private_constant_handler_001.rb.txt +8 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/process_handler_001.rb.txt +11 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/visibility_handler_001.rb.txt +27 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/yield_handler_001.rb.txt +55 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/exception_handler_spec.rb +48 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/extend_handler_spec.rb +23 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/legacy_base_spec.rb +128 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/macro_handler_spec.rb +157 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/method_condition_handler_spec.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/method_handler_spec.rb +177 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/mixin_handler_spec.rb +50 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/module_handler_spec.rb +34 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/private_constant_handler_spec.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/processor_spec.rb +23 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/ruby/base_spec.rb +90 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/ruby/legacy/base_spec.rb +78 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/spec_helper.rb +34 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/visibility_handler_spec.rb +34 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/handlers/yield_handler_spec.rb +51 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/logging_spec.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/base_spec.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/c_parser_spec.rb +231 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/array.c.txt +3887 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/example1.rb.txt +8 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/extrafile.c.txt +8 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/multifile.c.txt +6 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/override.c.txt +424 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/parse_in_order_001.rb.txt +2 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/parse_in_order_002.rb.txt +2 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/tag_handler_001.rb.txt +8 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/ast_node_spec.rb +33 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/legacy/statement_list_spec.rb +299 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/legacy/token_list_spec.rb +69 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/ruby_parser_spec.rb +257 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/source_parser_spec.rb +595 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/parser/tag_parsing_spec.rb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/rake/yardoc_task_spec.rb +90 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/registry_spec.rb +303 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/registry_store_spec.rb +255 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/checksums +1 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/Foo.dat +0 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/Foo/bar_i.dat +0 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/Foo/baz_i.dat +0 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/root.dat +0 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/proxy_types +2 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/file_system_serializer_spec.rb +124 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/spec_helper.rb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/serializers/yardoc_serializer_spec.rb +46 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/adapter_spec.rb +38 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/commands/base_spec.rb +87 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/commands/library_command_spec.rb +39 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/commands/static_file_command_spec.rb +84 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/doc_server_serializer_spec.rb +58 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/rack_adapter_spec.rb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/router_spec.rb +115 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/spec_helper.rb +17 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/static_caching_spec.rb +39 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server/webrick_servlet_spec.rb +20 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/server_spec.rb +10 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/spec_helper.rb +105 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/tags/default_factory_spec.rb +138 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/tags/default_tag_spec.rb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/tags/library_spec.rb +23 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/tags/overload_tag_spec.rb +53 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/tags/ref_tag_list_spec.rb +53 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/class_spec.rb +43 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/constant_spec.rb +40 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/engine_spec.rb +129 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/class001.html +280 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/class001.txt +36 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/class002.html +35 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/constant001.txt +25 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/constant002.txt +7 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/constant003.txt +11 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method001.html +130 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method001.txt +35 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method002.html +86 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method002.txt +20 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method003.html +159 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method003.txt +45 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method004.html +44 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method004.txt +10 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method005.html +99 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method005.txt +33 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module001.dot +33 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module001.html +795 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module001.txt +33 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module002.html +319 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/tag001.txt +82 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/base_helper_spec.rb +175 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/html_helper_spec.rb +541 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/html_syntax_highlight_helper_spec.rb +48 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/markup/rdoc_markup_spec.rb +84 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/markup_helper_spec.rb +132 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/method_helper_spec.rb +75 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/shared_signature_examples.rb +121 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/text_helper_spec.rb +44 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/method_spec.rb +102 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/module_spec.rb +109 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/onefile_spec.rb +47 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/section_spec.rb +146 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/spec_helper.rb +42 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/tag_spec.rb +39 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/templates/template_spec.rb +401 -0
- data/vendor/bundle/gems/yard-0.7.4/spec/verifier_spec.rb +86 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/dot/setup.rb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/dot/superklass.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/html/constructor_details.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/html/setup.rb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/html/subclasses.erb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/setup.rb +36 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/text/setup.rb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/class/text/subclasses.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/constant/text/header.erb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/constant/text/setup.rb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/abstract.erb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/deprecated.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/index.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/note.erb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/private.erb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/returns_void.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/text.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/todo.erb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/setup.rb +49 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/abstract.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/deprecated.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/index.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/note.erb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/private.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/returns_void.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/text.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/todo.erb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/css/common.css +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/css/full_list.css +55 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/css/style.css +322 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/frames.erb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list.erb +37 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list_class.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list_files.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list_methods.erb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/js/app.js +205 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/js/full_list.js +167 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/js/jquery.js +16 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/setup.rb +198 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/dot/header.erb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/dot/setup.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/breadcrumb.erb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/files.erb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/footer.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/headers.erb +17 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/index.erb +2 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/layout.erb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/listing.erb +4 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/objects.erb +32 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/search.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/setup.rb +71 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method/html/header.erb +16 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method/setup.rb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method/text/header.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/html/header.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/html/method_signature.erb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/html/source.erb +10 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/setup.rb +9 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/text/header.erb +10 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/text/method_signature.erb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/text/setup.rb +10 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/child.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/dependencies.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/header.erb +6 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/info.erb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/setup.rb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/attribute_details.erb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/attribute_summary.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/box_info.erb +37 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/children.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/constant_summary.erb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/defines.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/header.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/inherited_attributes.erb +17 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/inherited_constants.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/inherited_methods.erb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/item_summary.erb +30 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/method_details_list.erb +9 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/method_summary.erb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/methodmissing.erb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/pre_docstring.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/setup.rb +129 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/children.erb +10 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/class_meths_list.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/extends.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/header.erb +7 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/includes.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/instance_meths_list.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/setup.rb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/files.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/layout.erb +22 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/readme.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/setup.rb +43 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/root/dot/child.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/root/dot/setup.rb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/root/html/setup.rb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/example.erb +9 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/index.erb +3 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/option.erb +22 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/overload.erb +14 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/see.erb +8 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/tag.erb +20 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/setup.rb +50 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/example.erb +12 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/index.erb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/option.erb +20 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/overload.erb +19 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/see.erb +11 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/tag.erb +13 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/class/html/setup.rb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/docstring/html/setup.rb +1 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/fulldoc/html/css/style.css +93 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/fulldoc/html/js/app.js +33 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/fulldoc/html/setup.rb +54 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/layout/html/layout.erb +81 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/layout/html/setup.rb +24 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/method/html/header.erb +18 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/method/html/setup.rb +21 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/module/html/header.erb +7 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/module/html/method_list.erb +5 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/module/html/setup.rb +26 -0
- data/vendor/bundle/gems/yard-0.7.4/templates/guide/tags/html/setup.rb +8 -0
- data/vendor/bundle/specifications/yard-0.7.4.gemspec +28 -0
- metadata +505 -8
@@ -0,0 +1,81 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
require 'ostruct'
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
describe YARD::CLI::Gems do
|
6
|
+
before do
|
7
|
+
@rebuild = false
|
8
|
+
@gem1 = build_mock('gem1')
|
9
|
+
@gem2 = build_mock('gem2')
|
10
|
+
@gem3 = build_mock('gem3')
|
11
|
+
end
|
12
|
+
|
13
|
+
def build_mock(name, version = '1.0')
|
14
|
+
OpenStruct.new :name => name,
|
15
|
+
:version => version,
|
16
|
+
:full_gem_path => "/path/to/gems/#{name}-#{version}",
|
17
|
+
:yardoc_file => "/path/to/yardoc/#{name}-#{version}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def build_specs(*specs)
|
21
|
+
specs.each do |themock|
|
22
|
+
Registry.should_receive(:yardoc_file_for_gem).with(themock.name, "= #{themock.version}").and_return(themock.yardoc_file)
|
23
|
+
File.should_receive(:directory?).with(themock.yardoc_file).and_return(@rebuild)
|
24
|
+
File.should_receive(:directory?).with(themock.full_gem_path).and_return(true)
|
25
|
+
Registry.should_receive(:yardoc_file_for_gem).with(themock.name, "= #{themock.version}", true).and_return(themock.yardoc_file)
|
26
|
+
Dir.should_receive(:chdir).with(themock.full_gem_path)
|
27
|
+
end
|
28
|
+
Registry.should_receive(:clear).exactly(specs.size).times
|
29
|
+
CLI::Yardoc.should_receive(:run).exactly(specs.size).times
|
30
|
+
end
|
31
|
+
|
32
|
+
describe '#run' do
|
33
|
+
it "should build all gem indexes if no gem is specified" do
|
34
|
+
build_specs(@gem1, @gem2)
|
35
|
+
Gem.source_index.should_receive(:find_name).with('').and_return([@gem1, @gem2])
|
36
|
+
CLI::Gems.run
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should allow gem to be specified" do
|
40
|
+
build_specs(@gem1)
|
41
|
+
Gem.source_index.should_receive(:find_name).with(@gem1.name, '>= 0').and_return([@gem1])
|
42
|
+
CLI::Gems.run(@gem1.name)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should allow multiple gems to be specified for building" do
|
46
|
+
build_specs(@gem1, @gem2)
|
47
|
+
Gem.source_index.should_receive(:find_name).with(@gem1.name, @gem1.version).and_return([@gem1])
|
48
|
+
Gem.source_index.should_receive(:find_name).with(@gem2.name, '>= 0').and_return([@gem2])
|
49
|
+
CLI::Gems.run(@gem1.name, @gem1.version, @gem2.name)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should allow version to be specified with gem" do
|
53
|
+
build_specs(@gem1)
|
54
|
+
Gem.source_index.should_receive(:find_name).with(@gem1.name, '>= 1.0').and_return([@gem1])
|
55
|
+
CLI::Gems.run(@gem1.name, '>= 1.0')
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should warn if one of the gems is not found, but it should process others" do
|
59
|
+
build_specs(@gem2)
|
60
|
+
Gem.source_index.should_receive(:find_name).with(@gem1.name, '>= 2.0').and_return([])
|
61
|
+
Gem.source_index.should_receive(:find_name).with(@gem2.name, '>= 0').and_return([@gem2])
|
62
|
+
log.should_receive(:warn).with(/#{@gem1.name} >= 2.0 could not be found/)
|
63
|
+
CLI::Gems.run(@gem1.name, '>= 2.0', @gem2.name)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should fail if specified gem(s) is/are not found" do
|
67
|
+
CLI::Yardoc.should_not_receive(:run)
|
68
|
+
Gem.source_index.should_receive(:find_name).with(@gem1.name, '>= 2.0').and_return([])
|
69
|
+
log.should_receive(:warn).with(/#{@gem1.name} >= 2.0 could not be found/)
|
70
|
+
log.should_receive(:error).with(/No specified gems could be found/)
|
71
|
+
CLI::Gems.run(@gem1.name, '>= 2.0')
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should accept --rebuild" do
|
75
|
+
@rebuild = true
|
76
|
+
build_specs(@gem1)
|
77
|
+
Gem.source_index.should_receive(:find_name).with('').and_return([@gem1])
|
78
|
+
CLI::Gems.run('--rebuild')
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe YARD::CLI::Help do
|
4
|
+
describe '#run' do
|
5
|
+
it "should accept 'help command'" do
|
6
|
+
CLI::Yardoc.should_receive(:run).with('--help')
|
7
|
+
CLI::Help.run('doc')
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should accept no arguments (lists all commands)" do
|
11
|
+
CLI::CommandParser.should_receive(:run).with('--help')
|
12
|
+
CLI::Help.run
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should show all commands if command isn't found" do
|
16
|
+
CLI::CommandParser.should_receive(:run).with('--help')
|
17
|
+
help = CLI::Help.new
|
18
|
+
help.should_receive(:puts).with(/not found/)
|
19
|
+
help.run('unknown')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
class Server::WebrickAdapter; def start; end end
|
4
|
+
|
5
|
+
describe YARD::CLI::Server do
|
6
|
+
before do
|
7
|
+
@no_verify_libraries = false
|
8
|
+
@no_adapter_mock = false
|
9
|
+
@libraries = {}
|
10
|
+
@options = {:single_library => true, :caching => false}
|
11
|
+
@server_options = {:Port => 8808}
|
12
|
+
@adapter = mock(:adapter)
|
13
|
+
@adapter.stub!(:setup)
|
14
|
+
@cli = YARD::CLI::Server.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def rack_required
|
18
|
+
begin; require 'rack'; rescue LoadError; pending "rack required for this test" end
|
19
|
+
end
|
20
|
+
|
21
|
+
def unstub_adapter
|
22
|
+
@no_adapter_mock = true
|
23
|
+
end
|
24
|
+
|
25
|
+
def run(*args)
|
26
|
+
if @libraries.empty?
|
27
|
+
library = Server::LibraryVersion.new(File.basename(Dir.pwd), nil, File.expand_path('.yardoc'))
|
28
|
+
@libraries = {library.name => [library]}
|
29
|
+
end
|
30
|
+
unless @no_verify_libraries
|
31
|
+
@libraries.values.each {|libs| libs.each {|lib| File.should_receive(:exist?).at_least(1).times.with(File.expand_path(lib.yardoc_file)).and_return(true) } }
|
32
|
+
end
|
33
|
+
unless @no_adapter_mock
|
34
|
+
@cli.stub!(:adapter).and_return(@adapter)
|
35
|
+
@adapter.should_receive(:new).with(@libraries, @options, @server_options).and_return(@adapter)
|
36
|
+
@adapter.should_receive(:start)
|
37
|
+
end
|
38
|
+
@cli.run(*args.flatten)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should default to current dir if no library is specified" do
|
42
|
+
Dir.should_receive(:pwd).and_return('/path/to/foo')
|
43
|
+
@libraries['foo'] = [Server::LibraryVersion.new('foo', nil, File.expand_path('.yardoc'))]
|
44
|
+
run
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should use .yardoc as yardoc file is library list is odd" do
|
48
|
+
@libraries['a'] = [Server::LibraryVersion.new('a', nil, File.expand_path('.yardoc'))]
|
49
|
+
run 'a'
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should force multi library if more than one library is listed" do
|
53
|
+
@options[:single_library] = false
|
54
|
+
@libraries['a'] = [Server::LibraryVersion.new('a', nil, File.expand_path('b'))]
|
55
|
+
@libraries['c'] = [Server::LibraryVersion.new('c', nil, File.expand_path('.yardoc'))]
|
56
|
+
run %w(a b c)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should accept -m, --multi-library" do
|
60
|
+
@options[:single_library] = false
|
61
|
+
run '-m'
|
62
|
+
run '--multi-library'
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should accept -c, --cache" do
|
66
|
+
@options[:caching] = true
|
67
|
+
run '-c'
|
68
|
+
run '--cache'
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should accept -r, --reload" do
|
72
|
+
@options[:incremental] = true
|
73
|
+
run '-r'
|
74
|
+
run '--reload'
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should accept -d, --daemon" do
|
78
|
+
@server_options[:daemonize] = true
|
79
|
+
run '-d'
|
80
|
+
run '--daemon'
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should accept -p, --port" do
|
84
|
+
@server_options[:Port] = 10
|
85
|
+
run '-p', '10'
|
86
|
+
run '--port', '10'
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should accept --docroot" do
|
90
|
+
@server_options[:DocumentRoot] = Dir.pwd + '/__foo/bar'
|
91
|
+
run '--docroot', '__foo/bar'
|
92
|
+
end
|
93
|
+
|
94
|
+
it "should accept -a webrick to create WEBrick adapter" do
|
95
|
+
@cli.should_receive(:adapter=).with(YARD::Server::WebrickAdapter)
|
96
|
+
run '-a', 'webrick'
|
97
|
+
end
|
98
|
+
|
99
|
+
it "should accept -a rack to create Rack adapter" do
|
100
|
+
rack_required
|
101
|
+
@cli.should_receive(:adapter=).with(YARD::Server::RackAdapter)
|
102
|
+
run '-a', 'rack'
|
103
|
+
end
|
104
|
+
|
105
|
+
it "should default to Rack adapter if exists on system" do
|
106
|
+
rack_required
|
107
|
+
@cli.should_receive(:require).with('rubygems').and_return(false)
|
108
|
+
@cli.should_receive(:require).with('rack').and_return(true)
|
109
|
+
@cli.should_receive(:adapter=).with(YARD::Server::RackAdapter)
|
110
|
+
@cli.send(:select_adapter)
|
111
|
+
end
|
112
|
+
|
113
|
+
it "should fall back to WEBrick adapter if Rack is not on system" do
|
114
|
+
@cli.should_receive(:require).with('rubygems').and_return(false)
|
115
|
+
@cli.should_receive(:require).with('rack').and_raise(LoadError)
|
116
|
+
@cli.should_receive(:adapter=).with(YARD::Server::WebrickAdapter)
|
117
|
+
@cli.send(:select_adapter)
|
118
|
+
end
|
119
|
+
|
120
|
+
it "should accept -s, --server" do
|
121
|
+
@server_options[:server] = 'thin'
|
122
|
+
run '-s', 'thin'
|
123
|
+
run '--server', 'thin'
|
124
|
+
end
|
125
|
+
|
126
|
+
it "should accept -g, --gems" do
|
127
|
+
@no_verify_libraries = true
|
128
|
+
@options[:single_library] = false
|
129
|
+
@libraries['gem1'] = [Server::LibraryVersion.new('gem1', '1.0.0', nil, :gem)]
|
130
|
+
@libraries['gem2'] = [Server::LibraryVersion.new('gem2', '1.0.0', nil, :gem)]
|
131
|
+
gem1 = mock(:gem1)
|
132
|
+
gem1.stub!(:name).and_return('gem1')
|
133
|
+
gem1.stub!(:version).and_return('1.0.0')
|
134
|
+
gem1.stub!(:full_gem_path).and_return('/path/to/foo')
|
135
|
+
gem2 = mock(:gem2)
|
136
|
+
gem2.stub!(:name).and_return('gem2')
|
137
|
+
gem2.stub!(:version).and_return('1.0.0')
|
138
|
+
gem2.stub!(:full_gem_path).and_return('/path/to/bar')
|
139
|
+
specs = {'gem1' => gem1, 'gem2' => gem2}
|
140
|
+
source = mock(:source_index)
|
141
|
+
source.stub!(:find_name).and_return do |k, ver|
|
142
|
+
k == '' ? specs.values : specs.grep(k).map {|name| specs[name] }
|
143
|
+
end
|
144
|
+
Gem.stub!(:source_index).and_return(source)
|
145
|
+
run '-g'
|
146
|
+
run '--gems'
|
147
|
+
end
|
148
|
+
|
149
|
+
it "should load template paths after adapter template paths" do
|
150
|
+
unstub_adapter
|
151
|
+
@cli.adapter = Server::WebrickAdapter
|
152
|
+
run '-t', 'foo'
|
153
|
+
Templates::Engine.template_paths.last.should == 'foo'
|
154
|
+
end
|
155
|
+
|
156
|
+
it "should load ruby code (-e) after adapter" do
|
157
|
+
unstub_adapter
|
158
|
+
@cli.adapter = Server::WebrickAdapter
|
159
|
+
path = File.dirname(__FILE__) + '/tmp.adapterscript.rb'
|
160
|
+
begin
|
161
|
+
File.open(path, 'w') do |f|
|
162
|
+
f.puts "YARD::Templates::Engine.register_template_path 'foo'"
|
163
|
+
f.flush
|
164
|
+
run '-e', f.path
|
165
|
+
Templates::Engine.template_paths.last.should == 'foo'
|
166
|
+
end
|
167
|
+
ensure
|
168
|
+
File.unlink(path)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
describe YARD::CLI::Stats do
|
5
|
+
before do
|
6
|
+
Registry.clear
|
7
|
+
YARD.parse_string <<-eof
|
8
|
+
class A
|
9
|
+
CONST = 1
|
10
|
+
|
11
|
+
def foo; end
|
12
|
+
|
13
|
+
# Documented
|
14
|
+
def bar; end
|
15
|
+
end
|
16
|
+
module B; end
|
17
|
+
eof
|
18
|
+
|
19
|
+
@main_stats =
|
20
|
+
"Files: 1\n" +
|
21
|
+
"Modules: 1 ( 1 undocumented)\n" +
|
22
|
+
"Classes: 1 ( 1 undocumented)\n" +
|
23
|
+
"Constants: 1 ( 1 undocumented)\n" +
|
24
|
+
"Methods: 2 ( 1 undocumented)\n" +
|
25
|
+
" 20.00% documented\n"
|
26
|
+
|
27
|
+
@output = StringIO.new
|
28
|
+
@stats = CLI::Stats.new(false)
|
29
|
+
@stats.stub!(:support_rdoc_document_file!).and_return([])
|
30
|
+
@stats.stub!(:yardopts).and_return([])
|
31
|
+
@stats.stub!(:puts) {|*args| @output << args.join("\n") << "\n" }
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should list undocumented objects with --list-undoc" do
|
35
|
+
@stats.run('--list-undoc')
|
36
|
+
@output.string.should == <<-eof
|
37
|
+
#{@main_stats}
|
38
|
+
Undocumented Objects:
|
39
|
+
|
40
|
+
(in file: (stdin))
|
41
|
+
B
|
42
|
+
A
|
43
|
+
A::CONST
|
44
|
+
A#foo
|
45
|
+
eof
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should list no undocumented objects with --list-undoc when objects are undocumented" do
|
49
|
+
Registry.clear
|
50
|
+
YARD.parse_string <<-eof
|
51
|
+
# documentation
|
52
|
+
def foo; end
|
53
|
+
eof
|
54
|
+
@stats.run('--list-undoc')
|
55
|
+
@output.string.should == "Files: 1\n" +
|
56
|
+
"Modules: 0 ( 0 undocumented)\n" +
|
57
|
+
"Classes: 0 ( 0 undocumented)\n" +
|
58
|
+
"Constants: 0 ( 0 undocumented)\n" +
|
59
|
+
"Methods: 1 ( 0 undocumented)\n" +
|
60
|
+
" 100.00% documented\n"
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should list undocumented objects in compact mode with --list-undoc --compact" do
|
64
|
+
@stats.run('--list-undoc', '--compact')
|
65
|
+
@output.string.should == <<-eof
|
66
|
+
#{@main_stats}
|
67
|
+
Undocumented Objects:
|
68
|
+
B ((stdin))
|
69
|
+
A ((stdin))
|
70
|
+
A::CONST ((stdin))
|
71
|
+
A#foo ((stdin))
|
72
|
+
eof
|
73
|
+
end
|
74
|
+
|
75
|
+
it "should still list stats with --quiet" do
|
76
|
+
@stats.run('--quiet')
|
77
|
+
@output.string.should == @main_stats
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should not include public methods in stats with --no-public" do
|
81
|
+
@stats.run('--no-public')
|
82
|
+
@output.string.should ==
|
83
|
+
"Files: 1\n" +
|
84
|
+
"Modules: 1 ( 1 undocumented)\n" +
|
85
|
+
"Classes: 1 ( 1 undocumented)\n" +
|
86
|
+
"Constants: 1 ( 1 undocumented)\n" +
|
87
|
+
"Methods: 0 ( 0 undocumented)\n" +
|
88
|
+
" 0.00% documented\n"
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,628 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe YARD::CLI::Yardoc do
|
4
|
+
before do
|
5
|
+
@yardoc = YARD::CLI::Yardoc.new
|
6
|
+
@yardoc.statistics = false
|
7
|
+
@yardoc.use_document_file = false
|
8
|
+
@yardoc.use_yardopts_file = false
|
9
|
+
@yardoc.generate = false
|
10
|
+
Templates::Engine.stub!(:render)
|
11
|
+
Templates::Engine.stub!(:generate)
|
12
|
+
YARD.stub!(:parse)
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'Defaults' do
|
16
|
+
before do
|
17
|
+
@yardoc = CLI::Yardoc.new
|
18
|
+
@yardoc.stub!(:yardopts).and_return([])
|
19
|
+
@yardoc.stub!(:support_rdoc_document_file!).and_return([])
|
20
|
+
@yardoc.parse_arguments
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should use cache by default" do
|
24
|
+
@yardoc.use_cache.should == false
|
25
|
+
end
|
26
|
+
|
27
|
+
it "print statistics by default" do
|
28
|
+
@yardoc.statistics.should == true
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should generate output by default" do
|
32
|
+
@yardoc.generate.should == true
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should read .yardopts by default" do
|
36
|
+
@yardoc.use_yardopts_file.should == true
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should read .document by default" do
|
40
|
+
@yardoc.use_document_file.should == true
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should use {lib,app}/**/*.rb and ext/**/*.c as default file glob" do
|
44
|
+
@yardoc.files.should == ['{lib,app}/**/*.rb', 'ext/**/*.c']
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should use rdoc as default markup type (but falls back on none)" do
|
48
|
+
@yardoc.options[:markup].should == :rdoc
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should use default as default template" do
|
52
|
+
@yardoc.options[:template].should == :default
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should use HTML as default format" do
|
56
|
+
@yardoc.options[:format].should == :html
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should use 'Object' as default return type" do
|
60
|
+
@yardoc.options[:default_return].should == 'Object'
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should not hide void return types by default" do
|
64
|
+
@yardoc.options[:hide_void_return].should == false
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should only show public visibility by default" do
|
68
|
+
@yardoc.visibilities.should == [:public]
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should not list objects by default" do
|
72
|
+
@yardoc.list.should == false
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'General options' do
|
77
|
+
def self.should_accept(*args, &block)
|
78
|
+
@counter ||= 0
|
79
|
+
@counter += 1
|
80
|
+
counter = @counter
|
81
|
+
args.each do |arg|
|
82
|
+
define_method("test_options_#{@counter}", &block)
|
83
|
+
it("should accept #{arg}") { send("test_options_#{counter}", arg) }
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
should_accept('--single-db') do |arg|
|
88
|
+
@yardoc.parse_arguments(arg)
|
89
|
+
Registry.single_object_db.should == true
|
90
|
+
Registry.single_object_db = nil
|
91
|
+
end
|
92
|
+
|
93
|
+
should_accept('--no-single-db') do |arg|
|
94
|
+
@yardoc.parse_arguments(arg)
|
95
|
+
Registry.single_object_db.should == false
|
96
|
+
Registry.single_object_db = nil
|
97
|
+
end
|
98
|
+
|
99
|
+
should_accept('-c', '--use-cache') do |arg|
|
100
|
+
@yardoc.parse_arguments(arg)
|
101
|
+
@yardoc.use_cache.should == true
|
102
|
+
end
|
103
|
+
|
104
|
+
should_accept('--no-cache') do |arg|
|
105
|
+
@yardoc.parse_arguments(arg)
|
106
|
+
@yardoc.use_cache.should == false
|
107
|
+
end
|
108
|
+
|
109
|
+
should_accept('--yardopts') do |arg|
|
110
|
+
@yardoc = CLI::Yardoc.new
|
111
|
+
@yardoc.use_document_file = false
|
112
|
+
@yardoc.should_receive(:yardopts).at_least(1).times.and_return([])
|
113
|
+
@yardoc.parse_arguments(arg)
|
114
|
+
@yardoc.use_yardopts_file.should == true
|
115
|
+
@yardoc.parse_arguments('--no-yardopts', arg)
|
116
|
+
@yardoc.use_yardopts_file.should == true
|
117
|
+
end
|
118
|
+
|
119
|
+
should_accept('--yardopts with filename') do |arg|
|
120
|
+
@yardoc = CLI::Yardoc.new
|
121
|
+
File.should_receive(:read_binary).with('.foobar').and_return('')
|
122
|
+
@yardoc.use_document_file = false
|
123
|
+
@yardoc.parse_arguments('--yardopts', '.foobar')
|
124
|
+
@yardoc.use_yardopts_file.should == true
|
125
|
+
@yardoc.options_file.should == '.foobar'
|
126
|
+
end
|
127
|
+
|
128
|
+
should_accept('--no-yardopts') do |arg|
|
129
|
+
@yardoc = CLI::Yardoc.new
|
130
|
+
@yardoc.use_document_file = false
|
131
|
+
@yardoc.should_not_receive(:yardopts)
|
132
|
+
@yardoc.parse_arguments(arg)
|
133
|
+
@yardoc.use_yardopts_file.should == false
|
134
|
+
@yardoc.parse_arguments('--yardopts', arg)
|
135
|
+
@yardoc.use_yardopts_file.should == false
|
136
|
+
end
|
137
|
+
|
138
|
+
should_accept('--document') do |arg|
|
139
|
+
@yardoc = CLI::Yardoc.new
|
140
|
+
@yardoc.use_yardopts_file = false
|
141
|
+
@yardoc.should_receive(:support_rdoc_document_file!).and_return([])
|
142
|
+
@yardoc.parse_arguments('--no-document', arg)
|
143
|
+
@yardoc.use_document_file.should == true
|
144
|
+
end
|
145
|
+
|
146
|
+
should_accept('--no-document') do |arg|
|
147
|
+
@yardoc = CLI::Yardoc.new
|
148
|
+
@yardoc.use_yardopts_file = false
|
149
|
+
@yardoc.should_not_receive(:support_rdoc_document_file!)
|
150
|
+
@yardoc.parse_arguments('--document', arg)
|
151
|
+
@yardoc.use_document_file.should == false
|
152
|
+
end
|
153
|
+
|
154
|
+
should_accept('-b', '--db') do |arg|
|
155
|
+
@yardoc.parse_arguments(arg, 'test')
|
156
|
+
Registry.yardoc_file.should == 'test'
|
157
|
+
Registry.yardoc_file = '.yardoc'
|
158
|
+
end
|
159
|
+
|
160
|
+
should_accept('-n', '--no-output') do |arg|
|
161
|
+
Templates::Engine.should_not_receive(:generate)
|
162
|
+
@yardoc.run(arg)
|
163
|
+
end
|
164
|
+
|
165
|
+
should_accept('--exclude') do |arg|
|
166
|
+
YARD.should_receive(:parse).with(['a'], ['nota', 'b'])
|
167
|
+
@yardoc.run(arg, 'nota', arg, 'b', 'a')
|
168
|
+
end
|
169
|
+
|
170
|
+
should_accept('--no-save') do |arg|
|
171
|
+
YARD.should_receive(:parse)
|
172
|
+
Registry.should_not_receive(:save)
|
173
|
+
@yardoc.run(arg)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
describe 'Output options' do
|
178
|
+
it "should accept --title" do
|
179
|
+
@yardoc.parse_arguments('--title', 'hello world')
|
180
|
+
@yardoc.options[:title].should == 'hello world'
|
181
|
+
end
|
182
|
+
|
183
|
+
it "should allow --title to have multiple spaces in .yardopts" do
|
184
|
+
File.should_receive(:read_binary).with("test").and_return("--title \"Foo Bar\"")
|
185
|
+
@yardoc.options_file = "test"
|
186
|
+
@yardoc.use_yardopts_file = true
|
187
|
+
@yardoc.run
|
188
|
+
@yardoc.options[:title].should == "Foo Bar"
|
189
|
+
end
|
190
|
+
|
191
|
+
it "should alias --main to the --readme flag" do
|
192
|
+
readme = File.join(File.dirname(__FILE__),'..','..','README.md')
|
193
|
+
|
194
|
+
@yardoc.parse_arguments('--main', readme)
|
195
|
+
@yardoc.options[:readme].should == CodeObjects::ExtraFileObject.new(readme, '')
|
196
|
+
end
|
197
|
+
|
198
|
+
it "should select a markup provider when --markup-provider or -mp is set" do
|
199
|
+
@yardoc.parse_arguments("-M", "test")
|
200
|
+
@yardoc.options[:markup_provider].should == :test
|
201
|
+
@yardoc.parse_arguments("--markup-provider", "test2")
|
202
|
+
@yardoc.options[:markup_provider].should == :test2
|
203
|
+
end
|
204
|
+
|
205
|
+
it "should select a markup format when -m is set" do
|
206
|
+
@yardoc.should_receive(:verify_markup_options).and_return(true)
|
207
|
+
@yardoc.generate = true
|
208
|
+
@yardoc.parse_arguments('-m', 'markdown')
|
209
|
+
@yardoc.options[:markup].should == :markdown
|
210
|
+
end
|
211
|
+
|
212
|
+
it "should accept --default-return" do
|
213
|
+
@yardoc.parse_arguments *%w( --default-return XYZ )
|
214
|
+
@yardoc.options[:default_return].should == "XYZ"
|
215
|
+
end
|
216
|
+
|
217
|
+
it "should allow --hide-void-return to be set" do
|
218
|
+
@yardoc.parse_arguments *%w( --hide-void-return )
|
219
|
+
@yardoc.options[:hide_void_return].should be_true
|
220
|
+
end
|
221
|
+
|
222
|
+
it "should generate all objects with --use-cache" do
|
223
|
+
YARD.should_receive(:parse)
|
224
|
+
Registry.should_receive(:load)
|
225
|
+
Registry.should_receive(:load_all)
|
226
|
+
@yardoc.stub!(:generate).and_return(true)
|
227
|
+
@yardoc.run *%w( --use-cache )
|
228
|
+
end
|
229
|
+
|
230
|
+
it "should not print statistics with --no-stats" do
|
231
|
+
@yardoc.stub!(:statistics).and_return(false)
|
232
|
+
CLI::Stats.should_not_receive(:new)
|
233
|
+
@yardoc.run *%w( --no-stats )
|
234
|
+
end
|
235
|
+
|
236
|
+
describe '--asset' do
|
237
|
+
before do
|
238
|
+
@yardoc.generate = true
|
239
|
+
@yardoc.stub!(:run_generate)
|
240
|
+
end
|
241
|
+
|
242
|
+
it "should copy assets to output directory" do
|
243
|
+
FileUtils.should_receive(:cp_r).with('a', 'doc/a')
|
244
|
+
@yardoc.run *%w( --asset a )
|
245
|
+
@yardoc.assets.should == {'a' => 'a'}
|
246
|
+
end
|
247
|
+
|
248
|
+
it "should allow multiple --asset options" do
|
249
|
+
FileUtils.should_receive(:cp_r).with('a', 'doc/a')
|
250
|
+
FileUtils.should_receive(:cp_r).with('b', 'doc/b')
|
251
|
+
@yardoc.run *%w( --asset a --asset b )
|
252
|
+
@yardoc.assets.should == {'a' => 'a', 'b' => 'b'}
|
253
|
+
end
|
254
|
+
|
255
|
+
it "should not allow from or to to refer to a path above current path" do
|
256
|
+
log.should_receive(:warn).exactly(4).times.with(/invalid/i)
|
257
|
+
@yardoc.run *%w( --asset ../../../etc/passwd )
|
258
|
+
@yardoc.assets.should be_empty
|
259
|
+
@yardoc.run *%w( --asset a/b/c/d/../../../../../../etc/passwd )
|
260
|
+
@yardoc.assets.should be_empty
|
261
|
+
@yardoc.run *%w( --asset /etc/passwd )
|
262
|
+
@yardoc.assets.should be_empty
|
263
|
+
@yardoc.run *%w( --asset normal:/etc/passwd )
|
264
|
+
@yardoc.assets.should be_empty
|
265
|
+
end
|
266
|
+
|
267
|
+
it "should allow from:to syntax" do
|
268
|
+
FileUtils.should_receive(:cp_r).with('foo', 'doc/bar')
|
269
|
+
@yardoc.run *%w( --asset foo:bar )
|
270
|
+
@yardoc.assets.should == {'foo' => 'bar'}
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
describe '--no-private option' do
|
276
|
+
it "should accept --no-private" do
|
277
|
+
obj = mock(:object)
|
278
|
+
obj.should_receive(:tag).ordered.with(:private).and_return(true)
|
279
|
+
@yardoc.parse_arguments *%w( --no-private )
|
280
|
+
@yardoc.options[:verifier].call(obj).should == false
|
281
|
+
end
|
282
|
+
|
283
|
+
it "should hide object if namespace is @private with --no-private" do
|
284
|
+
ns = mock(:namespace)
|
285
|
+
ns.stub!(:type).and_return(:module)
|
286
|
+
ns.should_receive(:tag).ordered.with(:private).and_return(true)
|
287
|
+
obj = mock(:object)
|
288
|
+
obj.stub!(:namespace).and_return(ns)
|
289
|
+
obj.should_receive(:tag).ordered.with(:private).and_return(false)
|
290
|
+
@yardoc.parse_arguments *%w( --no-private )
|
291
|
+
@yardoc.options[:verifier].call(obj).should == false
|
292
|
+
end
|
293
|
+
|
294
|
+
it "should not call #tag on namespace if namespace is proxy with --no-private" do
|
295
|
+
ns = mock(:namespace)
|
296
|
+
ns.should_receive(:is_a?).with(CodeObjects::Proxy).and_return(true)
|
297
|
+
ns.should_not_receive(:tag)
|
298
|
+
obj = mock(:object)
|
299
|
+
obj.stub!(:type).and_return(:class)
|
300
|
+
obj.stub!(:namespace).and_return(ns)
|
301
|
+
obj.stub!(:visibility).and_return(:public)
|
302
|
+
obj.should_receive(:tag).ordered.with(:private).and_return(false)
|
303
|
+
@yardoc.parse_arguments *%w( --no-private )
|
304
|
+
@yardoc.options[:verifier].call(obj).should == true
|
305
|
+
end
|
306
|
+
|
307
|
+
# @bug gh-197
|
308
|
+
it "should not call #tag on namespace if namespace is proxy with --no-private" do
|
309
|
+
Registry.clear
|
310
|
+
YARD.parse_string "module Qux; class Foo::Bar; end; end"
|
311
|
+
foobar = Registry.at('Foo::Bar')
|
312
|
+
foobar.namespace.type = :module
|
313
|
+
@yardoc.parse_arguments *%w( --no-private )
|
314
|
+
@yardoc.options[:verifier].call(foobar).should == true
|
315
|
+
end
|
316
|
+
|
317
|
+
it "should not call #tag on proxy object" do # @bug gh-197
|
318
|
+
@yardoc.parse_arguments *%w( --no-private )
|
319
|
+
@yardoc.options[:verifier].call(P('ProxyClass')).should == true
|
320
|
+
end
|
321
|
+
|
322
|
+
it "should hide methods inside a 'private' class/module with --no-private" do
|
323
|
+
Registry.clear
|
324
|
+
YARD.parse_string <<-eof
|
325
|
+
# @private
|
326
|
+
class ABC
|
327
|
+
def foo; end
|
328
|
+
end
|
329
|
+
eof
|
330
|
+
@yardoc.parse_arguments *%w( --no-private )
|
331
|
+
@yardoc.options[:verifier].call(Registry.at('ABC')).should be_false
|
332
|
+
@yardoc.options[:verifier].call(Registry.at('ABC#foo')).should be_false
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
describe '.yardopts and .document handling' do
|
337
|
+
before do
|
338
|
+
@yardoc.use_yardopts_file = true
|
339
|
+
end
|
340
|
+
|
341
|
+
it "should search for and use yardopts file specified by #options_file" do
|
342
|
+
File.should_receive(:read_binary).with("test").and_return("-o \n\nMYPATH\nFILE1 FILE2")
|
343
|
+
@yardoc.use_document_file = false
|
344
|
+
@yardoc.options_file = "test"
|
345
|
+
@yardoc.run
|
346
|
+
@yardoc.options[:serializer].options[:basepath].should == "MYPATH"
|
347
|
+
@yardoc.files.should == ["FILE1", "FILE2"]
|
348
|
+
end
|
349
|
+
|
350
|
+
it "should use String#shell_split to split .yardopts tokens" do
|
351
|
+
optsdata = "foo bar"
|
352
|
+
optsdata.should_receive(:shell_split)
|
353
|
+
File.should_receive(:read_binary).with("test").and_return(optsdata)
|
354
|
+
@yardoc.options_file = "test"
|
355
|
+
@yardoc.run
|
356
|
+
end
|
357
|
+
|
358
|
+
it "should allow opts specified in command line to override yardopts file" do
|
359
|
+
File.should_receive(:read_binary).with(".yardopts").and_return("-o NOTMYPATH")
|
360
|
+
@yardoc.run("-o", "MYPATH", "FILE")
|
361
|
+
@yardoc.options[:serializer].options[:basepath].should == "MYPATH"
|
362
|
+
@yardoc.files.should == ["FILE"]
|
363
|
+
end
|
364
|
+
|
365
|
+
it "should load the RDoc .document file if found" do
|
366
|
+
File.should_receive(:read_binary).with(".yardopts").and_return("-o NOTMYPATH")
|
367
|
+
@yardoc.use_document_file = true
|
368
|
+
@yardoc.stub!(:support_rdoc_document_file!).and_return(["FILE2", "FILE3"])
|
369
|
+
@yardoc.run("-o", "MYPATH", "FILE1")
|
370
|
+
@yardoc.options[:serializer].options[:basepath].should == "MYPATH"
|
371
|
+
@yardoc.files.should == ["FILE2", "FILE3", "FILE1"]
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
describe 'Query options' do
|
376
|
+
before do
|
377
|
+
Registry.clear
|
378
|
+
end
|
379
|
+
|
380
|
+
it "should setup visibility rules as verifier" do
|
381
|
+
methobj = CodeObjects::MethodObject.new(:root, :test) {|o| o.visibility = :private }
|
382
|
+
File.should_receive(:read_binary).with("test").and_return("--private")
|
383
|
+
@yardoc.use_yardopts_file = true
|
384
|
+
@yardoc.options_file = "test"
|
385
|
+
@yardoc.run
|
386
|
+
@yardoc.options[:verifier].call(methobj).should be_true
|
387
|
+
end
|
388
|
+
|
389
|
+
it "should accept a --query" do
|
390
|
+
@yardoc.parse_arguments *%w( --query @return )
|
391
|
+
@yardoc.options[:verifier].should be_a(Verifier)
|
392
|
+
end
|
393
|
+
|
394
|
+
it "should accept multiple --query arguments" do
|
395
|
+
obj = mock(:object)
|
396
|
+
obj.should_receive(:tag).ordered.with('return').and_return(true)
|
397
|
+
obj.should_receive(:tag).ordered.with('tag').and_return(false)
|
398
|
+
@yardoc.parse_arguments *%w( --query @return --query @tag )
|
399
|
+
@yardoc.options[:verifier].should be_a(Verifier)
|
400
|
+
@yardoc.options[:verifier].call(obj).should == false
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
404
|
+
describe 'Extra file arguments' do
|
405
|
+
it "should accept extra files if specified after '-' with source files" do
|
406
|
+
Dir.should_receive(:glob).with('README*').and_return([])
|
407
|
+
File.should_receive(:file?).with('extra_file1').and_return(true)
|
408
|
+
File.should_receive(:file?).with('extra_file2').and_return(true)
|
409
|
+
File.should_receive(:read).with('extra_file1').and_return('')
|
410
|
+
File.should_receive(:read).with('extra_file2').and_return('')
|
411
|
+
@yardoc.parse_arguments *%w( file1 file2 - extra_file1 extra_file2 )
|
412
|
+
@yardoc.files.should == %w( file1 file2 )
|
413
|
+
@yardoc.options[:files].should ==
|
414
|
+
[CodeObjects::ExtraFileObject.new('extra_file1', ''),
|
415
|
+
CodeObjects::ExtraFileObject.new('extra_file2', '')]
|
416
|
+
end
|
417
|
+
|
418
|
+
it "should accept files section only containing extra files" do
|
419
|
+
Dir.should_receive(:glob).with('README*').and_return([])
|
420
|
+
@yardoc.parse_arguments *%w( - LICENSE )
|
421
|
+
@yardoc.files.should == %w( {lib,app}/**/*.rb ext/**/*.c )
|
422
|
+
@yardoc.options[:files].should == [CodeObjects::ExtraFileObject.new('LICENSE', '')]
|
423
|
+
end
|
424
|
+
|
425
|
+
it "should accept globs as extra files" do
|
426
|
+
Dir.should_receive(:glob).with('README*').and_return []
|
427
|
+
Dir.should_receive(:glob).with('*.txt').and_return ['a.txt', 'b.txt']
|
428
|
+
File.should_receive(:read).with('a.txt').and_return('')
|
429
|
+
File.should_receive(:read).with('b.txt').and_return('')
|
430
|
+
File.should_receive(:file?).with('a.txt').and_return(true)
|
431
|
+
File.should_receive(:file?).with('b.txt').and_return(true)
|
432
|
+
@yardoc.parse_arguments *%w( file1 file2 - *.txt )
|
433
|
+
@yardoc.files.should == %w( file1 file2 )
|
434
|
+
@yardoc.options[:files].should ==
|
435
|
+
[CodeObjects::ExtraFileObject.new('a.txt', ''),
|
436
|
+
CodeObjects::ExtraFileObject.new('b.txt', '')]
|
437
|
+
end
|
438
|
+
|
439
|
+
it "should warn if extra file is not found" do
|
440
|
+
log.should_receive(:warn).with(/Could not find extra file: UNKNOWN/)
|
441
|
+
@yardoc.parse_arguments *%w( - UNKNOWN )
|
442
|
+
end
|
443
|
+
|
444
|
+
it "should warn if readme file is not found" do
|
445
|
+
log.should_receive(:warn).with(/Could not find readme file: UNKNOWN/)
|
446
|
+
@yardoc.parse_arguments *%w( -r UNKNOWN )
|
447
|
+
end
|
448
|
+
|
449
|
+
it "should use first file as readme if no readme is specified when using --one-file" do
|
450
|
+
Dir.should_receive(:glob).with('README*').and_return []
|
451
|
+
Dir.should_receive(:glob).with('lib/*.rb').and_return(['lib/foo.rb'])
|
452
|
+
File.should_receive(:read).with('lib/foo.rb').and_return('')
|
453
|
+
@yardoc.parse_arguments *%w( --one-file lib/*.rb )
|
454
|
+
@yardoc.options[:readme].should == CodeObjects::ExtraFileObject.new('lib/foo.rb', '')
|
455
|
+
end
|
456
|
+
|
457
|
+
it "should use readme it exists when using --one-file" do
|
458
|
+
Dir.should_receive(:glob).with('README*').and_return ['README']
|
459
|
+
File.should_receive(:read).with('README').and_return('')
|
460
|
+
@yardoc.parse_arguments *%w( --one-file lib/*.rb )
|
461
|
+
@yardoc.options[:readme].should == CodeObjects::ExtraFileObject.new('README', '')
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
describe 'Source file arguments' do
|
466
|
+
it "should accept no params and parse {lib,app}/**/*.rb ext/**/*.c" do
|
467
|
+
@yardoc.parse_arguments
|
468
|
+
@yardoc.files.should == %w( {lib,app}/**/*.rb ext/**/*.c )
|
469
|
+
end
|
470
|
+
end
|
471
|
+
|
472
|
+
describe 'Tags options' do
|
473
|
+
def tag_created(switch, factory_method)
|
474
|
+
visible_tags = mock(:visible_tags)
|
475
|
+
visible_tags.should_receive(:|).ordered.with([:foo])
|
476
|
+
visible_tags.should_receive(:-).ordered.with([]).and_return(visible_tags)
|
477
|
+
Tags::Library.should_receive(:define_tag).with('Foo', :foo, factory_method)
|
478
|
+
Tags::Library.stub!(:visible_tags=)
|
479
|
+
Tags::Library.should_receive(:visible_tags).at_least(1).times.and_return(visible_tags)
|
480
|
+
@yardoc.parse_arguments("--#{switch}-tag", 'foo')
|
481
|
+
end
|
482
|
+
|
483
|
+
def tag_hidden(tag)
|
484
|
+
visible_tags = mock(:visible_tags)
|
485
|
+
visible_tags.should_receive(:|).ordered.with([tag])
|
486
|
+
visible_tags.should_receive(:-).ordered.with([tag]).and_return([])
|
487
|
+
Tags::Library.should_receive(:define_tag).with(tag.to_s.capitalize, tag, nil)
|
488
|
+
Tags::Library.stub!(:visible_tags=)
|
489
|
+
Tags::Library.should_receive(:visible_tags).at_least(1).times.and_return(visible_tags)
|
490
|
+
end
|
491
|
+
|
492
|
+
it "should accept --tag" do
|
493
|
+
Tags::Library.should_receive(:define_tag).with('Title of Foo', :foo, nil)
|
494
|
+
@yardoc.parse_arguments('--tag', 'foo:Title of Foo')
|
495
|
+
end
|
496
|
+
|
497
|
+
it "should accept --tag without title (and default to captialized tag name)" do
|
498
|
+
Tags::Library.should_receive(:define_tag).with('Foo', :foo, nil)
|
499
|
+
@yardoc.parse_arguments('--tag', 'foo')
|
500
|
+
end
|
501
|
+
|
502
|
+
it "should only list tag once if declared twice" do
|
503
|
+
visible_tags = []
|
504
|
+
Tags::Library.stub!(:define_tag)
|
505
|
+
Tags::Library.stub!(:visible_tags).and_return([:foo])
|
506
|
+
Tags::Library.stub!(:visible_tags=) {|value| visible_tags = value }
|
507
|
+
@yardoc.parse_arguments('--tag', 'foo', '--tag', 'foo')
|
508
|
+
visible_tags.should == [:foo]
|
509
|
+
end
|
510
|
+
|
511
|
+
it "should accept --type-tag" do
|
512
|
+
tag_created 'type', :with_types
|
513
|
+
end
|
514
|
+
|
515
|
+
it "should accept --type-name-tag" do
|
516
|
+
tag_created 'type-name', :with_types_and_name
|
517
|
+
end
|
518
|
+
|
519
|
+
it "should accept --name-tag" do
|
520
|
+
tag_created 'name', :with_name
|
521
|
+
end
|
522
|
+
|
523
|
+
it "should accept --title-tag" do
|
524
|
+
tag_created 'title', :with_title_and_text
|
525
|
+
end
|
526
|
+
|
527
|
+
it "should accept --hide-tag before tag is listed" do
|
528
|
+
tag_hidden(:anewfoo)
|
529
|
+
@yardoc.parse_arguments('--hide-tag', 'anewfoo', '--tag', 'anewfoo')
|
530
|
+
end
|
531
|
+
|
532
|
+
it "should accept --hide-tag after tag is listed" do
|
533
|
+
tag_hidden(:anewfoo2)
|
534
|
+
@yardoc.parse_arguments('--tag', 'anewfoo2', '--hide-tag', 'anewfoo2')
|
535
|
+
end
|
536
|
+
|
537
|
+
it "should accept --transitive-tag" do
|
538
|
+
@yardoc.parse_arguments('--transitive-tag', 'foo')
|
539
|
+
Tags::Library.transitive_tags.should include(:foo)
|
540
|
+
end
|
541
|
+
end
|
542
|
+
|
543
|
+
describe 'Safe mode' do
|
544
|
+
before do
|
545
|
+
YARD::Config.stub!(:options).and_return(:safe_mode => true)
|
546
|
+
end
|
547
|
+
|
548
|
+
it "should not allow --load or -e in safe mode" do
|
549
|
+
@yardoc.should_not_receive(:require)
|
550
|
+
@yardoc.run('--load', 'foo')
|
551
|
+
@yardoc.run('-e', 'foo')
|
552
|
+
end
|
553
|
+
|
554
|
+
it "should not allow --query in safe mode" do
|
555
|
+
@yardoc.run('--query', 'foo')
|
556
|
+
@yardoc.options[:verifier].expressions.should_not include("foo")
|
557
|
+
end
|
558
|
+
|
559
|
+
it "should not allow modifying the template paths" do
|
560
|
+
YARD::Templates::Engine.should_not_receive(:register_template_path)
|
561
|
+
@yardoc.run('-p', 'foo')
|
562
|
+
@yardoc.run('--template-path', 'foo')
|
563
|
+
end
|
564
|
+
end
|
565
|
+
|
566
|
+
describe 'Markup Loading' do
|
567
|
+
it "should load rdoc markup if no markup is provided" do
|
568
|
+
@yardoc.generate = true
|
569
|
+
@yardoc.run
|
570
|
+
@yardoc.options[:markup].should == :rdoc
|
571
|
+
end
|
572
|
+
|
573
|
+
it "should load rdoc markup even when no output is specified" do
|
574
|
+
@yardoc.parse_arguments('--no-output')
|
575
|
+
@yardoc.options[:markup].should == :rdoc
|
576
|
+
end
|
577
|
+
|
578
|
+
it "should warn if rdoc cannot be loaded and fallback to :none" do
|
579
|
+
mod = YARD::Templates::Helpers::MarkupHelper
|
580
|
+
mod.clear_markup_cache
|
581
|
+
mod.const_get(:MARKUP_PROVIDERS).should_receive(:[]).with(:rdoc).and_return([{:lib => 'INVALID'}])
|
582
|
+
log.should_receive(:warn).with(/Could not load default RDoc formatter/)
|
583
|
+
@yardoc.stub(:generate) { @yardoc.options[:files] = []; true }
|
584
|
+
@yardoc.run
|
585
|
+
@yardoc.options[:markup].should == :none
|
586
|
+
mod.clear_markup_cache
|
587
|
+
end
|
588
|
+
|
589
|
+
it "should error immediately if markup for any files are missing" do
|
590
|
+
mod = YARD::Templates::Helpers::MarkupHelper
|
591
|
+
mod.clear_markup_cache
|
592
|
+
mod.const_get(:MARKUP_PROVIDERS).should_receive(:[]).with(:markdown).and_return([{:lib => 'INVALID'}])
|
593
|
+
log.should_receive(:error).with(/Missing 'INVALID' gem for Markdown formatting/)
|
594
|
+
files = [CodeObjects::ExtraFileObject.new('test.md', '')]
|
595
|
+
@yardoc.stub(:generate) { @yardoc.options[:files] = files; true }
|
596
|
+
@yardoc.run
|
597
|
+
mod.clear_markup_cache
|
598
|
+
end
|
599
|
+
|
600
|
+
it "should error immediately if markup for any files are missing (file markup specified in attributes)" do
|
601
|
+
mod = YARD::Templates::Helpers::MarkupHelper
|
602
|
+
mod.clear_markup_cache
|
603
|
+
mod.const_get(:MARKUP_PROVIDERS).should_receive(:[]).with(:markdown).and_return([{:lib => 'INVALID'}])
|
604
|
+
log.should_receive(:error).with(/Missing 'INVALID' gem for Markdown formatting/)
|
605
|
+
files = [CodeObjects::ExtraFileObject.new('test', '# @markup markdown')]
|
606
|
+
@yardoc.stub(:generate) { @yardoc.options[:files] = files; true }
|
607
|
+
@yardoc.run
|
608
|
+
mod.clear_markup_cache
|
609
|
+
end
|
610
|
+
end
|
611
|
+
|
612
|
+
describe '#run' do
|
613
|
+
it "should parse_arguments if run() is called" do
|
614
|
+
@yardoc.should_receive(:parse_arguments)
|
615
|
+
@yardoc.run
|
616
|
+
end
|
617
|
+
|
618
|
+
it "should parse_arguments if run(arg1, arg2, ...) is called" do
|
619
|
+
@yardoc.should_receive(:parse_arguments)
|
620
|
+
@yardoc.run('--private', '-p', 'foo')
|
621
|
+
end
|
622
|
+
|
623
|
+
it "should not parse_arguments if run(nil) is called" do
|
624
|
+
@yardoc.should_not_receive(:parse_arguments)
|
625
|
+
@yardoc.run(nil)
|
626
|
+
end
|
627
|
+
end
|
628
|
+
end
|