yard 0.8.6.1 → 0.8.6.2
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.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/yard/cli/graph.rb +3 -2
- data/lib/yard/cli/yardoc.rb +1 -1
- data/lib/yard/parser/c/c_parser.rb +7 -1
- data/lib/yard/templates/helpers/markup/rdoc_markup.rb +1 -1
- data/lib/yard/version.rb +1 -1
- data/spec/parser/c_parser_spec.rb +5 -0
- data/spec/parser/examples/multifile.c.txt +16 -0
- data/spec/parser/source_parser_spec.rb +1 -1
- data/spec/templates/helpers/markup/rdoc_markup_spec.rb +14 -5
- data/templates/default/fulldoc/html/full_list.erb +1 -0
- data/templates/default/fulldoc/html/full_list_class.erb +1 -1
- data/templates/default/fulldoc/html/js/full_list.js +5 -5
- data/templates/guide/fulldoc/html/setup.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79ac2562993c76c250d449d1c1b0e2a62b41790f
|
4
|
+
data.tar.gz: bb2c0b58aac5e48b9c687e9495dbe5a420433259
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a404522e86cef2f801bef43ab15d49af955968afcad5d31784c61e30089ba3a50e904cebf99aa2465109043544fdf4b04010e6ba901eca1c46220e730f2a882c
|
7
|
+
data.tar.gz: 0be733bd7b4c1599710cbffc77af09ff879a0a823774eab1ec5d94923b0f7b185f68ae0ffef42b5eaa180149516586e29797b1d4d3d0c084532c755ef717a117
|
data/README.md
CHANGED
@@ -7,8 +7,8 @@
|
|
7
7
|
**Contributors**: See Contributors section below
|
8
8
|
**Copyright**: 2007-2013
|
9
9
|
**License**: MIT License
|
10
|
-
**Latest Version**: 0.8.6.
|
11
|
-
**Release Date**:
|
10
|
+
**Latest Version**: 0.8.6.2
|
11
|
+
**Release Date**: June 27th 2013
|
12
12
|
|
13
13
|
## Synopsis
|
14
14
|
|
@@ -283,6 +283,9 @@ More options can be seen by typing `yard graph --help`, but here is an example:
|
|
283
283
|
|
284
284
|
## Changelog
|
285
285
|
|
286
|
+
- **June.27.13**: 0.8.6.2 release
|
287
|
+
- Fixed issue where `yard graph` was not displaying methods
|
288
|
+
|
286
289
|
- **April.14.13**: 0.8.6.1 release
|
287
290
|
- Fixed broken links in File menu on default HTML template
|
288
291
|
- Added --layout switch to `yard display` to wrap output in layout template.
|
data/lib/yard/cli/graph.rb
CHANGED
@@ -66,7 +66,7 @@ module YARD
|
|
66
66
|
# Parses commandline options.
|
67
67
|
# @param [Array<String>] args each tokenized argument
|
68
68
|
def optparse(*args)
|
69
|
-
visibilities = []
|
69
|
+
visibilities = [:public]
|
70
70
|
opts = OptionParser.new
|
71
71
|
|
72
72
|
opts.separator ""
|
@@ -113,7 +113,8 @@ module YARD
|
|
113
113
|
|
114
114
|
Registry.load
|
115
115
|
|
116
|
-
|
116
|
+
expression = "#{visibilities.uniq.inspect}.include?(object.visibility)"
|
117
|
+
options.verifier = Verifier.new(expression)
|
117
118
|
if args.first
|
118
119
|
@objects = args.map {|o| Registry.at(o) }.compact
|
119
120
|
else
|
data/lib/yard/cli/yardoc.rb
CHANGED
@@ -80,7 +80,9 @@ module YARD
|
|
80
80
|
stmts = nil
|
81
81
|
if prevchar == '{'
|
82
82
|
stmts = consume_body_statements
|
83
|
-
|
83
|
+
if decl =~ /\A(typedef|enum|class|#{struct}|union)/
|
84
|
+
consume_until(';')
|
85
|
+
end
|
84
86
|
end
|
85
87
|
statement.source = @content[start..@index]
|
86
88
|
statement.block = stmts
|
@@ -219,6 +221,10 @@ module YARD
|
|
219
221
|
def char(num = 1) @content[@index, num] end
|
220
222
|
def prevchar(num = 1) @content[@index - 1, num] end
|
221
223
|
def nextchar(num = 1) @content[@index + 1, num] end
|
224
|
+
|
225
|
+
def struct
|
226
|
+
/struct\s[:alnum:]+\s\{/
|
227
|
+
end
|
222
228
|
end
|
223
229
|
end
|
224
230
|
end
|
data/lib/yard/version.rb
CHANGED
@@ -46,6 +46,11 @@ describe YARD::Parser::C::CParser do
|
|
46
46
|
parse(@contents)
|
47
47
|
Registry.at('Multifile#extra').docstring.should == ''
|
48
48
|
end
|
49
|
+
|
50
|
+
it "should differentiate between a struct and a pointer to a struct retval" do
|
51
|
+
parse(@contents)
|
52
|
+
Registry.at('Multifile#hello_mars').docstring.should == 'Hello Mars'
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
describe 'Foo class' do
|
@@ -1,6 +1,22 @@
|
|
1
|
+
struct hoge *
|
2
|
+
rb_fuga(VALUE obj)
|
3
|
+
{
|
4
|
+
return Qtrue;
|
5
|
+
}
|
6
|
+
|
7
|
+
/*
|
8
|
+
* Hello Mars
|
9
|
+
*/
|
10
|
+
VALUE
|
11
|
+
rb_hello_mars(VALUE obj, VALUE n)
|
12
|
+
{
|
13
|
+
return Qtrue;
|
14
|
+
}
|
15
|
+
|
1
16
|
void
|
2
17
|
Init_Multifile(void)
|
3
18
|
{
|
4
19
|
rb_cMultifile = rb_define_class("Multifile", rb_cObject);
|
5
20
|
rb_define_method(rb_cMultifile, "extra", rb_extra, 1); /* in extra.c */
|
21
|
+
rb_define_method(rb_cMultifile, "hello_mars", rb_hello_mars, 1);
|
6
22
|
}
|
@@ -647,7 +647,7 @@ describe YARD::Parser::SourceParser do
|
|
647
647
|
it "should display a warning for a syntax error (with new parser)" do
|
648
648
|
log.should_receive(:warn).with(/Syntax error in/)
|
649
649
|
log.should_receive(:backtrace)
|
650
|
-
YARD::Parser::SourceParser.parse_string("
|
650
|
+
YARD::Parser::SourceParser.parse_string("%!!!", :ruby)
|
651
651
|
end
|
652
652
|
end
|
653
653
|
|
@@ -45,20 +45,29 @@ describe YARD::Templates::Helpers::Markup::RDocMarkup do
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
describe '#to_html' do
|
49
|
+
def to_html(text)
|
50
|
+
html = YARD::Templates::Helpers::Markup::RDocMarkup.new(text).to_html
|
51
|
+
html.strip.gsub(/\r?\n/, '')
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'handles typewriter text' do
|
55
|
+
to_html('Hello +<code>+').should == '<p>Hello <tt><code></tt></p>'
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
48
59
|
describe '#fix_typewriter' do
|
49
60
|
def fix_typewriter(text)
|
50
61
|
YARD::Templates::Helpers::Markup::RDocMarkup.new('').send(:fix_typewriter, text)
|
51
62
|
end
|
52
63
|
|
53
64
|
it "should use #fix_typewriter to convert +text+ to <tt>text</tt>" do
|
54
|
-
fix_typewriter("Some +typewriter text
|
55
|
-
"Some <tt>typewriter"
|
56
|
-
" text <</tt>."
|
65
|
+
fix_typewriter("Some +typewriter text <+.").should ==
|
66
|
+
"Some <tt>typewriter text <</tt>."
|
57
67
|
fix_typewriter("Not +typewriter text.").should ==
|
58
68
|
"Not +typewriter text."
|
59
69
|
fix_typewriter("Alternating +type writer+ text +here+.").should ==
|
60
|
-
"Alternating <tt>type writer"
|
61
|
-
"</tt> text <tt>here</tt>."
|
70
|
+
"Alternating <tt>type writer</tt> text <tt>here</tt>."
|
62
71
|
fix_typewriter("No ++problem.").should ==
|
63
72
|
"No ++problem."
|
64
73
|
fix_typewriter("Math + stuff +is ok+").should ==
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<li><%= link_object(Registry.root,
|
1
|
+
<li><%= link_object(Registry.root, Registry.root.title, nil, false) %></li>
|
2
2
|
<%= class_list %>
|
@@ -111,11 +111,11 @@ clicked = null;
|
|
111
111
|
function linkList() {
|
112
112
|
$('#full_list li, #full_list li a:last').click(function(evt) {
|
113
113
|
if ($(this).hasClass('toggle')) return true;
|
114
|
-
if ($(this).find('.object_link a').length === 0) {
|
115
|
-
$(this).children('a.toggle').click();
|
116
|
-
return false;
|
117
|
-
}
|
118
114
|
if (this.tagName.toLowerCase() == "li") {
|
115
|
+
if ($(this).find('.object_link a').length === 0) {
|
116
|
+
$(this).children('a.toggle').click();
|
117
|
+
return false;
|
118
|
+
}
|
119
119
|
var toggle = $(this).children('a.toggle');
|
120
120
|
if (toggle.size() > 0 && evt.pageX < toggle.offset().left) {
|
121
121
|
toggle.click();
|
@@ -125,7 +125,7 @@ function linkList() {
|
|
125
125
|
if (clicked) clicked.removeClass('clicked');
|
126
126
|
var win = window.top.frames.main ? window.top.frames.main : window.parent;
|
127
127
|
if (this.tagName.toLowerCase() == "a") {
|
128
|
-
clicked = $(this).
|
128
|
+
clicked = $(this).parents('li').addClass('clicked');
|
129
129
|
win.location = this.href;
|
130
130
|
}
|
131
131
|
else {
|
@@ -45,7 +45,7 @@ end
|
|
45
45
|
|
46
46
|
def serialize_file(file)
|
47
47
|
index = options.files.index(file)
|
48
|
-
outfile = file.name + '.html'
|
48
|
+
outfile = file.name.downcase + '.html'
|
49
49
|
options.file = file
|
50
50
|
if file.attributes[:namespace]
|
51
51
|
options.object = Registry.at(file.attributes[:namespace])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.6.
|
4
|
+
version: 0.8.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loren Segal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
YARD is a documentation generation tool for the Ruby programming language.
|
@@ -596,7 +596,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
596
596
|
version: '0'
|
597
597
|
requirements: []
|
598
598
|
rubyforge_project: yard
|
599
|
-
rubygems_version: 2.0.
|
599
|
+
rubygems_version: 2.0.3
|
600
600
|
signing_key:
|
601
601
|
specification_version: 4
|
602
602
|
summary: Documentation tool for consistent and usable documentation in Ruby.
|