Skip to content

Commit 63f78ce

Browse files
author
Konstantin Gredeskoul
committed
Merge remote-tracking branch 'origin/graham/multiple-examples' into develop
2 parents e396751 + 4a37ac4 commit 63f78ce

File tree

15 files changed

+56
-68
lines changed

15 files changed

+56
-68
lines changed

examples/BUILD.bazel

Whitespace-only changes.

examples/bin/BUILD.bazel

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/lib/foo/BUILD.bazel

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/simple_script/BUILD

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package(default_visibility = ["//:__subpackages__"])
2+
3+
load(
4+
"@bazelruby_ruby_rules//ruby:defs.bzl",
5+
"ruby_binary",
6+
"ruby_test",
7+
)
8+
9+
ruby_binary(
10+
name = "default_bin",
11+
srcs = ["script.rb"],
12+
main = "script.rb",
13+
deps = [
14+
"//lib:foo",
15+
"@bundle//:libs",
16+
],
17+
)
18+
19+
20+
ruby_test(
21+
name = "default_test",
22+
srcs = ["script_spec.rb"],
23+
main = "script_spec.rb",
24+
rubyopt = ["-rrspec/autorun"], # require autorun because it is needed
25+
deps = [
26+
"//lib:foo",
27+
"@bundle//:libs",
28+
],
29+
)
30+

examples/simple_script/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Simple Script Example
2+
3+
This Workspace includes a simple ruby script that includes and external gem and an internal library
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@ workspace(name = "bazelruby_ruby_rules_example")
44
# rules_ruby itself...
55
local_repository(
66
name = "bazelruby_ruby_rules",
7-
path = "..",
7+
path = "../..",
88
)
99

10-
# But you'd usually want to fetch rules_ruby from remote.
11-
#
12-
# git_repository(
13-
# name = "bazelruby_ruby_rules",
14-
# remote = "https://github.com/yugui/rules_ruby.git",
15-
# tag = "v0.1.0",
16-
# )
17-
1810
load(
1911
"@bazelruby_ruby_rules//ruby:deps.bzl",
2012
"ruby_register_toolchains",

0 commit comments

Comments
 (0)