yard-docco 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.0.1 / 2011-08-01
2
+
3
+ - FIX an issue with some inline comments not appearing
4
+
1
5
  === 1.0.0 / 2011-07-31
2
6
 
3
7
  * Initial Release
@@ -1,20 +1,38 @@
1
+ # An example pirate ship.
1
2
  class Example
2
3
 
3
- def to_s
4
+ # @todo Yar! There be comments ahead, within these method. And if you are wise
5
+ # you will view the annotated source.
6
+ def a_word_of_warning
4
7
 
5
- # Comments at the start of will be collected with the comments below and
6
- # all notes and todos will be above even this.
7
- # @note that I want to tell you something
8
- # @todo this is a todo
9
- # This sentence was below the @note and the @todo but will appear with the
10
- # other sentences below them.
8
+ # Comments are found and collected and matched to the code that immediately
9
+ # follows the comments. You will be able to see these comments to the left
10
+ # of the source code that follows
11
11
  self.to_s.capitalize
12
+ end
13
+
14
+ # You must have stolen a pirate's rum to have been given this fate.
15
+ def walk_the_plank
12
16
 
13
- # Some comments at the end that should get included as well
17
+ # @note A note should be parsed and appear in the comments. Which will make
18
+ # it easier to find code that needs to be addressed.
19
+ puts "Yo Ho, Yo Ho!"
20
+
21
+ # I should have listened to the {#a_word_of_warning} (which I can link to
22
+ # and visit immediately from within the method comments). Too late.
23
+ puts "Walk the Plank!"
24
+
25
+ # @todo Even todo tags will appear as well. This todo is telling me I should
26
+ # code up the plank to walk.
27
+ #
28
+ # No code follows save for the end of the method, but the comment should still
29
+ # appear paired with a block of code.
14
30
 
15
31
  end
16
32
 
17
33
  #
34
+ # What? Even pirate ships need to export to XML.
35
+ #
18
36
  # Create an xml representation of the specified class based on defined
19
37
  # HappyMapper elements and attributes. The method is defined in a way
20
38
  # that it can be called recursively by classes that are also HappyMapper
data/lib/yard-docco.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module DoccoInTheYARD
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
4
4
 
5
5
  YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/../templates'
@@ -7,7 +7,7 @@
7
7
  <% object.annotated_source.each do |source| %>
8
8
  <tr>
9
9
  <td class="comment">
10
- <span><%= docstring_comment Array(source.first).join("\n") %>
10
+ <span><%= docstring_comment source.first %>
11
11
  </td>
12
12
  <td class="line-numbers">
13
13
  <pre class="lines" style="padding-right: 0px;"><%= h show_annotated_lines(source) %></pre>
@@ -104,7 +104,7 @@ def annotate_source(source)
104
104
  # If we have finished parsing lines and we still have code within a home, which
105
105
  # is likely if the the source code ends with an end. We want to create a new pair
106
106
  if current_code
107
- annotated << [ finished_comment.to_s, current_code ]
107
+ annotated << [ finished_comment, current_code ]
108
108
  current_code = nil
109
109
  end
110
110
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: yard-docco
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Franklin Webber
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-31 00:00:00 -07:00
13
+ date: 2011-08-01 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -52,7 +52,7 @@ homepage: http://github.com/burtlo/yard-docco
52
52
  licenses: []
53
53
 
54
54
  post_install_message: "\n\
55
- (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==)\n\n Thank you for installing yard-docco 1.0.0 / 2011-07-31.\n \n Changes:\n \n * Initial Release\n\
55
+ (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==)\n\n Thank you for installing yard-docco 1.0.1 / 2011-08-01.\n \n Changes:\n \n - FIX an issue with some inline comments not appearing\n \n\n\
56
56
  (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==) (==)\n\n"
57
57
  rdoc_options:
58
58
  - --charset=UTF-8