yard 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of yard might be problematic. Click here for more details.
- data/ChangeLog +341 -0
- data/LICENSE +1 -1
- data/README.md +31 -6
- data/Rakefile +22 -3
- data/docs/Tags.md +5 -1
- data/docs/WhatsNew.md +18 -1
- data/lib/rubygems_plugin.rb +3 -99
- data/lib/yard.rb +1 -1
- data/lib/yard/autoload.rb +37 -35
- data/lib/yard/cli/config.rb +25 -2
- data/lib/yard/cli/graph.rb +1 -1
- data/lib/yard/cli/yardoc.rb +4 -0
- data/lib/yard/code_objects/base.rb +17 -9
- data/lib/yard/code_objects/method_object.rb +0 -9
- data/lib/yard/code_objects/proxy.rb +6 -0
- data/lib/yard/docstring.rb +5 -0
- data/lib/yard/handlers/base.rb +3 -1
- data/lib/yard/handlers/processor.rb +1 -1
- data/lib/yard/handlers/ruby/alias_handler.rb +9 -8
- data/lib/yard/handlers/ruby/class_handler.rb +3 -3
- data/lib/yard/handlers/ruby/legacy/alias_handler.rb +9 -7
- data/lib/yard/handlers/ruby/legacy/method_handler.rb +7 -0
- data/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +21 -0
- data/lib/yard/handlers/ruby/method_condition_handler.rb +1 -1
- data/lib/yard/handlers/ruby/method_handler.rb +7 -0
- data/lib/yard/handlers/ruby/private_constant_handler.rb +36 -0
- data/lib/yard/parser/ruby/ast_node.rb +41 -24
- data/lib/yard/parser/ruby/legacy/ruby_parser.rb +3 -0
- data/lib/yard/parser/ruby/legacy/statement.rb +2 -0
- data/lib/yard/parser/ruby/legacy/statement_list.rb +27 -4
- data/lib/yard/parser/ruby/ruby_parser.rb +71 -36
- data/lib/yard/parser/source_parser.rb +11 -10
- data/lib/yard/registry.rb +62 -24
- data/lib/yard/registry_store.rb +18 -5
- data/lib/yard/rubygems/doc_manager.rb +75 -0
- data/lib/yard/rubygems/specification.rb +23 -0
- data/lib/yard/serializers/process_serializer.rb +1 -1
- data/lib/yard/serializers/yardoc_serializer.rb +7 -2
- data/lib/yard/server/commands/display_object_command.rb +1 -1
- data/lib/yard/server/commands/library_command.rb +2 -2
- data/lib/yard/tags/default_factory.rb +1 -1
- data/lib/yard/tags/library.rb +2 -2
- data/lib/yard/templates/helpers/base_helper.rb +19 -0
- data/lib/yard/templates/helpers/html_helper.rb +22 -9
- data/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +28 -0
- data/lib/yard/templates/helpers/markup_helper.rb +14 -22
- data/lib/yard/templates/template.rb +1 -1
- data/spec/cli/config_spec.rb +20 -0
- data/spec/cli/yardoc_spec.rb +12 -0
- data/spec/code_objects/base_spec.rb +13 -0
- data/spec/code_objects/proxy_spec.rb +9 -0
- data/spec/config_spec.rb +4 -1
- data/spec/docstring_spec.rb +5 -0
- data/spec/handlers/alias_handler_spec.rb +14 -1
- data/spec/handlers/attribute_handler_spec.rb +1 -1
- data/spec/handlers/base_spec.rb +21 -21
- data/spec/handlers/class_condition_handler_spec.rb +1 -1
- data/spec/handlers/class_handler_spec.rb +1 -1
- data/spec/handlers/class_variable_handler_spec.rb +1 -1
- data/spec/handlers/constant_handler_spec.rb +2 -2
- data/spec/handlers/examples/alias_handler_001.rb.txt +14 -0
- data/spec/handlers/examples/method_handler_001.rb.txt +6 -0
- data/spec/handlers/examples/module_handler_001.rb.txt +4 -0
- data/spec/handlers/examples/private_constant_handler_001.rb.txt +8 -0
- data/spec/handlers/exception_handler_spec.rb +1 -1
- data/spec/handlers/extend_handler_spec.rb +1 -1
- data/spec/handlers/method_condition_handler_spec.rb +1 -1
- data/spec/handlers/method_handler_spec.rb +7 -1
- data/spec/handlers/mixin_handler_spec.rb +1 -1
- data/spec/handlers/module_handler_spec.rb +5 -1
- data/spec/handlers/private_constant_handler_spec.rb +24 -0
- data/spec/handlers/process_handler_spec.rb +1 -1
- data/spec/handlers/ruby/base_spec.rb +4 -4
- data/spec/handlers/visibility_handler_spec.rb +1 -1
- data/spec/handlers/yield_handler_spec.rb +1 -1
- data/spec/parser/base_spec.rb +3 -5
- data/spec/parser/c_parser_spec.rb +1 -1
- data/spec/parser/ruby/ast_node_spec.rb +23 -26
- data/spec/parser/ruby/legacy/statement_list_spec.rb +9 -0
- data/spec/parser/ruby/ruby_parser_spec.rb +179 -177
- data/spec/parser/source_parser_spec.rb +41 -7
- data/spec/rake/yardoc_task_spec.rb +3 -3
- data/spec/registry_spec.rb +52 -0
- data/spec/registry_store_spec.rb +71 -1
- data/spec/serializers/yardoc_serializer_spec.rb +18 -7
- data/spec/server/rack_adapter_spec.rb +2 -2
- data/spec/spec_helper.rb +10 -0
- data/spec/tags/default_factory_spec.rb +122 -120
- data/spec/templates/helpers/base_helper_spec.rb +38 -14
- data/spec/templates/helpers/html_helper_spec.rb +19 -0
- data/spec/templates/helpers/html_syntax_highlight_helper_spec.rb +10 -6
- data/spec/templates/helpers/markup_helper_spec.rb +21 -5
- data/templates/default/class/dot/superklass.erb +1 -1
- data/templates/default/docstring/setup.rb +1 -1
- data/templates/default/fulldoc/html/css/style.css +12 -4
- data/templates/default/fulldoc/html/js/app.js +1 -1
- data/templates/default/fulldoc/html/js/jquery.js +5 -143
- data/templates/default/layout/html/files.erb +11 -0
- data/templates/default/layout/html/headers.erb +1 -1
- data/templates/default/layout/html/index.erb +2 -49
- data/templates/default/layout/html/listing.erb +4 -0
- data/templates/default/layout/html/objects.erb +32 -0
- data/templates/default/layout/html/setup.rb +1 -1
- data/templates/default/module/dot/info.erb +1 -1
- data/templates/default/module/dot/setup.rb +1 -1
- metadata +15 -6
- data/lib/yard/templates/helpers/html_syntax_highlight_helper18.rb +0 -25
@@ -0,0 +1,32 @@
|
|
1
|
+
<h2>Namespace Listing A-Z</h2>
|
2
|
+
|
3
|
+
<% if Registry.root.meths(:included => false).size > 0 %>
|
4
|
+
<ul class="toplevel"><li><%= linkify(Registry.root) %></li></ul>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% i = 0 %>
|
8
|
+
<table>
|
9
|
+
<tr>
|
10
|
+
<td valign='top' width="33%">
|
11
|
+
<% @objects_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %>
|
12
|
+
<% if (i += 1) % 8 == 0 %>
|
13
|
+
</td><td valign='top' width="33%">
|
14
|
+
<% i = 0 %>
|
15
|
+
<% end %>
|
16
|
+
<ul id="alpha_<%= letter %>" class="alpha">
|
17
|
+
<li class="letter"><%= letter %></li>
|
18
|
+
<ul>
|
19
|
+
<% objects.each do |obj| %>
|
20
|
+
<li>
|
21
|
+
<%= linkify obj, obj.name %>
|
22
|
+
<% if !obj.namespace.root? %>
|
23
|
+
<small>(<%= obj.namespace.path %>)</small>
|
24
|
+
<% end %>
|
25
|
+
</li>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
28
|
+
</ul>
|
29
|
+
<% end %>
|
30
|
+
</td>
|
31
|
+
</tr>
|
32
|
+
</table>
|
@@ -9,6 +9,6 @@
|
|
9
9
|
|
|
10
10
|
<% method_listing.each do |obj| %>
|
11
11
|
<%= uml_visibility obj %> <%= h obj.name(true) %>
|
12
|
-
<%= h(" : #{obj.tag(:return).types.first}") if obj.has_tag?(:return) && obj.tag(:return).types.size > 0 %>\l
|
12
|
+
<%= h(" : #{obj.tag(:return).types.first}") if obj.has_tag?(:return) && obj.tag(:return).types && obj.tag(:return).types.size > 0 %>\l
|
13
13
|
<% end %>
|
14
14
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
def init
|
2
2
|
@modules = object.children.select {|o| o.type == :module }
|
3
3
|
@classes = object.children.select {|o| o.type == :class }
|
4
|
-
sections :child, [:info], :classes, [T('class')], :header, [
|
4
|
+
sections :child, [:info], :classes, [T('class')], :header, [T('module')], :dependencies
|
5
5
|
end
|
6
6
|
|
7
7
|
def dependencies
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease:
|
5
|
+
version: 0.6.5
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Loren Segal
|
@@ -9,7 +10,7 @@ autorequire:
|
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date:
|
13
|
+
date: 2011-03-13 00:00:00 -05:00
|
13
14
|
default_executable:
|
14
15
|
dependencies: []
|
15
16
|
|
@@ -99,6 +100,7 @@ files:
|
|
99
100
|
- lib/yard/handlers/ruby/legacy/method_handler.rb
|
100
101
|
- lib/yard/handlers/ruby/legacy/mixin_handler.rb
|
101
102
|
- lib/yard/handlers/ruby/legacy/module_handler.rb
|
103
|
+
- lib/yard/handlers/ruby/legacy/private_constant_handler.rb
|
102
104
|
- lib/yard/handlers/ruby/legacy/process_handler.rb
|
103
105
|
- lib/yard/handlers/ruby/legacy/visibility_handler.rb
|
104
106
|
- lib/yard/handlers/ruby/legacy/yield_handler.rb
|
@@ -106,6 +108,7 @@ files:
|
|
106
108
|
- lib/yard/handlers/ruby/method_handler.rb
|
107
109
|
- lib/yard/handlers/ruby/mixin_handler.rb
|
108
110
|
- lib/yard/handlers/ruby/module_handler.rb
|
111
|
+
- lib/yard/handlers/ruby/private_constant_handler.rb
|
109
112
|
- lib/yard/handlers/ruby/process_handler.rb
|
110
113
|
- lib/yard/handlers/ruby/struct_handler_methods.rb
|
111
114
|
- lib/yard/handlers/ruby/visibility_handler.rb
|
@@ -124,6 +127,8 @@ files:
|
|
124
127
|
- lib/yard/rake/yardoc_task.rb
|
125
128
|
- lib/yard/registry.rb
|
126
129
|
- lib/yard/registry_store.rb
|
130
|
+
- lib/yard/rubygems/doc_manager.rb
|
131
|
+
- lib/yard/rubygems/specification.rb
|
127
132
|
- lib/yard/serializers/base.rb
|
128
133
|
- lib/yard/serializers/file_system_serializer.rb
|
129
134
|
- lib/yard/serializers/process_serializer.rb
|
@@ -181,7 +186,6 @@ files:
|
|
181
186
|
- lib/yard/templates/helpers/filter_helper.rb
|
182
187
|
- lib/yard/templates/helpers/html_helper.rb
|
183
188
|
- lib/yard/templates/helpers/html_syntax_highlight_helper.rb
|
184
|
-
- lib/yard/templates/helpers/html_syntax_highlight_helper18.rb
|
185
189
|
- lib/yard/templates/helpers/markup_helper.rb
|
186
190
|
- lib/yard/templates/helpers/method_helper.rb
|
187
191
|
- lib/yard/templates/helpers/module_helper.rb
|
@@ -237,6 +241,7 @@ files:
|
|
237
241
|
- spec/handlers/examples/method_handler_001.rb.txt
|
238
242
|
- spec/handlers/examples/mixin_handler_001.rb.txt
|
239
243
|
- spec/handlers/examples/module_handler_001.rb.txt
|
244
|
+
- spec/handlers/examples/private_constant_handler_001.rb.txt
|
240
245
|
- spec/handlers/examples/process_handler_001.rb.txt
|
241
246
|
- spec/handlers/examples/visibility_handler_001.rb.txt
|
242
247
|
- spec/handlers/examples/yield_handler_001.rb.txt
|
@@ -247,6 +252,7 @@ files:
|
|
247
252
|
- spec/handlers/method_handler_spec.rb
|
248
253
|
- spec/handlers/mixin_handler_spec.rb
|
249
254
|
- spec/handlers/module_handler_spec.rb
|
255
|
+
- spec/handlers/private_constant_handler_spec.rb
|
250
256
|
- spec/handlers/process_handler_spec.rb
|
251
257
|
- spec/handlers/processor_spec.rb
|
252
258
|
- spec/handlers/ruby/base_spec.rb
|
@@ -376,10 +382,13 @@ files:
|
|
376
382
|
- templates/default/layout/dot/header.erb
|
377
383
|
- templates/default/layout/dot/setup.rb
|
378
384
|
- templates/default/layout/html/breadcrumb.erb
|
385
|
+
- templates/default/layout/html/files.erb
|
379
386
|
- templates/default/layout/html/footer.erb
|
380
387
|
- templates/default/layout/html/headers.erb
|
381
388
|
- templates/default/layout/html/index.erb
|
382
389
|
- templates/default/layout/html/layout.erb
|
390
|
+
- templates/default/layout/html/listing.erb
|
391
|
+
- templates/default/layout/html/objects.erb
|
383
392
|
- templates/default/layout/html/search.erb
|
384
393
|
- templates/default/layout/html/setup.rb
|
385
394
|
- templates/default/method/html/header.erb
|
@@ -470,21 +479,21 @@ rdoc_options: []
|
|
470
479
|
require_paths:
|
471
480
|
- lib
|
472
481
|
required_ruby_version: !ruby/object:Gem::Requirement
|
482
|
+
none: false
|
473
483
|
requirements:
|
474
484
|
- - ">="
|
475
485
|
- !ruby/object:Gem::Version
|
476
486
|
version: "0"
|
477
|
-
version:
|
478
487
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
488
|
+
none: false
|
479
489
|
requirements:
|
480
490
|
- - ">="
|
481
491
|
- !ruby/object:Gem::Version
|
482
492
|
version: "0"
|
483
|
-
version:
|
484
493
|
requirements: []
|
485
494
|
|
486
495
|
rubyforge_project: yard
|
487
|
-
rubygems_version: 1.
|
496
|
+
rubygems_version: 1.5.2
|
488
497
|
signing_key:
|
489
498
|
specification_version: 3
|
490
499
|
summary: Documentation tool for consistent and usable documentation in Ruby.
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module YARD
|
2
|
-
module Templates
|
3
|
-
module Helpers
|
4
|
-
module HtmlSyntaxHighlightHelper
|
5
|
-
def html_syntax_highlight_ruby(source)
|
6
|
-
tokenlist = Parser::Ruby::Legacy::TokenList.new(source)
|
7
|
-
tokenlist.map do |s|
|
8
|
-
prettyclass = s.class.class_name.sub(/^Tk/, '').downcase
|
9
|
-
prettysuper = s.class.superclass.class_name.sub(/^Tk/, '').downcase
|
10
|
-
|
11
|
-
case s
|
12
|
-
when Parser::Ruby::Legacy::RubyToken::TkWhitespace, Parser::Ruby::Legacy::RubyToken::TkUnknownChar
|
13
|
-
h s.text
|
14
|
-
when Parser::Ruby::Legacy::RubyToken::TkId
|
15
|
-
prettyval = h(s.text)
|
16
|
-
"<span class='#{prettyval} #{prettyclass} #{prettysuper}'>#{prettyval}</span>"
|
17
|
-
else
|
18
|
-
"<span class='#{prettyclass} #{prettysuper}'>#{h s.text}</span>"
|
19
|
-
end
|
20
|
-
end.join
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|