|
8 | 8 | * [ruby_binary](#ruby_binary) |
9 | 9 | * [ruby_test](#ruby_test) |
10 | 10 | * [ruby_bundle](#ruby_bundle) |
| 11 | + * [ruby_gem](#rb_gem) |
11 | 12 | * [What's coming next](#whats-coming-next) |
12 | 13 | * [Contributing](#contributing) |
13 | 14 | * [Setup](#setup) |
@@ -483,11 +484,88 @@ ruby_bundle(name, gemfile, gemfile_lock, bundler_version = "2.1.2") |
483 | 484 | </tbody> |
484 | 485 | </table> |
485 | 486 |
|
| 487 | +## rb_gem |
| 488 | +Used to generate a zipped gem containing its srcs, dependencies and a gemspec. |
| 489 | + |
| 490 | +<pre> |
| 491 | +rb_gem(name, gem_name, version, srcs, authors, deps, data, includes) |
| 492 | +</pre> |
| 493 | +<table class="table table-condensed table-bordered table-params"> |
| 494 | + <colgroup> |
| 495 | + <col class="col-param" /> |
| 496 | + <col class="param-description" /> |
| 497 | + </colgroup> |
| 498 | + <thead> |
| 499 | + <tr> |
| 500 | + <th colspan="2">Attributes</th> |
| 501 | + </tr> |
| 502 | + </thead> |
| 503 | + <tbody> |
| 504 | + <tr> |
| 505 | + <td><code>name</code></td> |
| 506 | + <td> |
| 507 | + <code>Name, required</code> |
| 508 | + <p>A unique name for this rule.</p> |
| 509 | + </td> |
| 510 | + </tr> |
| 511 | + <tr> |
| 512 | + <td><code>gem_name</code></td> |
| 513 | + <td> |
| 514 | + <code>Name of the gem, required</code> |
| 515 | + <p>The name of the gem to be generated.</p> |
| 516 | + </td> |
| 517 | + </tr> |
| 518 | + <tr> |
| 519 | + <tr> |
| 520 | + <td><code>version</code></td> |
| 521 | + <td> |
| 522 | + <code>Label, required</code> |
| 523 | + <p> |
| 524 | + The version of the gem. Is used to name the output file, |
| 525 | + which becomes <code>name-version.zip</code>, and also |
| 526 | + included in the Gemspec. |
| 527 | + </p> |
| 528 | + </td> |
| 529 | + </tr> |
| 530 | + <tr> |
| 531 | + <td><code>authors</code></td> |
| 532 | + <td> |
| 533 | + <code>List of Strings, required</code> |
| 534 | + <p> |
| 535 | + List of human readable names of the gem authors. |
| 536 | + Required to generate a valid gemspec. |
| 537 | + </p> |
| 538 | + </td> |
| 539 | + </tr> |
| 540 | + <tr> |
| 541 | + <td><code>srcs</code></td> |
| 542 | + <td> |
| 543 | + <code>List of Labels, optional</code> |
| 544 | + <p> |
| 545 | + List of <code>.rb</code> files. |
| 546 | + </p> |
| 547 | + <p>At least <code>srcs</code> or <code>deps</code> must be present</p> |
| 548 | + </td> |
| 549 | + </tr> |
| 550 | + <tr> |
| 551 | + <td><code>deps</code></td> |
| 552 | + <td> |
| 553 | + <code>List of labels, optional</code> |
| 554 | + <p> |
| 555 | + List of targets that are required by the <code>srcs</code> Ruby |
| 556 | + files. |
| 557 | + </p> |
| 558 | + <p>At least <code>srcs</code> or <code>deps</code> must be present</p> |
| 559 | + </td> |
| 560 | + </tr> |
| 561 | + </tbody> |
| 562 | +</table> |
| 563 | + |
486 | 564 | ## What's coming next |
487 | 565 |
|
488 | 566 | 1. Building native extensions in gems with Bazel |
489 | 567 | 2. Using a specified version of Ruby. |
490 | | -3. Building and releasing your gems with Bazel |
| 568 | +3. Releasing your gems with Bazel |
491 | 569 |
|
492 | 570 | ## Contributing |
493 | 571 |
|
|
0 commit comments