Skip to content

Commit

Permalink
use rdoc gem version instead that supports :section:
Browse files Browse the repository at this point in the history
  • Loading branch information
qrush committed May 16, 2011
1 parent fde0199 commit 8e1706e
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 142 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gem "rdoc"
require 'rdoc/rdoc'
require 'rake/rdoctask'
require 'fileutils'

Expand Down
25 changes: 18 additions & 7 deletions rdoc/generator/template/jekdoc/classpage.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,25 @@ next: /rubygems-org-api

<%= klass.description %>
# Attributes
<% unless klass.attributes.empty? %>
<% klass.each_attribute do |attrib| %>
## <%= h attrib.name %>
<% if attrib.comment %>
<%= attrib.description.strip %>
<% sections = {} %>
<% klass.each_section do |section, constants, attributes| %>
<% sections[section] = attributes %>
<% end %>
<% sections.to_a.reverse.each do |section, attributes| %>
<% if section.title %>
# <%= section.title %>
<% end %>
<%= section.description if section.comment %>
<% unless attributes.empty? %>
<% attributes.each do |attrib| %>

## <%= h attrib.name %>
<%= attrib.description.strip if attrib.comment %>
<% end %>
<% end %>
<% end %>
248 changes: 113 additions & 135 deletions specification-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,182 +5,160 @@ previous: /command-reference
next: /rubygems-org-api
---

<p>
The <a href="Specification.html">Specification</a> class contains the

<p>The <a href="Specification.html">Specification</a> class contains the
metadata for a <a href="../Gem.html">Gem</a>. Typically defined in a
.gemspec file or a Rakefile, and looks like this:
</p>
<pre>
spec = Gem::Specification.new do |s|
s.name = 'example'
s.version = '1.0'
s.summary = 'Example gem specification'
...
end
</pre>
<p>
For a great way to package gems, use Hoe.
</p>

# Attributes
.gemspec file or a Rakefile, and looks like this:</p>

<pre>spec = Gem::Specification.new do |s|
s.name = 'example'
s.version = '1.0'
s.summary = 'Example gem specification'
...
end</pre>

<p>For a great way to package gems, use Hoe.</p>


## name




<p>
This gem&#8217;s name
</p>

## version
# Required gemspec attributes



<p>
This gem&#8217;s version
</p>



## name

<p>This gem’s name</p>

## require_paths

<p>
Paths in the gem to add to $LOAD_PATH when this gem is activated.
</p>
<p>
The default [&#8216;lib&#8217;] is typically sufficient.
</p>

<p>Paths in the gem to add to $LOAD_PATH when this gem is activated.</p>

<p>The default [‘lib’] is typically sufficient.</p>

## rubygems_version

<p>
The version of RubyGems used to create this gem.
</p>
<p>
Do not set this, it is set automatically when the gem is packaged.
</p>

<p>The version of RubyGems used to create this gem.</p>

<p>Do not set this, it is set automatically when the gem is packaged.</p>

## specification_version

<p>
The <a href="Specification.html">Gem::Specification</a> version of this
gemspec.
</p>
<p>
Do not set this, it is set automatically when the gem is packaged.
</p>

<p>The <a href="Specification.html">Gem::Specification</a> version of this
gemspec.</p>

<p>Do not set this, it is set automatically when the gem is packaged.</p>

## summary

<p>
A short summary of this gem&#8217;s description. Displayed in `gem list
-d`.
</p>
<p>
The description should be more detailed than the summary. For example, you
might wish to copy the entire README into the description.
</p>
<p>A short summary of this gem’s description. Displayed in `gem list -d`.</p>

<p>The description should be more detailed than the summary. For example, you
might wish to copy the entire README into the description.</p>

## version

<p>This gem’s version</p>

## autorequire

<p>
Autorequire was used by old RubyGems to automatically require a file.
</p>
<p>
Deprecated: It is neither supported nor functional.
</p>

## bindir
# Optional gemspec attributes



<p>
The path in the gem for executable scripts. Usually &#8216;bin&#8217;
</p>



## activated

<p>True when this gemspec has been activated. This attribute is not persisted.</p>

## activated?

<p>True when this gemspec has been activated. This attribute is not persisted.</p>

## autorequire

<p>Autorequire was used by old RubyGems to automatically require a file.</p>

<p>Deprecated: It is neither supported nor functional.</p>

## bindir

<p>The path in the gem for executable scripts. Usually ‘bin’</p>

## cert_chain

<p>
The certificate chain used to sign this gem. See Gem::Security for
details.
</p>

## description
<p>The certificate chain used to sign this gem. See Gem::Security for
details.</p>

<p>
A long description of this gem
</p>

## default_executable

<p>
Sets the default executable for this gem.
</p>
<p>
Deprecated: You must now specify the executable name to Gem.bin_path.
</p>

<p>Sets the default executable for this gem.</p>

<p>Deprecated: You must now specify the executable name to Gem.bin_path.</p>

## description

<p>A long description of this gem</p>

## email

<p>
A contact email for this gem
</p>
<p>
If you are providing multiple authors and multiple emails they should be in
the same order such that:
</p>
<pre>
Hash[*spec.authors.zip(spec.emails).flatten]
</pre>
<p>
Gives a hash of author name to email address.
</p>

<p>A contact email for this gem</p>

<p>If you are providing multiple authors and multiple emails they should be in
the same order such that:</p>

<pre>Hash[*spec.authors.zip(spec.emails).flatten]</pre>

<p>Gives a hash of author name to email address.</p>

## homepage

<p>
The URL of this gem&#8217;s home page
</p>

<p>The URL of this gem’s home page</p>

## loaded

<p>
True when this gemspec has been activated. This attribute is not persisted.
</p>
## activated
<p>True when this gemspec has been activated. This attribute is not persisted.</p>

## loaded?

<p>True when this gemspec has been activated. This attribute is not persisted.</p>

<p>
True when this gemspec has been activated. This attribute is not persisted.
</p>

## loaded_from

<p>
Path this gemspec was loaded from. This attribute is not persisted.
</p>

<p>Path this gemspec was loaded from. This attribute is not persisted.</p>

## post_install_message

<p>
A message that gets displayed after the gem is installed
</p>

<p>A message that gets displayed after the gem is installed</p>

## required_ruby_version

<p>
The version of ruby required by this gem
</p>

<p>The version of ruby required by this gem</p>

## required_rubygems_version

<p>
The RubyGems version required by this gem
</p>

<p>The RubyGems version required by this gem</p>

## rubyforge_project

<p>
The rubyforge project this gem lives under. i.e. RubyGems&#8217; <a
href="Specification.html#rubyforge_project">rubyforge_project</a> is
&#8220;rubygems&#8221;.
</p>

<p>The rubyforge project this gem lives under. i.e. RubyGems’ <a
href="Specification.html#attribute-i-rubyforge_project">rubyforge_project</a>
is “rubygems”.</p>

## signing_key

<p>
The key used to sign this gem. See Gem::Security for details.
</p>
<p>The key used to sign this gem. See Gem::Security for details.</p>






0 comments on commit 8e1706e

Please sign in to comment.