<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>docs.rubygems.org recent changes</title>
  <id>tag:docs.rubygems.org,2004:Hieraki</id>
  <generator uri="http://www.hieraki.org">Hieraki</generator>
  <link href="http://docs.rubygems.org/shelf/index" rel="alternate" type="text/html" />
  <updated>2010-12-28T19:03:01Z</updated>

  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RubyGems-Docs-Recent-Changes-atom" /><feedburner:info uri="rubygems-docs-recent-changes-atom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-375</id>
    <updated>2010-12-28T19:03:01Z</updated>
    <title>Gonçalo Silva: Publishing</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/CRkKNcf0gJ4/27" />
    <content type="html">&lt;p&gt;After everything is coded and tested, all you got left to do is packaging and publishing. The previously mentioned &lt;em&gt;gem&lt;/em&gt; utility makes it all very simple. Just run &lt;code&gt;gem build your_gem.gemspec&lt;/code&gt; and you should see something along these lines:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;Successfully built RubyGem
Name: your_gem
Version: 0.0.1
File: your_gem-0.0.1.gem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pushing your gem to RubyGems is as easy as it is to build it. Just &lt;code&gt;gem push your_gem-0.0.1.gem&lt;/code&gt; and soon it&amp;#8217;ll be published. Be aware that the first time you issue this command you&amp;#8217;ll be prompted to login with a RubyGems.org account.&lt;/p&gt; 

&lt;p&gt;Concerning this, I personally like keeping these simple tasks in my &lt;em&gt;Rakefile&lt;/em&gt;:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;desc "Validate the gemspec"
task :gemspec do
  gemspec.validate
end
 
desc "Build gem locally"
task :build =&amp;gt; :gemspec do
  system "gem build #{gemspec.name}.gemspec"
  FileUtils.mkdir_p "pkg"
  FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", "pkg"
end
 
desc "Install gem locally"
task :install =&amp;gt; :build do
  system "gem install pkg/#{gemspec.name}-#{gemspec.version}"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These help me build and install my gems. They also aid at keeping all packages in the &lt;em&gt;pkg/&lt;/em&gt; folder, which is useful for keeping the root directory clean and tidy.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/CRkKNcf0gJ4" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page114</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-374</id>
    <updated>2010-12-27T16:34:07Z</updated>
    <title>Gonçalo Silva: Gem template</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/ju_aAUcPAss/27" />
    <content type="html">&lt;p&gt;As I mentioned, I&amp;#8217;ve been using a gem skeleton for some time now, which &lt;a href="https://github.com/goncalossilva/gem_template%20gem_template"&gt;you can find at GitHub&lt;/a&gt;. Every gem I&amp;#8217;ve built started with that template, which I kept trying to improve over time.&lt;/p&gt; 

&lt;p&gt;You can start your gems from scratch, but that&amp;#8217;s just nonsense. You should create your own skeleton, use one made by someone else or use a third-party gem to help creating your gem.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/ju_aAUcPAss" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page116</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-373</id>
    <updated>2010-12-27T16:33:56Z</updated>
    <title>Gonçalo Silva: Gems for building gems</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/C6Asb7xyw0o/27" />
    <content type="html">&lt;p&gt;There are a few gems which were specifically created to help developers build their own gems. Among them are the renowned &lt;a href="https://github.com/technicalpickles/jeweler%20jeweler"&gt;jeweler&lt;/a&gt;, &lt;a href="https://github.com/seattlerb/hoe%20hoe"&gt;hoe&lt;/a&gt; and &lt;a href="https://github.com/fauna/echoe%20echoe"&gt;echoe&lt;/a&gt;. I can&amp;#8217;t go into detail in any of these since I&amp;#8217;ve never really used them—I started building my own gem skeleton from scratch right at the beginning. However, some of these tools are very helpful so you should &lt;strong&gt;really&lt;/strong&gt; take a look and see if any fits your needs.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/C6Asb7xyw0o" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page115</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-372</id>
    <updated>2010-12-27T16:33:41Z</updated>
    <title>Gonçalo Silva: Publishing</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/CRkKNcf0gJ4/27" />
    <content type="html">&lt;p&gt;After everything is coded and tested, all you got left to do is packaging and publishing. The previously mentioned &lt;em&gt;gem&lt;/em&gt; utility makes it all very simple. Just run &lt;code&gt;gem build your_gem.gemspec&lt;/code&gt; and you should see something along these lines:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;Successfully built RubyGem
Name: your_gem
Version: 0.0.1
File: your_gem-0.0.1.gem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pushing your gem to RubyGems is as easy as it is to build it. Just &lt;code&gt;gem push your_gem-0.0.1.gem&lt;/code&gt; and soon it&amp;#8217;ll be published. Be aware that the first time you issue this command you&amp;#8217;ll be prompted to login with a RubyGems.org account.&lt;/p&gt; 

&lt;p&gt;Concerning this, I personally like keeping these simple tasks in my &lt;em&gt;Rakefile&lt;/em&gt;:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;desc "Validate the gemspec"
task :gemspec do
  gemspec.validate
end
 
desc "Build gem locally"
task :build =&amp;amp;gt; :gemspec do
  system "gem build #{gemspec.name}.gemspec"
  FileUtils.mkdir_p "pkg"
  FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", "pkg"
end
 
desc "Install gem locally"
task :install =&amp;amp;gt; :build do
  system "gem install pkg/#{gemspec.name}-#{gemspec.version}"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These help me build and install my gems. They also aid at keeping all packages in the &lt;em&gt;pkg/&lt;/em&gt; folder, which is useful for keeping the root directory clean and tidy.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/CRkKNcf0gJ4" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page114</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-371</id>
    <updated>2010-12-27T16:33:15Z</updated>
    <title>Gonçalo Silva: Testing</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/GjR8bfI6A9Y/27" />
    <content type="html">&lt;p&gt;When it comes to testing, you&amp;#8217;ve got plenty of good options. Some people rely on test-unit (or minitest in 1.9), others prefer RSpec. It&amp;#8217;s really up to you. The only bad choice you can possibly make is opting to &lt;strong&gt;not&lt;/strong&gt; testing your gems at all.&lt;/p&gt; 

&lt;p&gt;Once again, I&amp;#8217;m going to use dummy&amp;#8217;s simplicity to explain this a bit further. All tests were built on test-unit and are organized as follow:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;dummy/
|-- test/
|   |-- address_test.rb
|   |-- company_test.rb
|   |-- ...
|   |-- test_helper.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you&amp;#8217;ve seen, tests are structured similarly to dummy itself. The test_helper is in charge of loading the necessary libraries and setting up any variables or methods used across most (if not all) tests. All tests are organized into files which target specific functionality in dummy. The tests contained in &lt;em&gt;address_test.rb&lt;/em&gt; run against &lt;em&gt;address.rb&lt;/em&gt; and so on.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/GjR8bfI6A9Y" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page113</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-370</id>
    <updated>2010-12-27T16:33:00Z</updated>
    <title>Gonçalo Silva: Ruby Idioms</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/3eUK7OL5_to/27" />
    <content type="html">&lt;p&gt;When developing a gem, you are probably creating, extending or overriding functionality. You might want people to include your module in their classes, or perhaps you just want to extend a given class with your module—it&amp;#8217;s your choice. What you shouldn&amp;#8217;t really do, however, is reinventing Ruby&amp;#8217;s module system. There is an &lt;a href="http://yehudakatz.com/2009/11/12/better-ruby-idioms/%20Better%20Ruby%20Idioms"&gt;excellent blog post&lt;/a&gt; on this which can help if you—like many gem authors I&amp;#8217;ve seen—start overriding &lt;code&gt;include&lt;/code&gt; to behave like &lt;code&gt;extend&lt;/code&gt;. It&amp;#8217;s very important to understand the difference between the two and, fortunately, there are &lt;a href="http://railstips.org/blog/archives/2009/05/15/include-vs-extend-in-ruby/%20Include%20vs%20Extend%20in%20Ruby"&gt;great resources&lt;/a&gt; about this out there.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/3eUK7OL5_to" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page112</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-369</id>
    <updated>2010-12-27T16:32:46Z</updated>
    <title>Gonçalo Silva: Introduction</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/DdLAInPIOTI/27" />
    <content type="html">&lt;p&gt;Making your own gem is nothing more than packaging your library or application according to the structure stated above. Put all your code under &lt;em&gt;lib/&lt;/em&gt;, all your tests under &lt;em&gt;test/&lt;/em&gt; or &lt;em&gt;spec/&lt;/em&gt;, your gem specification under &lt;em&gt;your_gem.gemspec&lt;/em&gt; and you&amp;#8217;re good to go. Of course, a few other files might come in handy, namely a &lt;em&gt;Rakefile&lt;/em&gt;, a &lt;em&gt;&lt;span class="caps"&gt;README&lt;/span&gt;&lt;/em&gt; and a &lt;em&gt;&lt;span class="caps"&gt;LICENSE&lt;/span&gt;&lt;/em&gt;. A &lt;em&gt;&lt;span class="caps"&gt;CHANGELOG&lt;/span&gt;&lt;/em&gt;, in some cases, might be useful as well.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/DdLAInPIOTI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/27#page111</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-368</id>
    <updated>2010-12-27T16:31:44Z</updated>
    <title>Gonçalo Silva: Introduction</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/kcZQ2vW9daI/26" />
    <content type="html">&lt;p&gt;Gems are very useful for not reinventing the wheel and avoiding duplication. That&amp;#8217;s basically it. Many Ruby developers create and publish awesome gems which address specific requirements, solve specific problems or add specific functionality. Anyone who comes across similar requirements or problems can use them and eventually improve them. That&amp;#8217;s the combined awesomeness of Ruby&amp;#8217;s strong open-source foundation and extreme flexibility. Anyway, you&amp;#8217;re reading this article&amp;#8230; so you&amp;#8217;ve probably understood the concept and grasped its usefulness long before reading this paragraph.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/kcZQ2vW9daI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/26#page110</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-367</id>
    <updated>2010-12-27T16:31:06Z</updated>
    <title>Gonçalo Silva: RubyGems</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/BQIwXQVwDnY/24" />
    <content type="html">&lt;p&gt;Finally, RubyGems. It is a package manager which became part of the standard library in Ruby 1.9. It allows developers to search, install and build gems, among other features. All of this is done by using the &lt;code&gt;gem&lt;/code&gt; command-line utility. You can find its website at &lt;a href="http://rubygems.org%20RubyGems.org%20|%20your%20community%20gem%20host"&gt;rubygems.org&lt;/a&gt;.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/BQIwXQVwDnY" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/24#page109</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-366</id>
    <updated>2010-12-27T16:30:35Z</updated>
    <title>Gonçalo Silva: Introduction</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/D-HkC--gHL8/24" />
    <content type="html">&lt;p&gt;At its most basic form, a Ruby gem is a package. It contains the necessary files and information for being installed on the system. Quoting &lt;a href="http://docs.rubygems.org/read/chapter/1%20Introducing%20RubyGems"&gt;RubyGems&lt;/a&gt;, «a gem is a packaged Ruby application or library. It has a name (e.g. rake) and a version (e.g. 0.4.16)».&lt;/p&gt; 

&lt;p&gt;Being very powerful, gems are of great importance in the Rubyland. They can easily be used to extend or modify functionality within Ruby applications.&lt;/p&gt; &lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/D-HkC--gHL8" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/24#page108</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Gonçalo Silva</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-365</id>
    <updated>2010-12-27T16:29:17Z</updated>
    <title>Gonçalo Silva: Structure</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/mnkOtfFOobQ/24" />
    <content type="html">&lt;p&gt;Every gem is different, but most follow a basic structure:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;gem/
|-- lib/
|   |-- gem.rb  
|-- test/
|-- README
|-- Rakefile
|-- gem.gemspec
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Your gem&amp;#8217;s code is located under &lt;em&gt;lib/&lt;/em&gt; which typically holds a Ruby file with the name of the gem. You can choose to have all the magic happening in this file, but you can also use it to load some other Ruby files also located under &lt;em&gt;lib/&lt;/em&gt;, typically inside a folder with the gem&amp;#8217;s name. Confused? Have a look:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;your_gem/
|-- lib/
|   |-- your_gem.rb
|   |-- your_gem/
|   |   |-- source1.rb
|   |   |-- source2.rb
|-- ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The test folder&amp;#8217;s name is not necessarily named &lt;em&gt;test/&lt;/em&gt;. When you&amp;#8217;re working with &lt;a href="http://rspec.info/%20RSpec"&gt;RSpec&lt;/a&gt;, for instance, its name is usually &lt;em&gt;spec/&lt;/em&gt;. As you&amp;#8217;ve probably guessed, this folder holds tests for your gem.&lt;/p&gt; 

&lt;p&gt;After the &lt;em&gt;&lt;span class="caps"&gt;README&lt;/span&gt;&lt;/em&gt; file, which hopefully doesn&amp;#8217;t need any introduction, comes the &lt;em&gt;Rakefile&lt;/em&gt;. In a gem&amp;#8217;s context, the &lt;em&gt;Rakefile&lt;/em&gt; is extremely useful. It can hold various tasks to help building, testing and debugging your gem, among all other things that you might find useful.&lt;/p&gt; 

&lt;p&gt;The &lt;em&gt;gemspec&lt;/em&gt;—as the name implies—contains your gem&amp;#8217;s specification by defining several attributes. An example &lt;em&gt;gemspec&lt;/em&gt; file could be:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;Gem::Specification.new do |s|
  s.name              = "gem"
  s.version           = "0.0.1"
  s.platform          = Gem::Platform::RUBY
  s.authors           = ["Gonçalo Silva"]
  s.email             = ["goncalossilva@gmail.com"]
  s.homepage          = "http://github.com/goncalossilva/gem_template"
  s.summary           = "Sample gem"
  s.description       = "A gem template"
  s.rubyforge_project = s.name
 
  s.required_rubygems_version = "&amp;amp;gt;= 1.3.6"
 
  # If you have runtime dependencies, add them here
  # s.add_runtime_dependency "other", "~&amp;amp;gt; 1.2"
 
  # If you have development dependencies, add them here
  # s.add_development_dependency "another", "= 0.9"
 
  # The list of files to be contained in the gem 
  s.files         = `git ls-files`.split("\n")
  # s.executables   = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
  # s.extensions    = `git ls-files ext/extconf.rb`.split("\n")
 
  s.require_path = 'lib'
 
  # For C extensions
  # s.extensions = "ext/extconf.rb"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some attributes like the name, version, platform and summary are required. Nonetheless, the vast majority is optional. If you use git with your project, you can use the nifty trick shown above to list the project&amp;#8217;s files, executables and extensions. If you don&amp;#8217;t, you can simply fall back to using pure Ruby code like:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;  s.files = Dir["{lib}/**/*.rb", "{lib}/**/*.rake", "{lib}/**/*.yml", "LICENSE", "*.md"]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;a href="http://github.com/goncalossilva/dummy"&gt;dummy&lt;/a&gt; gem is very simple. Because of this, it perfectly illustrates some of the ideas explained above. Some interesting bits are shown below:&lt;/p&gt; 

&lt;pre&gt;&lt;code&gt;dummy/
|-- lib/
|   |-- dummy/
|   |   |-- core_ext/
|   |   |   |-- array.rb
|   |   |   |-- string.rb
|   |   |-- address.rb
|   |   |-- company.rb
|   |   |-- ...
|   |-- dummy.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This gem is organized into several source files inside &lt;em&gt;lib/&lt;/em&gt;. The &lt;em&gt;dummy.rb&lt;/em&gt; implements the &lt;strong&gt;top-level module&lt;/strong&gt; and &lt;strong&gt;loads all functionality&lt;/strong&gt; from the Ruby files inside &lt;em&gt;lib/dummy/&lt;/em&gt;. It also includes some core extensions, namely to the &lt;em&gt;Array&lt;/em&gt; and &lt;em&gt;String&lt;/em&gt; classes (which are part of Ruby&amp;#8217;s core).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/mnkOtfFOobQ" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/24#page107</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Josh Nichols</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-363</id>
    <updated>2010-12-08T23:17:40Z</updated>
    <title>Josh Nichols: Searching remotely installable gems</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/l5mfyulurWU/2" />
    <content type="html">&lt;p&gt;When you run&lt;/p&gt;
&lt;pre&gt;  gem query --remote --name-matches doom
  # shortcut: gem q -R -n doom&lt;/pre&gt;
&lt;p&gt;you will see a detailed list of &lt;em&gt;matching&lt;/em&gt; gems on the remote server.&lt;/p&gt;
&lt;p&gt;Sample output:&lt;/p&gt;
&lt;pre&gt;
*** REMOTE GEMS ***

ruby-doom (0.8, 0.0.7)
    Ruby-DOOM provides a scripting API for creating DOOM
    maps. It also provides higher-level APIs to make map
    creation easier.
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/l5mfyulurWU" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/2#page4</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Josh Nichols</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-362</id>
    <updated>2010-11-16T01:47:39Z</updated>
    <title>Josh Nichols: Specification Reference</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/pPHxSbsYTSI/20" />
    <content type="html">&lt;p&gt;For the most up-to-date information, see &lt;a href="http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html"&gt;Gem::Specification&lt;/a&gt; in the &lt;a href="http://rubygems.rubyforge.org/rubygems-update/"&gt;RubyGems &lt;span class="caps"&gt;API&lt;/span&gt; documention&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In order to create a gem, you need to define a gem specification, commonly&lt;br /&gt;
called a &amp;#8220;gemspec&amp;#8221;.&lt;/p&gt;
&lt;p&gt;A gemspec consists of several &lt;em&gt;attributes&lt;/em&gt;.  Some of these are required;&lt;br /&gt;
most of them are optional.  The main body of this document is an alphabetical&lt;br /&gt;
list of gemspec attributes, each with a description, example usage, notes, and&lt;br /&gt;
more.&lt;/p&gt;
&lt;p&gt;See also:&lt;/p&gt;
&lt;h3&gt;&lt;a name="toc"&gt;Important Attributes&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Alphabetical&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt; &lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt; &lt;a href="#bindir"&gt;bindir&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt; &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;E&lt;/strong&gt; &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#extensions"&gt;extensions&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;F&lt;/strong&gt; &lt;a href="#files"&gt;files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;H&lt;/strong&gt; &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;L&lt;/strong&gt; &lt;a href="#license"&gt;license&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;N&lt;/strong&gt; &lt;a href="#name"&gt;name&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;P&lt;/strong&gt; &lt;a href="#platform"&gt;platform&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;R&lt;/strong&gt; &lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;S&lt;/strong&gt; &lt;a href="#summary"&gt;summary&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;T&lt;/strong&gt; &lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;V&lt;/strong&gt; &lt;a href="#version"&gt;version&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Themed&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Basics:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Files, Libraries, and Executables:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt; .. &lt;a href="#bindir"&gt;bindir&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;C compilation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#extensions"&gt;extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Testing:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;About:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Attribute Survey&lt;/h2&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="authors"&gt;authors&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author or authors of the package contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.author = 'John Jones'
  spec.authors = ['John Jones', 'Mary Smith']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="autorequire"&gt;autorequire&lt;/a&gt; (Deprecated)&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = nil&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The file that will be loaded when the &lt;tt&gt;gem&lt;/tt&gt; method is called.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.files = ['lib/rake.rb", "lib/rake/**/*.rb", ...]
  spec.autorequire = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This method is deprecated and should no longer be used. It is an artifact of older versions of Rubygems that used &lt;tt&gt;require_gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;As of Rubygems 1.0, you can simply use &lt;tt&gt;require&lt;/tt&gt; without any special handling so long as &lt;tt&gt;rubygems&lt;/tt&gt; is required first, or loaded automatically via the &lt;span class="caps"&gt;RUBYOPT&lt;/span&gt; environment variable or the -r command line option.&lt;/p&gt;
&lt;p&gt;The only exception to this rule are libraries from the Ruby standard library that are being independently maintained as third party gems, e.g. Test::Unit or RDoc. In those rare cases, you must call the &lt;tt&gt;gem&lt;/tt&gt; method first, followed by a &lt;tt&gt;require&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="bindir"&gt;bindir&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;bin&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The directory containing the application files, if any.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.bindir = 'bin'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;An &amp;#8220;application file&amp;#8221; is a file that is intended to be run from the command line.  If your package contains such files, they will typically be placed in a &lt;tt&gt;bin&lt;/tt&gt; directory, hence the name &lt;strong&gt;bindir&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="date"&gt;date&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Time;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Time.now&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The date/time that the gem was created.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.date = File.utime('VERSION')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;It&amp;#8217;s generally sufficient to leave it to the default.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="default_executable"&gt;default_executable&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = (see below)&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Of all the application files in the package, the &lt;strong&gt;default executable&lt;/strong&gt; is the one that can be run directly through the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.executables = ['bin/foo', 'bin/bar']
  spec.default_executable = 'bin/bar'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;If you only specify one application file in &lt;strong&gt;executables&lt;/strong&gt;, that file becomes the default executable.  Therefore, you only need to specify this value if you have more than one application file.&lt;/p&gt;
&lt;p&gt;The notion of running applications directly through a gem is not well supported at the moment.  The idea is that you can download a gem, say &lt;tt&gt;monopoly.gem&lt;/tt&gt; (the board game), and run &lt;tt&gt;gem monopoly.gem&lt;/tt&gt;, which would run the &lt;tt&gt;monopoly&lt;/tt&gt; application. This is not an in-demand feature.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Is the full path necessary?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="dependencies"&gt;dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the gems that must be installed for this gem to work.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_dependency('log4r', '&amp;gt;= 1.0.5')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When installing a gem with &lt;tt&gt;gem install &amp;#8230;&lt;/tt&gt;, its dependencies will be checked.  If they are not installed, &lt;tt&gt;gem&lt;/tt&gt; will offer to install them.&lt;/p&gt;
&lt;p&gt;See also &lt;a href="#requirements"&gt;requirements&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="development_dependencies"&gt;development dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Gems that are used for development purposes only.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_development_dependency('rspec')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Development dependencies are not installed by default, and are not activated when the gem is.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="description"&gt;description&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Detailed description of the gem.  See also &lt;a href="#summary"&gt;summary&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.description = &amp;lt;&amp;lt;-EOF
    Rake is a Make-like program implemented in Ruby. Tasks and
    dependencies are specified in standard Ruby syntax.
  EOF
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;As of Rubygems 1.3.2 there is no longer any automatic formatting of the description. Versions prior to this reformatted the description into a single line.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;description&lt;/em&gt; should be more detailed than the &lt;em&gt;summary&lt;/em&gt;.  You might consider copying all or part of your project&amp;#8217;s &lt;span class="caps"&gt;README&lt;/span&gt; into this field.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="email"&gt;email&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author&amp;#8217;s email address.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.email = 'john.jones@example.com'
  spec.email = ['jack@example.com', 'jill@example.com']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="executables"&gt;executables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of files in the package that are applications.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # XXX: is this correct?
  spec.executables &amp;lt;&amp;lt; 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For example, the &lt;tt&gt;rake&lt;/tt&gt; gem has &lt;tt&gt;rake&lt;/tt&gt; as an executable. You don&amp;#8217;t specify the full path (as in &lt;tt&gt;bin/rake&lt;/tt&gt;); all application-style files are expected to be found in &lt;a href="#bindir"&gt;bindir&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extensions"&gt;extensions&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The paths to &lt;tt&gt;extconf.rb&lt;/tt&gt;-style files used to compile extensions.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extensions &amp;lt;&amp;lt; 'ext/rmagic/extconf.rb'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;These files will be run when the gem is installed, causing the C (or whatever) code to be compiled on the user&amp;#8217;s machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Any other comments?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of &lt;em&gt;extra&lt;/em&gt; files that will be used by RDoc to generate the documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When the user elects to generate the RDoc documentation for a gem (typically at install time), all the library files are sent to RDoc for processing.  This option allows you to have some non-code files included for a more complete set of documentation.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="files"&gt;files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The list of files to be contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  require 'rake'
  spec.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
  
  # or without Rake...
  spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
  spec.files += Dir['[A-Z]*'] + Dir['test/**/*']
  spec.files.reject! { |fn| fn.include? "CVS" }
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;You don&amp;#8217;t need to use Rake, obviously, but it does make it much easier to specify files, as it automatically excludes &lt;span class="caps"&gt;CVS&lt;/span&gt; files, backups, etc.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="has_rdoc"&gt;has_rdoc&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: boolean;   &lt;em&gt;Optional&lt;/em&gt;;   default = false&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Indicates whether the code in the gem has been commented with RDoc in mind.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.has_rdoc = true
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This attribute has an advisory role only.  Any gem can be submitted for RDoc processing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="homepage"&gt;homepage&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;&lt;span class="caps"&gt;URL&lt;/span&gt; of the project or author.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.hompage = 'http://rake.rubyforge.org'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="license"&gt;license&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The license(s) for the library.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # single license
  spec.license = 'MIT'

  # multiple licenses
  spec.licenses = ['MIT', 'GPL-2']
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Each license must be a short name, no more than 64 characters.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="name"&gt;name&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The name of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.name = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The name does not include the version number; see &lt;a href="#version"&gt;version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="platform"&gt;platform&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Gem::Platform::Ruby&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The target platform for the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.platform = Gem::Platform::Win32
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Most gems contain pure Ruby code; they should simply leave the default value in place.  Some gems contain C (or other) code to be compiled into a Ruby &amp;#8220;extension&amp;#8221;.  The should leave the default value in place unless their code will only compile on a certain type of system.  Some gems consist of pre-compiled code (&amp;#8220;binary gems&amp;#8221;).  It&amp;#8217;s especially important that they set the &lt;em&gt;platform&lt;/em&gt; attribute appropriately.  A shortcut is to set the platform to Gem::Platform::&lt;span class="caps"&gt;CURRENT&lt;/span&gt;, which will cause the gem builder to set the platform to the appropriate value for the system on which the build is being performed.&lt;/p&gt;
&lt;p&gt;If this attribute is set to a non-default value, it will be included in the filename of the gem when it is built, e.g. &lt;tt&gt;fxruby-1.2.0-win32.gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rdoc_options"&gt;rdoc_options&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Specifies the &lt;tt&gt;rdoc&lt;/tt&gt; options to be used when generating &lt;span class="caps"&gt;API&lt;/span&gt; documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rdoc_options &amp;lt;&amp;lt; '--title' &amp;lt;&amp;lt; 'Rake -- Ruby Make' &amp;lt;&amp;lt;
                       '--main' &amp;lt;&amp;lt; 'README' &amp;lt;&amp;lt;
                       '--line-numbers'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="require_paths"&gt;require_paths&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Required&lt;/em&gt;;   default = [&amp;#8220;lib&amp;#8221;]&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;List of &amp;#8217;&amp;#8217;require&amp;#8217;&amp;#8217; paths from the root of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If all library files are in the root directory...
  spec.require_path = '.'
  
  # If you have 'lib' and 'ext' directories...
  spec.require_paths &amp;lt;&amp;lt; 'ext'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The default is sufficient in most cases, as Ruby packages tend to be structured so that library code is found under the &lt;tt&gt;lib&lt;/tt&gt; directory.&lt;/p&gt;
&lt;p&gt;The example above shows that you can use &lt;tt&gt;spec.require_path = &amp;#8216;&amp;#8230;&amp;#8217;&lt;/tt&gt; instead of &lt;tt&gt;spec.require_paths = [&amp;#8230;]&lt;/tt&gt;.  This is a shortcut, acknowledging that nearly all gems will have only one require path element.&lt;/p&gt;
&lt;p&gt;Be careful about interpreting this attribute, however.  It is used to modify the &lt;tt&gt;LOAD_PATH&lt;/tt&gt;, and thus to resolve &lt;tt&gt;require&lt;/tt&gt; calls.  So if code calls &lt;tt&gt;require &amp;#8216;rake/packagetask&amp;#8217;&lt;/tt&gt;, for example, and the &lt;tt&gt;require_paths&lt;/tt&gt; is set to &lt;tt&gt;lib&lt;/tt&gt;, then there had better be a file &lt;tt&gt;lib/rake/packagetask.rb&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="required_ruby_version"&gt;required_ruby_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Gem::Version::Requirement;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&amp;gt; 0.0.0&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of Ruby required to use the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If it will work with 1.6.8 or greater...
  spec.required_ruby_version = '&amp;gt;= 1.6.8'
  
  # ...but not with 1.7/1.8...
  spec.required_ruby_version = '~&amp;gt; 1.6.8'
  
  # The typical case these days...
  spec.required_ruby_version = '&amp;gt;= 1.8.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;See the RubyGems wiki for documentation on specifying versions.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="requirements"&gt;requirements&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the external (to &lt;nowiki&gt;RubyGems&lt;/nowiki&gt;) requirements that must be met for this gem to work.  It&amp;#8217;s simply information for the user.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.requirements &amp;lt;&amp;lt; 'libmagick, v6.0 or greater'
  spec.requirements &amp;lt;&amp;lt; 'A powerful graphics card'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For requirements that can be met by other gems, see &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The RubyForge project corresponding to the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rubyforge_project = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Obviously, if your gem doesn&amp;#8217;t have a Rubyforge project, leave this setting alone.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubygems_version"&gt;rubygems_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;current version of RubyGems&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of RubyGems used to create this gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="specification_version"&gt;specification_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Integer;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;Revision level of the RubyGems specification this gem conforms to.&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The revision level of the GemSpec specification that this gem conforms to.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="summary"&gt;summary&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A short description of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.summary = 'Ruby based make-like utility.'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The summary is used to describe the gem in lists produced by the &lt;tt&gt;gem&lt;/tt&gt; tool.  See also &lt;a href="#description"&gt;description&lt;/a&gt;, which is less important.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="test_files"&gt;test_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A collection of unit test files.  They will be loaded as unit tests when the user requests a gem to be unit tested.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.test_files = Dir.glob('test/tc_*.rb')     # (1)
  spec.test_file  = 'tests/test-suite.rb'        # (2)
  spec.test_files = ['tests/test-suite.rb']      # (3)
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Example (1) specifies that all files matching &lt;tt&gt;tc_*.rb&lt;/tt&gt; in the &lt;tt&gt;test&lt;/tt&gt; directory are unit test files.&lt;/p&gt;
&lt;p&gt;Example (2) shows that you can specify a test suite instead, which presumably loads individual test cases.  This uses the shortcut method &lt;tt&gt;test_file=&lt;/tt&gt;, and has the same effect as example (3).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="version"&gt;version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of the gem.  See RationalVersioningPolicy for some advice on specifying the version number for your gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.version = '0.4.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The canonical way to represent versions in RubyGems is with the &lt;tt&gt;Gem::Version&lt;/tt&gt; class.  But the practical way to specify it in a gemspec is with a String.&lt;/p&gt;
&lt;p&gt;The version string must consist purely of numbers and periods.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/pPHxSbsYTSI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/20#page85</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Josh Nichols</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-361</id>
    <updated>2010-11-16T01:47:09Z</updated>
    <title>Josh Nichols: Specification Reference</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/pPHxSbsYTSI/20" />
    <content type="html">&lt;p&gt;For the most up-to-date information, see &lt;a href="http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html"&gt;Gem::Specification&lt;/a&gt; in the &lt;a href="http://rubygems.rubyforge.org/rubygems-update/"&gt;RubyGems &lt;span class="caps"&gt;API&lt;/span&gt; documention&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In order to create a gem, you need to define a gem specification, commonly&lt;br /&gt;
called a &amp;#8220;gemspec&amp;#8221;.&lt;/p&gt;
&lt;p&gt;A gemspec consists of several &lt;em&gt;attributes&lt;/em&gt;.  Some of these are required;&lt;br /&gt;
most of them are optional.  The main body of this document is an alphabetical&lt;br /&gt;
list of gemspec attributes, each with a description, example usage, notes, and&lt;br /&gt;
more.&lt;/p&gt;
&lt;p&gt;See also:&lt;/p&gt;
&lt;h3&gt;&lt;a name="toc"&gt;Important Attributes&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Alphabetical&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt; &lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt; &lt;a href="#bindir"&gt;bindir&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt; &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;E&lt;/strong&gt; &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#extensions"&gt;extensions&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;F&lt;/strong&gt; &lt;a href="#files"&gt;files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;H&lt;/strong&gt; &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;L&lt;/strong&gt; &lt;a href="#license"&gt;license&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;N&lt;/strong&gt; &lt;a href="#name"&gt;name&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;P&lt;/strong&gt; &lt;a href="#platform"&gt;platform&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;R&lt;/strong&gt; &lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;S&lt;/strong&gt; &lt;a href="#summary"&gt;summary&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;T&lt;/strong&gt; &lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;V&lt;/strong&gt; &lt;a href="#version"&gt;version&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Themed&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Basics:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Files, Libraries, and Executables:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt; .. &lt;a href="#bindir"&gt;bindir&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;C compilation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#extensions"&gt;extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Testing:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;About:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Attribute Survey&lt;/h2&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="authors"&gt;authors&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author or authors of the package contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.author = 'John Jones'
  spec.authors = ['John Jones', 'Mary Smith']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="autorequire"&gt;autorequire&lt;/a&gt; (Deprecated)&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = nil&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The file that will be loaded when the &lt;tt&gt;gem&lt;/tt&gt; method is called.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.files = ['lib/rake.rb", "lib/rake/**/*.rb", ...]
  spec.autorequire = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This method is deprecated and should no longer be used. It is an artifact of older versions of Rubygems that used &lt;tt&gt;require_gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;As of Rubygems 1.0, you can simply use &lt;tt&gt;require&lt;/tt&gt; without any special handling so long as &lt;tt&gt;rubygems&lt;/tt&gt; is required first, or loaded automatically via the &lt;span class="caps"&gt;RUBYOPT&lt;/span&gt; environment variable or the -r command line option.&lt;/p&gt;
&lt;p&gt;The only exception to this rule are libraries from the Ruby standard library that are being independently maintained as third party gems, e.g. Test::Unit or RDoc. In those rare cases, you must call the &lt;tt&gt;gem&lt;/tt&gt; method first, followed by a &lt;tt&gt;require&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="bindir"&gt;bindir&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;bin&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The directory containing the application files, if any.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.bindir = 'bin'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;An &amp;#8220;application file&amp;#8221; is a file that is intended to be run from the command line.  If your package contains such files, they will typically be placed in a &lt;tt&gt;bin&lt;/tt&gt; directory, hence the name &lt;strong&gt;bindir&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="date"&gt;date&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Time;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Time.now&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The date/time that the gem was created.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.date = File.utime('VERSION')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;It&amp;#8217;s generally sufficient to leave it to the default.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="default_executable"&gt;default_executable&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = (see below)&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Of all the application files in the package, the &lt;strong&gt;default executable&lt;/strong&gt; is the one that can be run directly through the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.executables = ['bin/foo', 'bin/bar']
  spec.default_executable = 'bin/bar'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;If you only specify one application file in &lt;strong&gt;executables&lt;/strong&gt;, that file becomes the default executable.  Therefore, you only need to specify this value if you have more than one application file.&lt;/p&gt;
&lt;p&gt;The notion of running applications directly through a gem is not well supported at the moment.  The idea is that you can download a gem, say &lt;tt&gt;monopoly.gem&lt;/tt&gt; (the board game), and run &lt;tt&gt;gem monopoly.gem&lt;/tt&gt;, which would run the &lt;tt&gt;monopoly&lt;/tt&gt; application. This is not an in-demand feature.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Is the full path necessary?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="dependencies"&gt;dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the gems that must be installed for this gem to work.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_dependency('log4r', '&amp;gt;= 1.0.5')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When installing a gem with &lt;tt&gt;gem install &amp;#8230;&lt;/tt&gt;, its dependencies will be checked.  If they are not installed, &lt;tt&gt;gem&lt;/tt&gt; will offer to install them.&lt;/p&gt;
&lt;p&gt;See also &lt;a href="#requirements"&gt;requirements&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="development_dependencies"&gt;development dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Gems that are used for development purposes only.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_development_dependency('rspec')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Development dependencies are not installed by default, and are not activated when the gem is.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="description"&gt;description&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Detailed description of the gem.  See also &lt;a href="#summary"&gt;summary&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.description = &amp;lt;&amp;lt;-EOF
    Rake is a Make-like program implemented in Ruby. Tasks and
    dependencies are specified in standard Ruby syntax.
  EOF
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;As of Rubygems 1.3.2 there is no longer any automatic formatting of the description. Versions prior to this reformatted the description into a single line.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;description&lt;/em&gt; should be more detailed than the &lt;em&gt;summary&lt;/em&gt;.  You might consider copying all or part of your project&amp;#8217;s &lt;span class="caps"&gt;README&lt;/span&gt; into this field.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="email"&gt;email&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author&amp;#8217;s email address.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.email = 'john.jones@example.com'
  spec.email = ['jack@example.com', 'jill@example.com']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="executables"&gt;executables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of files in the package that are applications.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # XXX: is this correct?
  spec.executables &amp;lt;&amp;lt; 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For example, the &lt;tt&gt;rake&lt;/tt&gt; gem has &lt;tt&gt;rake&lt;/tt&gt; as an executable. You don&amp;#8217;t specify the full path (as in &lt;tt&gt;bin/rake&lt;/tt&gt;); all application-style files are expected to be found in &lt;a href="#bindir"&gt;bindir&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extensions"&gt;extensions&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The paths to &lt;tt&gt;extconf.rb&lt;/tt&gt;-style files used to compile extensions.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extensions &amp;lt;&amp;lt; 'ext/rmagic/extconf.rb'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;These files will be run when the gem is installed, causing the C (or whatever) code to be compiled on the user&amp;#8217;s machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Any other comments?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of &lt;em&gt;extra&lt;/em&gt; files that will be used by RDoc to generate the documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When the user elects to generate the RDoc documentation for a gem (typically at install time), all the library files are sent to RDoc for processing.  This option allows you to have some non-code files included for a more complete set of documentation.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="files"&gt;files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The list of files to be contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  require 'rake'
  spec.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
  
  # or without Rake...
  spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
  spec.files += Dir['[A-Z]*'] + Dir['test/**/*']
  spec.files.reject! { |fn| fn.include? "CVS" }
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;You don&amp;#8217;t need to use Rake, obviously, but it does make it much easier to specify files, as it automatically excludes &lt;span class="caps"&gt;CVS&lt;/span&gt; files, backups, etc.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="has_rdoc"&gt;has_rdoc&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: boolean;   &lt;em&gt;Optional&lt;/em&gt;;   default = false&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Indicates whether the code in the gem has been commented with RDoc in mind.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.has_rdoc = true
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This attribute has an advisory role only.  Any gem can be submitted for RDoc processing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="homepage"&gt;homepage&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;&lt;span class="caps"&gt;URL&lt;/span&gt; of the project or author.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.hompage = 'http://rake.rubyforge.org'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="license"&gt;license&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The license(s) for the library.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # single license
  spec.license = 'MIT'
  # multiple licenses
  spec.licenses = ['MIT', 'GPL-2']
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Each license must be a short name, no more than 64 characters.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="name"&gt;name&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The name of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.name = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The name does not include the version number; see &lt;a href="#version"&gt;version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="platform"&gt;platform&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Gem::Platform::Ruby&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The target platform for the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.platform = Gem::Platform::Win32
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Most gems contain pure Ruby code; they should simply leave the default value in place.  Some gems contain C (or other) code to be compiled into a Ruby &amp;#8220;extension&amp;#8221;.  The should leave the default value in place unless their code will only compile on a certain type of system.  Some gems consist of pre-compiled code (&amp;#8220;binary gems&amp;#8221;).  It&amp;#8217;s especially important that they set the &lt;em&gt;platform&lt;/em&gt; attribute appropriately.  A shortcut is to set the platform to Gem::Platform::&lt;span class="caps"&gt;CURRENT&lt;/span&gt;, which will cause the gem builder to set the platform to the appropriate value for the system on which the build is being performed.&lt;/p&gt;
&lt;p&gt;If this attribute is set to a non-default value, it will be included in the filename of the gem when it is built, e.g. &lt;tt&gt;fxruby-1.2.0-win32.gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rdoc_options"&gt;rdoc_options&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Specifies the &lt;tt&gt;rdoc&lt;/tt&gt; options to be used when generating &lt;span class="caps"&gt;API&lt;/span&gt; documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rdoc_options &amp;lt;&amp;lt; '--title' &amp;lt;&amp;lt; 'Rake -- Ruby Make' &amp;lt;&amp;lt;
                       '--main' &amp;lt;&amp;lt; 'README' &amp;lt;&amp;lt;
                       '--line-numbers'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="require_paths"&gt;require_paths&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Required&lt;/em&gt;;   default = [&amp;#8220;lib&amp;#8221;]&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;List of &amp;#8217;&amp;#8217;require&amp;#8217;&amp;#8217; paths from the root of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If all library files are in the root directory...
  spec.require_path = '.'
  
  # If you have 'lib' and 'ext' directories...
  spec.require_paths &amp;lt;&amp;lt; 'ext'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The default is sufficient in most cases, as Ruby packages tend to be structured so that library code is found under the &lt;tt&gt;lib&lt;/tt&gt; directory.&lt;/p&gt;
&lt;p&gt;The example above shows that you can use &lt;tt&gt;spec.require_path = &amp;#8216;&amp;#8230;&amp;#8217;&lt;/tt&gt; instead of &lt;tt&gt;spec.require_paths = [&amp;#8230;]&lt;/tt&gt;.  This is a shortcut, acknowledging that nearly all gems will have only one require path element.&lt;/p&gt;
&lt;p&gt;Be careful about interpreting this attribute, however.  It is used to modify the &lt;tt&gt;LOAD_PATH&lt;/tt&gt;, and thus to resolve &lt;tt&gt;require&lt;/tt&gt; calls.  So if code calls &lt;tt&gt;require &amp;#8216;rake/packagetask&amp;#8217;&lt;/tt&gt;, for example, and the &lt;tt&gt;require_paths&lt;/tt&gt; is set to &lt;tt&gt;lib&lt;/tt&gt;, then there had better be a file &lt;tt&gt;lib/rake/packagetask.rb&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="required_ruby_version"&gt;required_ruby_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Gem::Version::Requirement;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&amp;gt; 0.0.0&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of Ruby required to use the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If it will work with 1.6.8 or greater...
  spec.required_ruby_version = '&amp;gt;= 1.6.8'
  
  # ...but not with 1.7/1.8...
  spec.required_ruby_version = '~&amp;gt; 1.6.8'
  
  # The typical case these days...
  spec.required_ruby_version = '&amp;gt;= 1.8.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;See the RubyGems wiki for documentation on specifying versions.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="requirements"&gt;requirements&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the external (to &lt;nowiki&gt;RubyGems&lt;/nowiki&gt;) requirements that must be met for this gem to work.  It&amp;#8217;s simply information for the user.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.requirements &amp;lt;&amp;lt; 'libmagick, v6.0 or greater'
  spec.requirements &amp;lt;&amp;lt; 'A powerful graphics card'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For requirements that can be met by other gems, see &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The RubyForge project corresponding to the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rubyforge_project = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Obviously, if your gem doesn&amp;#8217;t have a Rubyforge project, leave this setting alone.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubygems_version"&gt;rubygems_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;current version of RubyGems&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of RubyGems used to create this gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="specification_version"&gt;specification_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Integer;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;Revision level of the RubyGems specification this gem conforms to.&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The revision level of the GemSpec specification that this gem conforms to.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="summary"&gt;summary&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A short description of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.summary = 'Ruby based make-like utility.'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The summary is used to describe the gem in lists produced by the &lt;tt&gt;gem&lt;/tt&gt; tool.  See also &lt;a href="#description"&gt;description&lt;/a&gt;, which is less important.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="test_files"&gt;test_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A collection of unit test files.  They will be loaded as unit tests when the user requests a gem to be unit tested.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.test_files = Dir.glob('test/tc_*.rb')     # (1)
  spec.test_file  = 'tests/test-suite.rb'        # (2)
  spec.test_files = ['tests/test-suite.rb']      # (3)
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Example (1) specifies that all files matching &lt;tt&gt;tc_*.rb&lt;/tt&gt; in the &lt;tt&gt;test&lt;/tt&gt; directory are unit test files.&lt;/p&gt;
&lt;p&gt;Example (2) shows that you can specify a test suite instead, which presumably loads individual test cases.  This uses the shortcut method &lt;tt&gt;test_file=&lt;/tt&gt;, and has the same effect as example (3).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="version"&gt;version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of the gem.  See RationalVersioningPolicy for some advice on specifying the version number for your gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.version = '0.4.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The canonical way to represent versions in RubyGems is with the &lt;tt&gt;Gem::Version&lt;/tt&gt; class.  But the practical way to specify it in a gemspec is with a String.&lt;/p&gt;
&lt;p&gt;The version string must consist purely of numbers and periods.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/pPHxSbsYTSI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/20#page85</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Josh Nichols</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-360</id>
    <updated>2010-11-16T01:42:35Z</updated>
    <title>Josh Nichols: Specification Reference</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/pPHxSbsYTSI/20" />
    <content type="html">&lt;p&gt;For the most up-to-date information, see &lt;a href="http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html"&gt;Gem::Specification&lt;/a&gt; in the &lt;a href="http://rubygems.rubyforge.org/rubygems-update/"&gt;RubyGems &lt;span class="caps"&gt;API&lt;/span&gt; documention&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In order to create a gem, you need to define a gem specification, commonly&lt;br /&gt;
called a &amp;#8220;gemspec&amp;#8221;.&lt;/p&gt;
&lt;p&gt;A gemspec consists of several &lt;em&gt;attributes&lt;/em&gt;.  Some of these are required;&lt;br /&gt;
most of them are optional.  The main body of this document is an alphabetical&lt;br /&gt;
list of gemspec attributes, each with a description, example usage, notes, and&lt;br /&gt;
more.&lt;/p&gt;
&lt;p&gt;See also:&lt;/p&gt;
&lt;h3&gt;&lt;a name="toc"&gt;Important Attributes&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Alphabetical&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt; &lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt; &lt;a href="#bindir"&gt;bindir&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt; &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;E&lt;/strong&gt; &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#extensions"&gt;extensions&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;F&lt;/strong&gt; &lt;a href="#files"&gt;files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;H&lt;/strong&gt; &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;L&lt;/strong&gt; &lt;a href="#license"&gt;license&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;N&lt;/strong&gt; &lt;a href="#name"&gt;name&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;P&lt;/strong&gt; &lt;a href="#platform"&gt;platform&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;R&lt;/strong&gt; &lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;S&lt;/strong&gt; &lt;a href="#summary"&gt;summary&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;T&lt;/strong&gt; &lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;V&lt;/strong&gt; &lt;a href="#version"&gt;version&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Themed&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Basics:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Files, Libraries, and Executables:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt; .. &lt;a href="#bindir"&gt;bindir&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;C compilation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#extensions"&gt;extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Testing:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;About:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Attribute Survey&lt;/h2&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="authors"&gt;authors&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author or authors of the package contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.author = 'John Jones'
  spec.authors = ['John Jones', 'Mary Smith']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="autorequire"&gt;autorequire&lt;/a&gt; (Deprecated)&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = nil&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The file that will be loaded when the &lt;tt&gt;gem&lt;/tt&gt; method is called.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.files = ['lib/rake.rb", "lib/rake/**/*.rb", ...]
  spec.autorequire = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This method is deprecated and should no longer be used. It is an artifact of older versions of Rubygems that used &lt;tt&gt;require_gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;As of Rubygems 1.0, you can simply use &lt;tt&gt;require&lt;/tt&gt; without any special handling so long as &lt;tt&gt;rubygems&lt;/tt&gt; is required first, or loaded automatically via the &lt;span class="caps"&gt;RUBYOPT&lt;/span&gt; environment variable or the -r command line option.&lt;/p&gt;
&lt;p&gt;The only exception to this rule are libraries from the Ruby standard library that are being independently maintained as third party gems, e.g. Test::Unit or RDoc. In those rare cases, you must call the &lt;tt&gt;gem&lt;/tt&gt; method first, followed by a &lt;tt&gt;require&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="bindir"&gt;bindir&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;bin&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The directory containing the application files, if any.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.bindir = 'bin'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;An &amp;#8220;application file&amp;#8221; is a file that is intended to be run from the command line.  If your package contains such files, they will typically be placed in a &lt;tt&gt;bin&lt;/tt&gt; directory, hence the name &lt;strong&gt;bindir&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="date"&gt;date&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Time;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Time.now&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The date/time that the gem was created.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.date = File.utime('VERSION')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;It&amp;#8217;s generally sufficient to leave it to the default.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="default_executable"&gt;default_executable&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = (see below)&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Of all the application files in the package, the &lt;strong&gt;default executable&lt;/strong&gt; is the one that can be run directly through the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.executables = ['bin/foo', 'bin/bar']
  spec.default_executable = 'bin/bar'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;If you only specify one application file in &lt;strong&gt;executables&lt;/strong&gt;, that file becomes the default executable.  Therefore, you only need to specify this value if you have more than one application file.&lt;/p&gt;
&lt;p&gt;The notion of running applications directly through a gem is not well supported at the moment.  The idea is that you can download a gem, say &lt;tt&gt;monopoly.gem&lt;/tt&gt; (the board game), and run &lt;tt&gt;gem monopoly.gem&lt;/tt&gt;, which would run the &lt;tt&gt;monopoly&lt;/tt&gt; application. This is not an in-demand feature.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Is the full path necessary?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="dependencies"&gt;dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the gems that must be installed for this gem to work.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_dependency('log4r', '&amp;gt;= 1.0.5')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When installing a gem with &lt;tt&gt;gem install &amp;#8230;&lt;/tt&gt;, its dependencies will be checked.  If they are not installed, &lt;tt&gt;gem&lt;/tt&gt; will offer to install them.&lt;/p&gt;
&lt;p&gt;See also &lt;a href="#requirements"&gt;requirements&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="development_dependencies"&gt;development dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Gems that are used for development purposes only.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_development_dependency('rspec')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Development dependencies are not installed by default, and are not activated when the gem is.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="description"&gt;description&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Detailed description of the gem.  See also &lt;a href="#summary"&gt;summary&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.description = &amp;lt;&amp;lt;-EOF
    Rake is a Make-like program implemented in Ruby. Tasks and
    dependencies are specified in standard Ruby syntax.
  EOF
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;As of Rubygems 1.3.2 there is no longer any automatic formatting of the description. Versions prior to this reformatted the description into a single line.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;description&lt;/em&gt; should be more detailed than the &lt;em&gt;summary&lt;/em&gt;.  You might consider copying all or part of your project&amp;#8217;s &lt;span class="caps"&gt;README&lt;/span&gt; into this field.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="email"&gt;email&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author&amp;#8217;s email address.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.email = 'john.jones@example.com'
  spec.email = ['jack@example.com', 'jill@example.com']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="executables"&gt;executables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of files in the package that are applications.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # XXX: is this correct?
  spec.executables &amp;lt;&amp;lt; 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For example, the &lt;tt&gt;rake&lt;/tt&gt; gem has &lt;tt&gt;rake&lt;/tt&gt; as an executable. You don&amp;#8217;t specify the full path (as in &lt;tt&gt;bin/rake&lt;/tt&gt;); all application-style files are expected to be found in &lt;a href="#bindir"&gt;bindir&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extensions"&gt;extensions&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The paths to &lt;tt&gt;extconf.rb&lt;/tt&gt;-style files used to compile extensions.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extensions &amp;lt;&amp;lt; 'ext/rmagic/extconf.rb'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;These files will be run when the gem is installed, causing the C (or whatever) code to be compiled on the user&amp;#8217;s machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Any other comments?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of &lt;em&gt;extra&lt;/em&gt; files that will be used by RDoc to generate the documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When the user elects to generate the RDoc documentation for a gem (typically at install time), all the library files are sent to RDoc for processing.  This option allows you to have some non-code files included for a more complete set of documentation.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="files"&gt;files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The list of files to be contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  require 'rake'
  spec.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
  
  # or without Rake...
  spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
  spec.files += Dir['[A-Z]*'] + Dir['test/**/*']
  spec.files.reject! { |fn| fn.include? "CVS" }
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;You don&amp;#8217;t need to use Rake, obviously, but it does make it much easier to specify files, as it automatically excludes &lt;span class="caps"&gt;CVS&lt;/span&gt; files, backups, etc.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="has_rdoc"&gt;has_rdoc&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: boolean;   &lt;em&gt;Optional&lt;/em&gt;;   default = false&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Indicates whether the code in the gem has been commented with RDoc in mind.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.has_rdoc = true
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This attribute has an advisory role only.  Any gem can be submitted for RDoc processing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="homepage"&gt;homepage&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;&lt;span class="caps"&gt;URL&lt;/span&gt; of the project or author.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.hompage = 'http://rake.rubyforge.org'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="bindir"&gt;license&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The license of the gem, if any.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.license = 'MIT'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="name"&gt;name&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The name of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.name = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The name does not include the version number; see &lt;a href="#version"&gt;version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="platform"&gt;platform&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Gem::Platform::Ruby&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The target platform for the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.platform = Gem::Platform::Win32
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Most gems contain pure Ruby code; they should simply leave the default value in place.  Some gems contain C (or other) code to be compiled into a Ruby &amp;#8220;extension&amp;#8221;.  The should leave the default value in place unless their code will only compile on a certain type of system.  Some gems consist of pre-compiled code (&amp;#8220;binary gems&amp;#8221;).  It&amp;#8217;s especially important that they set the &lt;em&gt;platform&lt;/em&gt; attribute appropriately.  A shortcut is to set the platform to Gem::Platform::&lt;span class="caps"&gt;CURRENT&lt;/span&gt;, which will cause the gem builder to set the platform to the appropriate value for the system on which the build is being performed.&lt;/p&gt;
&lt;p&gt;If this attribute is set to a non-default value, it will be included in the filename of the gem when it is built, e.g. &lt;tt&gt;fxruby-1.2.0-win32.gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rdoc_options"&gt;rdoc_options&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Specifies the &lt;tt&gt;rdoc&lt;/tt&gt; options to be used when generating &lt;span class="caps"&gt;API&lt;/span&gt; documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rdoc_options &amp;lt;&amp;lt; '--title' &amp;lt;&amp;lt; 'Rake -- Ruby Make' &amp;lt;&amp;lt;
                       '--main' &amp;lt;&amp;lt; 'README' &amp;lt;&amp;lt;
                       '--line-numbers'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="require_paths"&gt;require_paths&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Required&lt;/em&gt;;   default = [&amp;#8220;lib&amp;#8221;]&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;List of &amp;#8217;&amp;#8217;require&amp;#8217;&amp;#8217; paths from the root of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If all library files are in the root directory...
  spec.require_path = '.'
  
  # If you have 'lib' and 'ext' directories...
  spec.require_paths &amp;lt;&amp;lt; 'ext'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The default is sufficient in most cases, as Ruby packages tend to be structured so that library code is found under the &lt;tt&gt;lib&lt;/tt&gt; directory.&lt;/p&gt;
&lt;p&gt;The example above shows that you can use &lt;tt&gt;spec.require_path = &amp;#8216;&amp;#8230;&amp;#8217;&lt;/tt&gt; instead of &lt;tt&gt;spec.require_paths = [&amp;#8230;]&lt;/tt&gt;.  This is a shortcut, acknowledging that nearly all gems will have only one require path element.&lt;/p&gt;
&lt;p&gt;Be careful about interpreting this attribute, however.  It is used to modify the &lt;tt&gt;LOAD_PATH&lt;/tt&gt;, and thus to resolve &lt;tt&gt;require&lt;/tt&gt; calls.  So if code calls &lt;tt&gt;require &amp;#8216;rake/packagetask&amp;#8217;&lt;/tt&gt;, for example, and the &lt;tt&gt;require_paths&lt;/tt&gt; is set to &lt;tt&gt;lib&lt;/tt&gt;, then there had better be a file &lt;tt&gt;lib/rake/packagetask.rb&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="required_ruby_version"&gt;required_ruby_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Gem::Version::Requirement;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&amp;gt; 0.0.0&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of Ruby required to use the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If it will work with 1.6.8 or greater...
  spec.required_ruby_version = '&amp;gt;= 1.6.8'
  
  # ...but not with 1.7/1.8...
  spec.required_ruby_version = '~&amp;gt; 1.6.8'
  
  # The typical case these days...
  spec.required_ruby_version = '&amp;gt;= 1.8.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;See the RubyGems wiki for documentation on specifying versions.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="requirements"&gt;requirements&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the external (to &lt;nowiki&gt;RubyGems&lt;/nowiki&gt;) requirements that must be met for this gem to work.  It&amp;#8217;s simply information for the user.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.requirements &amp;lt;&amp;lt; 'libmagick, v6.0 or greater'
  spec.requirements &amp;lt;&amp;lt; 'A powerful graphics card'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For requirements that can be met by other gems, see &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The RubyForge project corresponding to the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rubyforge_project = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Obviously, if your gem doesn&amp;#8217;t have a Rubyforge project, leave this setting alone.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubygems_version"&gt;rubygems_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;current version of RubyGems&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of RubyGems used to create this gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="specification_version"&gt;specification_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Integer;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;Revision level of the RubyGems specification this gem conforms to.&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The revision level of the GemSpec specification that this gem conforms to.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="summary"&gt;summary&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A short description of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.summary = 'Ruby based make-like utility.'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The summary is used to describe the gem in lists produced by the &lt;tt&gt;gem&lt;/tt&gt; tool.  See also &lt;a href="#description"&gt;description&lt;/a&gt;, which is less important.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="test_files"&gt;test_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A collection of unit test files.  They will be loaded as unit tests when the user requests a gem to be unit tested.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.test_files = Dir.glob('test/tc_*.rb')     # (1)
  spec.test_file  = 'tests/test-suite.rb'        # (2)
  spec.test_files = ['tests/test-suite.rb']      # (3)
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Example (1) specifies that all files matching &lt;tt&gt;tc_*.rb&lt;/tt&gt; in the &lt;tt&gt;test&lt;/tt&gt; directory are unit test files.&lt;/p&gt;
&lt;p&gt;Example (2) shows that you can specify a test suite instead, which presumably loads individual test cases.  This uses the shortcut method &lt;tt&gt;test_file=&lt;/tt&gt;, and has the same effect as example (3).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="version"&gt;version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of the gem.  See RationalVersioningPolicy for some advice on specifying the version number for your gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.version = '0.4.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The canonical way to represent versions in RubyGems is with the &lt;tt&gt;Gem::Version&lt;/tt&gt; class.  But the practical way to specify it in a gemspec is with a String.&lt;/p&gt;
&lt;p&gt;The version string must consist purely of numbers and periods.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/pPHxSbsYTSI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/20#page85</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Josh Nichols</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-359</id>
    <updated>2010-11-16T01:40:28Z</updated>
    <title>Josh Nichols: Specification Reference</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/pPHxSbsYTSI/20" />
    <content type="html">&lt;p&gt;For the most up-to-date information, see &lt;a href="http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html"&gt;Gem::Specification&lt;/a&gt; in the &lt;a href="http://rubygems.rubyforge.org/rubygems-update/"&gt;RubyGems &lt;span class="caps"&gt;API&lt;/span&gt; documention&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In order to create a gem, you need to define a gem specification, commonly&lt;br /&gt;
called a &amp;#8220;gemspec&amp;#8221;.&lt;/p&gt;
&lt;p&gt;A gemspec consists of several &lt;em&gt;attributes&lt;/em&gt;.  Some of these are required;&lt;br /&gt;
most of them are optional.  The main body of this document is an alphabetical&lt;br /&gt;
list of gemspec attributes, each with a description, example usage, notes, and&lt;br /&gt;
more.&lt;/p&gt;
&lt;p&gt;See also:&lt;/p&gt;
&lt;h3&gt;&lt;a name="toc"&gt;Important Attributes&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Alphabetical&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt; &lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt; &lt;a href="#bindir"&gt;bindir&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt; &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;E&lt;/strong&gt; &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#extensions"&gt;extensions&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;F&lt;/strong&gt; &lt;a href="#files"&gt;files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;H&lt;/strong&gt; &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;L&lt;/strong&gt; &lt;a href="#license"&gt;license&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;N&lt;/strong&gt; &lt;a href="#name"&gt;name&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;P&lt;/strong&gt; &lt;a href="#platform"&gt;platform&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;R&lt;/strong&gt; &lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;S&lt;/strong&gt; &lt;a href="#summary"&gt;summary&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;T&lt;/strong&gt; &lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;V&lt;/strong&gt; &lt;a href="#version"&gt;version&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Themed&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Basics:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Files, Libraries, and Executables:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt; .. &lt;a href="#bindir"&gt;bindir&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;C compilation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#extensions"&gt;extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Testing:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;About:&lt;/strong&gt; &lt;br /&gt;
&lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Attribute Survey&lt;/h2&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="authors"&gt;authors&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author or authors of the package contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.author = 'John Jones'
  spec.authors = ['John Jones', 'Mary Smith']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="autorequire"&gt;autorequire&lt;/a&gt; (Deprecated)&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = nil&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The file that will be loaded when the &lt;tt&gt;gem&lt;/tt&gt; method is called.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.files = ['lib/rake.rb", "lib/rake/**/*.rb", ...]
  spec.autorequire = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This method is deprecated and should no longer be used. It is an artifact of older versions of Rubygems that used &lt;tt&gt;require_gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;As of Rubygems 1.0, you can simply use &lt;tt&gt;require&lt;/tt&gt; without any special handling so long as &lt;tt&gt;rubygems&lt;/tt&gt; is required first, or loaded automatically via the &lt;span class="caps"&gt;RUBYOPT&lt;/span&gt; environment variable or the -r command line option.&lt;/p&gt;
&lt;p&gt;The only exception to this rule are libraries from the Ruby standard library that are being independently maintained as third party gems, e.g. Test::Unit or RDoc. In those rare cases, you must call the &lt;tt&gt;gem&lt;/tt&gt; method first, followed by a &lt;tt&gt;require&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="bindir"&gt;bindir&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;bin&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The directory containing the application files, if any.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.bindir = 'bin'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;An &amp;#8220;application file&amp;#8221; is a file that is intended to be run from the command line.  If your package contains such files, they will typically be placed in a &lt;tt&gt;bin&lt;/tt&gt; directory, hence the name &lt;strong&gt;bindir&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="date"&gt;date&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Time;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Time.now&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The date/time that the gem was created.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.date = File.utime('VERSION')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;It&amp;#8217;s generally sufficient to leave it to the default.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="default_executable"&gt;default_executable&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = (see below)&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Of all the application files in the package, the &lt;strong&gt;default executable&lt;/strong&gt; is the one that can be run directly through the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.executables = ['bin/foo', 'bin/bar']
  spec.default_executable = 'bin/bar'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;If you only specify one application file in &lt;strong&gt;executables&lt;/strong&gt;, that file becomes the default executable.  Therefore, you only need to specify this value if you have more than one application file.&lt;/p&gt;
&lt;p&gt;The notion of running applications directly through a gem is not well supported at the moment.  The idea is that you can download a gem, say &lt;tt&gt;monopoly.gem&lt;/tt&gt; (the board game), and run &lt;tt&gt;gem monopoly.gem&lt;/tt&gt;, which would run the &lt;tt&gt;monopoly&lt;/tt&gt; application. This is not an in-demand feature.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Is the full path necessary?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="dependencies"&gt;dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the gems that must be installed for this gem to work.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_dependency('log4r', '&amp;gt;= 1.0.5')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When installing a gem with &lt;tt&gt;gem install &amp;#8230;&lt;/tt&gt;, its dependencies will be checked.  If they are not installed, &lt;tt&gt;gem&lt;/tt&gt; will offer to install them.&lt;/p&gt;
&lt;p&gt;See also &lt;a href="#requirements"&gt;requirements&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="development_dependencies"&gt;development dependencies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Gems that are used for development purposes only.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.add_development_dependency('rspec')
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Development dependencies are not installed by default, and are not activated when the gem is.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="description"&gt;description&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Detailed description of the gem.  See also &lt;a href="#summary"&gt;summary&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.description = &amp;lt;&amp;lt;-EOF
    Rake is a Make-like program implemented in Ruby. Tasks and
    dependencies are specified in standard Ruby syntax.
  EOF
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;As of Rubygems 1.3.2 there is no longer any automatic formatting of the description. Versions prior to this reformatted the description into a single line.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;description&lt;/em&gt; should be more detailed than the &lt;em&gt;summary&lt;/em&gt;.  You might consider copying all or part of your project&amp;#8217;s &lt;span class="caps"&gt;README&lt;/span&gt; into this field.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="email"&gt;email&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The author&amp;#8217;s email address.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.email = 'john.jones@example.com'
  spec.email = ['jack@example.com', 'jill@example.com']
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="executables"&gt;executables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of files in the package that are applications.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # XXX: is this correct?
  spec.executables &amp;lt;&amp;lt; 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For example, the &lt;tt&gt;rake&lt;/tt&gt; gem has &lt;tt&gt;rake&lt;/tt&gt; as an executable. You don&amp;#8217;t specify the full path (as in &lt;tt&gt;bin/rake&lt;/tt&gt;); all application-style files are expected to be found in &lt;a href="#bindir"&gt;bindir&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extensions"&gt;extensions&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The paths to &lt;tt&gt;extconf.rb&lt;/tt&gt;-style files used to compile extensions.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extensions &amp;lt;&amp;lt; 'ext/rmagic/extconf.rb'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;These files will be run when the gem is installed, causing the C (or whatever) code to be compiled on the user&amp;#8217;s machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Any other comments?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A list of &lt;em&gt;extra&lt;/em&gt; files that will be used by RDoc to generate the documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;When the user elects to generate the RDoc documentation for a gem (typically at install time), all the library files are sent to RDoc for processing.  This option allows you to have some non-code files included for a more complete set of documentation.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="files"&gt;files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The list of files to be contained in the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  require 'rake'
  spec.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
  
  # or without Rake...
  spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
  spec.files += Dir['[A-Z]*'] + Dir['test/**/*']
  spec.files.reject! { |fn| fn.include? "CVS" }
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;You don&amp;#8217;t need to use Rake, obviously, but it does make it much easier to specify files, as it automatically excludes &lt;span class="caps"&gt;CVS&lt;/span&gt; files, backups, etc.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="has_rdoc"&gt;has_rdoc&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: boolean;   &lt;em&gt;Optional&lt;/em&gt;;   default = false&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Indicates whether the code in the gem has been commented with RDoc in mind.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.has_rdoc = true
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;This attribute has an advisory role only.  Any gem can be submitted for RDoc processing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="homepage"&gt;homepage&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;&lt;span class="caps"&gt;URL&lt;/span&gt; of the project or author.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.hompage = 'http://rake.rubyforge.org'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="name"&gt;name&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The name of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.name = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The name does not include the version number; see &lt;a href="#version"&gt;version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="platform"&gt;platform&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Gem::Platform::Ruby&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The target platform for the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.platform = Gem::Platform::Win32
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Most gems contain pure Ruby code; they should simply leave the default value in place.  Some gems contain C (or other) code to be compiled into a Ruby &amp;#8220;extension&amp;#8221;.  The should leave the default value in place unless their code will only compile on a certain type of system.  Some gems consist of pre-compiled code (&amp;#8220;binary gems&amp;#8221;).  It&amp;#8217;s especially important that they set the &lt;em&gt;platform&lt;/em&gt; attribute appropriately.  A shortcut is to set the platform to Gem::Platform::&lt;span class="caps"&gt;CURRENT&lt;/span&gt;, which will cause the gem builder to set the platform to the appropriate value for the system on which the build is being performed.&lt;/p&gt;
&lt;p&gt;If this attribute is set to a non-default value, it will be included in the filename of the gem when it is built, e.g. &lt;tt&gt;fxruby-1.2.0-win32.gem&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rdoc_options"&gt;rdoc_options&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Specifies the &lt;tt&gt;rdoc&lt;/tt&gt; options to be used when generating &lt;span class="caps"&gt;API&lt;/span&gt; documentation.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rdoc_options &amp;lt;&amp;lt; '--title' &amp;lt;&amp;lt; 'Rake -- Ruby Make' &amp;lt;&amp;lt;
                       '--main' &amp;lt;&amp;lt; 'README' &amp;lt;&amp;lt;
                       '--line-numbers'
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="require_paths"&gt;require_paths&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Required&lt;/em&gt;;   default = [&amp;#8220;lib&amp;#8221;]&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;List of &amp;#8217;&amp;#8217;require&amp;#8217;&amp;#8217; paths from the root of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If all library files are in the root directory...
  spec.require_path = '.'
  
  # If you have 'lib' and 'ext' directories...
  spec.require_paths &amp;lt;&amp;lt; 'ext'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The default is sufficient in most cases, as Ruby packages tend to be structured so that library code is found under the &lt;tt&gt;lib&lt;/tt&gt; directory.&lt;/p&gt;
&lt;p&gt;The example above shows that you can use &lt;tt&gt;spec.require_path = &amp;#8216;&amp;#8230;&amp;#8217;&lt;/tt&gt; instead of &lt;tt&gt;spec.require_paths = [&amp;#8230;]&lt;/tt&gt;.  This is a shortcut, acknowledging that nearly all gems will have only one require path element.&lt;/p&gt;
&lt;p&gt;Be careful about interpreting this attribute, however.  It is used to modify the &lt;tt&gt;LOAD_PATH&lt;/tt&gt;, and thus to resolve &lt;tt&gt;require&lt;/tt&gt; calls.  So if code calls &lt;tt&gt;require &amp;#8216;rake/packagetask&amp;#8217;&lt;/tt&gt;, for example, and the &lt;tt&gt;require_paths&lt;/tt&gt; is set to &lt;tt&gt;lib&lt;/tt&gt;, then there had better be a file &lt;tt&gt;lib/rake/packagetask.rb&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="required_ruby_version"&gt;required_ruby_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Gem::Version::Requirement;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&amp;gt; 0.0.0&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of Ruby required to use the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  # If it will work with 1.6.8 or greater...
  spec.required_ruby_version = '&amp;gt;= 1.6.8'
  
  # ...but not with 1.7/1.8...
  spec.required_ruby_version = '~&amp;gt; 1.6.8'
  
  # The typical case these days...
  spec.required_ruby_version = '&amp;gt;= 1.8.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;See the RubyGems wiki for documentation on specifying versions.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="requirements"&gt;requirements&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;Lists the external (to &lt;nowiki&gt;RubyGems&lt;/nowiki&gt;) requirements that must be met for this gem to work.  It&amp;#8217;s simply information for the user.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.requirements &amp;lt;&amp;lt; 'libmagick, v6.0 or greater'
  spec.requirements &amp;lt;&amp;lt; 'A powerful graphics card'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;For requirements that can be met by other gems, see &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The RubyForge project corresponding to the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.rubyforge_project = 'rake'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Obviously, if your gem doesn&amp;#8217;t have a Rubyforge project, leave this setting alone.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="rubygems_version"&gt;rubygems_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;current version of RubyGems&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of RubyGems used to create this gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="specification_version"&gt;specification_version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Integer;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;Revision level of the RubyGems specification this gem conforms to.&lt;/em&gt;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The revision level of the GemSpec specification that this gem conforms to.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  DO NOT USE. It is set automatically when the gem is created.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="summary"&gt;summary&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A short description of the gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.summary = 'Ruby based make-like utility.'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The summary is used to describe the gem in lists produced by the &lt;tt&gt;gem&lt;/tt&gt; tool.  See also &lt;a href="#description"&gt;description&lt;/a&gt;, which is less important.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="test_files"&gt;test_files&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;A collection of unit test files.  They will be loaded as unit tests when the user requests a gem to be unit tested.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.test_files = Dir.glob('test/tc_*.rb')     # (1)
  spec.test_file  = 'tests/test-suite.rb'        # (2)
  spec.test_files = ['tests/test-suite.rb']      # (3)
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;Example (1) specifies that all files matching &lt;tt&gt;tc_*.rb&lt;/tt&gt; in the &lt;tt&gt;test&lt;/tt&gt; directory are unit test files.&lt;/p&gt;
&lt;p&gt;Example (2) shows that you can specify a test suite instead, which presumably loads individual test cases.  This uses the shortcut method &lt;tt&gt;test_file=&lt;/tt&gt;, and has the same effect as example (3).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style="vertical-align:middle;"&gt;&lt;a name="version"&gt;version&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;The version of the gem.  See RationalVersioningPolicy for some advice on specifying the version number for your gem.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;pre&gt;
  spec.version = '0.4.1'
&lt;/pre&gt;
&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;The canonical way to represent versions in RubyGems is with the &lt;tt&gt;Gem::Version&lt;/tt&gt; class.  But the practical way to specify it in a gemspec is with a String.&lt;/p&gt;
&lt;p&gt;The version string must consist purely of numbers and periods.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/pPHxSbsYTSI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/20#page85</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Eric Hodel</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-358</id>
    <updated>2010-08-21T21:42:39Z</updated>
    <title>Eric Hodel: Where I can get the latest yaml metadata used by rubygems?</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/ya1eN27APF0/14" />
    <content type="html">&lt;p&gt;RubyGems no longer uses &lt;span class="caps"&gt;YAML&lt;/span&gt; for metadata.  `gem help generate_index` shows the structure of a RubyGems source.&lt;/p&gt;
&lt;p&gt;http://rubygems.org no longer generates a yaml index, but the Marshal full index is still generated nightly.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/ya1eN27APF0" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/14#page64</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Eric Hodel</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-357</id>
    <updated>2010-08-21T21:38:57Z</updated>
    <title>Eric Hodel: Why does require return false when loading a file from a gem?</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/NpJDmwKX-Ew/19" />
    <content type="html">&lt;p style="font-style: italic;"&gt;Require returns false when loading a file from a gem.  Usually require will return true when it has loaded correctly.  What&amp;#8217;s wrong?&lt;/p&gt;
&lt;h3&gt;Answer&lt;/h3&gt;
&lt;p&gt;Nothing.  Well, something.  But nothing you need to worry about.&lt;/p&gt;
&lt;p&gt;A false return from the require method does &lt;em&gt;not&lt;/em&gt; indicate an error.  It just means that the file has  already been loaded.&lt;/p&gt;
&lt;p&gt;RubyGems has a feature that allows a file to be automatically loaded when a gem is activated (i.e. selected).  When you require a file that is in an inactive gem, the RubyGems software will activate that gem for you.  During that activation, any autoloaded files will be loaded for you.&lt;/p&gt;
&lt;p&gt;So, by the time your require statement actually does the work of loading the file, it has already been autoloaded via the gem activation, and therefore it returns false.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/NpJDmwKX-Ew" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/19#page100</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Eric Hodel</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-356</id>
    <updated>2010-08-21T21:36:43Z</updated>
    <title>Eric Hodel: RubyGems hangs while updating the source index.</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/oPnKT78qdfA/19" />
    <content type="html">&lt;p style="font-style: italic;"&gt;I have a problem with RubyGems. It doesn&amp;#8217;t matter what I try to install with, it freezes.&lt;/p&gt;
&lt;p style="font-style: italic;"&gt;Particulary I tried to execute:&lt;/p&gt;
gem install rails &amp;#8212;include-dependencies
&lt;p style="font-style: italic;"&gt;but the command freezes at the following message:&lt;/p&gt;
&amp;#8220;Updating Gem source index for: http://gems.rubyforge.org&amp;#8221;
&lt;h3&gt;Answer&lt;/h3&gt;
&lt;p&gt;You&amp;#8217;ll need to upgrade RubyGems to a modern version.  You can find instructions in the Downloads link at the top of this page.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/oPnKT78qdfA" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/19#page96</feedburner:origLink></entry>

  <entry>
    <author>
      <name>Eric Hodel</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-355</id>
    <updated>2010-08-21T21:35:14Z</updated>
    <title>Eric Hodel: Why does require 'some_gem' fail?</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGems-Docs-Recent-Changes-atom/~3/PbDWeedJCt8/19" />
    <content type="html">&lt;p&gt;Not every library has a strict mapping between the name of the gem and the name of the file you need to require.  First you should check to see if the files match correctly:&lt;/p&gt;
&lt;pre&gt;
$ gem list RedCloth

*** LOCAL GEMS ***

RedCloth (4.1.1)
$ ruby -rubygems -e 'require "RedCloth"'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- RedCloth (LoadError)
	from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
	from -e:1
$ gem contents --no-prefix RedCloth | grep lib
lib/case_sensitive_require/RedCloth.rb
lib/redcloth/erb_extension.rb
lib/redcloth/formatters/base.rb
lib/redcloth/formatters/html.rb
lib/redcloth/formatters/latex.rb
lib/redcloth/formatters/latex_entities.yml
lib/redcloth/textile_doc.rb
lib/redcloth/version.rb
lib/redcloth.rb
$ ruby -rubygems -e 'require "redcloth"'
$ # success!&lt;/pre&gt;
&lt;p&gt;If you&amp;#8217;re requiring the correct file, maybe `gem` is using a different ruby than `ruby`:&lt;/p&gt;
&lt;pre&gt;$ which ruby
/usr/local/bin/ruby
$ gem env | grep 'RUBY EXECUTABLE'
   - RUBY EXECUTABLE: /usr/local/bin/ruby1.9
&lt;/pre&gt;
&lt;p&gt;In this instance we&amp;#8217;ve got two ruby installations so that `gem` uses a different version than `ruby`.  You can probably fix this by adjusting a symlink:&lt;/p&gt;
&lt;pre&gt;$ ls -l /usr/local/bin/ruby*
lrwxr-xr-x  1 root  wheel       76 Jan 20  2010 /usr/local/bin/ruby@ -&amp;gt; /usr/local/bin/ruby1.8
-rwxr-xr-x  1 root  wheel  1213160 Jul 15 16:36 /usr/local/bin/ruby1.8*
-rwxr-xr-x  1 root  wheel  2698624 Jul  6 19:30 /usr/local/bin/ruby1.9*
$ ls -l /usr/local/bin/gem*
lrwxr-xr-x  1 root  wheel   76 Jan 20  2010 /usr/local/bin/gem@ -&amp;gt; /usr/local/bin/gem1.9
-rwxr-xr-x  1 root  wheel  550 Jul 15 16:36 /usr/local/bin/gem1.8*
-rwxr-xr-x  1 root  wheel  550 Jul  6 19:30 /usr/local/bin/gem1.9*&lt;/pre&gt;
&lt;p&gt;You may also need to give `irb` the same treatment.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGems-Docs-Recent-Changes-atom/~4/PbDWeedJCt8" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://docs.rubygems.org/read/chapter/19#page105</feedburner:origLink></entry>

</feed>
