Skip to content
Newer
Older
100644 416 lines (248 sloc) 9.51 KB
cd905b8 @qrush add pages for the rest
qrush authored Apr 30, 2011
1 ---
2 layout: default
3 title: Specification Reference
f680d16 @ffmike Rework Next/Previous links to match the order on the index page
ffmike authored Jan 3, 2012
4 previous: /patterns
5 next: /command-reference
cd905b8 @qrush add pages for the rest
qrush authored Apr 30, 2011
6 ---
7
5b5b876 @qrush make it bigger
qrush authored May 17, 2011
8 {% include big.html %}
9
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
10
11 <p>The <a href="Specification.html">Specification</a> class contains the
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
12 metadata for a <a href="../Gem.html">Gem</a>. Typically defined in a
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
13 .gemspec file or a Rakefile, and looks like this:</p>
14
5b5b876 @qrush make it bigger
qrush authored May 17, 2011
15 <pre>Gem::Specification.new do |s|
16 s.name = 'example'
17 s.version = '0.1.0'
18 s.summary = &quot;This is an example!&quot;
19 s.description = &quot;Much longer explanation of the example!&quot;
20 s.authors = [&quot;Ruby Coder&quot;]
21 s.email = 'rubycoder@example.com'
22 s.files = [&quot;lib/example.rb&quot;]
23 s.homepage = 'http://rubygems.org/gems/example'
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
24 end</pre>
25
26
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
27
28 ## Required gemspec attributes
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
29
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
30 * [files](#files)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
31
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
32 * [name](#name)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
33
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
34 * [platform=](#platform=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
35
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
36 * [require_paths](#require_paths)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
37
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
38 * [rubygems_version](#rubygems_version)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
39
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
40 * [summary](#summary)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
41
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
42 * [version](#version)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
43
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
44 ## Optional gemspec attributes
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
45
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
46 * [add_development_dependency](#add_development_dependency)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
47
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
48 * [add_runtime_dependency](#add_runtime_dependency)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
49
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
50 * [author=](#author=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
51
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
52 * [authors=](#authors=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
53
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
54 * [bindir](#bindir)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
55
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
56 * [cert_chain](#cert_chain)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
57
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
58 * [description](#description)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
59
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
60 * [email](#email)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
61
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
62 * [executables](#executables)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
63
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
64 * [extensions](#extensions)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
65
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
66 * [extra_rdoc_files](#extra_rdoc_files)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
67
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
68 * [homepage](#homepage)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
69
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
70 * [license=](#license=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
71
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
72 * [licenses=](#licenses=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
73
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
74 * [post_install_message](#post_install_message)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
75
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
76 * [rdoc_options](#rdoc_options)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
77
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
78 * [required_ruby_version=](#required_ruby_version=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
79
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
80 * [requirements](#requirements)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
81
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
82 * [signing_key](#signing_key)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
83
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
84 * [test_files=](#test_files=)
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
85
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
86
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
87
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
88 # Required gemspec attributes
89
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
90
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
91
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
92
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
93 <a id="files"> </a>
94 ## files
95
96 <p>Files included in this gem. You cannot append to this accessor, you must
97 assign to it.</p>
98
99 <p>Only add files you can require to this list, not directories, etc.</p>
100
101 <p>Directories are automatically stripped from this list when building a gem,
102 other non-files cause an error.</p>
103
104 <p>Usage:</p>
105
106 <pre>require 'rake'
107 spec.files = FileList['lib/**/*.rb',
108 'bin/*',
109 '[A-Z]*',
110 'test/**/*'].to_a
111
112 # or without Rake...
113 spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
114 spec.files += Dir['[A-Z]*'] + Dir['test/**/*']
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
115 spec.files.reject! { |fn| fn.include? &quot;CVS&quot; }</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
116
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
117 <a id="name"> </a>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
118 ## name
119
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
120 <p>This gem’s name.</p>
121
122 <p>Usage:</p>
123
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
124 <pre>spec.name = 'rake'</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
125
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
126 <a id="platform="> </a>
127 ## platform=
128
129 <p>The platform this gem runs on.</p>
130
131 <p>This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT.</p>
132
133 <p>Most gems contain pure Ruby code; they should simply leave the default
134 value in place. Some gems contain C (or other) code to be compiled into a
135 Ruby “extension”. The should leave the default value in place unless their
136 code will only compile on a certain type of system. Some gems consist of
137 pre-compiled code (“binary gems”). It’s especially important that they set
138 the platform attribute appropriately. A shortcut is to set the platform to
139 Gem::Platform::CURRENT, which will cause the gem builder to set the
140 platform to the appropriate value for the system on which the build is
141 being performed.</p>
142
143 <p>If this attribute is set to a non-default value, it will be included in the
144 filename of the gem when it is built, e.g. fxruby-1.2.0-win32.gem.</p>
145
146 <p>Usage:</p>
147
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
148 <pre>spec.platform = Gem::Platform::Win32</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
149
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
150 <a id="require_paths"> </a>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
151 ## require_paths
152
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
153 <p>Paths in the gem to add to <tt>$LOAD_PATH</tt> when this gem is activated.</p>
154
155 <p>Usage:</p>
156
157 <pre># If all library files are in the root directory...
158 spec.require_path = '.'
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
159
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
160 # If you have 'lib' and 'ext' directories...
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
161 spec.require_paths &lt;&lt; 'ext'</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
162
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
163 <a id="rubygems_version"> </a>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
164 ## rubygems_version
165
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
166 <p>The version of RubyGems used to create this gem.</p>
167
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
168 <p>Do not set this, it is set automatically when the gem is packaged.</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
169
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
170 <a id="summary"> </a>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
171 ## summary
172
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
173 <p>A short summary of this gem’s description. Displayed in `gem list -d`.</p>
174
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
175 <p>The description should be more detailed than the summary.</p>
176
177 <p>Usage:</p>
178
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
179 <pre>spec.summary = &quot;This is a small summary of my gem&quot;</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
180
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
181 <a id="version"> </a>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
182 ## version
183
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
184 <p>This gem’s version.</p>
185
186 <p>The version string can contain numbers and periods, such as <tt>1.0.0</tt>.
187 A gem is a ‘prerelease’ gem if the version has a letter in it, such as
188 <tt>1.0.0.pre</tt>.</p>
189
190 <p>Usage:</p>
191
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
192 <pre>spec.version = '0.4.1'</pre>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
193
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
194 # Optional gemspec attributes
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
195
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
196
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
197
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
198
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
199 <a id="add_development_dependency"> </a>
200 ## add_development_dependency
201
202 <p>Adds a development dependency named <tt>gem</tt> with <tt>requirements</tt>
203 to this gem.</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
204
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
205 <p>Usage:</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
206
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
207 <pre>spec.add_development_dependency 'example', '~&gt; 1.1', '&gt;= 1.1.4'</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
208
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
209 <p>Development dependencies aren’t installed by default and aren’t activated
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
210 when a gem is required.</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
211
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
212 <a id="add_runtime_dependency"> </a>
213 ## add_runtime_dependency
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
214
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
215 <p>Adds a runtime dependency named <tt>gem</tt> with <tt>requirements</tt> to
216 this gem.</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
217
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
218 <p>Usage:</p>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
219
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
220 <pre>spec.add_runtime_dependency 'example', '~&gt; 1.1', '&gt;= 1.1.4'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
221
222 <a id="author="> </a>
223 ## author=
224
225 <p>Singular writer for <a
226 href="Specification.html#method-i-authors">authors</a></p>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
227
228 <p>Usage:</p>
229
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
230 <pre>spec.author = 'John Jones'</pre>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
231
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
232 <a id="authors="> </a>
233 ## authors=
234
235 <p>Sets the list of authors, ensuring it is an array.</p>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
236
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
237 <p>Usage:</p>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
238
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
239 <pre>spec.authors = ['John Jones', 'Mary Smith']</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
240
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
241 <a id="bindir"> </a>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
242 ## bindir
243
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
244 <p>The path in the gem for executable scripts. Usually ‘bin’</p>
245
246 <p>Usage:</p>
247
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
248 <pre>spec.bindir = 'bin'</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
249
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
250 <a id="cert_chain"> </a>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
251 ## cert_chain
252
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
253 <p>The certificate chain used to sign this gem. See Gem::Security for
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
254 details.</p>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
255
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
256 <a id="description"> </a>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
257 ## description
258
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
259 <p>A long description of this gem</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
260
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
261 <p>The description should be more detailed than the summary.</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
262
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
263 <p>Usage:</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
264
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
265 <pre>spec.description = &lt;&lt;-EOF
266 Rake is a Make-like program implemented in Ruby. Tasks and
267 dependencies are specified in standard Ruby syntax.
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
268 EOF</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
269
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
270 <a id="email"> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
271 ## email
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
272
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
273 <p>A contact email for this gem</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
274
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
275 <p>Usage:</p>
fde0199 @qrush starting to generate rdoc for gemspec guide
qrush authored May 16, 2011
276
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
277 <pre>spec.email = 'john.jones@example.com'
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
278 spec.email = ['jack@example.com', 'jill@example.com']</pre>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
279
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
280 <a id="executables"> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
281 ## executables
282
283 <p>Executables included in the gem.</p>
284
285 <p>For example, the rake gem has rake as an executable. You don’t specify the
286 full path (as in bin/rake); all application-style files are expected to be
287 found in bindir.</p>
288
289 <p>Usage:</p>
290
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
291 <pre>spec.executables &lt;&lt; 'rake'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
292
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
293 <a id="extensions"> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
294 ## extensions
295
296 <p>Extensions to build when installing the gem, specifically the paths to
297 extconf.rb-style files used to compile extensions.</p>
298
299 <p>These files will be run when the gem is installed, causing the C (or
300 whatever) code to be compiled on the user’s machine.</p>
301
302 <p>Usage:</p>
303
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
304 <pre>spec.extensions &lt;&lt; 'ext/rmagic/extconf.rb'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
305
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
306 <a id="extra_rdoc_files"> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
307 ## extra_rdoc_files
308
309 <p>Extra files to add to RDoc such as README or doc/examples.txt</p>
310
311 <p>When the user elects to generate the RDoc documentation for a gem
312 (typically at install time), all the library files are sent to RDoc for
313 processing. This option allows you to have some non-code files included for
314 a more complete set of documentation.</p>
315
316 <p>Usage:</p>
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
317
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
318 <pre>spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
319
320 <a id="homepage"> </a>
321 ## homepage
322
323 <p>The URL of this gem’s home page</p>
324
325 <p>Usage:</p>
326
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
327 <pre>spec.homepage = 'http://rake.rubyforge.org'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
328
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
329 <a id="license="> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
330 ## license=
8e1706e @qrush use rdoc gem version instead that supports :section:
qrush authored May 16, 2011
331
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
332 <p>The license for this gem.</p>
333
334 <p>The license must be a short name, no more than 64 characters.</p>
335
336 <p>This should just be the name of your license, make to include the full text
337 of the license inside of the gem when you build it.</p>
338
339 <p>Usage:</p>
340
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
341 <pre>spec.license = 'MIT'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
342
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
343 <a id="licenses="> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
344 ## licenses=
345
346 <p>The license(s) for the library.</p>
347
348 <p>Each license must be a short name, no more than 64 characters.</p>
349
350 <p>This should just be the name of your license, make to include the full text
351 of the license inside of the gem when you build it.</p>
352
353 <p>Usage:</p>
354
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
355 <pre>spec.licenses = ['MIT', 'GPL-2']</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
356
357 <a id="post_install_message"> </a>
358 ## post_install_message
359
360 <p>A message that gets displayed after the gem is installed.</p>
361
362 <p>Usage:</p>
363
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
364 <pre>spec.post_install_message = &quot;Thanks for installing!&quot;</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
365
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
366 <a id="rdoc_options"> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
367 ## rdoc_options
368
369 <p>Specifies the rdoc options to be used when generating API documentation.</p>
370
371 <p>Usage:</p>
372
373 <pre>spec.rdoc_options &lt;&lt; '--title' &lt;&lt; 'Rake -- Ruby Make' &lt;&lt;
374 '--main' &lt;&lt; 'README' &lt;&lt;
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
375 '--line-numbers'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
376
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
377 <a id="required_ruby_version="> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
378 ## required_ruby_version=
379
380 <p>The version of ruby required by this gem</p>
381
382 <p>Usage:</p>
383
384 <pre># If it will work with 1.8.6 or greater...
385 spec.required_ruby_version = '&gt;= 1.8.6'
386
387 # Hopefully by now:
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
388 spec.required_ruby_version = '&gt;= 1.9.2'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
389
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
390 <a id="requirements"> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
391 ## requirements
392
393 <p>Lists the external (to RubyGems) requirements that must be met for this gem
394 to work. It’s simply information for the user.</p>
395
396 <p>Usage:</p>
397
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
398 <pre>spec.requirements &lt;&lt; 'libmagick, v6.0'
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
399 spec.requirements &lt;&lt; 'A good graphics card'</pre>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
400
401 <a id="signing_key"> </a>
402 ## signing_key
403
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
404 <p>The key used to sign this gem. See Gem::Security for details.</p>
474eed6 @qrush better formatting and more comments
qrush authored May 17, 2011
405
65087d0 @qrush add index, style updates
qrush authored May 17, 2011
406 <a id="test_files="> </a>
4d0cd16 @qrush most of the spec guide
qrush authored May 17, 2011
407 ## test_files=
408
409 <p>A collection of unit test files. They will be loaded as unit tests when the
410 user requests a gem to be unit tested.</p>
411
412 <p>Usage:</p>
413
414 <pre>spec.test_files = Dir.glob('test/tc_*.rb')
0920c6a @sferik Cleanup EOL whitepsace
sferik authored Jul 17, 2011
415 spec.test_files = ['tests/test-suite.rb']</pre>
Something went wrong with that request. Please try again.