This repository has been archived by the owner on Jul 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbundle_gem.html
457 lines (414 loc) · 14.1 KB
/
bundle_gem.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta content='IE=edge' http-equiv='X-UA-Compatible'>
<meta content='en' http-equiv='Content-Language'>
<meta content='width=device-width, initial-scale=1' name='viewport'>
<meta content='276VSYOko8B8vIu1i8i5qbj7_ql5PXo0dU69XQy-SL' name='globalsign-domain-verification'>
<title>
Bundler: bundle gem
</title>
<link href='/bundle_gem.html' rel='canonical'>
<script src="/application.min.js"></script>
<link href="/application.css" rel="stylesheet" />
<link href='/images/apple-touch-icon.png' rel='apple-touch-icon' sizes='180x180'>
<link href='/images/favicon-32x32.png' rel='icon' sizes='32x32' type='image/png'>
<link href='/images/favicon-16x16.png' rel='icon' sizes='16x16' type='image/png'>
<link href='/manifest.json' rel='manifest'>
<link color='#50bced' href='/images/safari-pinned-tab.svg' rel='mask-icon'>
<meta content='bundler.io' name='apple-mobile-web-app-title'>
<meta content='bundler.io' name='application-name'>
<meta content='#ffffff' name='theme-color'>
<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="/blog/feed.xml" />
</head>
<body class=''>
<nav class='navbar navbar-expand-md navbar-light'>
<div class='container-md'>
<a href="/" class="navbar-brand me-auto fw-bold">Bundler</a>
<button aria-controls='bs-navbar-collapse' aria-expanded='false' aria-label='Toggle navigation' class='navbar-toggler' data-bs-target='#bs-navbar-collapse' data-bs-toggle='collapse' type='button'>
<span class='navbar-toggler-icon'></span>
</button>
<div class='collapse navbar-collapse flex-grow-0' id='bs-navbar-collapse'>
<ul class='navbar-nav'>
<li class='nav-item'>
<input class='input-search my-1 ps-1 pt-1' id='input-search' placeholder='Type to search...' type='text'>
<svg class='text-opacity-40 m-1 mb-2' style='width: 1rem; height: 1rem; fill: currentcolor;' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'>
<!-- Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. -->
<path d='M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z'></path>
</svg>
</li>
<li class='nav-item'><a href="/docs.html" class="nav-link">Docs</a></li>
<li class='nav-item'><a href="/contributors.html" class="nav-link">Team</a></li>
<li class='nav-item'><a href="/blog" class="nav-link">Blog</a></li>
<li class='nav-item'><a href="https://github.com/rubygems/rubygems/tree/master/bundler" target="_blank" rel="noopener noreferrer" class="nav-link">Repository</a></li>
</ul>
</div>
</div>
</nav>
<div class='bg-light-blue header'>
<img src="/images/docs_header_transparent_bg.png" srcset="/images/docs_header_transparent_bg.png 1x, /images/[email protected] 2x, /images/[email protected] 3x" class="img-fluid header-padding" style="max-width: 400px;" alt="" />
</div>
<div class='container'>
<div class='row flex-column flex-md-row-reverse'>
<div class='col-12 col-md-9 contents commands' id='page-content-wrapper'>
<div class="mp" id="man">
<h2 id="NAME">bundle gem</h2>
<p class="man-name">
<code>bundle-gem</code> - <span class="man-whatis">Generate a project skeleton for creating a rubygem</span>
</p>
<pre><code>bundle gem</code> <var>GEM_NAME</var> <a href="#OPTIONS" title="OPTIONS" data-bare-link="true">OPTIONS</a></pre>
<h2 id="DESCRIPTION">Description</h2>
<p>Generates a directory named <code>GEM_NAME</code> with a <code>Rakefile</code>, <code>GEM_NAME.gemspec</code>,
and other supporting files and directories that can be used to develop a
rubygem with that name.</p>
<p>Run <code>rake -T</code> in the resulting project for a list of Rake tasks that can be used
to test and publish the gem to rubygems.org.</p>
<p>The generated project skeleton can be customized with OPTIONS, as explained
below. Note that these options can also be specified via Bundler's global
configuration file using the following names:</p>
<ul>
<li><code>gem.coc</code></li>
<li><code>gem.mit</code></li>
<li><code>gem.test</code></li>
</ul>
<h2 id="OPTIONS">Options</h2>
<dl>
<dt>
<code>--exe</code> or <code>-b</code> or <code>--bin</code>
</dt>
<dd><p>Specify that Bundler should create a binary executable (as <code>exe/GEM_NAME</code>)
in the generated rubygem project. This binary will also be added to the
<code>GEM_NAME.gemspec</code> manifest. This behavior is disabled by default.</p></dd>
<dt><code>--no-exe</code></dt>
<dd><p>Do not create a binary (overrides <code>--exe</code> specified in the global config).</p></dd>
<dt class="flush"><code>--coc</code></dt>
<dd><p>Add a <code>CODE_OF_CONDUCT.md</code> file to the root of the generated project. If
this option is unspecified, an interactive prompt will be displayed and the
answer will be saved in Bundler's global config for future <code>bundle gem</code> use.</p></dd>
<dt><code>--no-coc</code></dt>
<dd><p>Do not create a <code>CODE_OF_CONDUCT.md</code> (overrides <code>--coc</code> specified in the
global config).</p></dd>
<dt class="flush"><code>--ext</code></dt>
<dd><p>Add boilerplate for C extension code to the generated project. This behavior
is disabled by default.</p></dd>
<dt><code>--no-ext</code></dt>
<dd><p>Do not add C extension code (overrides <code>--ext</code> specified in the global
config).</p></dd>
<dt class="flush"><code>--mit</code></dt>
<dd><p>Add an MIT license to a <code>LICENSE.txt</code> file in the root of the generated
project. Your name from the global git config is used for the copyright
statement. If this option is unspecified, an interactive prompt will be
displayed and the answer will be saved in Bundler's global config for future
<code>bundle gem</code> use.</p></dd>
<dt><code>--no-mit</code></dt>
<dd><p>Do not create a <code>LICENSE.txt</code> (overrides <code>--mit</code> specified in the global
config).</p></dd>
<dt>
<code>-t</code>, <code>--test=minitest</code>, <code>--test=rspec</code>, <code>--test=test-unit</code>
</dt>
<dd>
<p>Specify the test framework that Bundler should use when generating the
project. Acceptable values are <code>minitest</code>, <code>rspec</code> and <code>test-unit</code>. The
<code>GEM_NAME.gemspec</code> will be configured and a skeleton test/spec directory will
be created based on this option. Given no option is specified:</p>
<p>When Bundler is configured to generate tests, this defaults to Bundler's
global config setting <code>gem.test</code>.</p>
<p>When Bundler is configured to not generate tests, an interactive prompt will
be displayed and the answer will be used for the current rubygem project.</p>
<p>When Bundler is unconfigured, an interactive prompt will be displayed and
the answer will be saved in Bundler's global config for future <code>bundle gem</code>
use.</p>
</dd>
<dt>
<code>--ci</code>, <code>--ci=github</code>, <code>--ci=travis</code>, <code>--ci=gitlab</code>, <code>--ci=circle</code>
</dt>
<dd>
<p>Specify the continuous integration service that Bundler should use when
generating the project. Acceptable values are <code>github</code>, <code>travis</code>, <code>gitlab</code>
and <code>circle</code>. A configuration file will be generated in the project directory.
Given no option is specified:</p>
<p>When Bundler is configured to generate CI files, this defaults to Bundler's
global config setting <code>gem.ci</code>.</p>
<p>When Bundler is configured to not generate CI files, an interactive prompt
will be displayed and the answer will be used for the current rubygem project.</p>
<p>When Bundler is unconfigured, an interactive prompt will be displayed and
the answer will be saved in Bundler's global config for future <code>bundle gem</code>
use.</p>
</dd>
<dt>
<code>--linter</code>, <code>--linter=rubocop</code>, <code>--linter=standard</code>
</dt>
<dd>
<p>Specify the linter and code formatter that Bundler should add to the
project's development dependencies. Acceptable values are <code>rubocop</code> and
<code>standard</code>. A configuration file will be generated in the project directory.
Given no option is specified:</p>
<p>When Bundler is configured to add a linter, this defaults to Bundler's
global config setting <code>gem.linter</code>.</p>
<p>When Bundler is configured not to add a linter, an interactive prompt
will be displayed and the answer will be used for the current rubygem project.</p>
<p>When Bundler is unconfigured, an interactive prompt will be displayed and
the answer will be saved in Bundler's global config for future <code>bundle gem</code>
use.</p>
</dd>
<dt>
<code>-e</code>, <code>--edit[=EDITOR]</code>
</dt>
<dd><p>Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not
specified. The default is <code>$BUNDLER_EDITOR</code>, <code>$VISUAL</code>, or <code>$EDITOR</code>.</p></dd>
</dl>
<h2 id="SEE-ALSO">See Also</h2>
<ul>
<li><a href="bundle-config.1.html">bundle config(1)</a></li>
</ul>
</div>
</div>
<div class='col-12 col-md-3 mt-4' id='sidebar-wrapper'>
<div class='sidebar-nav'>
<h4>Choose version</h4>
<select class='version-selects form-select mb-3'>
<optgroup label='Current release'>
<option value='/v2.3/bundle_gem.html'>
v2.3
</option>
</optgroup>
<optgroup label='Legacy release'>
<option selected value='/v2.2/bundle_gem.html'>
v2.2
</option>
<option value='/v2.1/bundle_gem.html'>
v2.1
</option>
</optgroup>
<optgroup label='Deprecated release'>
<option value='/v2.0/bundle_gem.html'>
v2.0
</option>
<option value='/v1.17/bundle_gem.html'>
v1.17
</option>
<option value='/v1.16/bundle_gem.html'>
v1.16
</option>
<option value='/v1.15/bundle_gem.html'>
v1.15
</option>
<option value='/v1.14/bundle_gem.html'>
v1.14
</option>
<option value='/v1.13/bundle_gem.html'>
v1.13
</option>
<option value='/v1.12/bundle_gem.html'>
v1.12
</option>
</optgroup>
</select>
<h4>Primary Commands</h4>
<ul>
<li class=''>
<a href="/v2.2/man/bundle-install.1.html">bundle install</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-update.1.html">bundle update</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-cache.1.html">bundle cache</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-exec.1.html">bundle exec</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-config.1.html">bundle config</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/bundle_help.html">bundle help</a>
</li>
<li class='separator'>
<hr>
</li>
</ul>
<h4>Utilities</h4>
<ul>
<li class=''>
<a href="/v2.2/man/bundle.1.html">bundle</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-add.1.html">bundle add</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-binstubs.1.html">bundle binstubs</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-check.1.html">bundle check</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-clean.1.html">bundle clean</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/bundle_console.html">bundle console</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-doctor.1.html">bundle doctor</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-gem.1.html">bundle gem</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-info.1.html">bundle info</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-init.1.html">bundle init</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-inject.1.html">bundle inject</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-list.1.html">bundle list</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-lock.1.html">bundle lock</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-open.1.html">bundle open</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-outdated.1.html">bundle outdated</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-platform.1.html">bundle platform</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/bundle_plugin.html">bundle plugin</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-pristine.1.html">bundle pristine</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-remove.1.html">bundle remove</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-show.1.html">bundle show</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/bundle_version.html">bundle version</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/bundle-viz.1.html">bundle viz</a>
</li>
<li class='separator'>
<hr>
</li>
<li class=''>
<a href="/v2.2/man/gemfile.5.html">gemfile</a>
</li>
<li class='separator'>
<hr>
</li>
</ul>
</div>
</div>
</div>
</div>
<script src="/commands_layout.min.js"></script>
<div class='bg-light-blue'>
<div class='container'>
<div class='contents'>
<div class='edit-on-github text-center'>
This document is obsolete. <a href="/v2.3/man/bundle-gem.1.html">See the latest version of this document</a> if you caught an error or noticed something was missing, it may be fixed there.
</div>
</div>
</div>
</div>
<div class='footer'>
<nav class='navbar justify-content-center'>
<ul class='navbar-nav'>
<li class='nav-item'><a href="/docs.html" class="nav-link px-3">Docs</a></li>
<li class='nav-item'><a href="/contributors.html" class="nav-link px-3">Team</a></li>
<li class='nav-item'><a href="/blog" class="nav-link px-3">Blog</a></li>
<li class='nav-item'><a href="/about.html" class="nav-link px-3">About</a></li>
<li class='nav-item'><a href="https://github.com/rubygems/rubygems/tree/master/bundler" class="nav-link px-3">Repository</a></li>
</ul>
</nav>
</div>
</body>
</html>