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.
Files changed (491) hide show
  1. data/Rakefile +4 -1
  2. data/lib/nutshell-crm.rb +274 -6
  3. data/lib/nutshell-crm/version.rb +1 -1
  4. data/nutshell-crm.gemspec +1 -0
  5. data/spec/nutshell-crm_spec.rb +40 -167
  6. data/vendor/bundle/bin/yard +19 -0
  7. data/vendor/bundle/bin/yardoc +19 -0
  8. data/vendor/bundle/bin/yri +19 -0
  9. data/vendor/bundle/gems/yard-0.7.4/.yardopts +18 -0
  10. data/vendor/bundle/gems/yard-0.7.4/ChangeLog +10533 -0
  11. data/vendor/bundle/gems/yard-0.7.4/LEGAL +74 -0
  12. data/vendor/bundle/gems/yard-0.7.4/LICENSE +22 -0
  13. data/vendor/bundle/gems/yard-0.7.4/README.md +514 -0
  14. data/vendor/bundle/gems/yard-0.7.4/Rakefile +99 -0
  15. data/vendor/bundle/gems/yard-0.7.4/benchmarks/builtins_vs_eval.rb +23 -0
  16. data/vendor/bundle/gems/yard-0.7.4/benchmarks/concat_vs_join.rb +12 -0
  17. data/vendor/bundle/gems/yard-0.7.4/benchmarks/erb_vs_erubis.rb +53 -0
  18. data/vendor/bundle/gems/yard-0.7.4/benchmarks/format_args.rb +46 -0
  19. data/vendor/bundle/gems/yard-0.7.4/benchmarks/generation.rb +37 -0
  20. data/vendor/bundle/gems/yard-0.7.4/benchmarks/marshal_vs_dbm.rb +63 -0
  21. data/vendor/bundle/gems/yard-0.7.4/benchmarks/parsing.rb +46 -0
  22. data/vendor/bundle/gems/yard-0.7.4/benchmarks/pathname_vs_string.rb +50 -0
  23. data/vendor/bundle/gems/yard-0.7.4/benchmarks/rdoc_vs_yardoc.rb +10 -0
  24. data/vendor/bundle/gems/yard-0.7.4/benchmarks/ri_vs_yri.rb +18 -0
  25. data/vendor/bundle/gems/yard-0.7.4/benchmarks/ripper_parser.rb +12 -0
  26. data/vendor/bundle/gems/yard-0.7.4/benchmarks/splat_vs_flatten.rb +12 -0
  27. data/vendor/bundle/gems/yard-0.7.4/benchmarks/template_erb.rb +22 -0
  28. data/vendor/bundle/gems/yard-0.7.4/benchmarks/template_format.rb +6 -0
  29. data/vendor/bundle/gems/yard-0.7.4/benchmarks/template_profile.rb +17 -0
  30. data/vendor/bundle/gems/yard-0.7.4/benchmarks/yri_cache.rb +19 -0
  31. data/vendor/bundle/gems/yard-0.7.4/bin/yard +4 -0
  32. data/vendor/bundle/gems/yard-0.7.4/bin/yard-graph +4 -0
  33. data/vendor/bundle/gems/yard-0.7.4/bin/yard-server +4 -0
  34. data/vendor/bundle/gems/yard-0.7.4/bin/yardoc +4 -0
  35. data/vendor/bundle/gems/yard-0.7.4/bin/yri +4 -0
  36. data/vendor/bundle/gems/yard-0.7.4/docs/CodeObjects.md +115 -0
  37. data/vendor/bundle/gems/yard-0.7.4/docs/GettingStarted.md +590 -0
  38. data/vendor/bundle/gems/yard-0.7.4/docs/Glossary.md +12 -0
  39. data/vendor/bundle/gems/yard-0.7.4/docs/Handlers.md +152 -0
  40. data/vendor/bundle/gems/yard-0.7.4/docs/Overview.md +61 -0
  41. data/vendor/bundle/gems/yard-0.7.4/docs/Parser.md +191 -0
  42. data/vendor/bundle/gems/yard-0.7.4/docs/Tags.md +586 -0
  43. data/vendor/bundle/gems/yard-0.7.4/docs/Templates.md +518 -0
  44. data/vendor/bundle/gems/yard-0.7.4/docs/WhatsNew.md +887 -0
  45. data/vendor/bundle/gems/yard-0.7.4/docs/images/code-objects-class-diagram.png +0 -0
  46. data/vendor/bundle/gems/yard-0.7.4/docs/images/handlers-class-diagram.png +0 -0
  47. data/vendor/bundle/gems/yard-0.7.4/docs/images/overview-class-diagram.png +0 -0
  48. data/vendor/bundle/gems/yard-0.7.4/docs/images/parser-class-diagram.png +0 -0
  49. data/vendor/bundle/gems/yard-0.7.4/docs/images/tags-class-diagram.png +0 -0
  50. data/vendor/bundle/gems/yard-0.7.4/lib/rubygems_plugin.rb +4 -0
  51. data/vendor/bundle/gems/yard-0.7.4/lib/yard.rb +57 -0
  52. data/vendor/bundle/gems/yard-0.7.4/lib/yard/autoload.rb +233 -0
  53. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/command.rb +73 -0
  54. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/command_parser.rb +89 -0
  55. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/config.rb +136 -0
  56. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/diff.rb +201 -0
  57. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/gems.rb +83 -0
  58. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/graph.rb +103 -0
  59. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/help.rb +18 -0
  60. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/list.rb +22 -0
  61. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/server.rb +160 -0
  62. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/stats.rb +210 -0
  63. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/yardoc.rb +696 -0
  64. data/vendor/bundle/gems/yard-0.7.4/lib/yard/cli/yri.rb +193 -0
  65. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/base.rb +513 -0
  66. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/class_object.rb +143 -0
  67. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/class_variable_object.rb +8 -0
  68. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/constant_object.rb +13 -0
  69. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/extended_method_object.rb +23 -0
  70. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/extra_file_object.rb +89 -0
  71. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/macro_object.rb +215 -0
  72. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/method_object.rb +153 -0
  73. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/module_object.rb +18 -0
  74. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/namespace_object.rb +200 -0
  75. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/proxy.rb +252 -0
  76. data/vendor/bundle/gems/yard-0.7.4/lib/yard/code_objects/root_object.rb +16 -0
  77. data/vendor/bundle/gems/yard-0.7.4/lib/yard/config.rb +259 -0
  78. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/array.rb +15 -0
  79. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/file.rb +65 -0
  80. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/hash.rb +15 -0
  81. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/insertion.rb +60 -0
  82. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/module.rb +19 -0
  83. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/string.rb +67 -0
  84. data/vendor/bundle/gems/yard-0.7.4/lib/yard/core_ext/symbol_hash.rb +73 -0
  85. data/vendor/bundle/gems/yard-0.7.4/lib/yard/docstring.rb +331 -0
  86. data/vendor/bundle/gems/yard-0.7.4/lib/yard/globals.rb +18 -0
  87. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/base.rb +569 -0
  88. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/processor.rb +187 -0
  89. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/alias_handler.rb +43 -0
  90. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/attribute_handler.rb +83 -0
  91. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/base.rb +160 -0
  92. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/class_condition_handler.rb +84 -0
  93. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/class_handler.rb +122 -0
  94. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/class_variable_handler.rb +16 -0
  95. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/constant_handler.rb +45 -0
  96. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/exception_handler.rb +26 -0
  97. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/extend_handler.rb +21 -0
  98. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/alias_handler.rb +37 -0
  99. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/attribute_handler.rb +61 -0
  100. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/base.rb +228 -0
  101. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +81 -0
  102. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/class_handler.rb +110 -0
  103. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +14 -0
  104. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/constant_handler.rb +28 -0
  105. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/exception_handler.rb +12 -0
  106. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/extend_handler.rb +20 -0
  107. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/macro_handler.rb +39 -0
  108. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/method_handler.rb +78 -0
  109. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/mixin_handler.rb +41 -0
  110. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/module_handler.rb +11 -0
  111. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +21 -0
  112. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/visibility_handler.rb +16 -0
  113. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/legacy/yield_handler.rb +28 -0
  114. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/macro_handler.rb +40 -0
  115. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/macro_handler_methods.rb +130 -0
  116. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/method_condition_handler.rb +8 -0
  117. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/method_handler.rb +94 -0
  118. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/mixin_handler.rb +36 -0
  119. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/module_handler.rb +11 -0
  120. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/private_constant_handler.rb +36 -0
  121. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/struct_handler_methods.rb +140 -0
  122. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/visibility_handler.rb +24 -0
  123. data/vendor/bundle/gems/yard-0.7.4/lib/yard/handlers/ruby/yield_handler.rb +30 -0
  124. data/vendor/bundle/gems/yard-0.7.4/lib/yard/logging.rb +77 -0
  125. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/base.rb +56 -0
  126. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/c_parser.rb +501 -0
  127. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/ast_node.rb +399 -0
  128. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/ruby_lex.rb +1376 -0
  129. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/ruby_parser.rb +30 -0
  130. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/statement.rb +60 -0
  131. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/statement_list.rb +390 -0
  132. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/legacy/token_list.rb +66 -0
  133. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/ruby/ruby_parser.rb +542 -0
  134. data/vendor/bundle/gems/yard-0.7.4/lib/yard/parser/source_parser.rb +517 -0
  135. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rake/yardoc_task.rb +75 -0
  136. data/vendor/bundle/gems/yard-0.7.4/lib/yard/registry.rb +400 -0
  137. data/vendor/bundle/gems/yard-0.7.4/lib/yard/registry_store.rb +252 -0
  138. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports.rb +8 -0
  139. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/LICENSE.txt +57 -0
  140. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/MIT.txt +20 -0
  141. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/gem.rb +8 -0
  142. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/backports/source_index.rb +353 -0
  143. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/doc_manager.rb +75 -0
  144. data/vendor/bundle/gems/yard-0.7.4/lib/yard/rubygems/specification.rb +41 -0
  145. data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/base.rb +80 -0
  146. data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/file_system_serializer.rb +92 -0
  147. data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/process_serializer.rb +24 -0
  148. data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/stdout_serializer.rb +32 -0
  149. data/vendor/bundle/gems/yard-0.7.4/lib/yard/serializers/yardoc_serializer.rb +122 -0
  150. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server.rb +11 -0
  151. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/adapter.rb +100 -0
  152. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/base.rb +192 -0
  153. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/display_file_command.rb +24 -0
  154. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/display_object_command.rb +51 -0
  155. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/frames_command.rb +32 -0
  156. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/library_command.rb +100 -0
  157. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/library_index_command.rb +24 -0
  158. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/list_command.rb +48 -0
  159. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/search_command.rb +72 -0
  160. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/commands/static_file_command.rb +50 -0
  161. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/doc_server_helper.rb +40 -0
  162. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/doc_server_serializer.rb +31 -0
  163. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/library_version.rb +227 -0
  164. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/rack_adapter.rb +83 -0
  165. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/router.rb +180 -0
  166. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/static_caching.rb +45 -0
  167. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/css/custom.css +78 -0
  168. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
  169. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +12 -0
  170. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/fulldoc/html/js/live.js +32 -0
  171. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/layout/html/breadcrumb.erb +46 -0
  172. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/layout/html/headers.erb +16 -0
  173. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/default/layout/html/setup.rb +7 -0
  174. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/frames/html/frames.erb +13 -0
  175. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/frames/html/setup.rb +3 -0
  176. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/full_list/html/full_list.erb +34 -0
  177. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/full_list/html/setup.rb +20 -0
  178. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/contents.erb +13 -0
  179. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/headers.erb +26 -0
  180. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +12 -0
  181. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/setup.rb +3 -0
  182. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/library_list/html/title.erb +2 -0
  183. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/processing/html/processing.erb +51 -0
  184. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/processing/html/setup.rb +3 -0
  185. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/search/html/search.erb +19 -0
  186. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/templates/doc_server/search/html/setup.rb +8 -0
  187. data/vendor/bundle/gems/yard-0.7.4/lib/yard/server/webrick_adapter.rb +42 -0
  188. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/default_factory.rb +141 -0
  189. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/default_tag.rb +12 -0
  190. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/library.rb +201 -0
  191. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/option_tag.rb +12 -0
  192. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/overload_tag.rb +65 -0
  193. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/ref_tag.rb +7 -0
  194. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/ref_tag_list.rb +27 -0
  195. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/tag.rb +57 -0
  196. data/vendor/bundle/gems/yard-0.7.4/lib/yard/tags/tag_format_error.rb +6 -0
  197. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/engine.rb +173 -0
  198. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/erb_cache.rb +22 -0
  199. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/base_helper.rb +206 -0
  200. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/filter_helper.rb +26 -0
  201. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/html_helper.rb +520 -0
  202. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +59 -0
  203. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/markup/rdoc_markup.rb +85 -0
  204. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/markup_helper.rb +164 -0
  205. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/method_helper.rb +72 -0
  206. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/module_helper.rb +19 -0
  207. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/text_helper.rb +95 -0
  208. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/helpers/uml_helper.rb +46 -0
  209. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/section.rb +106 -0
  210. data/vendor/bundle/gems/yard-0.7.4/lib/yard/templates/template.rb +366 -0
  211. data/vendor/bundle/gems/yard-0.7.4/lib/yard/verifier.rb +148 -0
  212. data/vendor/bundle/gems/yard-0.7.4/spec/cli/command_parser_spec.rb +43 -0
  213. data/vendor/bundle/gems/yard-0.7.4/spec/cli/command_spec.rb +36 -0
  214. data/vendor/bundle/gems/yard-0.7.4/spec/cli/config_spec.rb +92 -0
  215. data/vendor/bundle/gems/yard-0.7.4/spec/cli/diff_spec.rb +172 -0
  216. data/vendor/bundle/gems/yard-0.7.4/spec/cli/gems_spec.rb +81 -0
  217. data/vendor/bundle/gems/yard-0.7.4/spec/cli/help_spec.rb +22 -0
  218. data/vendor/bundle/gems/yard-0.7.4/spec/cli/list_spec.rb +8 -0
  219. data/vendor/bundle/gems/yard-0.7.4/spec/cli/server_spec.rb +171 -0
  220. data/vendor/bundle/gems/yard-0.7.4/spec/cli/stats_spec.rb +90 -0
  221. data/vendor/bundle/gems/yard-0.7.4/spec/cli/yardoc_spec.rb +628 -0
  222. data/vendor/bundle/gems/yard-0.7.4/spec/cli/yri_spec.rb +87 -0
  223. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/base_spec.rb +334 -0
  224. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/class_object_spec.rb +225 -0
  225. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/code_object_list_spec.rb +33 -0
  226. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/constants_spec.rb +81 -0
  227. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/extra_file_object_spec.rb +132 -0
  228. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/macro_object_spec.rb +154 -0
  229. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/method_object_spec.rb +152 -0
  230. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/module_object_spec.rb +141 -0
  231. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/namespace_object_spec.rb +170 -0
  232. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/proxy_spec.rb +124 -0
  233. data/vendor/bundle/gems/yard-0.7.4/spec/code_objects/spec_helper.rb +3 -0
  234. data/vendor/bundle/gems/yard-0.7.4/spec/config_spec.rb +167 -0
  235. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/array_spec.rb +14 -0
  236. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/file_spec.rb +68 -0
  237. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/hash_spec.rb +14 -0
  238. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/insertion_spec.rb +37 -0
  239. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/module_spec.rb +15 -0
  240. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/string_spec.rb +42 -0
  241. data/vendor/bundle/gems/yard-0.7.4/spec/core_ext/symbol_hash_spec.rb +86 -0
  242. data/vendor/bundle/gems/yard-0.7.4/spec/docstring_spec.rb +400 -0
  243. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/alias_handler_spec.rb +80 -0
  244. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/attribute_handler_spec.rb +94 -0
  245. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/base_spec.rb +197 -0
  246. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/class_condition_handler_spec.rb +62 -0
  247. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/class_handler_spec.rb +246 -0
  248. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/class_variable_handler_spec.rb +11 -0
  249. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/constant_handler_spec.rb +64 -0
  250. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/alias_handler_001.rb.txt +44 -0
  251. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/attribute_handler_001.rb.txt +32 -0
  252. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/class_condition_handler_001.rb.txt +61 -0
  253. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/class_handler_001.rb.txt +120 -0
  254. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/class_variable_handler_001.rb.txt +10 -0
  255. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/constant_handler_001.rb.txt +25 -0
  256. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/exception_handler_001.rb.txt +59 -0
  257. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/extend_handler_001.rb.txt +16 -0
  258. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/macro_handler_001.rb.txt +83 -0
  259. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/method_condition_handler_001.rb.txt +10 -0
  260. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/method_handler_001.rb.txt +122 -0
  261. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/mixin_handler_001.rb.txt +33 -0
  262. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/module_handler_001.rb.txt +29 -0
  263. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/private_constant_handler_001.rb.txt +8 -0
  264. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/process_handler_001.rb.txt +11 -0
  265. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/visibility_handler_001.rb.txt +27 -0
  266. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/examples/yield_handler_001.rb.txt +55 -0
  267. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/exception_handler_spec.rb +48 -0
  268. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/extend_handler_spec.rb +23 -0
  269. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/legacy_base_spec.rb +128 -0
  270. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/macro_handler_spec.rb +157 -0
  271. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/method_condition_handler_spec.rb +14 -0
  272. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/method_handler_spec.rb +177 -0
  273. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/mixin_handler_spec.rb +50 -0
  274. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/module_handler_spec.rb +34 -0
  275. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/private_constant_handler_spec.rb +24 -0
  276. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/processor_spec.rb +23 -0
  277. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/ruby/base_spec.rb +90 -0
  278. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/ruby/legacy/base_spec.rb +78 -0
  279. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/spec_helper.rb +34 -0
  280. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/visibility_handler_spec.rb +34 -0
  281. data/vendor/bundle/gems/yard-0.7.4/spec/handlers/yield_handler_spec.rb +51 -0
  282. data/vendor/bundle/gems/yard-0.7.4/spec/logging_spec.rb +14 -0
  283. data/vendor/bundle/gems/yard-0.7.4/spec/parser/base_spec.rb +24 -0
  284. data/vendor/bundle/gems/yard-0.7.4/spec/parser/c_parser_spec.rb +231 -0
  285. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/array.c.txt +3887 -0
  286. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/example1.rb.txt +8 -0
  287. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/extrafile.c.txt +8 -0
  288. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/multifile.c.txt +6 -0
  289. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/override.c.txt +424 -0
  290. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/parse_in_order_001.rb.txt +2 -0
  291. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/parse_in_order_002.rb.txt +2 -0
  292. data/vendor/bundle/gems/yard-0.7.4/spec/parser/examples/tag_handler_001.rb.txt +8 -0
  293. data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/ast_node_spec.rb +33 -0
  294. data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/legacy/statement_list_spec.rb +299 -0
  295. data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/legacy/token_list_spec.rb +69 -0
  296. data/vendor/bundle/gems/yard-0.7.4/spec/parser/ruby/ruby_parser_spec.rb +257 -0
  297. data/vendor/bundle/gems/yard-0.7.4/spec/parser/source_parser_spec.rb +595 -0
  298. data/vendor/bundle/gems/yard-0.7.4/spec/parser/tag_parsing_spec.rb +18 -0
  299. data/vendor/bundle/gems/yard-0.7.4/spec/rake/yardoc_task_spec.rb +90 -0
  300. data/vendor/bundle/gems/yard-0.7.4/spec/registry_spec.rb +303 -0
  301. data/vendor/bundle/gems/yard-0.7.4/spec/registry_store_spec.rb +255 -0
  302. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/checksums +1 -0
  303. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/Foo.dat +0 -0
  304. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/Foo/bar_i.dat +0 -0
  305. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/Foo/baz_i.dat +0 -0
  306. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/objects/root.dat +0 -0
  307. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/data/serialized_yardoc/proxy_types +2 -0
  308. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/file_system_serializer_spec.rb +124 -0
  309. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/spec_helper.rb +2 -0
  310. data/vendor/bundle/gems/yard-0.7.4/spec/serializers/yardoc_serializer_spec.rb +46 -0
  311. data/vendor/bundle/gems/yard-0.7.4/spec/server/adapter_spec.rb +38 -0
  312. data/vendor/bundle/gems/yard-0.7.4/spec/server/commands/base_spec.rb +87 -0
  313. data/vendor/bundle/gems/yard-0.7.4/spec/server/commands/library_command_spec.rb +39 -0
  314. data/vendor/bundle/gems/yard-0.7.4/spec/server/commands/static_file_command_spec.rb +84 -0
  315. data/vendor/bundle/gems/yard-0.7.4/spec/server/doc_server_serializer_spec.rb +58 -0
  316. data/vendor/bundle/gems/yard-0.7.4/spec/server/rack_adapter_spec.rb +18 -0
  317. data/vendor/bundle/gems/yard-0.7.4/spec/server/router_spec.rb +115 -0
  318. data/vendor/bundle/gems/yard-0.7.4/spec/server/spec_helper.rb +17 -0
  319. data/vendor/bundle/gems/yard-0.7.4/spec/server/static_caching_spec.rb +39 -0
  320. data/vendor/bundle/gems/yard-0.7.4/spec/server/webrick_servlet_spec.rb +20 -0
  321. data/vendor/bundle/gems/yard-0.7.4/spec/server_spec.rb +10 -0
  322. data/vendor/bundle/gems/yard-0.7.4/spec/spec_helper.rb +105 -0
  323. data/vendor/bundle/gems/yard-0.7.4/spec/tags/default_factory_spec.rb +138 -0
  324. data/vendor/bundle/gems/yard-0.7.4/spec/tags/default_tag_spec.rb +11 -0
  325. data/vendor/bundle/gems/yard-0.7.4/spec/tags/library_spec.rb +23 -0
  326. data/vendor/bundle/gems/yard-0.7.4/spec/tags/overload_tag_spec.rb +53 -0
  327. data/vendor/bundle/gems/yard-0.7.4/spec/tags/ref_tag_list_spec.rb +53 -0
  328. data/vendor/bundle/gems/yard-0.7.4/spec/templates/class_spec.rb +43 -0
  329. data/vendor/bundle/gems/yard-0.7.4/spec/templates/constant_spec.rb +40 -0
  330. data/vendor/bundle/gems/yard-0.7.4/spec/templates/engine_spec.rb +129 -0
  331. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/class001.html +280 -0
  332. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/class001.txt +36 -0
  333. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/class002.html +35 -0
  334. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/constant001.txt +25 -0
  335. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/constant002.txt +7 -0
  336. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/constant003.txt +11 -0
  337. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method001.html +130 -0
  338. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method001.txt +35 -0
  339. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method002.html +86 -0
  340. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method002.txt +20 -0
  341. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method003.html +159 -0
  342. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method003.txt +45 -0
  343. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method004.html +44 -0
  344. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method004.txt +10 -0
  345. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method005.html +99 -0
  346. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/method005.txt +33 -0
  347. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module001.dot +33 -0
  348. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module001.html +795 -0
  349. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module001.txt +33 -0
  350. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/module002.html +319 -0
  351. data/vendor/bundle/gems/yard-0.7.4/spec/templates/examples/tag001.txt +82 -0
  352. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/base_helper_spec.rb +175 -0
  353. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/html_helper_spec.rb +541 -0
  354. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/html_syntax_highlight_helper_spec.rb +48 -0
  355. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/markup/rdoc_markup_spec.rb +84 -0
  356. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/markup_helper_spec.rb +132 -0
  357. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/method_helper_spec.rb +75 -0
  358. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/shared_signature_examples.rb +121 -0
  359. data/vendor/bundle/gems/yard-0.7.4/spec/templates/helpers/text_helper_spec.rb +44 -0
  360. data/vendor/bundle/gems/yard-0.7.4/spec/templates/method_spec.rb +102 -0
  361. data/vendor/bundle/gems/yard-0.7.4/spec/templates/module_spec.rb +109 -0
  362. data/vendor/bundle/gems/yard-0.7.4/spec/templates/onefile_spec.rb +47 -0
  363. data/vendor/bundle/gems/yard-0.7.4/spec/templates/section_spec.rb +146 -0
  364. data/vendor/bundle/gems/yard-0.7.4/spec/templates/spec_helper.rb +42 -0
  365. data/vendor/bundle/gems/yard-0.7.4/spec/templates/tag_spec.rb +39 -0
  366. data/vendor/bundle/gems/yard-0.7.4/spec/templates/template_spec.rb +401 -0
  367. data/vendor/bundle/gems/yard-0.7.4/spec/verifier_spec.rb +86 -0
  368. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/dot/setup.rb +6 -0
  369. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/dot/superklass.erb +3 -0
  370. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/html/constructor_details.erb +8 -0
  371. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/html/setup.rb +1 -0
  372. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/html/subclasses.erb +4 -0
  373. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/setup.rb +36 -0
  374. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/text/setup.rb +11 -0
  375. data/vendor/bundle/gems/yard-0.7.4/templates/default/class/text/subclasses.erb +5 -0
  376. data/vendor/bundle/gems/yard-0.7.4/templates/default/constant/text/header.erb +11 -0
  377. data/vendor/bundle/gems/yard-0.7.4/templates/default/constant/text/setup.rb +3 -0
  378. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/abstract.erb +4 -0
  379. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/deprecated.erb +1 -0
  380. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/index.erb +5 -0
  381. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/note.erb +6 -0
  382. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/private.erb +4 -0
  383. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/returns_void.erb +1 -0
  384. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/text.erb +1 -0
  385. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/html/todo.erb +6 -0
  386. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/setup.rb +49 -0
  387. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/abstract.erb +2 -0
  388. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/deprecated.erb +2 -0
  389. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/index.erb +2 -0
  390. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/note.erb +4 -0
  391. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/private.erb +2 -0
  392. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/returns_void.erb +1 -0
  393. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/text.erb +1 -0
  394. data/vendor/bundle/gems/yard-0.7.4/templates/default/docstring/text/todo.erb +4 -0
  395. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/css/common.css +1 -0
  396. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/css/full_list.css +55 -0
  397. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/css/style.css +322 -0
  398. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/frames.erb +13 -0
  399. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list.erb +37 -0
  400. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list_class.erb +2 -0
  401. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list_files.erb +5 -0
  402. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/full_list_methods.erb +12 -0
  403. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/js/app.js +205 -0
  404. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/js/full_list.js +167 -0
  405. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/js/jquery.js +16 -0
  406. data/vendor/bundle/gems/yard-0.7.4/templates/default/fulldoc/html/setup.rb +198 -0
  407. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/dot/header.erb +6 -0
  408. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/dot/setup.rb +14 -0
  409. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/breadcrumb.erb +13 -0
  410. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/files.erb +11 -0
  411. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/footer.erb +5 -0
  412. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/headers.erb +17 -0
  413. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/index.erb +2 -0
  414. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/layout.erb +24 -0
  415. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/listing.erb +4 -0
  416. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/objects.erb +32 -0
  417. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/search.erb +5 -0
  418. data/vendor/bundle/gems/yard-0.7.4/templates/default/layout/html/setup.rb +71 -0
  419. data/vendor/bundle/gems/yard-0.7.4/templates/default/method/html/header.erb +16 -0
  420. data/vendor/bundle/gems/yard-0.7.4/templates/default/method/setup.rb +3 -0
  421. data/vendor/bundle/gems/yard-0.7.4/templates/default/method/text/header.erb +1 -0
  422. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/html/header.erb +3 -0
  423. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/html/method_signature.erb +18 -0
  424. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/html/source.erb +10 -0
  425. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/setup.rb +9 -0
  426. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/text/header.erb +10 -0
  427. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/text/method_signature.erb +12 -0
  428. data/vendor/bundle/gems/yard-0.7.4/templates/default/method_details/text/setup.rb +10 -0
  429. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/child.erb +1 -0
  430. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/dependencies.erb +3 -0
  431. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/header.erb +6 -0
  432. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/info.erb +14 -0
  433. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/dot/setup.rb +14 -0
  434. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/attribute_details.erb +11 -0
  435. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/attribute_summary.erb +8 -0
  436. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/box_info.erb +37 -0
  437. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/children.erb +8 -0
  438. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/constant_summary.erb +13 -0
  439. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/defines.erb +3 -0
  440. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/header.erb +5 -0
  441. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/inherited_attributes.erb +17 -0
  442. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/inherited_constants.erb +8 -0
  443. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/inherited_methods.erb +18 -0
  444. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/item_summary.erb +30 -0
  445. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/method_details_list.erb +9 -0
  446. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/method_summary.erb +14 -0
  447. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/methodmissing.erb +12 -0
  448. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/html/pre_docstring.erb +1 -0
  449. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/setup.rb +129 -0
  450. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/children.erb +10 -0
  451. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/class_meths_list.erb +8 -0
  452. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/extends.erb +8 -0
  453. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/header.erb +7 -0
  454. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/includes.erb +8 -0
  455. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/instance_meths_list.erb +8 -0
  456. data/vendor/bundle/gems/yard-0.7.4/templates/default/module/text/setup.rb +12 -0
  457. data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/files.erb +5 -0
  458. data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/layout.erb +22 -0
  459. data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/readme.erb +3 -0
  460. data/vendor/bundle/gems/yard-0.7.4/templates/default/onefile/html/setup.rb +43 -0
  461. data/vendor/bundle/gems/yard-0.7.4/templates/default/root/dot/child.erb +3 -0
  462. data/vendor/bundle/gems/yard-0.7.4/templates/default/root/dot/setup.rb +5 -0
  463. data/vendor/bundle/gems/yard-0.7.4/templates/default/root/html/setup.rb +1 -0
  464. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/example.erb +9 -0
  465. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/index.erb +3 -0
  466. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/option.erb +22 -0
  467. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/overload.erb +14 -0
  468. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/see.erb +8 -0
  469. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/html/tag.erb +20 -0
  470. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/setup.rb +50 -0
  471. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/example.erb +12 -0
  472. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/index.erb +1 -0
  473. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/option.erb +20 -0
  474. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/overload.erb +19 -0
  475. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/see.erb +11 -0
  476. data/vendor/bundle/gems/yard-0.7.4/templates/default/tags/text/tag.erb +13 -0
  477. data/vendor/bundle/gems/yard-0.7.4/templates/guide/class/html/setup.rb +1 -0
  478. data/vendor/bundle/gems/yard-0.7.4/templates/guide/docstring/html/setup.rb +1 -0
  479. data/vendor/bundle/gems/yard-0.7.4/templates/guide/fulldoc/html/css/style.css +93 -0
  480. data/vendor/bundle/gems/yard-0.7.4/templates/guide/fulldoc/html/js/app.js +33 -0
  481. data/vendor/bundle/gems/yard-0.7.4/templates/guide/fulldoc/html/setup.rb +54 -0
  482. data/vendor/bundle/gems/yard-0.7.4/templates/guide/layout/html/layout.erb +81 -0
  483. data/vendor/bundle/gems/yard-0.7.4/templates/guide/layout/html/setup.rb +24 -0
  484. data/vendor/bundle/gems/yard-0.7.4/templates/guide/method/html/header.erb +18 -0
  485. data/vendor/bundle/gems/yard-0.7.4/templates/guide/method/html/setup.rb +21 -0
  486. data/vendor/bundle/gems/yard-0.7.4/templates/guide/module/html/header.erb +7 -0
  487. data/vendor/bundle/gems/yard-0.7.4/templates/guide/module/html/method_list.erb +5 -0
  488. data/vendor/bundle/gems/yard-0.7.4/templates/guide/module/html/setup.rb +26 -0
  489. data/vendor/bundle/gems/yard-0.7.4/templates/guide/tags/html/setup.rb +8 -0
  490. data/vendor/bundle/specifications/yard-0.7.4.gemspec +28 -0
  491. metadata +505 -8
@@ -0,0 +1,18 @@
1
+ module YARD
2
+ module CLI
3
+ # Handles help for commands
4
+ # @since 0.6.0
5
+ class Help < Command
6
+ def description; "Retrieves help for a command" end
7
+
8
+ def run(*args)
9
+ if args.first && cmd = CommandParser.commands[args.first.to_sym]
10
+ cmd.run('--help')
11
+ else
12
+ puts "Command #{args.first} not found." if args.first
13
+ CommandParser.run('--help')
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,22 @@
1
+ module YARD
2
+ module CLI
3
+ # Lists all constant and method names in the codebase. Uses {Yardoc} --list.
4
+ class List < Command
5
+ def description; 'Lists all constant and methods. Uses `yard doc --list`' end
6
+
7
+ # Runs the commandline utility, parsing arguments and displaying a
8
+ # list of objects
9
+ #
10
+ # @param [Array<String>] args the list of arguments.
11
+ # @return [void]
12
+ def run(*args)
13
+ if args.include?('--help')
14
+ puts "Usage: yard list [yardoc_options]"
15
+ puts "Takes the same arguments as yardoc. See yardoc --help"
16
+ else
17
+ Yardoc.run('--list', *args)
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,160 @@
1
+ module YARD
2
+ module CLI
3
+ # A local documentation server
4
+ # @since 0.6.0
5
+ class Server < Command
6
+ # @return [Hash] a list of options to pass to the doc server
7
+ attr_accessor :options
8
+
9
+ # @return [Hash] a list of options to pass to the web server
10
+ attr_accessor :server_options
11
+
12
+ # @return [Hash] a list of library names and yardoc files to serve
13
+ attr_accessor :libraries
14
+
15
+ # @return [Adapter] the adapter to use for loading the web server
16
+ attr_accessor :adapter
17
+
18
+ # @return [Array<String>] a list of scripts to load
19
+ # @since 0.6.2
20
+ attr_accessor :scripts
21
+
22
+ # @return [Array<String>] a list of template paths to register
23
+ # @since 0.6.2
24
+ attr_accessor :template_paths
25
+
26
+ def description
27
+ "Runs a local documentation server"
28
+ end
29
+
30
+ def run(*args)
31
+ self.scripts = []
32
+ self.template_paths = []
33
+ self.libraries = {}
34
+ self.options = SymbolHash.new(false).update(
35
+ :single_library => true,
36
+ :caching => false
37
+ )
38
+ self.server_options = {:Port => 8808}
39
+ optparse(*args)
40
+
41
+ select_adapter.setup
42
+ load_scripts
43
+ load_template_paths
44
+ adapter.new(libraries, options, server_options).start
45
+ end
46
+
47
+ private
48
+
49
+ def load_scripts
50
+ scripts.each {|file| load_script(file) }
51
+ end
52
+
53
+ def load_template_paths
54
+ return if YARD::Config.options[:safe_mode]
55
+ Templates::Engine.template_paths |= template_paths
56
+ end
57
+
58
+ def select_adapter
59
+ return adapter if adapter
60
+ require 'rubygems'
61
+ require 'rack'
62
+ self.adapter = YARD::Server::RackAdapter
63
+ rescue LoadError
64
+ self.adapter = YARD::Server::WebrickAdapter
65
+ end
66
+
67
+ def add_libraries(args)
68
+ (0...args.size).step(2) do |index|
69
+ library, yardoc = args[index], args[index + 1]
70
+ yardoc ||= '.yardoc'
71
+ yardoc = File.expand_path(yardoc)
72
+ if File.exist?(yardoc)
73
+ libraries[library] ||= []
74
+ libraries[library] << YARD::Server::LibraryVersion.new(library, nil, yardoc)
75
+ else
76
+ log.warn "Cannot find yardoc db for #{library}: #{yardoc}"
77
+ end
78
+ end
79
+ end
80
+
81
+ def add_gems
82
+ require 'rubygems'
83
+ Gem.source_index.find_name('').each do |spec|
84
+ libraries[spec.name] ||= []
85
+ libraries[spec.name] << YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem)
86
+ end
87
+ end
88
+
89
+ def optparse(*args)
90
+ opts = OptionParser.new
91
+ opts.banner = 'Usage: yard server [options] [[library yardoc_file] ...]'
92
+ opts.separator ''
93
+ opts.separator 'Example: yard server -m yard .yardoc ruby-core ../ruby/.yardoc'
94
+ opts.separator 'The above example serves documentation for YARD and Ruby-core'
95
+ opts.separator ''
96
+ opts.separator 'If no library/yardoc_file is specified, the server uses'
97
+ opts.separator 'the name of the current directory and `.yardoc` respectively'
98
+ opts.separator ''
99
+ opts.separator "General Options:"
100
+ opts.on('-m', '--multi-library', 'Serves documentation for multiple libraries') do
101
+ options[:single_library] = false
102
+ end
103
+ opts.on('-c', '--cache', 'Caches all documentation to document root (see --docroot)') do
104
+ options[:caching] = true
105
+ end
106
+ opts.on('-r', '--reload', 'Reparses the library code on each request') do
107
+ options[:incremental] = true
108
+ end
109
+ opts.on('-g', '--gems', 'Serves documentation for installed gems') do
110
+ add_gems
111
+ end
112
+ opts.on('-t', '--template-path PATH',
113
+ 'The template path to look for templates in. (used with -t).') do |path|
114
+ self.template_paths << path
115
+ end
116
+ opts.separator ''
117
+ opts.separator "Web Server Options:"
118
+ opts.on('-d', '--daemon', 'Daemonizes the server process') do
119
+ server_options[:daemonize] = true
120
+ end
121
+ opts.on('-p PORT', '--port', 'Serves documentation on PORT') do |port|
122
+ server_options[:Port] = port.to_i
123
+ end
124
+ opts.on('--docroot DOCROOT', 'Uses DOCROOT as document root') do |docroot|
125
+ server_options[:DocumentRoot] = File.expand_path(docroot)
126
+ end
127
+ opts.on('-a', '--adapter ADAPTER', 'Use the ADAPTER (full Ruby class) for web server') do |adapter|
128
+ if adapter.downcase == 'webrick'
129
+ self.adapter = YARD::Server::WebrickAdapter
130
+ elsif adapter.downcase == 'rack'
131
+ self.adapter = YARD::Server::RackAdapter
132
+ else
133
+ self.adapter = eval(adapter)
134
+ end
135
+ end
136
+ opts.on('-s', '--server TYPE', 'Use a specific server type eg. thin,mongrel,cgi (Rack specific)') do |type|
137
+ server_options[:server] = type
138
+ end
139
+ common_options(opts)
140
+ opts.on('-e', '--load FILE', 'A Ruby script to load before the source tree is parsed.') do |file|
141
+ self.scripts << file
142
+ end
143
+ parse_options(opts, args)
144
+
145
+ if args.empty? && libraries.empty?
146
+ if !File.exist? File.expand_path('.yardoc')
147
+ log.enter_level(Logger::INFO) do
148
+ log.info "No .yardoc file found in current directory, parsing source before starting server..."
149
+ end
150
+ Yardoc.run('-n')
151
+ end
152
+ add_libraries([File.basename(Dir.pwd), File.expand_path('.yardoc')])
153
+ else
154
+ add_libraries(args)
155
+ options[:single_library] = false if libraries.size > 1
156
+ end
157
+ end
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,210 @@
1
+ module YARD
2
+ module CLI
3
+ # @since 0.6.0
4
+ class Stats < Yardoc
5
+ include Templates::Helpers::BaseHelper
6
+
7
+ # Maintains the order in which +stats_for_+ statistics methods should be
8
+ # printed.
9
+ #
10
+ # @see #print_statistics
11
+ STATS_ORDER = [:files, :modules, :classes, :constants, :methods]
12
+
13
+ # @return [Boolean] whether to parse and load registry
14
+ attr_accessor :parse
15
+
16
+ # @param [Boolean] parse whether to parse and load registry (see {#parse})
17
+ def initialize(parse = true)
18
+ super()
19
+ @parse = parse
20
+ @undoc_list = nil
21
+ @compact = false
22
+ end
23
+
24
+ def description
25
+ "Prints documentation statistics on a set of files"
26
+ end
27
+
28
+ # Runs the commandline utility, parsing arguments and generating
29
+ # output if set.
30
+ #
31
+ # @param [Array<String>] args the list of arguments
32
+ # @return [void]
33
+ def run(*args)
34
+ parse_arguments(*args)
35
+
36
+ if parse
37
+ if use_cache
38
+ Registry.load!
39
+ checksums = Registry.checksums.dup
40
+ end
41
+ YARD.parse(files, excluded)
42
+ Registry.save(use_cache) if save_yardoc
43
+ end
44
+
45
+ print_statistics
46
+ print_undocumented_objects
47
+ end
48
+
49
+ # Prints statistics for different object types
50
+ #
51
+ # To add statistics for a specific type, add a method +#stats_for_TYPE+
52
+ # to this class that calls {#output}.
53
+ def print_statistics
54
+ @total, @undocumented = 0, 0
55
+ meths = methods.map {|m| m.to_s }.grep(/^stats_for_/)
56
+ STATS_ORDER.each do |meth|
57
+ mname = "stats_for_#{meth}"
58
+ if meths.include?(mname)
59
+ send(mname)
60
+ meths.delete(mname)
61
+ end
62
+ end
63
+ meths.each {|m| send(m) }
64
+ total = (@total - @undocumented).to_f / @total.to_f * 100
65
+ puts("% 3.2f%% documented" % total)
66
+ end
67
+
68
+ # Prints list of undocumented objects
69
+ def print_undocumented_objects
70
+ return if !@undoc_list || @undoc_list.empty?
71
+ puts
72
+ puts "Undocumented Objects:"
73
+
74
+ objects = @undoc_list.sort_by {|o| o.file }
75
+ max = objects.sort_by {|o| o.path.length }.last.path.length
76
+ if @compact
77
+ objects.each do |object|
78
+ puts("%-#{max}s (%s)" % [object.path, object.file])
79
+ end
80
+ else
81
+ last_file = nil
82
+ objects.each do |object|
83
+ if object.file != last_file
84
+ puts
85
+ puts "(in file: #{object.file})"
86
+ end
87
+ puts object.path
88
+ last_file = object.file
89
+ end
90
+ end
91
+ end
92
+
93
+ # @return [Array<CodeObjects::Base>] all the parsed objects in the registry,
94
+ # removing any objects that are not visible (private, protected) depending
95
+ # on the arguments passed to the command.
96
+ def all_objects
97
+ @all_objects ||= run_verifier Registry.all
98
+ end
99
+
100
+ # Statistics for files
101
+ def stats_for_files
102
+ files = []
103
+ all_objects.each {|o| files |= [o.file] }
104
+ output "Files", files.size
105
+ end
106
+
107
+ # Statistics for modules
108
+ def stats_for_modules
109
+ output "Modules", *type_statistics(:module)
110
+ end
111
+
112
+ # Statistics for classes
113
+ def stats_for_classes
114
+ output "Classes", *type_statistics(:class)
115
+ end
116
+
117
+ # Statistics for constants
118
+ def stats_for_constants
119
+ output "Constants", *type_statistics(:constant)
120
+ end
121
+
122
+ # Statistics for methods
123
+ def stats_for_methods
124
+ objs = all_objects.select {|m| m.type == :method }
125
+ objs.reject! {|m| m.is_alias? || !m.is_explicit? }
126
+ undoc = objs.select {|m| m.docstring.blank? && !m.overridden_method }
127
+ @undoc_list |= undoc if @undoc_list
128
+ output "Methods", objs.size, undoc.size
129
+ end
130
+
131
+ # Prints a statistic to standard out. This method is optimized for
132
+ # getting Integer values, though it allows any data to be printed.
133
+ #
134
+ # @param [String] name the statistic name
135
+ # @param [Integer, String] data the numeric (or any) data representing
136
+ # the statistic. If +data+ is an Integer, it should represent the
137
+ # total objects of a type.
138
+ # @param [Integer, nil] undoc number of undocumented objects for the type
139
+ # @return [void]
140
+ def output(name, data, undoc = nil)
141
+ @total += data if data.is_a?(Integer) && undoc
142
+ @undocumented += undoc if undoc.is_a?(Integer)
143
+ if undoc
144
+ data = ("%5s (% 5d undocumented)" % [data, undoc])
145
+ else
146
+ data = "%5s" % data
147
+ end
148
+ puts("%-12s %s" % [name + ":", data])
149
+ end
150
+
151
+ private
152
+
153
+ def type_statistics(type)
154
+ objs = all_objects.select {|m| m.type == type }
155
+ undoc = objs.find_all {|m| m.docstring.blank? }
156
+ @undoc_list |= undoc if @undoc_list
157
+ [objs.size, undoc.size]
158
+ end
159
+
160
+ # Parses commandline options.
161
+ # @param [Array<String>] args each tokenized argument
162
+ def optparse(*args)
163
+ opts = OptionParser.new
164
+ opts.banner = "Usage: yard stats [options] [source_files]"
165
+
166
+ opts.separator "(if a list of source files is omitted, lib/**/*.rb ext/**/*.c is used.)"
167
+
168
+ general_options(opts)
169
+ output_options(opts)
170
+ tag_options(opts)
171
+ common_options(opts)
172
+ parse_options(opts, args)
173
+ parse_files(*args) unless args.empty?
174
+ end
175
+
176
+ def general_options(opts)
177
+ super(opts)
178
+
179
+ opts.on('--list-undoc', 'List all undocumented objects') do
180
+ @undoc_list = []
181
+ end
182
+
183
+ opts.on('--compact', 'Compact undocumented objects listing') do
184
+ @compact = true
185
+ end
186
+
187
+ opts.on('--no-public', "Don't include public methods in statistics.") do
188
+ visibilities.delete(:public)
189
+ end
190
+
191
+ opts.on('--protected', "Include protected methods in statistics.") do
192
+ visibilities.push(:protected)
193
+ end
194
+
195
+ opts.on('--private', "Include private methods in statistics.") do
196
+ visibilities.push(:private)
197
+ end
198
+
199
+ opts.on('--no-private', "Don't include objects with @private tag in statistics.") do
200
+ options[:verifier].add_expressions '!object.tag(:private) &&
201
+ (object.namespace.type == :proxy || !object.namespace.tag(:private))'
202
+ end
203
+
204
+ opts.on('--query QUERY', "Only includes objects that match a specific query") do |query|
205
+ options[:verifier].add_expressions(query.taint)
206
+ end
207
+ end
208
+ end
209
+ end
210
+ end
@@ -0,0 +1,696 @@
1
+ require 'digest/sha1'
2
+ require 'fileutils'
3
+
4
+ module YARD
5
+ module CLI
6
+ # Yardoc is the default YARD CLI command (+yard doc+ and historic +yardoc+
7
+ # executable) used to generate and output (mainly) HTML documentation given
8
+ # a set of source files.
9
+ #
10
+ # == Usage
11
+ #
12
+ # Main usage for this command is:
13
+ #
14
+ # $ yardoc [options] [source_files [- extra_files]]
15
+ #
16
+ # See +yardoc --help+ for details on valid options.
17
+ #
18
+ # == Options File (+.yardopts+)
19
+ #
20
+ # If a +.yardopts+ file is found in the source directory being processed,
21
+ # YARD will use the contents of the file as arguments to the command,
22
+ # treating newlines as spaces. You can use shell-style quotations to
23
+ # group space delimited arguments, just like on the command line.
24
+ #
25
+ # A valid +.yardopts+ file might look like:
26
+ #
27
+ # --no-private
28
+ # --title "My Title"
29
+ # --exclude foo --exclude bar
30
+ # lib/**/*.erb
31
+ # lib/**/*.rb -
32
+ # HACKING.rdoc LEGAL COPYRIGHT
33
+ #
34
+ # Note that Yardoc also supports the legacy RDoc style +.document+ file,
35
+ # though this file can only specify source globs to parse, not options.
36
+ #
37
+ # == Queries (+--query+)
38
+ #
39
+ # Yardoc supports queries to select specific code objects for which to
40
+ # generate documentation. For example, you might want to generate
41
+ # documentation only for your public API. If you've documented your public
42
+ # methods with +@api public+, you can use the following query to select
43
+ # all of these objects:
44
+ #
45
+ # --query '@api.text == "public"'
46
+ #
47
+ # Note that the syntax for queries is mostly Ruby with a few syntactic
48
+ # simplifications for meta-data tags. See the {Verifier} class for an
49
+ # overview of this syntax.
50
+ #
51
+ # == Adding Custom Ad-Hoc Meta-data Tags (+--tag+)
52
+ #
53
+ # YARD allows specification of {file:docs/Tags.md meta-data tags}
54
+ # programmatically via the {YARD::Tags::Library} class, but often this is not
55
+ # practical for users writing documentation. To make adding custom tags
56
+ # easier, Yardoc has a few command-line switches for creating basic tags
57
+ # and displaying them in generated HTML output.
58
+ #
59
+ # To specify a custom tag to be displayed in output, use any of the
60
+ # following:
61
+ #
62
+ # * +--tag+ TAG:TITLE
63
+ # * +--name-tag+ TAG:TITLE
64
+ # * +--type-tag+ TAG:TITLE
65
+ # * +--type-name-tag+ TAG:TITLE
66
+ # * +--title-tag+ TAG:TITLE
67
+ #
68
+ # "TAG:TITLE" is of the form: name:"Display Title", for example:
69
+ #
70
+ # --tag overload:"Overloaded Method"
71
+ #
72
+ # See +yardoc --help+ for a description of the various options.
73
+ #
74
+ # Tags added in this way are automatically displayed in output. To add
75
+ # a meta-data tag that does not show up in output, use +--hide-tag TAG+.
76
+ # Note that you can also use this option on existing tags to hide
77
+ # builtin tags, for instance.
78
+ #
79
+ # == Processed Data Storage (+.yardoc+ directory)
80
+ #
81
+ # When Yardoc parses a source directory, it creates a +.yardoc+ directory
82
+ # (by default, override with +-b+) at the root of the project. This directory
83
+ # contains marshal dumps for all raw object data in the source, so that
84
+ # you can access it later for various commands (+stats+, +graph+, etc.).
85
+ # This directory is also used as a cache for any future calls to +yardoc+
86
+ # so as to process only the files which have changed since the last call.
87
+ #
88
+ # When Yardoc uses the cache in subsequent calls to +yardoc+, methods
89
+ # or classes that have been deleted from source since the last parsing
90
+ # will not be erased from the cache (YARD never deletes objects). In such
91
+ # a case, you should wipe the cache and do a clean parsing of the source tree.
92
+ # You can do this by deleting the +.yardoc+ directory manually, or running
93
+ # Yardoc without +--use-cache+ (+-c+).
94
+ #
95
+ # @since 0.2.1
96
+ # @see Verifier
97
+ class Yardoc < Command
98
+ # The configuration filename to load extra options from
99
+ DEFAULT_YARDOPTS_FILE = ".yardopts"
100
+
101
+ # @return [Hash] the hash of options passed to the template.
102
+ # @see Templates::Engine#render
103
+ attr_reader :options
104
+
105
+ # @return [Array<String>] list of Ruby source files to process
106
+ attr_accessor :files
107
+
108
+ # @return [Array<String>] list of excluded paths (regexp matches)
109
+ # @since 0.5.3
110
+ attr_accessor :excluded
111
+
112
+ # @return [Boolean] whether to use the existing yardoc db if the
113
+ # .yardoc already exists. Also makes use of file checksums to
114
+ # parse only changed files.
115
+ attr_accessor :use_cache
116
+
117
+ # @return [Boolean] whether to parse options from .yardopts
118
+ attr_accessor :use_yardopts_file
119
+
120
+ # @return [Boolean] whether to parse options from .document
121
+ attr_accessor :use_document_file
122
+
123
+ # @return [Boolean] whether objects should be serialized to .yardoc db
124
+ attr_accessor :save_yardoc
125
+
126
+ # @return [Boolean] whether to generate output
127
+ attr_accessor :generate
128
+
129
+ # @return [Boolean] whether to print a list of objects
130
+ # @since 0.5.5
131
+ attr_accessor :list
132
+
133
+ # The options file name (defaults to {DEFAULT_YARDOPTS_FILE})
134
+ # @return [String] the filename to load extra options from
135
+ attr_accessor :options_file
136
+
137
+ # Keep track of which visibilities are to be shown
138
+ # @return [Array<Symbol>] a list of visibilities
139
+ # @since 0.5.6
140
+ attr_accessor :visibilities
141
+
142
+ # @return [Array<Symbol>] a list of tags to hide from templates
143
+ # @since 0.6.0
144
+ attr_accessor :hidden_tags
145
+
146
+ # @return [Boolean] whether to print statistics after parsing
147
+ # @since 0.6.0
148
+ attr_accessor :statistics
149
+
150
+ # @return [Array<String>] a list of assets to copy after generation
151
+ # @since 0.6.0
152
+ attr_accessor :assets
153
+
154
+ # @return [Boolean] whether markup option was specified
155
+ # @since 0.7.0
156
+ attr_accessor :has_markup
157
+
158
+ # Creates a new instance of the commandline utility
159
+ def initialize
160
+ super
161
+ @options = SymbolHash.new(false)
162
+ @options.update(
163
+ :format => :html,
164
+ :template => :default,
165
+ :markup => :rdoc, # default is :rdoc but falls back on :none
166
+ :serializer => YARD::Serializers::FileSystemSerializer.new,
167
+ :default_return => "Object",
168
+ :hide_void_return => false,
169
+ :no_highlight => false,
170
+ :files => [],
171
+ :title => "Documentation by YARD #{YARD::VERSION}",
172
+ :verifier => Verifier.new
173
+ )
174
+ @visibilities = [:public]
175
+ @assets = {}
176
+ @excluded = []
177
+ @files = []
178
+ @hidden_tags = []
179
+ @use_cache = false
180
+ @use_yardopts_file = true
181
+ @use_document_file = true
182
+ @generate = true
183
+ @options_file = DEFAULT_YARDOPTS_FILE
184
+ @statistics = true
185
+ @list = false
186
+ @save_yardoc = true
187
+ @has_markup = false
188
+
189
+ if defined?(::Encoding) && ::Encoding.respond_to?(:default_external=)
190
+ ::Encoding.default_external, ::Encoding.default_internal = 'utf-8', 'utf-8'
191
+ end
192
+ end
193
+
194
+ def description
195
+ "Generates documentation"
196
+ end
197
+
198
+ # Runs the commandline utility, parsing arguments and generating
199
+ # output if set.
200
+ #
201
+ # @param [Array<String>] args the list of arguments. If the list only
202
+ # contains a single nil value, skip calling of {#parse_arguments}
203
+ # @return [void]
204
+ def run(*args)
205
+ if args.size == 0 || !args.first.nil?
206
+ # fail early if arguments are not valid
207
+ return unless parse_arguments(*args)
208
+ end
209
+
210
+ checksums = nil
211
+ if use_cache
212
+ Registry.load
213
+ checksums = Registry.checksums.dup
214
+ end
215
+ YARD.parse(files, excluded)
216
+ Registry.save(use_cache) if save_yardoc
217
+
218
+ if generate
219
+ run_generate(checksums)
220
+ copy_assets
221
+ elsif list
222
+ print_list
223
+ end
224
+
225
+ if !list && statistics && log.level < Logger::ERROR
226
+ Registry.load_all
227
+ log.enter_level(Logger::ERROR) do
228
+ Stats.new(false).run(*args)
229
+ end
230
+ end
231
+
232
+ true
233
+ end
234
+
235
+ # Parses commandline arguments
236
+ # @param [Array<String>] args the list of arguments
237
+ # @return [Boolean] whether or not arguments are valid
238
+ # @since 0.5.6
239
+ def parse_arguments(*args)
240
+ parse_yardopts_options(*args)
241
+
242
+ # Parse files and then command line arguments
243
+ optparse(*support_rdoc_document_file!) if use_document_file
244
+ optparse(*yardopts) if use_yardopts_file
245
+ optparse(*args)
246
+
247
+ # Last minute modifications
248
+ self.files = ['{lib,app}/**/*.rb', 'ext/**/*.c'] if self.files.empty?
249
+ self.files.delete_if {|x| x =~ /\A\s*\Z/ } # remove empty ones
250
+ readme = Dir.glob('README*').first
251
+ readme ||= Dir.glob(files.first).first if options[:onefile]
252
+ options[:readme] ||= CodeObjects::ExtraFileObject.new(readme) if readme
253
+ options[:files].unshift(options[:readme]).uniq! if options[:readme]
254
+
255
+ Tags::Library.visible_tags -= hidden_tags
256
+ add_visibility_verifier
257
+
258
+ if generate && !verify_markup_options
259
+ false
260
+ else
261
+ true
262
+ end
263
+ end
264
+
265
+ # The list of all objects to process. Override this method to change
266
+ # which objects YARD should generate documentation for.
267
+ #
268
+ # @deprecated To hide methods use the +@private+ tag instead.
269
+ # @return [Array<CodeObjects::Base>] a list of code objects to process
270
+ def all_objects
271
+ Registry.all(:root, :module, :class)
272
+ end
273
+
274
+ # Parses the .yardopts file for default yard options
275
+ # @return [Array<String>] an array of options parsed from .yardopts
276
+ def yardopts
277
+ return [] unless use_yardopts_file
278
+ File.read_binary(options_file).shell_split
279
+ rescue Errno::ENOENT
280
+ []
281
+ end
282
+
283
+ private
284
+
285
+ # Generates output for objects
286
+ # @param [Hash, nil] checksums if supplied, a list of checkums for files.
287
+ # @return [void]
288
+ # @since 0.5.1
289
+ def run_generate(checksums)
290
+ if checksums
291
+ changed_files = []
292
+ Registry.checksums.each do |file, hash|
293
+ changed_files << file if checksums[file] != hash
294
+ end
295
+ end
296
+ Registry.load_all if use_cache
297
+ objects = run_verifier(all_objects).reject do |object|
298
+ serialized = !options[:serializer] || options[:serializer].exists?(object)
299
+ if checksums && serialized && !object.files.any? {|f, line| changed_files.include?(f) }
300
+ true
301
+ else
302
+ log.info "Re-generating object #{object.path}..."
303
+ false
304
+ end
305
+ end
306
+ Templates::Engine.generate(objects, options)
307
+ end
308
+
309
+ # Verifies that the markup options are valid before parsing any code.
310
+ # Failing early is better than failing late.
311
+ #
312
+ # @return (see YARD::Templates::Helpers::MarkupHelper#load_markup_provider)
313
+ def verify_markup_options
314
+ result, lvl = false, has_markup ? log.level : Logger::FATAL
315
+ obj = Struct.new(:options).new(options)
316
+ obj.extend(Templates::Helpers::MarkupHelper)
317
+ options[:files].each do |file|
318
+ markup = file.attributes[:markup] || obj.markup_for_file('', file.filename)
319
+ result = obj.load_markup_provider(markup)
320
+ return false if !result && markup != :rdoc
321
+ end
322
+ options[:markup] = :rdoc unless has_markup
323
+ log.enter_level(lvl) { result = obj.load_markup_provider }
324
+ if !result && !has_markup
325
+ log.warn "Could not load default RDoc formatter, " +
326
+ "ignoring any markup (install RDoc to get default formatting)."
327
+ options[:markup] = :none
328
+ true
329
+ else
330
+ result
331
+ end
332
+ end
333
+
334
+ # Copies any assets to the output directory
335
+ # @return [void]
336
+ # @since 0.6.0
337
+ def copy_assets
338
+ return unless options[:serializer]
339
+ outpath = options[:serializer].basepath
340
+ assets.each do |from, to|
341
+ to = File.join(outpath, to)
342
+ log.debug "Copying asset '#{from}' to '#{to}'"
343
+ FileUtils.cp_r(from, to)
344
+ end
345
+ end
346
+
347
+ # Prints a list of all objects
348
+ # @return [void]
349
+ # @since 0.5.5
350
+ def print_list
351
+ Registry.load_all
352
+ run_verifier(Registry.all).
353
+ sort_by {|item| [item.file || '', item.line || 0] }.each do |item|
354
+ puts "#{item.file}:#{item.line}: #{item.path}"
355
+ end
356
+ end
357
+
358
+ # Parses out the yardopts/document options
359
+ def parse_yardopts_options(*args)
360
+ opts = OptionParser.new
361
+ opts.base.long.clear # HACK: why are --help and --version defined?
362
+ yardopts_options(opts)
363
+ begin
364
+ opts.parse(args)
365
+ rescue OptionParser::ParseError => err
366
+ idx = args.index(err.args.first)
367
+ args = args[(idx+1)..-1]
368
+ args.shift while args.first && args.first[0,1] != '-'
369
+ retry
370
+ end
371
+ end
372
+
373
+ # Reads a .document file in the directory to get source file globs
374
+ # @return [Array<String>] an array of files parsed from .document
375
+ def support_rdoc_document_file!
376
+ return [] unless use_document_file
377
+ File.read(".document").gsub(/^[ \t]*#.+/m, '').split(/\s+/)
378
+ rescue Errno::ENOENT
379
+ []
380
+ end
381
+
382
+ # Adds a set of extra documentation files to be processed
383
+ # @param [Array<String>] files the set of documentation files
384
+ def add_extra_files(*files)
385
+ files.map! {|f| f.include?("*") ? Dir.glob(f) : f }.flatten!
386
+ files.each do |file|
387
+ if File.file?(file)
388
+ options[:files] << CodeObjects::ExtraFileObject.new(file)
389
+ else
390
+ log.warn "Could not find extra file: #{file}"
391
+ end
392
+ end
393
+ end
394
+
395
+ # Parses the file arguments into Ruby files and extra files, which are
396
+ # separated by a '-' element.
397
+ #
398
+ # @example Parses a set of Ruby source files
399
+ # parse_files %w(file1 file2 file3)
400
+ # @example Parses a set of Ruby files with a separator and extra files
401
+ # parse_files %w(file1 file2 - extrafile1 extrafile2)
402
+ # @param [Array<String>] files the list of files to parse
403
+ # @return [void]
404
+ def parse_files(*files)
405
+ seen_extra_files_marker = false
406
+
407
+ files.each do |file|
408
+ if file == "-"
409
+ seen_extra_files_marker = true
410
+ next
411
+ end
412
+
413
+ if seen_extra_files_marker
414
+ add_extra_files(file)
415
+ else
416
+ self.files << file
417
+ end
418
+ end
419
+ end
420
+
421
+ # Adds verifier rule for visibilities
422
+ # @return [void]
423
+ # @since 0.5.6
424
+ def add_visibility_verifier
425
+ vis_expr = "object.type != :method || #{visibilities.uniq.inspect}.include?(object.visibility)"
426
+ options[:verifier].add_expressions(vis_expr)
427
+ end
428
+
429
+ # (see Templates::Helpers::BaseHelper#run_verifier)
430
+ def run_verifier(list)
431
+ options[:verifier] ? options[:verifier].run(list) : list
432
+ end
433
+
434
+ # @since 0.6.0
435
+ def add_tag(tag_data, factory_method = nil)
436
+ tag, title = *tag_data.split(':')
437
+ title ||= tag.capitalize
438
+ Tags::Library.define_tag(title, tag.to_sym, factory_method)
439
+ Tags::Library.visible_tags |= [tag.to_sym]
440
+ end
441
+
442
+ # Parses commandline options.
443
+ # @param [Array<String>] args each tokenized argument
444
+ def optparse(*args)
445
+ opts = OptionParser.new
446
+ opts.banner = "Usage: yard doc [options] [source_files [- extra_files]]"
447
+
448
+ opts.separator "(if a list of source files is omitted, "
449
+ opts.separator " {lib,app}/**/*.rb ext/**/*.c is used.)"
450
+ opts.separator ""
451
+ opts.separator "Example: yardoc -o documentation/ - FAQ LICENSE"
452
+ opts.separator " The above example outputs documentation for files in"
453
+ opts.separator " lib/**/*.rb to documentation/ including the extra files"
454
+ opts.separator " FAQ and LICENSE."
455
+ opts.separator ""
456
+ opts.separator "A base set of options can be specified by adding a .yardopts"
457
+ opts.separator "file to your base path containing all extra options separated"
458
+ opts.separator "by whitespace."
459
+
460
+ general_options(opts)
461
+ output_options(opts)
462
+ tag_options(opts)
463
+ common_options(opts)
464
+ parse_options(opts, args)
465
+ parse_files(*args) unless args.empty?
466
+ end
467
+
468
+ # Adds general options
469
+ def general_options(opts)
470
+ opts.separator ""
471
+ opts.separator "General Options:"
472
+
473
+ opts.on('-b', '--db FILE', 'Use a specified .yardoc db to load from or save to',
474
+ ' (defaults to .yardoc)') do |yfile|
475
+ YARD::Registry.yardoc_file = yfile
476
+ end
477
+
478
+ opts.on('--[no-]single-db', 'Whether code objects should be stored to single',
479
+ ' database file (advanced)') do |use_single_db|
480
+ Registry.single_object_db = use_single_db
481
+ end
482
+
483
+ opts.on('-n', '--no-output', 'Only generate .yardoc database, no documentation.') do
484
+ self.generate = false
485
+ end
486
+
487
+ opts.on('-c', '--use-cache [FILE]',
488
+ "Use the cached .yardoc db to generate documentation.",
489
+ " (defaults to no cache)") do |file|
490
+ YARD::Registry.yardoc_file = file if file
491
+ self.use_cache = true
492
+ end
493
+
494
+ opts.on('--no-cache', "Clear .yardoc db before parsing source.") do
495
+ self.use_cache = false
496
+ end
497
+
498
+ yardopts_options(opts)
499
+
500
+ opts.on('--no-save', 'Do not save the parsed data to the yardoc db') do
501
+ self.save_yardoc = false
502
+ end
503
+
504
+ opts.on('--exclude REGEXP', 'Ignores a file if it matches path match (regexp)') do |path|
505
+ self.excluded << path
506
+ end
507
+ end
508
+
509
+ # Adds --[no-]yardopts / --[no-]document
510
+ def yardopts_options(opts)
511
+ opts.on('--[no-]yardopts [FILE]',
512
+ "If arguments should be read from FILE",
513
+ " (defaults to yes, FILE defaults to .yardopts)") do |use_yardopts|
514
+ if use_yardopts.is_a?(String)
515
+ self.options_file = use_yardopts
516
+ self.use_yardopts_file = true
517
+ else
518
+ self.use_yardopts_file = (use_yardopts != false)
519
+ end
520
+ end
521
+
522
+ opts.on('--[no-]document', "If arguments should be read from .document file. ",
523
+ " (defaults to yes)") do |use_document|
524
+ self.use_document_file = use_document
525
+ end
526
+ end
527
+
528
+ # Adds output options
529
+ def output_options(opts)
530
+ opts.separator ""
531
+ opts.separator "Output options:"
532
+
533
+ opts.on('--one-file', 'Generates output as a single file') do
534
+ options[:onefile] = true
535
+ end
536
+
537
+ opts.on('--list', 'List objects to standard out (implies -n)') do |format|
538
+ self.generate = false
539
+ self.list = true
540
+ end
541
+
542
+ opts.on('--no-public', "Don't show public methods. (default shows public)") do
543
+ visibilities.delete(:public)
544
+ end
545
+
546
+ opts.on('--protected', "Show protected methods. (default hides protected)") do
547
+ visibilities.push(:protected)
548
+ end
549
+
550
+ opts.on('--private', "Show private methods. (default hides private)") do
551
+ visibilities.push(:private)
552
+ end
553
+
554
+ opts.on('--no-private', "Hide objects with @private tag") do
555
+ options[:verifier].add_expressions '!object.tag(:private) &&
556
+ (object.namespace.is_a?(CodeObjects::Proxy) || !object.namespace.tag(:private))'
557
+ end
558
+
559
+ opts.on('--no-highlight', "Don't highlight code blocks in output.") do
560
+ options[:no_highlight] = true
561
+ end
562
+
563
+ opts.on('--default-return TYPE', "Shown if method has no return type. ",
564
+ " (defaults to 'Object')") do |type|
565
+ options[:default_return] = type
566
+ end
567
+
568
+ opts.on('--hide-void-return', "Hides return types specified as 'void'. ",
569
+ " (default is shown)") do
570
+ options[:hide_void_return] = true
571
+ end
572
+
573
+ opts.on('--query QUERY', "Only show objects that match a specific query") do |query|
574
+ next if YARD::Config.options[:safe_mode]
575
+ options[:verifier].add_expressions(query.taint)
576
+ end
577
+
578
+ opts.on('--title TITLE', 'Add a specific title to HTML documents') do |title|
579
+ options[:title] = title
580
+ end
581
+
582
+ opts.on('-r', '--readme FILE', '--main FILE', 'The readme file used as the title page',
583
+ ' of documentation.') do |readme|
584
+ if File.file?(readme)
585
+ options[:readme] = CodeObjects::ExtraFileObject.new(readme)
586
+ else
587
+ log.warn "Could not find readme file: #{readme}"
588
+ end
589
+ end
590
+
591
+ opts.on('--files FILE1,FILE2,...', 'Any extra comma separated static files to be ',
592
+ ' included (eg. FAQ)') do |files|
593
+ add_extra_files(*files.split(","))
594
+ end
595
+
596
+ opts.on('--asset FROM[:TO]', 'A file or directory to copy over to output ',
597
+ ' directory after generating') do |asset|
598
+ re = /^(?:\.\.\/|\/)/
599
+ from, to = *asset.split(':').map {|f| File.cleanpath(f) }
600
+ to ||= from
601
+ if from =~ re || to =~ re
602
+ log.warn "Invalid file '#{asset}'"
603
+ else
604
+ assets[from] = to
605
+ end
606
+ end
607
+
608
+ opts.on('-o', '--output-dir PATH',
609
+ 'The output directory. (defaults to ./doc)') do |dir|
610
+ options[:serializer].basepath = dir
611
+ end
612
+
613
+ opts.on('-m', '--markup MARKUP',
614
+ 'Markup style used in documentation, like textile, ',
615
+ ' markdown or rdoc. (defaults to rdoc)') do |markup|
616
+ self.has_markup = true
617
+ options[:markup] = markup.to_sym
618
+ end
619
+
620
+ opts.on('-M', '--markup-provider MARKUP_PROVIDER',
621
+ 'Overrides the library used to process markup ',
622
+ ' formatting (specify the gem name)') do |markup_provider|
623
+ options[:markup_provider] = markup_provider.to_sym
624
+ end
625
+
626
+ opts.on('--charset ENC', 'Character set to use when parsing files ',
627
+ ' (default is system locale)') do |encoding|
628
+ begin
629
+ if defined?(Encoding) && Encoding.respond_to?(:default_external=)
630
+ Encoding.default_external, Encoding.default_internal = encoding, encoding
631
+ end
632
+ rescue ArgumentError => e
633
+ raise OptionParser::InvalidOption, e
634
+ end
635
+ end
636
+
637
+ opts.on('-t', '--template TEMPLATE',
638
+ 'The template to use. (defaults to "default")') do |template|
639
+ options[:template] = template.to_sym
640
+ end
641
+
642
+ opts.on('-p', '--template-path PATH',
643
+ 'The template path to look for templates in.',
644
+ ' (used with -t).') do |path|
645
+ next if YARD::Config.options[:safe_mode]
646
+ YARD::Templates::Engine.register_template_path(path)
647
+ end
648
+
649
+ opts.on('-f', '--format FORMAT',
650
+ 'The output format for the template.',
651
+ ' (defaults to html)') do |format|
652
+ options[:format] = format.to_sym
653
+ end
654
+
655
+ opts.on('--no-stats', 'Don\'t print statistics') do
656
+ self.statistics = false
657
+ end
658
+ end
659
+
660
+ # Adds tag options
661
+ # @since 0.6.0
662
+ def tag_options(opts)
663
+ opts.separator ""
664
+ opts.separator "Tag options: (TAG:TITLE looks like: 'overload:Overloaded Method')"
665
+
666
+ opts.on('--tag TAG:TITLE', 'Registers a new free-form metadata @tag') do |tag|
667
+ add_tag(tag)
668
+ end
669
+
670
+ opts.on('--type-tag TAG:TITLE', 'Tag with an optional types field') do |tag|
671
+ add_tag(tag, :with_types)
672
+ end
673
+
674
+ opts.on('--type-name-tag TAG:TITLE', 'Tag with optional types and a name field') do |tag|
675
+ add_tag(tag, :with_types_and_name)
676
+ end
677
+
678
+ opts.on('--name-tag TAG:TITLE', 'Tag with a name field') do |tag|
679
+ add_tag(tag, :with_name)
680
+ end
681
+
682
+ opts.on('--title-tag TAG:TITLE', 'Tag with first line as title field') do |tag|
683
+ add_tag(tag, :with_title_and_text)
684
+ end
685
+
686
+ opts.on('--hide-tag TAG', 'Hides a previously defined tag from templates') do |tag|
687
+ self.hidden_tags |= [tag.to_sym]
688
+ end
689
+
690
+ opts.on('--transitive-tag TAG', 'Adds a transitive tag') do |tag|
691
+ Tags::Library.transitive_tags += [tag.to_sym]
692
+ end
693
+ end
694
+ end
695
+ end
696
+ end