1
- ![ activity] ( https://img.shields.io/github/commit-activity/m/bazelruby/rules_ruby?style=for-the-badge )
1
+ # Rules Ruby Version 0.4.1
2
+
3
+ This is the README for Ruby Rules for the [ Bazel Build] ( https://bazel.build ) system.
4
+
5
+ ## ATTENTION: Base Branch Change Announcement
6
+
7
+ We recently switched from the base branch of ` develop ` to the base of ` master ` . Please update your local repos accordingly.
8
+
9
+ ### Build Status
10
+
11
+ [ ![ CircleCI] ( https://circleci.com/gh/bazelruby/rules_ruby.svg?style=shield )] ( https://circleci.com/gh/bazelruby/rules_ruby )   ;
12
+ [ ![ Build Status] ( https://travis-ci.org/bazelruby/rules_ruby.svg?branch=master )] ( https://travis-ci.org/bazelruby/rules_ruby )   ;
13
+ ![ activity] ( https://img.shields.io/github/commit-activity/m/bazelruby/rules_ruby?style=badge )   ;
2
14
3
15
- [ Rules Development Status] ( #rules-development-status )
4
16
- [ Usage] ( #usage )
31
43
- [ Linter] ( #linter )
32
44
- [ Copyright] ( #copyright )
33
45
34
- # RulesRuby Version 0.4.1
35
-
36
- ## ATTENTION: Base branch change announcement
37
-
38
- We recently switched from the base of ` develop ` branch to the base of ` master ` . Please update your local repos accordingly.
39
-
40
- ** Moving forward, ` develop ` branch will not be kept up to date.**
41
-
42
- ### Build Status
43
-
44
- | Build | Status |
45
- | ---------: | --------------------------------------------------------------------------------------------------------------------------------------------------- |
46
- | CircleCI (master) | [ ![ CircleCI] ( https://circleci.com/gh/bazelruby/rules_ruby.svg?style=shield )] ( https://circleci.com/gh/bazelruby/rules_ruby ) |
47
- | TravisCI (master) | [ ![ Build Status] ( https://travis-ci.org/bazelruby/rules_ruby.svg?branch=master )] ( https://travis-ci.org/bazelruby/rules_ruby ) |
48
46
49
47
### [ Change Log] ( CHANGELOG.md )
50
48
@@ -55,10 +53,6 @@ gem install github_changelog_generator
55
53
github_changelog_generator -u bazelruby -p rules_ruby
56
54
```
57
55
58
- # Rules Ruby
59
-
60
- This is the README for Ruby Rules for the [ Bazel Build] ( https://bazel.build ) system.
61
-
62
56
## Rules Development Status
63
57
64
58
| ** Readiness** | ** Types of Applications** |
@@ -76,7 +70,7 @@ Note: we have a short guide on [Building your first Ruby Project](https://github
76
70
77
71
#### Load dependencies, select Ruby SDK and define one or more Bundles
78
72
79
- ``` python
73
+ ``` bazel
80
74
workspace(name = " my_ruby_project" )
81
75
82
76
load(" @bazel_tools//tools/build_defs/repo:http.bzl" , " http_archive" )
@@ -144,7 +138,7 @@ Any of the project `BUILD` files can now reference any gems included in the `Gem
144
138
145
139
Add ` ruby_library ` , ` ruby_binary ` , ` ruby_rspec ` or ` ruby_test ` into your ` BUILD.bazel ` files.
146
140
147
- ``` python
141
+ ``` bazel
148
142
# ———————————————————————————————————————————————————————————————————————
149
143
# Define Ruby executable, test, spec and package a gem
150
144
# ———————————————————————————————————————————————————————————————————————
@@ -192,7 +186,7 @@ ruby_rspec(
192
186
193
187
Use `ruby_gem` rule to package any number of ruby files or folders into a Ruby- Gem compatible ZIP archive.
194
188
195
- ```python
189
+ ```bazel
196
190
load(
197
191
" @bazelruby_rules_ruby//ruby:defs.bzl" ,
198
192
" ruby_gem" ,
@@ -243,7 +237,7 @@ The following diagram attempts to capture the implementation behind `ruby_librar
243
237
244
238
# ## `ruby_library`
245
239
246
- ```python
240
+ ```bazel
247
241
ruby_library(
248
242
name,
249
243
deps,
@@ -332,7 +326,7 @@ ruby_library(
332
326
333
327
# ## `ruby_binary`
334
328
335
- ```python
329
+ ```bazel
336
330
ruby_binary(
337
331
name,
338
332
deps,
@@ -431,7 +425,7 @@ ruby_binary(
431
425
432
426
# ## `ruby_test`
433
427
434
- ```python
428
+ ```bazel
435
429
ruby_test(
436
430
name,
437
431
deps,
@@ -536,7 +530,7 @@ ruby_test(
536
530
537
531
This rule installs gems defined in a Gemfile using Bundler, and exports individual gems from the bundle, as well as the entire bundle, available as a `ruby_library` that can be depended upon from other targets.
538
532
539
- ```python
533
+ ```bazel
540
534
ruby_bundle(
541
535
name,
542
536
gemfile,
@@ -609,7 +603,7 @@ Installing using a `Gemfile` that uses the `gemspec` keyword is not currently su
609
603
610
604
# ### `WORKSPACE`:
611
605
612
- ```python
606
+ ```bazel
613
607
load(" @bazelruby_rules_ruby//ruby:defs.bzl" , " ruby_bundle" )
614
608
615
609
ruby_bundle(
@@ -622,7 +616,7 @@ ruby_bundle(
622
616
623
617
# ### `BUILD.bazel`:
624
618
625
- ```pythonj
619
+ ```bazel
626
620
# Reference the entire bundle with :gems
627
621
628
622
ruby_library(
@@ -644,7 +638,7 @@ ruby_binary(
644
638
645
639
# ## `ruby_rspec`
646
640
647
- ```python
641
+ ```bazel
648
642
ruby_rspec(
649
643
name,
650
644
deps,
@@ -759,7 +753,7 @@ ruby_rspec(
759
753
760
754
Used to generate a zipped gem containing its srcs, dependencies and a gemspec.
761
755
762
- ```python
756
+ ```bazel
763
757
ruby_gem(
764
758
name,
765
759
gem_name,
@@ -1053,36 +1047,38 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1053
1047
1054
1048
- [Build Status](# build-status)
1055
1049
- [Change Log](# change-logchangelogmd)
1056
- - [Rules Ruby](# rules-ruby)
1057
- - [Rules Development Status](# rules-development-status)
1058
- - [Usage](# usage)
1059
- - [`WORKSPACE ` File](# workspace-file)
1060
- - [Load dependencies, select Ruby SDK and define one or more Bundles](# load-dependencies-select-ruby-sdk-and-define-one-or-more-bundles)
1061
- - [`BUILD .bazel` file (s)](# buildbazel-files)
1062
- - [Define Ruby Executable, Library and an RSpec](# define-ruby-executable-library-and-an-rspec)
1063
- - [Package Ruby files as a Gem](# package-ruby-files-as-a-gem)
1064
- - [Rule Dependency Diagram](# rule-dependency-diagram)
1065
- - [Rules](# rules)
1066
- - [`ruby_library` ](# ruby_library)
1067
- - [`ruby_binary` ](# ruby_binary)
1068
- - [`ruby_test` ](# ruby_test)
1069
- - [`ruby_bundle` ](# ruby_bundle)
1070
- - [Limitations](# limitations)
1071
- - [Conventions](# conventions)
1072
- - [`WORKSPACE ` :](# workspace)
1073
- - [`BUILD .bazel` :](# buildbazel)
1074
- - [`ruby_rspec` ](# ruby_rspec)
1075
- - [`ruby_gem` ](# ruby_gem)
1076
- - [What' s coming next](#whats-coming-next)
1077
- - [Contributing](# contributing)
1078
- - [Setup](# setup)
1079
- - [Using the Script](# using-the-script)
1080
- - [OS - Specific Setup](# os-specific-setup)
1081
- - [Issues During Setup](# issues-during-setup)
1082
- - [Developing Rules](# developing-rules)
1083
- - [Running Tests](# running-tests)
1084
- - [Test Script](# test-script)
1085
- - [Linter](# linter)
1086
- - [Copyright](# copyright)
1050
+ - [ATTENTION : Base Branch Change Announcement](# attention-base-branch-change-announcement)
1051
+ - [Build Status](# build-status)
1052
+ - [Change Log](# change-log)
1053
+ - [Rules Development Status](# rules-development-status)
1054
+ - [Usage](# usage)
1055
+ - [`WORKSPACE ` File](# workspace-file)
1056
+ - [Load dependencies, select Ruby SDK and define one or more Bundles](# load-dependencies-select-ruby-sdk-and-define-one-or-more-bundles)
1057
+ - [`BUILD .bazel` file (s)](# buildbazel-files)
1058
+ - [Define Ruby Executable, Library and an RSpec](# define-ruby-executable-library-and-an-rspec)
1059
+ - [Package Ruby files as a Gem](# package-ruby-files-as-a-gem)
1060
+ - [Rule Dependency Diagram](# rule-dependency-diagram)
1061
+ - [Rules](# rules)
1062
+ - [`ruby_library` ](# ruby_library)
1063
+ - [`ruby_binary` ](# ruby_binary)
1064
+ - [`ruby_test` ](# ruby_test)
1065
+ - [`ruby_bundle` ](# ruby_bundle)
1066
+ - [Limitations](# limitations)
1067
+ - [Conventions](# conventions)
1068
+ - [`WORKSPACE ` :](# workspace)
1069
+ - [`BUILD .bazel` :](# buildbazel)
1070
+ - [`ruby_rspec` ](# ruby_rspec)
1071
+ - [`ruby_gem` ](# ruby_gem)
1072
+ - [What' s coming next](#whats-coming-next)
1073
+ - [Contributing](# contributing)
1074
+ - [Setup](# setup)
1075
+ - [Using the Script](# using-the-script)
1076
+ - [OS - Specific Setup](# os-specific-setup)
1077
+ - [Issues During Setup](# issues-during-setup)
1078
+ - [Developing Rules](# developing-rules)
1079
+ - [Running Tests](# running-tests)
1080
+ - [Test Script](# test-script)
1081
+ - [Linter](# linter)
1082
+ - [Copyright](# copyright)
1087
1083
1088
1084
< !-- / code_chunk_output -- >
0 commit comments