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,201 @@
|
|
1
|
+
module YARD
|
2
|
+
module Tags
|
3
|
+
# Holds all the registered meta tags. If you want to extend YARD and add
|
4
|
+
# a new meta tag, you can do it in one of two ways.
|
5
|
+
#
|
6
|
+
# == Method #1
|
7
|
+
# Use {Library.define_tag} to define a new tag by passing the tag name
|
8
|
+
# and the factory method to use when creating the tag. These definitions will
|
9
|
+
# be auto expanded into ruby code similar to what is shown in method #2. If you
|
10
|
+
# do not provide a factory method to use, it will default to {DefaultFactory#parse_tag}
|
11
|
+
# Example:
|
12
|
+
# define_tag "Parameter", :param, :with_types_and_name
|
13
|
+
# define_tag "Author", :author
|
14
|
+
#
|
15
|
+
# The first line will expand to the code:
|
16
|
+
# def param_tag(text) tag_factory.parse_tag_with_types_and_name(text) end
|
17
|
+
#
|
18
|
+
# The second line will expand to:
|
19
|
+
# def author_tag(text) tag_factory.parse_tag(text) end
|
20
|
+
#
|
21
|
+
# Note that +tag_factory+ is the factory object used to parse tags. This value
|
22
|
+
# defaults to the {DefaultFactory} class and can be set by changing {Library.default_factory}.
|
23
|
+
#
|
24
|
+
# == Method #2
|
25
|
+
# Write your own +tagname_tag+ method that takes the raw text as a parameter.
|
26
|
+
# Example:
|
27
|
+
# def mytag_tag(text)
|
28
|
+
# # parse your tag contents here
|
29
|
+
# end
|
30
|
+
#
|
31
|
+
# This will allow you to use @mytag TEXT to add meta data to classes through
|
32
|
+
# the docstring. You can use the {Library#factory} object to help parse standard
|
33
|
+
# tag syntax.
|
34
|
+
#
|
35
|
+
# == Adding/Changing the Tag Syntax
|
36
|
+
# If you have specialized tag parsing needs you can substitute the {#factory}
|
37
|
+
# object with your own by setting {Library.default_factory= Library.default_factory}
|
38
|
+
# to a new class with its own parsing methods before running YARD. This is useful
|
39
|
+
# if you want to change the syntax of existing tags (@see, @since, etc.)
|
40
|
+
#
|
41
|
+
# @see DefaultFactory
|
42
|
+
# @see Library.define_tag
|
43
|
+
class Library
|
44
|
+
class << self
|
45
|
+
attr_reader :labels
|
46
|
+
|
47
|
+
def instance
|
48
|
+
@instance ||= new
|
49
|
+
end
|
50
|
+
|
51
|
+
def default_factory
|
52
|
+
@default_factory ||= DefaultFactory.new
|
53
|
+
end
|
54
|
+
|
55
|
+
# Replace the factory object responsible for parsing tags by setting
|
56
|
+
# this to an object (or class) that responds to +parse_TAGNAME+ methods
|
57
|
+
# where +TAGNAME+ is the name of the tag.
|
58
|
+
#
|
59
|
+
# You should set this value before performing any source parsing with
|
60
|
+
# YARD, otherwise your factory class will not be used.
|
61
|
+
#
|
62
|
+
# @example
|
63
|
+
# YARD::Tags::Library.default_factory = MyFactory
|
64
|
+
#
|
65
|
+
# @param [Class, Object] factory the factory that parses all tags
|
66
|
+
#
|
67
|
+
# @see DefaultFactory
|
68
|
+
def default_factory=(factory)
|
69
|
+
@default_factory = factory.is_a?(Class) ? factory.new : factory
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns the factory method used to parse the tag text for a specific tag
|
73
|
+
#
|
74
|
+
# @param [Symbol] tag the tag name
|
75
|
+
# @return [Symbol] the factory method name for the tag
|
76
|
+
# @return [Class<Tag>] the Tag class to use to parse the tag
|
77
|
+
# @return [nil] if the tag is freeform text
|
78
|
+
# @since 0.6.0
|
79
|
+
def factory_method_for(tag)
|
80
|
+
@factory_methods[tag]
|
81
|
+
end
|
82
|
+
|
83
|
+
# Sets the list of tags to display when rendering templates. The order of
|
84
|
+
# tags in the list is also significant, as it represents the order that
|
85
|
+
# tags are displayed in templates.
|
86
|
+
#
|
87
|
+
# You can use the {Array#place} to insert new tags to be displayed in
|
88
|
+
# the templates at specific positions:
|
89
|
+
#
|
90
|
+
# Library.visible_tags.place(:mytag).before(:return)
|
91
|
+
#
|
92
|
+
# @return [Array<Symbol>] a list of ordered tags
|
93
|
+
# @since 0.6.0
|
94
|
+
attr_accessor :visible_tags
|
95
|
+
|
96
|
+
# Sets the list of tags that should apply to any children inside the
|
97
|
+
# namespace they are defined in. For instance, a "@since" tag should
|
98
|
+
# apply to all methods inside a module it is defined in. Transitive
|
99
|
+
# tags can be overridden by directly defining a tag on the child object.
|
100
|
+
#
|
101
|
+
# @return [Array<Symbol>] a list of transitive tags
|
102
|
+
# @since 0.6.0
|
103
|
+
attr_accessor :transitive_tags
|
104
|
+
|
105
|
+
# Sorts the labels lexically by their label name, often used when displaying
|
106
|
+
# the tags.
|
107
|
+
#
|
108
|
+
# @return [Array<Symbol>, String] the sorted labels as an array of the tag name and label
|
109
|
+
def sorted_labels
|
110
|
+
labels.sort_by {|a| a.last.downcase }
|
111
|
+
end
|
112
|
+
|
113
|
+
# Convenience method to define a new tag using one of {Tag}'s factory methods, or the
|
114
|
+
# regular {DefaultFactory#parse_tag} factory method if none is supplied.
|
115
|
+
#
|
116
|
+
# @param [#to_s] tag the tag name to create
|
117
|
+
# @param [#to_s, Class<Tag>] meth the {Tag} factory method to call when
|
118
|
+
# creating the tag or the name of the class to directly create a tag for
|
119
|
+
def define_tag(label, tag, meth = nil)
|
120
|
+
if meth.is_a?(Class) && Tag > meth
|
121
|
+
class_eval <<-eof, __FILE__, __LINE__
|
122
|
+
def #{tag}_tag(text)
|
123
|
+
#{meth}.new(#{tag.inspect}, text)
|
124
|
+
end
|
125
|
+
eof
|
126
|
+
else
|
127
|
+
class_eval <<-eof, __FILE__, __LINE__
|
128
|
+
def #{tag}_tag(text)
|
129
|
+
send_to_factory(#{tag.inspect}, #{meth.inspect}, text)
|
130
|
+
end
|
131
|
+
eof
|
132
|
+
end
|
133
|
+
|
134
|
+
@labels ||= SymbolHash.new(false)
|
135
|
+
@labels.update(tag => label)
|
136
|
+
@factory_methods ||= SymbolHash.new(false)
|
137
|
+
@factory_methods.update(tag => meth)
|
138
|
+
tag
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
private
|
143
|
+
|
144
|
+
def send_to_factory(tag_name, meth, text)
|
145
|
+
meth = meth.to_s
|
146
|
+
send_name = "parse_tag" + (meth.empty? ? "" : "_" + meth)
|
147
|
+
if @factory.respond_to?(send_name)
|
148
|
+
arity = @factory.method(send_name).arity
|
149
|
+
@factory.send(send_name, tag_name, text)
|
150
|
+
else
|
151
|
+
raise NoMethodError, "Factory #{@factory.class_name} does not implement factory method :#{meth}."
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
public
|
156
|
+
|
157
|
+
# A factory class to handle parsing of tags, defaults to {default_factory}
|
158
|
+
attr_accessor :factory
|
159
|
+
|
160
|
+
def initialize(factory = Library.default_factory)
|
161
|
+
self.factory = factory
|
162
|
+
end
|
163
|
+
|
164
|
+
define_tag "Abstract", :abstract
|
165
|
+
define_tag "API Visibility", :api
|
166
|
+
define_tag "Attribute (macro)", :attribute, :with_types
|
167
|
+
define_tag "Attribute", :attr, :with_types_and_name
|
168
|
+
define_tag "Attribute Getter", :attr_reader, :with_types_and_name
|
169
|
+
define_tag "Attribute Setter", :attr_writer, :with_types_and_name
|
170
|
+
define_tag "Author", :author
|
171
|
+
define_tag "Deprecated", :deprecated
|
172
|
+
define_tag "Example", :example, :with_title_and_text
|
173
|
+
define_tag "End Grouping", :endgroup
|
174
|
+
define_tag "Grouping", :group
|
175
|
+
define_tag "Macro", :macro, :with_types_and_name
|
176
|
+
define_tag "Method (macro)", :method, :with_title_and_text
|
177
|
+
define_tag "Note", :note
|
178
|
+
define_tag "Options Hash", :option, :with_options
|
179
|
+
define_tag "Overloads", :overload, OverloadTag
|
180
|
+
define_tag "Parameters", :param, :with_types_and_name
|
181
|
+
define_tag "Private", :private
|
182
|
+
define_tag "Raises", :raise, :with_types
|
183
|
+
define_tag "Returns", :return, :with_types
|
184
|
+
define_tag "Scope (macro)", :scope
|
185
|
+
define_tag "See Also", :see, :with_name
|
186
|
+
define_tag "Since", :since
|
187
|
+
define_tag "Todo Item", :todo
|
188
|
+
define_tag "Version", :version
|
189
|
+
define_tag "Visibility (macro)", :visibility
|
190
|
+
define_tag "Yields", :yield, :with_types
|
191
|
+
define_tag "Yield Parameters", :yieldparam, :with_types_and_name
|
192
|
+
define_tag "Yield Returns", :yieldreturn, :with_types
|
193
|
+
|
194
|
+
self.visible_tags = [:abstract, :deprecated, :note, :todo, :example, :overload,
|
195
|
+
:param, :option, :yield, :yieldparam, :yieldreturn, :return, :raise,
|
196
|
+
:see, :author, :since, :version]
|
197
|
+
|
198
|
+
self.transitive_tags = [:since, :api]
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module YARD
|
2
|
+
module Tags
|
3
|
+
class OverloadTag < Tag
|
4
|
+
attr_reader :signature, :parameters, :docstring
|
5
|
+
|
6
|
+
def initialize(tag_name, text)
|
7
|
+
super(tag_name, nil)
|
8
|
+
parse_tag(text)
|
9
|
+
parse_signature
|
10
|
+
end
|
11
|
+
|
12
|
+
def tag(name) docstring.tag(name) end
|
13
|
+
def tags(name = nil) docstring.tags(name) end
|
14
|
+
def has_tag?(name) docstring.has_tag?(name) end
|
15
|
+
|
16
|
+
def object=(value)
|
17
|
+
super(value)
|
18
|
+
docstring.object = value
|
19
|
+
end
|
20
|
+
|
21
|
+
def name(prefix = false)
|
22
|
+
return @name unless prefix
|
23
|
+
object.scope == :class ? @name.to_s : "#{object.send(:sep)}#{@name}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def method_missing(*args, &block)
|
27
|
+
object.send(*args, &block)
|
28
|
+
end
|
29
|
+
|
30
|
+
def type
|
31
|
+
object.type
|
32
|
+
end
|
33
|
+
|
34
|
+
def is_a?(other)
|
35
|
+
object.is_a?(other) || self.class >= other.class || false
|
36
|
+
end
|
37
|
+
alias kind_of? is_a?
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def parse_tag(text)
|
42
|
+
@signature, text = *text.split(/\r?\n/, 2)
|
43
|
+
@signature.strip!
|
44
|
+
text ||= ""
|
45
|
+
numspaces = text[/\A(\s*)/, 1].length
|
46
|
+
text.gsub!(/^[ \t]{#{numspaces}}/, '')
|
47
|
+
text.strip!
|
48
|
+
@docstring = Docstring.new(text, nil)
|
49
|
+
end
|
50
|
+
|
51
|
+
def parse_signature
|
52
|
+
if signature =~ /^(?:def\s)?\s*(#{CodeObjects::METHODMATCH})(?:(?:\s+|\s*\()(.*)(?:\)\s*$)?)?/m
|
53
|
+
meth, args = $1, $2
|
54
|
+
meth.gsub!(/\s+/,'')
|
55
|
+
# FIXME refactor this code to not make use of the Handlers::Base class (tokval_list should be moved)
|
56
|
+
toks = YARD::Parser::Ruby::Legacy::TokenList.new(args)
|
57
|
+
args = YARD::Handlers::Ruby::Legacy::Base.new(nil, nil).send(:tokval_list, toks, :all)
|
58
|
+
args.map! {|a| k, v = *a.split('=', 2); [k.strip.to_sym, (v ? v.strip : nil)] } if args
|
59
|
+
@name = meth.to_sym
|
60
|
+
@parameters = args
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module YARD
|
2
|
+
module Tags
|
3
|
+
class RefTagList
|
4
|
+
attr_accessor :owner, :tag_name, :name
|
5
|
+
|
6
|
+
def initialize(tag_name, owner, name = nil)
|
7
|
+
@owner = CodeObjects::Proxy === owner ? owner : P(owner)
|
8
|
+
@tag_name = tag_name.to_s
|
9
|
+
@name = name
|
10
|
+
end
|
11
|
+
|
12
|
+
def tags
|
13
|
+
if owner.is_a?(CodeObjects::Base)
|
14
|
+
o = owner.tags(tag_name)
|
15
|
+
o = o.select {|t| t.name.to_s == name.to_s } if name
|
16
|
+
o.each do |t|
|
17
|
+
t.extend(RefTag)
|
18
|
+
t.owner = owner
|
19
|
+
end
|
20
|
+
o
|
21
|
+
else
|
22
|
+
[]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module YARD
|
2
|
+
module Tags
|
3
|
+
# Represents a metadata tag value (+@tag+). Tags can have any combination of
|
4
|
+
# {#types}, {#name} and {#text}, or none of the above.
|
5
|
+
#
|
6
|
+
# @example Programmatic tag creation
|
7
|
+
# # The following docstring syntax:
|
8
|
+
# # @param [String, nil] arg an argument
|
9
|
+
# #
|
10
|
+
# # is equivalent to:
|
11
|
+
# Tag.new(:param, 'an argument', ['String', 'nil'], 'arg')
|
12
|
+
class Tag
|
13
|
+
# @return [String] the name of the tag
|
14
|
+
attr_accessor :tag_name
|
15
|
+
|
16
|
+
# @return [String] the tag text associated with the tag
|
17
|
+
# @return [nil] if no tag text is supplied
|
18
|
+
attr_accessor :text
|
19
|
+
|
20
|
+
# @return [Array<String>] a list of types associated with the tag
|
21
|
+
# @return [nil] if no types are associated with the tag
|
22
|
+
attr_accessor :types
|
23
|
+
|
24
|
+
# @return [String] a name associated with the tag
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# @return [CodeObjects::Base] the associated object
|
28
|
+
attr_accessor :object
|
29
|
+
|
30
|
+
# Creates a new tag object with a tag name and text. Optionally, formally declared types
|
31
|
+
# and a key name can be specified.
|
32
|
+
#
|
33
|
+
# Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc.
|
34
|
+
#
|
35
|
+
# Key names are for tags that declare meta data for a specific key or name, such as +param+,
|
36
|
+
# +raise+, etc.
|
37
|
+
#
|
38
|
+
# @param [#to_s] tag_name the tag name to create the tag for
|
39
|
+
# @param [String] text the descriptive text for this tag
|
40
|
+
# @param [Array<String>] types optional type list of formally declared types
|
41
|
+
# for the tag
|
42
|
+
# @param [String] name optional key name which the tag refers to
|
43
|
+
def initialize(tag_name, text, types = nil, name = nil)
|
44
|
+
@tag_name, @text, @name, @types = tag_name.to_s, text, name, (types ? [types].flatten.compact : nil)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Convenience method to access the first type specified. This should mainly
|
48
|
+
# be used for tags that only specify one type.
|
49
|
+
#
|
50
|
+
# @return [String] the first of the list of specified types
|
51
|
+
# @see #types
|
52
|
+
def type
|
53
|
+
types.first
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,173 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
|
3
|
+
module YARD
|
4
|
+
module Templates
|
5
|
+
# This module manages all creation, handling and rendering of {Template}
|
6
|
+
# objects.
|
7
|
+
#
|
8
|
+
# * To create a template object at a path, use {template}.
|
9
|
+
# * To render a template, call {render}.
|
10
|
+
# * To register a template path in the lookup paths, call {register_template_path}.
|
11
|
+
module Engine
|
12
|
+
class << self
|
13
|
+
# @return [Array<String>] the list of registered template paths
|
14
|
+
attr_accessor :template_paths
|
15
|
+
|
16
|
+
# Registers a new template path in {template_paths}
|
17
|
+
#
|
18
|
+
# @param [String] path a new template path
|
19
|
+
# @return [void]
|
20
|
+
def register_template_path(path)
|
21
|
+
template_paths.push path
|
22
|
+
end
|
23
|
+
|
24
|
+
# Creates a template module representing the path. Searches on disk
|
25
|
+
# for the first directory named +path+ (joined by '/') within the
|
26
|
+
# template paths and builds a template module for. All other matching
|
27
|
+
# directories in other template paths will be included in the
|
28
|
+
# generated module as mixins (for overriding).
|
29
|
+
#
|
30
|
+
# @param [Array<String, Symbol>] path a list of path components
|
31
|
+
# @raise [ArgumentError] if the path does not exist within one of the
|
32
|
+
# {template_paths} on disk.
|
33
|
+
# @return [Template] the module representing the template
|
34
|
+
def template(*path)
|
35
|
+
from_template = nil
|
36
|
+
from_template = path.shift if path.first.is_a?(Template)
|
37
|
+
path = path.join('/')
|
38
|
+
full_paths = find_template_paths(from_template, path)
|
39
|
+
|
40
|
+
path = File.cleanpath(path).gsub('../', '')
|
41
|
+
raise ArgumentError, "No such template for #{path}" if full_paths.empty?
|
42
|
+
mod = template!(path, full_paths)
|
43
|
+
|
44
|
+
mod
|
45
|
+
end
|
46
|
+
|
47
|
+
# Forces creation of a template at +path+ within a +full_path+.
|
48
|
+
#
|
49
|
+
# @param [String] path the path name of the template
|
50
|
+
# @param [Array<String>] full_paths the full path on disk of the template
|
51
|
+
# @return [Template] the template module representing the +path+
|
52
|
+
def template!(path, full_paths = nil)
|
53
|
+
full_paths ||= [path]
|
54
|
+
full_paths = [full_paths] unless full_paths.is_a?(Array)
|
55
|
+
name = template_module_name(full_paths.first)
|
56
|
+
begin; return const_get(name); rescue NameError; end
|
57
|
+
|
58
|
+
mod = const_set(name, Module.new)
|
59
|
+
mod.send(:include, Template)
|
60
|
+
mod.send(:initialize, path, full_paths)
|
61
|
+
mod
|
62
|
+
end
|
63
|
+
|
64
|
+
# Renders a template on a {CodeObjects::Base code object} using
|
65
|
+
# a set of default (overridable) options. Either the +:object+
|
66
|
+
# or +:type+ keys must be provided.
|
67
|
+
#
|
68
|
+
# If a +:serializer+ key is provided and +:serialize+ is not set to
|
69
|
+
# false, the rendered contents will be serialized through the {Serializers::Base}
|
70
|
+
# object. See {with_serializer}.
|
71
|
+
#
|
72
|
+
# @example Renders an object with html formatting
|
73
|
+
# Engine.render(:format => :html, :object => obj)
|
74
|
+
# @example Renders without an object
|
75
|
+
# Engine.render(:type => :fulldoc, :otheropts => somevalue)
|
76
|
+
# @param [Hash] options the options hash
|
77
|
+
# @option options [Symbol] :format (:text) the default format
|
78
|
+
# @option options [Symbol] :type (nil) the :object's type.
|
79
|
+
# @option options [Symbol] :template (:default) the default template
|
80
|
+
# @return [String] the rendered template
|
81
|
+
def render(options = {})
|
82
|
+
set_default_options(options)
|
83
|
+
mod = template(options[:template], options[:type], options[:format])
|
84
|
+
|
85
|
+
if options[:serialize] != false
|
86
|
+
with_serializer(options[:object], options[:serializer]) { mod.run(options) }
|
87
|
+
else
|
88
|
+
mod.run(options)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Passes a set of objects to the +:fulldoc+ template for full documentation generation.
|
93
|
+
# This is called by {CLI::Yardoc} to most commonly perform HTML
|
94
|
+
# documentation generation.
|
95
|
+
#
|
96
|
+
# @param [Array<CodeObjects::Base>] objects a list of {CodeObjects::Base}
|
97
|
+
# objects to pass to the template
|
98
|
+
# @param [Hash] options (see {render})
|
99
|
+
# @return [void]
|
100
|
+
def generate(objects, options = {})
|
101
|
+
set_default_options(options)
|
102
|
+
options[:objects] = objects
|
103
|
+
template(options[:template], :fulldoc, options[:format]).run(options)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Serializes the results of a block with a +serializer+ object.
|
107
|
+
#
|
108
|
+
# @param [CodeObjects::Base] object the code object to serialize
|
109
|
+
# @param [Serializers::Base] serializer the serializer object
|
110
|
+
# @yield a block whose result will be serialize
|
111
|
+
# @yieldreturn [String] the contents to serialize
|
112
|
+
# @see Serializers::Base
|
113
|
+
def with_serializer(object, serializer, &block)
|
114
|
+
serializer.before_serialize if serializer
|
115
|
+
output = yield
|
116
|
+
if serializer
|
117
|
+
serializer.serialize(object, output)
|
118
|
+
serializer.after_serialize(output)
|
119
|
+
end
|
120
|
+
output
|
121
|
+
end
|
122
|
+
|
123
|
+
private
|
124
|
+
|
125
|
+
# Sets default options on the options hash
|
126
|
+
#
|
127
|
+
# @param [Hash] options the options hash
|
128
|
+
# @option options [Symbol] :format (:text) the default format
|
129
|
+
# @option options [Symbol] :type (nil) the :object's type, if provided
|
130
|
+
# @option options [Symbol] :template (:default) the default template
|
131
|
+
# @return [void]
|
132
|
+
def set_default_options(options = {})
|
133
|
+
options[:__globals] ||= OpenStruct.new
|
134
|
+
options[:format] ||= :text
|
135
|
+
options[:type] ||= options[:object].type if options[:object]
|
136
|
+
options[:template] ||= :default
|
137
|
+
end
|
138
|
+
|
139
|
+
# Searches through the registered {template_paths} and returns
|
140
|
+
# all full directories that have the +path+ within them on disk.
|
141
|
+
#
|
142
|
+
# @param [Template] from_template if provided, allows a relative
|
143
|
+
# path to be specified from this template's full path.
|
144
|
+
# @param [String] path the path component to search for in the
|
145
|
+
# {template_paths}
|
146
|
+
# @return [Array<String>] a list of full paths that are existing
|
147
|
+
# candidates for a template module
|
148
|
+
def find_template_paths(from_template, path)
|
149
|
+
paths = template_paths.dup
|
150
|
+
paths = from_template.full_paths + paths if from_template
|
151
|
+
|
152
|
+
paths.inject([]) do |acc, tp|
|
153
|
+
full_path = File.cleanpath(File.join(tp, path))
|
154
|
+
acc.unshift(full_path) if File.directory?(full_path)
|
155
|
+
acc
|
156
|
+
end.uniq
|
157
|
+
end
|
158
|
+
|
159
|
+
# The name of the module that represents a +path+
|
160
|
+
#
|
161
|
+
# @param [String] the path toe generate a module name for
|
162
|
+
# @return [String] the module name
|
163
|
+
def template_module_name(path)
|
164
|
+
'Template_' + path.to_s.gsub(/[^a-z0-9]/i, '_')
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
self.template_paths = []
|
169
|
+
end
|
170
|
+
|
171
|
+
Engine.register_template_path(File.join(YARD::ROOT, '..', 'templates'))
|
172
|
+
end
|
173
|
+
end
|