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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 423812ba8b57f788358b8e8a063406734ffcd8aa
4
- data.tar.gz: 3847cd78486e1964b9a6c71bc3a791e82331a763
3
+ metadata.gz: 79ac2562993c76c250d449d1c1b0e2a62b41790f
4
+ data.tar.gz: bb2c0b58aac5e48b9c687e9495dbe5a420433259
5
5
  SHA512:
6
- metadata.gz: 8f9ac29d7ed76bc7100931b4403c655d78fc2078102fb0c3d44fc972a4f2bcf31302ebd1676927b7322b980621a5274a8a1682ba7235f4ee7cf2d24c561250bc
7
- data.tar.gz: b450ef97c370faaa21934a7b9c2af03b32a4f692db7a2246efb39204fd039f89a07bcda58a533bcdcfe301b5904a2c598fcd315f5b0f1cfdb6aa57e04e2f2fb0
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.1
11
- **Release Date**: April 14th 2013
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.
@@ -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
- options.verifier = Verifier.new("object.type != :method || #{visibilities.uniq.inspect}.include?(object.visibility)")
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
@@ -683,7 +683,7 @@ module YARD
683
683
 
684
684
  opts.on('--po-dir DIR',
685
685
  'The directory that has .po files.',
686
- ' (defaults to #{YARD::Registry.po_dir})') do |dir|
686
+ " (defaults to #{YARD::Registry.po_dir})") do |dir|
687
687
  YARD::Registry.po_dir = dir
688
688
  end
689
689
  end
@@ -80,7 +80,9 @@ module YARD
80
80
  stmts = nil
81
81
  if prevchar == '{'
82
82
  stmts = consume_body_statements
83
- consume_until(';') if decl =~ /\A(typedef|enum|class|struct|union)\b/
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
@@ -72,7 +72,7 @@ module YARD
72
72
  next str
73
73
  end
74
74
  next str unless code_tags == 0
75
- first_text + '<tt>' + CGI.escapeHTML(type_text) + '</tt>'
75
+ first_text + '<tt>' + type_text + '</tt>'
76
76
  end
77
77
  end
78
78
 
@@ -1,3 +1,3 @@
1
1
  module YARD
2
- VERSION = "0.8.6.1"
2
+ VERSION = "0.8.6.2"
3
3
  end
@@ -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("$$$", :ruby)
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>&lt;code&gt;</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 <+.").should ==
55
- "Some <tt>typewriter" +
56
- " text &lt;</tt>."
65
+ fix_typewriter("Some +typewriter text &lt;+.").should ==
66
+ "Some <tt>typewriter text &lt;</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 ==
@@ -11,6 +11,7 @@
11
11
  <script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script>
12
12
  <% end %>
13
13
 
14
+ <title><%= @list_title %></title>
14
15
  <base id="base_target" target="_parent" />
15
16
  </head>
16
17
  <body>
@@ -1,2 +1,2 @@
1
- <li><%= link_object(Registry.root, nil, nil, false) %></li>
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).parent('li').addClass('clicked');
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.1
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-04-15 00:00:00.000000000 Z
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.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.