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,22 @@
|
|
1
|
+
module YARD
|
2
|
+
module Templates
|
3
|
+
# @since 0.5.4
|
4
|
+
module ErbCache
|
5
|
+
def self.method_for(filename, &block)
|
6
|
+
@methods ||= {}
|
7
|
+
return @methods[filename] if @methods[filename]
|
8
|
+
@methods[filename] = name = "_erb_cache_#{@methods.size}"
|
9
|
+
erb = yield.src
|
10
|
+
encoding = erb[/\A(#coding[:=].*\r?\n)/, 1] || ''
|
11
|
+
module_eval "#{encoding}def #{name}; #{erb}; end", filename
|
12
|
+
|
13
|
+
name
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.clear!
|
17
|
+
return unless @methods
|
18
|
+
@methods.clear
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
module YARD::Templates::Helpers
|
2
|
+
# The base helper module included in all templates.
|
3
|
+
module BaseHelper
|
4
|
+
attr_accessor :object, :serializer
|
5
|
+
|
6
|
+
# @group Managing Global Template State
|
7
|
+
|
8
|
+
# An object that keeps track of global state throughout the entire template
|
9
|
+
# rendering process (including any sub-templates).
|
10
|
+
#
|
11
|
+
# @return [OpenStruct] a struct object that stores state
|
12
|
+
# @since 0.6.0
|
13
|
+
def globals; options[:__globals] end
|
14
|
+
|
15
|
+
# @group Running the Verifier
|
16
|
+
|
17
|
+
# Runs a list of objects against the {Verifier} object passed into the
|
18
|
+
# template and returns the subset of verified objects.
|
19
|
+
#
|
20
|
+
# @param [Array<CodeObjects::Base>] list a list of code objects
|
21
|
+
# @return [Array<CodeObjects::Base>] a list of code objects that match
|
22
|
+
# the verifier. If no verifier is supplied, all objects are returned.
|
23
|
+
def run_verifier(list)
|
24
|
+
options[:verifier] ? options[:verifier].run(list) : list
|
25
|
+
end
|
26
|
+
|
27
|
+
# @group Escaping Text
|
28
|
+
|
29
|
+
# Escapes text. This is used a lot by the HtmlHelper and there should
|
30
|
+
# be some helper to "clean up" text for whatever, this is it.
|
31
|
+
def h(text)
|
32
|
+
text
|
33
|
+
end
|
34
|
+
|
35
|
+
# @group Linking Objects and URLs
|
36
|
+
|
37
|
+
# Links objects or URLs. This method will delegate to the correct +link_+
|
38
|
+
# method depending on the arguments passed in.
|
39
|
+
#
|
40
|
+
# @example Linking a URL
|
41
|
+
# linkify('http://example.com')
|
42
|
+
# @example Including docstring contents of an object
|
43
|
+
# linkify('include:YARD::Docstring')
|
44
|
+
# @example Linking to an extra file
|
45
|
+
# linkify('file:README')
|
46
|
+
# @example Linking an object by path
|
47
|
+
# linkify('YARD::Docstring')
|
48
|
+
def linkify(*args)
|
49
|
+
if args.first.is_a?(String)
|
50
|
+
case args.first
|
51
|
+
when %r{://}, /^mailto:/
|
52
|
+
link_url(args[0], args[1], {:target => '_parent'}.merge(args[2]||{}))
|
53
|
+
when /^include:file:(\S+)/
|
54
|
+
file = $1
|
55
|
+
relpath = File.relative_path(Dir.pwd, File.expand_path(file))
|
56
|
+
if relpath =~ /^\.\./
|
57
|
+
log.warn "Cannot include file from path `#{file}'"
|
58
|
+
""
|
59
|
+
elsif File.file?(file)
|
60
|
+
link_include_file(file)
|
61
|
+
else
|
62
|
+
log.warn "Cannot find file at `#{file}' for inclusion"
|
63
|
+
""
|
64
|
+
end
|
65
|
+
when /^include:(\S+)/
|
66
|
+
path = $1
|
67
|
+
if obj = YARD::Registry.resolve(object.namespace, path)
|
68
|
+
link_include_object(obj)
|
69
|
+
else
|
70
|
+
log.warn "Cannot find object at `#{path}' for inclusion"
|
71
|
+
""
|
72
|
+
end
|
73
|
+
when /^render:(\S+)/
|
74
|
+
path = $1
|
75
|
+
if obj = YARD::Registry.resolve(object, path)
|
76
|
+
opts = options.dup
|
77
|
+
opts.delete(:serializer)
|
78
|
+
obj.format(opts)
|
79
|
+
else
|
80
|
+
''
|
81
|
+
end
|
82
|
+
when /^file:(\S+?)(?:#(\S+))?$/
|
83
|
+
link_file($1, args[1] ? args[1] : nil, $2)
|
84
|
+
else
|
85
|
+
link_object(*args)
|
86
|
+
end
|
87
|
+
else
|
88
|
+
link_object(*args)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Includes an object's docstring into output.
|
93
|
+
# @since 0.6.0
|
94
|
+
# @param [CodeObjects::Base] object the object to include
|
95
|
+
# @return [String] the object's docstring (no tags)
|
96
|
+
def link_include_object(object)
|
97
|
+
object.docstring
|
98
|
+
end
|
99
|
+
|
100
|
+
# Include a file as a docstring in output
|
101
|
+
# @since 0.7.0
|
102
|
+
# @param [String] file the filename to include
|
103
|
+
# @return [String] the file's contents
|
104
|
+
def link_include_file(file)
|
105
|
+
File.read(file)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Links to an object with an optional title
|
109
|
+
#
|
110
|
+
# @param [CodeObjects::Base] object the object to link to
|
111
|
+
# @param [String] title the title to use for the link
|
112
|
+
# @return [String] the linked object
|
113
|
+
def link_object(object, title = nil)
|
114
|
+
return title if title
|
115
|
+
|
116
|
+
case object
|
117
|
+
when YARD::CodeObjects::Base, YARD::CodeObjects::Proxy
|
118
|
+
object.path
|
119
|
+
when String, Symbol
|
120
|
+
P(object).path
|
121
|
+
else
|
122
|
+
object
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# Links to a URL
|
127
|
+
#
|
128
|
+
# @param [String] url the URL to link to
|
129
|
+
# @param [String] title the optional title to display the link as
|
130
|
+
# @param [Hash] params optional parameters for the link
|
131
|
+
# @return [String] the linked URL
|
132
|
+
def link_url(url, title = nil, params = nil)
|
133
|
+
url
|
134
|
+
end
|
135
|
+
|
136
|
+
# Links to an extra file
|
137
|
+
#
|
138
|
+
# @param [String] filename the filename to link to
|
139
|
+
# @param [String] title the title of the link
|
140
|
+
# @param [String] anchor optional anchor
|
141
|
+
# @return [String] the link to the file
|
142
|
+
# @since 0.5.5
|
143
|
+
def link_file(filename, title = nil, anchor = nil)
|
144
|
+
return filename.filename if CodeObjects::ExtraFileObject === filename
|
145
|
+
filename
|
146
|
+
end
|
147
|
+
|
148
|
+
# @group Formatting Object Attributes
|
149
|
+
|
150
|
+
# Formats a list of return types for output and links each type.
|
151
|
+
#
|
152
|
+
# @example Formatting types
|
153
|
+
# format_types(['String', 'Array']) #=> "(String, Array)"
|
154
|
+
# @example Formatting types without surrounding brackets
|
155
|
+
# format_types(['String', 'Array'], false) #=> "String, Array"
|
156
|
+
# @param [Array<String>] list a list of types
|
157
|
+
# @param [Boolean] brackets whether to surround the types in brackets
|
158
|
+
# @return [String] the formatted list of Ruby types
|
159
|
+
def format_types(list, brackets = true)
|
160
|
+
list.nil? || list.empty? ? "" : (brackets ? "(#{list.join(", ")})" : list.join(", "))
|
161
|
+
end
|
162
|
+
|
163
|
+
# @example Formatted type of an exception class
|
164
|
+
# o = ClassObject.new(:root, :MyError)
|
165
|
+
# o.superclass = P('RuntimeError')
|
166
|
+
# format_object_type(o) # => "Exception"
|
167
|
+
# @example Formatted type of a method
|
168
|
+
# o = MethodObject.new(:root, :to_s)
|
169
|
+
# format_object_type(o) # => "Method"
|
170
|
+
# @param [CodeObjects::Base] object the object to retrieve the type for
|
171
|
+
# @return [String] the human-readable formatted {CodeObjects::Base#type #type}
|
172
|
+
# for the object
|
173
|
+
def format_object_type(object)
|
174
|
+
case object
|
175
|
+
when YARD::CodeObjects::ClassObject
|
176
|
+
object.is_exception? ? "Exception" : "Class"
|
177
|
+
else
|
178
|
+
object.type.to_s.capitalize
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# @example
|
183
|
+
# s = format_object_title ModuleObject.new(:root, :MyModuleName)
|
184
|
+
# s # => "Module: MyModuleName"
|
185
|
+
# @param [CodeObjects::Base] object the object to retrieve a title for
|
186
|
+
# @return [String] the page title name for a given object
|
187
|
+
def format_object_title(object)
|
188
|
+
case object
|
189
|
+
when YARD::CodeObjects::RootObject
|
190
|
+
"Top Level Namespace"
|
191
|
+
else
|
192
|
+
format_object_type(object) + ": " + object.path
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Indents and formats source code
|
197
|
+
#
|
198
|
+
# @param [String] value the input source code
|
199
|
+
# @return [String] formatted source code
|
200
|
+
def format_source(value)
|
201
|
+
sp = value.split("\n").last[/^(\s+)/, 1]
|
202
|
+
num = sp ? sp.size : 0
|
203
|
+
value.gsub(/^\s{#{num}}/, '')
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module YARD
|
2
|
+
module Templates::Helpers
|
3
|
+
# Helpers for various object types
|
4
|
+
module FilterHelper
|
5
|
+
# @return [Boolean] whether an object is a method
|
6
|
+
def is_method?(object)
|
7
|
+
object.type == :method
|
8
|
+
end
|
9
|
+
|
10
|
+
# @return [Boolean] whether an object is a namespace
|
11
|
+
def is_namespace?(object)
|
12
|
+
object.is_a?(CodeObjects::NamespaceObject)
|
13
|
+
end
|
14
|
+
|
15
|
+
# @return [Boolean] whether an object is a class
|
16
|
+
def is_class?(object)
|
17
|
+
object.is_a?(CodeObjects::ClassObject)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [Boolean] whether an object is a module
|
21
|
+
def is_module?(object)
|
22
|
+
object.is_a?(CodeObjects::ModuleObject)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,520 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module YARD
|
4
|
+
module Templates::Helpers
|
5
|
+
# The helper module for HTML templates.
|
6
|
+
module HtmlHelper
|
7
|
+
include MarkupHelper
|
8
|
+
include HtmlSyntaxHighlightHelper
|
9
|
+
|
10
|
+
# @group Escaping Template Data
|
11
|
+
|
12
|
+
# Escapes HTML entities
|
13
|
+
#
|
14
|
+
# @param [String] text the text to escape
|
15
|
+
# @return [String] the HTML with escaped entities
|
16
|
+
def h(text)
|
17
|
+
CGI.escapeHTML(text.to_s)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Escapes a URL
|
21
|
+
#
|
22
|
+
# @param [String] text the URL
|
23
|
+
# @return [String] the escaped URL
|
24
|
+
def urlencode(text)
|
25
|
+
CGI.escape(text.to_s)
|
26
|
+
end
|
27
|
+
|
28
|
+
# @group Converting Markup to HTML
|
29
|
+
|
30
|
+
# Turns text into HTML using +markup+ style formatting.
|
31
|
+
#
|
32
|
+
# @param [String] text the text to format
|
33
|
+
# @param [Symbol] markup examples are +:markdown+, +:textile+, +:rdoc+.
|
34
|
+
# To add a custom markup type, see {MarkupHelper}
|
35
|
+
# @return [String] the HTML
|
36
|
+
def htmlify(text, markup = options[:markup])
|
37
|
+
markup_meth = "html_markup_#{markup}"
|
38
|
+
return text unless respond_to?(markup_meth)
|
39
|
+
return "" unless text
|
40
|
+
return text unless markup
|
41
|
+
html = send(markup_meth, text)
|
42
|
+
if html.respond_to?(:encode)
|
43
|
+
html = html.force_encoding(text.encoding) # for libs that mess with encoding
|
44
|
+
html = html.encode(:invalid => :replace, :replace => '?')
|
45
|
+
end
|
46
|
+
html = resolve_links(html)
|
47
|
+
html = html.gsub(/<pre\s*(?:lang="(.+?)")?>(?:\s*<code>)?(.+?)(?:<\/code>\s*)?<\/pre>/m) do
|
48
|
+
language = $1
|
49
|
+
string = $2
|
50
|
+
|
51
|
+
string = html_syntax_highlight(CGI.unescapeHTML(string), language) unless options[:no_highlight]
|
52
|
+
classes = ['code', language].compact.join(' ')
|
53
|
+
%Q{<pre class="#{classes}">#{string}</pre>}
|
54
|
+
end unless [:text, :none, :pre].include?(markup)
|
55
|
+
html
|
56
|
+
end
|
57
|
+
|
58
|
+
# Converts Markdown to HTML
|
59
|
+
# @param [String] text input Markdown text
|
60
|
+
# @return [String] output HTML
|
61
|
+
# @since 0.6.0
|
62
|
+
def html_markup_markdown(text)
|
63
|
+
# TODO: other libraries might be more complex
|
64
|
+
provider = markup_class(:markdown)
|
65
|
+
if provider.to_s == 'RDiscount'
|
66
|
+
provider.new(text, :autolink).to_html
|
67
|
+
elsif provider.to_s == 'RedcarpetCompat'
|
68
|
+
provider.new(text, :gh_blockcode, :fenced_code, :autolink).to_html
|
69
|
+
else
|
70
|
+
provider.new(text).to_html
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Converts Textile to HTML
|
75
|
+
# @param [String] text the input Textile text
|
76
|
+
# @return [String] output HTML
|
77
|
+
# @since 0.6.0
|
78
|
+
def html_markup_textile(text)
|
79
|
+
doc = markup_class(:textile).new(text)
|
80
|
+
doc.hard_breaks = false if doc.respond_to?(:hard_breaks=)
|
81
|
+
doc.to_html
|
82
|
+
end
|
83
|
+
|
84
|
+
# Converts plaintext to strict Textile (hard breaks)
|
85
|
+
# @param [String] text the input textile data
|
86
|
+
# @return [String] the output HTML
|
87
|
+
# @since 0.6.0
|
88
|
+
def html_markup_textile_strict(text)
|
89
|
+
markup_class(:textile).new(text).to_html
|
90
|
+
end
|
91
|
+
|
92
|
+
# Converts RDoc formatting (SimpleMarkup) to HTML
|
93
|
+
# @param [String] text the input RDoc formatted text
|
94
|
+
# @return [String] output HTML
|
95
|
+
# @since 0.6.0
|
96
|
+
def html_markup_rdoc(text)
|
97
|
+
doc = markup_class(:rdoc).new(text)
|
98
|
+
doc.from_path = url_for(object) if doc.respond_to?(:from_path=)
|
99
|
+
doc.to_html
|
100
|
+
end
|
101
|
+
|
102
|
+
# Converts plaintext to pre-formatted HTML
|
103
|
+
# @param [String] text the input text
|
104
|
+
# @return [String] the output HTML
|
105
|
+
# @since 0.6.0
|
106
|
+
def html_markup_pre(text)
|
107
|
+
"<pre>" + h(text) + "</pre>"
|
108
|
+
end
|
109
|
+
|
110
|
+
# Converts plaintext to regular HTML
|
111
|
+
# @param [String] text the input text
|
112
|
+
# @return [String] the output HTML
|
113
|
+
# @since 0.6.0
|
114
|
+
def html_markup_text(text)
|
115
|
+
h(text).gsub(/\r?\n/, '<br/>')
|
116
|
+
end
|
117
|
+
|
118
|
+
# @return [String] the same text with no markup
|
119
|
+
# @since 0.6.6
|
120
|
+
def html_markup_none(text)
|
121
|
+
h(text)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Converts HTML to HTML
|
125
|
+
# @param [String] text input html
|
126
|
+
# @return [String] output HTML
|
127
|
+
# @since 0.6.0
|
128
|
+
def html_markup_html(text)
|
129
|
+
text
|
130
|
+
end
|
131
|
+
|
132
|
+
# Highlights Ruby source. Similar to {#html_syntax_highlight}, but
|
133
|
+
# this method is meant to be called from {#htmlify} when markup is
|
134
|
+
# set to "ruby".
|
135
|
+
#
|
136
|
+
# @param [String] source the Ruby source
|
137
|
+
# @return [String] the highlighted HTML
|
138
|
+
# @since 0.7.0
|
139
|
+
def html_markup_ruby(source)
|
140
|
+
'<pre class="code ruby">' + html_syntax_highlight(source, :ruby) + '</pre>'
|
141
|
+
end
|
142
|
+
|
143
|
+
# @return [String] HTMLified text as a single line (paragraphs removed)
|
144
|
+
def htmlify_line(*args)
|
145
|
+
"<div class='inline'>" + htmlify(*args) + "</div>"
|
146
|
+
end
|
147
|
+
|
148
|
+
# @group Syntax Highlighting Source Code
|
149
|
+
|
150
|
+
# Syntax highlights +source+ in language +type+.
|
151
|
+
#
|
152
|
+
# @note To support a specific language +type+, implement the method
|
153
|
+
# +html_syntax_highlight_TYPE+ in this class.
|
154
|
+
#
|
155
|
+
# @param [String] source the source code to highlight
|
156
|
+
# @param [Symbol] type the language type (:ruby, :plain, etc). Use
|
157
|
+
# :plain for no syntax highlighting.
|
158
|
+
# @return [String] the highlighted source
|
159
|
+
def html_syntax_highlight(source, type = nil)
|
160
|
+
return "" unless source
|
161
|
+
return h(source) if options[:no_highlight]
|
162
|
+
|
163
|
+
type ||= object.source_type || :ruby
|
164
|
+
|
165
|
+
# handle !!!LANG prefix to send to html_syntax_highlight_LANG
|
166
|
+
if source =~ /\A(?:[ \t]*\r?\n)?[ \t]*!!!([\w.+-]+)[ \t]*\r?\n/
|
167
|
+
type, source = $1, $'
|
168
|
+
source = $'
|
169
|
+
end
|
170
|
+
|
171
|
+
meth = "html_syntax_highlight_#{type}"
|
172
|
+
respond_to?(meth) ? send(meth, source) : h(source)
|
173
|
+
end
|
174
|
+
|
175
|
+
# @return [String] unhighlighted source
|
176
|
+
def html_syntax_highlight_plain(source)
|
177
|
+
h(source)
|
178
|
+
end
|
179
|
+
|
180
|
+
# @group Linking Objects and URLs
|
181
|
+
|
182
|
+
# Resolves any text in the form of +{Name}+ to the object specified by
|
183
|
+
# Name. Also supports link titles in the form +{Name title}+.
|
184
|
+
#
|
185
|
+
# @example Linking to an instance method
|
186
|
+
# resolve_links("{MyClass#method}") # => "<a href='...'>MyClass#method</a>"
|
187
|
+
# @example Linking to a class with a title
|
188
|
+
# resolve_links("{A::B::C the C class}") # => "<a href='...'>the c class</a>"
|
189
|
+
# @param [String] text the text to resolve links in
|
190
|
+
# @return [String] HTML with linkified references
|
191
|
+
def resolve_links(text)
|
192
|
+
code_tags = 0
|
193
|
+
text.gsub(/<(\/)?(pre|code|tt)|(\\|!)?\{(?!\})(\S+?)(?:\s([^\}]*?\S))?\}(?=[\W<]|.+<\/|$)/m) do |str|
|
194
|
+
closed, tag, escape, name, title, match = $1, $2, $3, $4, $5, $&
|
195
|
+
if tag
|
196
|
+
code_tags += (closed ? -1 : 1)
|
197
|
+
next str
|
198
|
+
end
|
199
|
+
next str unless code_tags == 0
|
200
|
+
|
201
|
+
next(match[1..-1]) if escape
|
202
|
+
|
203
|
+
next(match) if name[0,1] == '|'
|
204
|
+
|
205
|
+
if name == '<a' && title =~ /href=["'](.+?)["'].*>.*<\/a>\s*(.*)\Z/
|
206
|
+
name, title = $1, $2
|
207
|
+
title = nil if title.empty?
|
208
|
+
end
|
209
|
+
|
210
|
+
if object.is_a?(String)
|
211
|
+
object
|
212
|
+
else
|
213
|
+
link = linkify(name, title)
|
214
|
+
if (link == name || link == title) && (name+' '+link !~ /\A<a\s.*>/)
|
215
|
+
match = /(.+)?(\{#{Regexp.quote name}(?:\s.*?)?\})(.+)?/.match(text)
|
216
|
+
file = (@file ? @file.filename : object.file) || '(unknown)'
|
217
|
+
line = (@file ? 1 : (object.docstring.line_range ? object.docstring.line_range.first : 1)) + (match ? $`.count("\n") : 0)
|
218
|
+
log.warn "In file `#{file}':#{line}: Cannot resolve link to #{name} from text" + (match ? ":" : ".")
|
219
|
+
log.warn((match[1] ? '...' : '') + match[2].gsub("\n","") + (match[3] ? '...' : '')) if match
|
220
|
+
end
|
221
|
+
|
222
|
+
link
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# (see BaseHelper#link_file)
|
228
|
+
def link_file(filename, title = nil, anchor = nil)
|
229
|
+
if CodeObjects::ExtraFileObject === filename
|
230
|
+
file = filename
|
231
|
+
else
|
232
|
+
contents = File.file?(filename) ? nil : ''
|
233
|
+
file = CodeObjects::ExtraFileObject.new(filename, contents)
|
234
|
+
end
|
235
|
+
return title || file.title unless serializer
|
236
|
+
link_url(url_for_file(file, anchor), title || file.title)
|
237
|
+
end
|
238
|
+
|
239
|
+
# (see BaseHelper#link_include_file)
|
240
|
+
def link_include_file(file)
|
241
|
+
unless file.is_a?(CodeObjects::ExtraFileObject)
|
242
|
+
file = CodeObjects::ExtraFileObject.new(file)
|
243
|
+
end
|
244
|
+
file.attributes[:markup] ||= markup_for_file('', file.filename)
|
245
|
+
htmlify(file.contents, file.attributes[:markup] || options[:markup])
|
246
|
+
end
|
247
|
+
|
248
|
+
# (see BaseHelper#link_include_object)
|
249
|
+
def link_include_object(obj)
|
250
|
+
htmlify(obj.docstring)
|
251
|
+
end
|
252
|
+
|
253
|
+
# (see BaseHelper#link_object)
|
254
|
+
def link_object(obj, otitle = nil, anchor = nil, relative = true)
|
255
|
+
return otitle if obj.nil?
|
256
|
+
obj = Registry.resolve(object, obj, true, true) if obj.is_a?(String)
|
257
|
+
if !otitle && obj.root?
|
258
|
+
title = "Top Level Namespace"
|
259
|
+
elsif otitle
|
260
|
+
title = otitle.to_s
|
261
|
+
elsif object.is_a?(CodeObjects::Base)
|
262
|
+
title = h(object.relative_path(obj))
|
263
|
+
else
|
264
|
+
title = h(obj.to_s)
|
265
|
+
end
|
266
|
+
return title unless serializer
|
267
|
+
return title if obj.is_a?(CodeObjects::Proxy)
|
268
|
+
|
269
|
+
link = url_for(obj, anchor, relative)
|
270
|
+
link = link ? link_url(link, title, :title => h("#{obj.path} (#{obj.type})")) : title
|
271
|
+
"<span class='object_link'>" + link + "</span>"
|
272
|
+
end
|
273
|
+
|
274
|
+
# (see BaseHelper#link_url)
|
275
|
+
def link_url(url, title = nil, params = {})
|
276
|
+
title ||= url
|
277
|
+
title.gsub!(/[\r\n]/, ' ')
|
278
|
+
params = SymbolHash.new(false).update(
|
279
|
+
:href => url,
|
280
|
+
:title => h(title)
|
281
|
+
).update(params)
|
282
|
+
params[:target] ||= '_parent' if url =~ /^(\w+):\/\//
|
283
|
+
"<a #{tag_attrs(params)}>#{title}</a>".gsub(/[\r\n]/, ' ')
|
284
|
+
end
|
285
|
+
|
286
|
+
# @group URL Helpers
|
287
|
+
|
288
|
+
# @param [CodeObjects::Base] object the object to get an anchor for
|
289
|
+
# @return [String] the anchor for a specific object
|
290
|
+
def anchor_for(object)
|
291
|
+
case object
|
292
|
+
when CodeObjects::MethodObject
|
293
|
+
"#{object.name}-#{object.scope}_#{object.type}"
|
294
|
+
when CodeObjects::ClassVariableObject
|
295
|
+
"#{object.name.to_s.gsub('@@', '')}-#{object.type}"
|
296
|
+
when CodeObjects::Base
|
297
|
+
"#{object.name}-#{object.type}"
|
298
|
+
when CodeObjects::Proxy
|
299
|
+
object.path
|
300
|
+
else
|
301
|
+
object.to_s
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
# Returns the URL for an object.
|
306
|
+
#
|
307
|
+
# @param [String, CodeObjects::Base] obj the object (or object path) to link to
|
308
|
+
# @param [String] anchor the anchor to link to
|
309
|
+
# @param [Boolean] relative use a relative or absolute link
|
310
|
+
# @return [String] the URL location of the object
|
311
|
+
def url_for(obj, anchor = nil, relative = true)
|
312
|
+
link = nil
|
313
|
+
return link unless serializer
|
314
|
+
|
315
|
+
if obj.is_a?(CodeObjects::Base) && !obj.is_a?(CodeObjects::NamespaceObject)
|
316
|
+
# If the obj is not a namespace obj make it the anchor.
|
317
|
+
anchor, obj = obj, obj.namespace
|
318
|
+
end
|
319
|
+
|
320
|
+
objpath = serializer.serialized_path(obj)
|
321
|
+
return link unless objpath
|
322
|
+
|
323
|
+
if relative
|
324
|
+
fromobj = object
|
325
|
+
if object.is_a?(CodeObjects::Base) &&
|
326
|
+
!object.is_a?(CodeObjects::NamespaceObject)
|
327
|
+
fromobj = fromobj.namespace
|
328
|
+
end
|
329
|
+
|
330
|
+
from = serializer.serialized_path(fromobj)
|
331
|
+
link = File.relative_path(from, objpath)
|
332
|
+
else
|
333
|
+
link = objpath
|
334
|
+
end
|
335
|
+
|
336
|
+
link + (anchor ? '#' + urlencode(anchor_for(anchor)) : '')
|
337
|
+
end
|
338
|
+
|
339
|
+
# Returns the URL for a specific file
|
340
|
+
#
|
341
|
+
# @param [String, CodeObjects::ExtraFileObject] filename the filename to link to
|
342
|
+
# @param [String] anchor optional anchor
|
343
|
+
# @return [String] the URL pointing to the file
|
344
|
+
def url_for_file(filename, anchor = nil)
|
345
|
+
return '' unless serializer
|
346
|
+
fromobj = object
|
347
|
+
if CodeObjects::Base === fromobj && !fromobj.is_a?(CodeObjects::NamespaceObject)
|
348
|
+
fromobj = fromobj.namespace
|
349
|
+
end
|
350
|
+
from = serializer.serialized_path(fromobj)
|
351
|
+
if filename == options[:readme]
|
352
|
+
path = 'index.html'
|
353
|
+
else
|
354
|
+
path = serializer.serialized_path(filename)
|
355
|
+
end
|
356
|
+
link = File.relative_path(from, path)
|
357
|
+
link += (anchor ? '#' + urlencode(anchor) : '')
|
358
|
+
link
|
359
|
+
end
|
360
|
+
|
361
|
+
# @group Formatting Objects and Attributes
|
362
|
+
|
363
|
+
# Formats a list of objects and links them
|
364
|
+
# @return [String] a formatted list of objects
|
365
|
+
def format_object_name_list(objects)
|
366
|
+
objects.sort_by {|o| o.name.to_s.downcase }.map do |o|
|
367
|
+
"<span class='name'>" + linkify(o, o.name) + "</span>"
|
368
|
+
end.join(", ")
|
369
|
+
end
|
370
|
+
|
371
|
+
# Formats a list of types from a tag.
|
372
|
+
#
|
373
|
+
# @param [Array<String>, FalseClass] typelist
|
374
|
+
# the list of types to be formatted.
|
375
|
+
#
|
376
|
+
# @param [Boolean] brackets omits the surrounding
|
377
|
+
# brackets if +brackets+ is set to +false+.
|
378
|
+
#
|
379
|
+
# @return [String] the list of types formatted
|
380
|
+
# as [Type1, Type2, ...] with the types linked
|
381
|
+
# to their respective descriptions.
|
382
|
+
#
|
383
|
+
def format_types(typelist, brackets = true)
|
384
|
+
return unless typelist.is_a?(Array)
|
385
|
+
list = typelist.map do |type|
|
386
|
+
type = type.gsub(/([<>])/) { h($1) }
|
387
|
+
type = type.gsub(/([\w:]+)/) { $1 == "lt" || $1 == "gt" ? $1 : linkify($1, $1) }
|
388
|
+
"<tt>" + type + "</tt>"
|
389
|
+
end
|
390
|
+
list.empty? ? "" : (brackets ? "(#{list.join(", ")})" : list.join(", "))
|
391
|
+
end
|
392
|
+
|
393
|
+
# Get the return types for a method signature.
|
394
|
+
#
|
395
|
+
# @param [CodeObjects::MethodObject] meth the method object
|
396
|
+
# @param [Boolean] link whether to link the types
|
397
|
+
# @return [String] the signature types
|
398
|
+
# @since 0.5.3
|
399
|
+
def signature_types(meth, link = true)
|
400
|
+
meth = convert_method_to_overload(meth)
|
401
|
+
if meth.respond_to?(:object) && !meth.has_tag?(:return)
|
402
|
+
meth = meth.object
|
403
|
+
end
|
404
|
+
|
405
|
+
type = options[:default_return] || ""
|
406
|
+
if meth.tag(:return) && meth.tag(:return).types
|
407
|
+
types = meth.tags(:return).map {|t| t.types ? t.types : [] }.flatten.uniq
|
408
|
+
first = link ? h(types.first) : format_types([types.first], false)
|
409
|
+
if types.size == 2 && types.last == 'nil'
|
410
|
+
type = first + '<sup>?</sup>'
|
411
|
+
elsif types.size == 2 && types.last =~ /^(Array)?<#{Regexp.quote types.first}>$/
|
412
|
+
type = first + '<sup>+</sup>'
|
413
|
+
elsif types.size > 2
|
414
|
+
type = [first, '...'].join(', ')
|
415
|
+
elsif types == ['void'] && options[:hide_void_return]
|
416
|
+
type = ""
|
417
|
+
else
|
418
|
+
type = link ? h(types.join(", ")) : format_types(types, false)
|
419
|
+
end
|
420
|
+
elsif !type.empty?
|
421
|
+
type = link ? h(type) : format_types([type], false)
|
422
|
+
end
|
423
|
+
type = "(#{type}) " unless type.empty?
|
424
|
+
type
|
425
|
+
end
|
426
|
+
|
427
|
+
# Formats the signature of method +meth+.
|
428
|
+
#
|
429
|
+
# @param [CodeObjects::MethodObject] meth the method object to list
|
430
|
+
# the signature of
|
431
|
+
# @param [Boolean] link whether to link the method signature to the details view
|
432
|
+
# @param [Boolean] show_extras whether to show extra meta-data (visibility, attribute info)
|
433
|
+
# @param [Boolean] full_attr_name whether to show the full attribute name
|
434
|
+
# ("name=" instead of "name")
|
435
|
+
# @return [String] the formatted method signature
|
436
|
+
def signature(meth, link = true, show_extras = true, full_attr_name = true)
|
437
|
+
meth = convert_method_to_overload(meth)
|
438
|
+
|
439
|
+
type = signature_types(meth, link)
|
440
|
+
scope = meth.scope == :class ? "+" : "-"
|
441
|
+
name = full_attr_name ? meth.name : meth.name.to_s.gsub(/^(\w+)=$/, '\1')
|
442
|
+
blk = format_block(meth)
|
443
|
+
args = !full_attr_name && meth.writer? ? "" : format_args(meth)
|
444
|
+
extras = []
|
445
|
+
extras_text = ''
|
446
|
+
if show_extras
|
447
|
+
if rw = meth.attr_info
|
448
|
+
attname = [rw[:read] ? 'read' : nil, rw[:write] ? 'write' : nil].compact
|
449
|
+
attname = attname.size == 1 ? attname.join('') + 'only' : nil
|
450
|
+
extras << attname if attname
|
451
|
+
end
|
452
|
+
extras << meth.visibility if meth.visibility != :public
|
453
|
+
extras_text = ' <span class="extras">(' + extras.join(", ") + ')</span>' unless extras.empty?
|
454
|
+
end
|
455
|
+
title = "%s %s<strong>%s</strong>%s %s" % [scope, type, h(name), args, blk]
|
456
|
+
if link
|
457
|
+
if meth.is_a?(YARD::CodeObjects::MethodObject)
|
458
|
+
link_title = "#{h meth.name(true)} (#{meth.scope} #{meth.type})"
|
459
|
+
else
|
460
|
+
link_title = "#{h name} (#{meth.type})"
|
461
|
+
end
|
462
|
+
obj = meth.respond_to?(:object) ? meth.object : meth
|
463
|
+
link_url(url_for(obj), title, :title => link_title) + extras_text
|
464
|
+
else
|
465
|
+
title + extras_text
|
466
|
+
end
|
467
|
+
end
|
468
|
+
|
469
|
+
# @group Getting the Character Encoding
|
470
|
+
|
471
|
+
# Returns the current character set. The default value can be overridden
|
472
|
+
# by setting the +LANG+ environment variable or by overriding this
|
473
|
+
# method. In Ruby 1.9 you can also modify this value by setting
|
474
|
+
# +Encoding.default_external+.
|
475
|
+
#
|
476
|
+
# @return [String] the current character set
|
477
|
+
# @since 0.5.4
|
478
|
+
def charset
|
479
|
+
if @file && RUBY19
|
480
|
+
lang = @file.contents.encoding.to_s
|
481
|
+
else
|
482
|
+
return 'utf-8' unless RUBY19 || lang = ENV['LANG']
|
483
|
+
if RUBY19
|
484
|
+
lang = ::Encoding.default_external.name.downcase
|
485
|
+
else
|
486
|
+
lang = lang.downcase.split('.').last
|
487
|
+
end
|
488
|
+
end
|
489
|
+
case lang
|
490
|
+
when "ascii-8bit", "us-ascii", "ascii-7bit"; 'iso-8859-1'
|
491
|
+
when "utf8"; 'utf-8'
|
492
|
+
else; lang
|
493
|
+
end
|
494
|
+
end
|
495
|
+
|
496
|
+
# @endgroup
|
497
|
+
|
498
|
+
private
|
499
|
+
|
500
|
+
# Converts a set of hash options into HTML attributes for a tag
|
501
|
+
#
|
502
|
+
# @param [Hash{String => String}] opts the tag options
|
503
|
+
# @return [String] the tag attributes of an HTML tag
|
504
|
+
def tag_attrs(opts = {})
|
505
|
+
opts.sort_by {|k, v| k.to_s }.map {|k,v| "#{k}=#{v.to_s.inspect}" if v }.join(" ")
|
506
|
+
end
|
507
|
+
|
508
|
+
# Converts a {CodeObjects::MethodObject} into an overload object
|
509
|
+
# @since 0.5.3
|
510
|
+
def convert_method_to_overload(meth)
|
511
|
+
# use first overload tag if it has a return type and method itself does not
|
512
|
+
if !meth.tag(:return) && meth.tags(:overload).size == 1 && meth.tag(:overload).tag(:return)
|
513
|
+
return meth.tag(:overload)
|
514
|
+
end
|
515
|
+
meth
|
516
|
+
end
|
517
|
+
end
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|