From ab9ec828a2eaaed69d757fea52246a75afc10e7f Mon Sep 17 00:00:00 2001 From: satreix Date: Fri, 12 Jul 2024 09:42:23 +0100 Subject: [PATCH] build(deps): migrate rules_ruby to bzlmod --- .github/workflows/workflow.yml | 6 -- .ruby-version | 2 +- Gemfile.lock | 7 ++ MODULE.bazel | 52 +++++++++++ MODULE.bazel.lock | 87 +++++++++++++++++++ WORKSPACE | 27 ------ src/ruby/hello_world/BUILD.bazel | 25 ++++-- src/ruby/hello_world/lib/BUILD.bazel | 4 +- src/ruby/hello_world/spec/BUILD.bazel | 14 +++ src/ruby/template/BUILD.bazel | 34 ++++---- src/ruby/template/empty.rb | 1 - src/ruby/template/spec/BUILD.bazel | 14 +++ src/ruby/template/spec/template_spec.rb | 4 +- .../bazelruby_rules_ruby/0001-fix-rspec.patch | 32 ------- third_party/bazelruby_rules_ruby/BUILD.bazel | 0 15 files changed, 216 insertions(+), 93 deletions(-) create mode 100644 src/ruby/hello_world/spec/BUILD.bazel delete mode 100644 src/ruby/template/empty.rb create mode 100644 src/ruby/template/spec/BUILD.bazel delete mode 100644 third_party/bazelruby_rules_ruby/0001-fix-rspec.patch delete mode 100644 third_party/bazelruby_rules_ruby/BUILD.bazel diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 95eaa07a..4a5ce93b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -38,18 +38,12 @@ jobs: distribution: "zulu" java-version: "21" - # Ruby rules use host install still: https://github.com/bazelruby/rules_ruby/issues/112 - - name: "[Ruby] Install Ruby" - uses: ruby/setup-ruby@v1.185.0 - - name: Versions run: | echo "--> bazel" bazel version echo "--> java" java --version - echo "--> ruby" - ruby --version - name: Copy .bazelrc run: cp tools/ci/bazel.rc $HOME/.bazelrc diff --git a/.ruby-version b/.ruby-version index 619b5376..dac625a8 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.3 +jruby-9.4.8.0 diff --git a/Gemfile.lock b/Gemfile.lock index 59f027ba..4c4504b4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,19 +3,24 @@ GEM specs: ast (2.4.2) cgi (0.3.6) + cgi (0.3.6-java) diff-lcs (1.5.1) erb (4.0.4) cgi (>= 0.3.3) + erb (4.0.4-java) + cgi (>= 0.3.3) haml (5.2.2) temple (>= 0.8.0) tilt json (2.7.2) + json (2.7.2-java) language_server-protocol (3.17.0.3) parallel (1.25.1) parser (3.3.3.0) ast (~> 2.4.1) racc racc (1.8.0) + racc (1.8.0-java) rainbow (3.1.1) regexp_parser (2.9.2) rexml (3.3.1) @@ -56,12 +61,14 @@ GEM temple (~> 0.10.0) tilt (>= 2.1.0) strscan (3.1.0) + strscan (3.1.0-java) temple (0.10.3) tilt (2.3.0) unicode-display_width (2.5.0) PLATFORMS arm64-darwin-22 + universal-java-21 x86_64-darwin-19 x86_64-darwin-20 x86_64-darwin-21 diff --git a/MODULE.bazel b/MODULE.bazel index 1eb1c0de..1b233603 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -32,6 +32,58 @@ bazel_dep(name = "rules_cc", version = "0.0.9") bazel_dep(name = "rules_cue", version = "0.7.0") bazel_dep(name = "rules_foreign_cc", version = "0.11.1") bazel_dep(name = "rules_go", version = "0.48.1", repo_name = "io_bazel_rules_go") +bazel_dep(name = "rules_ruby", version = "0.11.0") + +ruby = use_extension("@rules_ruby//ruby:extensions.bzl", "ruby") +ruby.toolchain( + name = "ruby", + version_file = "//:.ruby-version", +) +use_repo(ruby, "ruby") +ruby.bundle_fetch( + name = "bundle", + gem_checksums = { + "ast-2.4.2": "1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12", + "cgi-0.3.6": "c5e2c301437116b28fdfbb565452b9c1ee597901e68611367b4126b5d10feca3", + "cgi-0.3.6-java": "f94886a613c101f2f60c2e33ea8a42d6ad0b9a5fcda3d550e01f35b0271585af", + "diff-lcs-1.5.1": "273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe", + "erb-4.0.4": "de116e106205c46bc01918789b611aaad1328dcc6e9f12cf8cd2cc60ef619717", + "erb-4.0.4-java": "3767088f230194a84316a5879f0c3dc5f2a96fb1c9a198c3e27d3f35d416c597", + "haml-5.2.2": "6e759246556145642ef832d670fc06f9bd8539159a0e600847a00291dd7aae0c", + "json-2.7.2": "1898b5cbc81cd36c0fd4d0b7ad2682c39fb07c5ff682fc6265f678f550d4982c", + "json-2.7.2-java": "138e3038b5361b3d06ee2e8aa2be00bed0d0de4ef5f1553fc5935e5b93aca7ee", + "language_server-protocol-3.17.0.3": "3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f", + "parallel-1.25.1": "12e089b9aa36ea2343f6e93f18cfcebd031798253db8260590d26a7f70b1ab90", + "parser-3.3.3.0": "a2e23c90918d9b7e866b18dca2b6835f227769dd2fa8e59c5841f3389cf53eeb", + "racc-1.8.0": "09349a65c37c4fe710a435f25c9f1652e39f29ad6b1fa08d4a8d30c0553d3a08", + "racc-1.8.0-java": "3688448632150682bbd708b199961129aed2266107e26fcacb45c997395c19f9", + "rainbow-3.1.1": "039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a", + "regexp_parser-2.9.2": "5a27e767ad634f8a4b544520d5cd28a0db7aa1198a5d7c9d7e11d7b3d9066446", + "rexml-3.3.1": "34af9fb38eff6c451abd187c53fded98378aa91766d4c62fbbce10e40ed7c325", + "rspec-3.13.0": "d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993", + "rspec-core-3.13.0": "557792b4e88da883d580342b263d9652b6a10a12d5bda9ef967b01a48f15454c", + "rspec-expectations-3.13.0": "621d48c62262f955421eaa418130744760802cad47e781df70dba4d9f897102e", + "rspec-its-1.3.0": "4da51040e7820daafd40f2f6216d13c90aa949f0d302a0412c9ef6074e73ea97", + "rspec-mocks-3.13.0": "735a891215758d77cdb5f4721fffc21078793959d1f0ee4a961874311d9b7f66", + "rspec-support-3.13.0": "0e725f53b8c20ce75913a5da7bf06bf90698266951f3b1e3ae7bcd9612775257", + "rubocop-1.64.1": "3145bf1863771e400a1c041060e751e5ff0edd9ceb99d01df36db1902f611f3b", + "rubocop-ast-1.31.3": "1b07d618d8776993ec6053a706d1c09f0bf15139fd69415924656cbff07e7818", + "rubocop-rspec-3.0.2": "95fb61205015b16e2a5416a5b00c035cb725a22a12462cfbd4cab920930d2d8f", + "ruby-progressbar-1.13.0": "80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33", + "slim-5.2.1": "72351dff7e2ff20e2d5c393cfc385bb9142cef5db059141628fd7163ac3c13e7", + "strscan-3.1.0": "01b8a81d214fbf7b5308c6fb51b5972bbfc4a6aa1f166fd3618ba97e0fcd5555", + "strscan-3.1.0-java": "8645aa76e017e21764c6df572d2d79fcc1672284014f5bdbd806278cdbcd11b0", + "temple-0.10.3": "df3145fe6577af1e25387eb7f7122d32ed51bdb6f2e7bb0f4fbf07b66151913b", + "tilt-2.3.0": "82dd903d61213c63679d28e404ee8e10d1b0fdf5270f1ad0898ec314cc3e745c", + "unicode-display_width-2.5.0": "7e7681dcade1add70cb9fda20dd77f300b8587c81ebbd165d14fd93144ff0ab4", + }, + gemfile = "//:Gemfile", + gemfile_lock = "//:Gemfile.lock", +) +use_repo(ruby, "bundle", "ruby_toolchains") + +register_toolchains("@ruby_toolchains//:all") + bazel_dep(name = "rules_rust", version = "0.46.0") # rules_rust 0.45.1 does not work with protobuf 23.1 and this breaks `bazel test src/rust/...` diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index bfb4962d..fd7a4ac1 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -214,6 +214,8 @@ "https://bcr.bazel.build/modules/rules_python/0.33.2/MODULE.bazel": "3e036c4ad8d804a4dad897d333d8dce200d943df4827cb849840055be8d2e937", "https://bcr.bazel.build/modules/rules_python/0.33.2/source.json": "e539592cd3aae4492032cecea510e46ca16eeb972271560b922cae9893944e2f", "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/rules_ruby/0.11.0/MODULE.bazel": "4090c6ba0d07e08953c3c9b5387be429094ad9a3f4b3e24bd669401c88f6c252", + "https://bcr.bazel.build/modules/rules_ruby/0.11.0/source.json": "5c94d36a4618c175b764e3b42a673bf216d065c4a1d0a344a00a242fcd2817a7", "https://bcr.bazel.build/modules/rules_rust/0.46.0/MODULE.bazel": "9bc9cd48a10ec306399f2864988e94f3bf1227b4f239cb4e15145f76cec5a99a", "https://bcr.bazel.build/modules/rules_rust/0.46.0/source.json": "1fe88a22bc1b24dbba44076ca82ced427a751d2df22f927494fdbc53e75c4bf8", "https://bcr.bazel.build/modules/rules_sh/0.4.0/MODULE.bazel": "1e1f124fafde047e65d614930e1f344dbbc47204865c8c7aae484ee0de2d60ac", @@ -2771,6 +2773,91 @@ ] } }, + "@@rules_ruby~//ruby:extensions.bzl%ruby": { + "general": { + "bzlTransitiveDigest": "j8Z4sRl//8oTbAI/GgSSNRDJQErEPVfHpzHmEOm6cZ4=", + "usagesDigest": "bDOwPYVGMiP+q9UxsDj4jEFfAY36LJKJ4gantER3qkY=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "ruby_toolchains": { + "bzlFile": "@@rules_ruby~//ruby/private/toolchain:repository_proxy.bzl", + "ruleClassName": "rb_toolchain_repository_proxy", + "attributes": { + "toolchain": "@ruby//:toolchain", + "toolchain_type": "@rules_ruby//ruby:toolchain_type" + } + }, + "bundle": { + "bzlFile": "@@rules_ruby~//ruby/private:bundle_fetch.bzl", + "ruleClassName": "rb_bundle_fetch", + "attributes": { + "srcs": [], + "env": {}, + "gemfile": "@@//:Gemfile", + "gemfile_lock": "@@//:Gemfile.lock", + "gem_checksums": { + "ast-2.4.2": "1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12", + "cgi-0.3.6": "c5e2c301437116b28fdfbb565452b9c1ee597901e68611367b4126b5d10feca3", + "cgi-0.3.6-java": "f94886a613c101f2f60c2e33ea8a42d6ad0b9a5fcda3d550e01f35b0271585af", + "diff-lcs-1.5.1": "273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe", + "erb-4.0.4": "de116e106205c46bc01918789b611aaad1328dcc6e9f12cf8cd2cc60ef619717", + "erb-4.0.4-java": "3767088f230194a84316a5879f0c3dc5f2a96fb1c9a198c3e27d3f35d416c597", + "haml-5.2.2": "6e759246556145642ef832d670fc06f9bd8539159a0e600847a00291dd7aae0c", + "json-2.7.2": "1898b5cbc81cd36c0fd4d0b7ad2682c39fb07c5ff682fc6265f678f550d4982c", + "json-2.7.2-java": "138e3038b5361b3d06ee2e8aa2be00bed0d0de4ef5f1553fc5935e5b93aca7ee", + "language_server-protocol-3.17.0.3": "3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f", + "parallel-1.25.1": "12e089b9aa36ea2343f6e93f18cfcebd031798253db8260590d26a7f70b1ab90", + "parser-3.3.3.0": "a2e23c90918d9b7e866b18dca2b6835f227769dd2fa8e59c5841f3389cf53eeb", + "racc-1.8.0": "09349a65c37c4fe710a435f25c9f1652e39f29ad6b1fa08d4a8d30c0553d3a08", + "racc-1.8.0-java": "3688448632150682bbd708b199961129aed2266107e26fcacb45c997395c19f9", + "rainbow-3.1.1": "039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a", + "regexp_parser-2.9.2": "5a27e767ad634f8a4b544520d5cd28a0db7aa1198a5d7c9d7e11d7b3d9066446", + "rexml-3.3.1": "34af9fb38eff6c451abd187c53fded98378aa91766d4c62fbbce10e40ed7c325", + "rspec-3.13.0": "d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993", + "rspec-core-3.13.0": "557792b4e88da883d580342b263d9652b6a10a12d5bda9ef967b01a48f15454c", + "rspec-expectations-3.13.0": "621d48c62262f955421eaa418130744760802cad47e781df70dba4d9f897102e", + "rspec-its-1.3.0": "4da51040e7820daafd40f2f6216d13c90aa949f0d302a0412c9ef6074e73ea97", + "rspec-mocks-3.13.0": "735a891215758d77cdb5f4721fffc21078793959d1f0ee4a961874311d9b7f66", + "rspec-support-3.13.0": "0e725f53b8c20ce75913a5da7bf06bf90698266951f3b1e3ae7bcd9612775257", + "rubocop-1.64.1": "3145bf1863771e400a1c041060e751e5ff0edd9ceb99d01df36db1902f611f3b", + "rubocop-ast-1.31.3": "1b07d618d8776993ec6053a706d1c09f0bf15139fd69415924656cbff07e7818", + "rubocop-rspec-3.0.2": "95fb61205015b16e2a5416a5b00c035cb725a22a12462cfbd4cab920930d2d8f", + "ruby-progressbar-1.13.0": "80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33", + "slim-5.2.1": "72351dff7e2ff20e2d5c393cfc385bb9142cef5db059141628fd7163ac3c13e7", + "strscan-3.1.0": "01b8a81d214fbf7b5308c6fb51b5972bbfc4a6aa1f166fd3618ba97e0fcd5555", + "strscan-3.1.0-java": "8645aa76e017e21764c6df572d2d79fcc1672284014f5bdbd806278cdbcd11b0", + "temple-0.10.3": "df3145fe6577af1e25387eb7f7122d32ed51bdb6f2e7bb0f4fbf07b66151913b", + "tilt-2.3.0": "82dd903d61213c63679d28e404ee8e10d1b0fdf5270f1ad0898ec314cc3e745c", + "unicode-display_width-2.5.0": "7e7681dcade1add70cb9fda20dd77f300b8587c81ebbd165d14fd93144ff0ab4" + }, + "bundler_remote": "https://rubygems.org/", + "bundler_checksums": {} + } + }, + "ruby": { + "bzlFile": "@@rules_ruby~//ruby/private:download.bzl", + "ruleClassName": "rb_download", + "attributes": { + "version": "", + "version_file": "@@//:.ruby-version", + "msys2_packages": [ + "libyaml" + ], + "ruby_build_version": "20240530.1" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "rules_ruby~", + "bazel_skylib", + "bazel_skylib~" + ] + ] + } + }, "@@rules_rust~//rust:extensions.bzl%rust": { "general": { "bzlTransitiveDigest": "6RBA1KykC5nmdyT4XQkeyGYbOY91H5Redr7HBCw8hFE=", diff --git a/WORKSPACE b/WORKSPACE index 143bf520..12075475 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,18 +2,6 @@ workspace(name = "everest") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -http_archive( - name = "bazelruby_rules_ruby", - patch_args = ["-p1"], - patches = [ - # A fix for https://github.com/bazelruby/rules_ruby/issues/79 - "//third_party/bazelruby_rules_ruby:0001-fix-rspec.patch", - ], - sha256 = "33217f27c7cc44355dc82bbe172d0ace09c6a73da387bbbcd66cff013d35e498", - strip_prefix = "rules_ruby-8a03f6c54f1bb3ecbbb82c8e2fdbf40e049a8115", - url = "https://github.com/bazelruby/rules_ruby/archive/8a03f6c54f1bb3ecbbb82c8e2fdbf40e049a8115.tar.gz", -) - http_archive( name = "com_github_antlr_grammars_v4", build_file_content = """exports_files(glob(["**/*.g4"]), visibility = ["//visibility:public"])""", @@ -87,18 +75,3 @@ openapi_tools_generator_bazel_repositories( openapi_generator_cli_version = "5.4.0", sha256 = "f3ed312310e390324b33ba2ffff290ce812935207a1493ec5c098d0a441be51c", ) - -load("@bazelruby_rules_ruby//ruby:deps.bzl", "rules_ruby_dependencies", "rules_ruby_select_sdk") - -rules_ruby_dependencies() - -rules_ruby_select_sdk() - -load("@bazelruby_rules_ruby//ruby:defs.bzl", "ruby_bundle") - -ruby_bundle( - name = "bundle", - bundler_version = "2.5.3", - gemfile = "//:Gemfile", - gemfile_lock = "//:Gemfile.lock", -) diff --git a/src/ruby/hello_world/BUILD.bazel b/src/ruby/hello_world/BUILD.bazel index d5f4178d..3ed8c075 100644 --- a/src/ruby/hello_world/BUILD.bazel +++ b/src/ruby/hello_world/BUILD.bazel @@ -1,18 +1,31 @@ -load("@bazelruby_rules_ruby//ruby:defs.bzl", "ruby_binary", "ruby_rspec") +load("@rules_ruby//ruby:defs.bzl", "rb_binary", "rb_test") load("//tools/test/binary:binary.bzl", "binary_test") -ruby_binary( +rb_binary( name = "hello_world", srcs = ["hello_world.rb"], + main = "hello_world.rb", deps = [ "//src/ruby/hello_world/lib:hello", ], ) -ruby_rspec( - name = "hello_spec_test", - specs = ["//src/ruby/hello_world:spec/hello_spec.rb"], - deps = ["//src/ruby/hello_world/lib:hello"], +rb_test( + name = "rubocop_test", + timeout = "short", + args = [ + "src/ruby/hello_world/", + "src/ruby/hello_world/lib/", + "src/ruby/hello_world/spec/", + ], + main = "@bundle//bin:rubocop", + tags = ["no-sandbox"], + deps = [ + ":hello_world", + "//src/ruby/hello_world/lib:hello", + "//src/ruby/hello_world/spec:hello_test", + "@bundle", + ], ) binary_test( diff --git a/src/ruby/hello_world/lib/BUILD.bazel b/src/ruby/hello_world/lib/BUILD.bazel index f7e5265c..e9d5755d 100644 --- a/src/ruby/hello_world/lib/BUILD.bazel +++ b/src/ruby/hello_world/lib/BUILD.bazel @@ -1,6 +1,6 @@ -load("@bazelruby_rules_ruby//ruby:defs.bzl", "ruby_library") +load("@rules_ruby//ruby:defs.bzl", "rb_library") -ruby_library( +rb_library( name = "hello", srcs = ["hello.rb"], visibility = ["//src/ruby/hello_world:__subpackages__"], diff --git a/src/ruby/hello_world/spec/BUILD.bazel b/src/ruby/hello_world/spec/BUILD.bazel new file mode 100644 index 00000000..2dd36792 --- /dev/null +++ b/src/ruby/hello_world/spec/BUILD.bazel @@ -0,0 +1,14 @@ +load("@rules_ruby//ruby:defs.bzl", "rb_test") + +rb_test( + name = "hello_test", + timeout = "short", + srcs = ["hello_spec.rb"], + args = ["src/ruby/hello_world/spec/"], + main = "@bundle//bin:rspec", + visibility = ["//src/ruby/hello_world:__subpackages__"], + deps = [ + "//src/ruby/hello_world/lib:hello", + "@bundle", + ], +) diff --git a/src/ruby/template/BUILD.bazel b/src/ruby/template/BUILD.bazel index 0f317f57..eead43ef 100644 --- a/src/ruby/template/BUILD.bazel +++ b/src/ruby/template/BUILD.bazel @@ -1,24 +1,28 @@ -load("@bazelruby_rules_ruby//ruby:defs.bzl", "ruby_binary", "ruby_library", "ruby_rspec") +load("@rules_ruby//ruby:defs.bzl", "rb_binary", "rb_test") -ruby_binary( +rb_binary( name = "template", srcs = ["template.rb"], data = glob(["templates/**"]), + main = "template.rb", + visibility = ["//src/ruby/template/spec:__pkg__"], deps = [ - "@bundle//:erb", - "@bundle//:haml", - "@bundle//:slim", + "@bundle", ], ) -ruby_library( - name = "empty", - srcs = ["empty.rb"], -) - -ruby_rspec( - name = "template_spec_test", - data = [":template"], - specs = ["//src/ruby/template:spec/template_spec.rb"], - deps = [":empty"], # hack to make rspec happy, not used +rb_test( + name = "rubocop_test", + timeout = "short", + args = [ + "src/ruby/template/", + "src/ruby/template/spec/", + ], + main = "@bundle//bin:rubocop", + tags = ["no-sandbox"], + deps = [ + ":template", + "//src/ruby/template/spec:template_test", + "@bundle", + ], ) diff --git a/src/ruby/template/empty.rb b/src/ruby/template/empty.rb deleted file mode 100644 index 8b137891..00000000 --- a/src/ruby/template/empty.rb +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/ruby/template/spec/BUILD.bazel b/src/ruby/template/spec/BUILD.bazel new file mode 100644 index 00000000..293a7edf --- /dev/null +++ b/src/ruby/template/spec/BUILD.bazel @@ -0,0 +1,14 @@ +load("@rules_ruby//ruby:defs.bzl", "rb_test") + +rb_test( + name = "template_test", + timeout = "short", + srcs = ["template_spec.rb"], + args = ["src/ruby/template/spec/"], + data = ["//src/ruby/template"], + main = "@bundle//bin:rspec", + visibility = ["//src/ruby/template:__subpackages__"], + deps = [ + "@bundle", + ], +) diff --git a/src/ruby/template/spec/template_spec.rb b/src/ruby/template/spec/template_spec.rb index 660a9ccf..98a53031 100644 --- a/src/ruby/template/spec/template_spec.rb +++ b/src/ruby/template/spec/template_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require_relative '../template' - EXPECTED_OUTPUT = "=== ERB ===

Hello, ERB!

=== Haml === @@ -12,7 +10,7 @@ RSpec.describe 'template', 'main' do # rubocop:disable RSpec/DescribeClass, RSpec/DescribeMethod it 'renders templates' do - expect { system %(./src/ruby/template/template) } + expect { system %(./src/ruby/template/template.sh) } .to output(EXPECTED_OUTPUT) .to_stdout_from_any_process end diff --git a/third_party/bazelruby_rules_ruby/0001-fix-rspec.patch b/third_party/bazelruby_rules_ruby/0001-fix-rspec.patch deleted file mode 100644 index 316f159c..00000000 --- a/third_party/bazelruby_rules_ruby/0001-fix-rspec.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/ruby/private/rspec.bzl b/ruby/private/rspec.bzl -index 42a9378..9ee4327 100644 ---- a/ruby/private/rspec.bzl -+++ b/ruby/private/rspec.bzl -@@ -10,17 +10,14 @@ load(":binary.bzl", "ruby_binary_macro") - - def ruby_rspec( - name, -- srcs, - specs, -+ srcs = None, - deps = None, - size = "small", - rspec_args = None, # This is expected to be a dictionary - bundle = DEFAULT_BUNDLE_NAME, - visibility = None, - **kwargs): -- if specs == None: -- specs = [] -- - if srcs == None: - srcs = [] - -@@ -41,7 +38,7 @@ def ruby_rspec( - else: - args_list.append("%s" % (option)) - -- args_list += specs -+ args_list += ["$(location " + s + ")" for s in specs] - - rspec_gems = ["%s:%s" % (bundle, gem) for gem in DEFAULT_RSPEC_GEMS] - diff --git a/third_party/bazelruby_rules_ruby/BUILD.bazel b/third_party/bazelruby_rules_ruby/BUILD.bazel deleted file mode 100644 index e69de29b..00000000