{"id":43088887,"url":"https://github.com/swift-nav/rules_gherkin","last_synced_at":"2026-01-31T15:39:03.937Z","repository":{"id":49502741,"uuid":"329225665","full_name":"swift-nav/rules_gherkin","owner":"swift-nav","description":"A set of bazel rules for BDD with cucumber/gherkin","archived":false,"fork":false,"pushed_at":"2026-01-27T15:30:04.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-28T02:13:01.453Z","etag":null,"topics":["bazel","bazel-rules","cucumber","cucumber-cpp"],"latest_commit_sha":null,"homepage":"","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swift-nav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-13T07:20:38.000Z","updated_at":"2026-01-27T15:30:07.000Z","dependencies_parsed_at":"2024-10-18T06:34:06.477Z","dependency_job_id":null,"html_url":"https://github.com/swift-nav/rules_gherkin","commit_stats":null,"previous_names":["nathaniel-brough/rules_gherkin","swift-nav/rules_gherkin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/swift-nav/rules_gherkin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-nav%2Frules_gherkin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-nav%2Frules_gherkin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-nav%2Frules_gherkin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-nav%2Frules_gherkin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swift-nav","download_url":"https://codeload.github.com/swift-nav/rules_gherkin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-nav%2Frules_gherkin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28946780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","bazel-rules","cucumber","cucumber-cpp"],"created_at":"2026-01-31T15:39:03.443Z","updated_at":"2026-01-31T15:39:03.932Z","avatar_url":"https://github.com/swift-nav.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"![bazel_cucumber](doc/imgs/bazel_cucumber.png)\n![Bazel](https://github.com/swift-nav/rules_gherkin/workflows/Bazel/badge.svg) [![docs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://swift-nav.github.io/rules_gherkin/)\n# rules_gherkin\nA set of bazel rules for BDD with [cucumber/gherkin](https://cucumber.io/).\n\n## Getting started\n\n### Prerequisites\nYou'll need a `Gemfile` and `Gemfile.lock` in the root of your workspace with the following content:\n\n```ruby\nsource 'https://rubygems.org'\n\ngem 'cucumber', '~\u003e 10.2.0'\ngem 'cucumber-wire', '~\u003e 8.0.0'\n```\n\nRun `bundle install` to generate the `Gemfile.lock` file.\n\n### MODULE.bazel Setup\nAdd the following to your `MODULE.bazel` (see examples/MODULE.bazel for complete example):\n\n```python\nbazel_dep(name = \"rules_gherkin\", version = \"0.1.0\")\nbazel_dep(name = \"rules_ruby\", version = \"0.21.1\")\n\nruby = use_extension(\"@rules_ruby//ruby:extensions.bzl\", \"ruby\")\nruby.toolchain(\n    name = \"ruby\",\n    version = \"jruby-9.4.5.0\",\n)\nruby.bundle_fetch(\n    name = \"cucumber\",\n    gem_checksums = { ... },  # See examples/MODULE.bazel for complete checksums\n    gemfile = \"//:Gemfile\",\n    gemfile_lock = \"//:Gemfile.lock\",\n)\nuse_repo(ruby, \"cucumber\", \"ruby\", \"ruby_toolchains\")\n\nregister_toolchains(\"@ruby_toolchains//:all\")\n```\n\nNote: The `gem_checksums` dictionary is required for hermetic builds. See `examples/MODULE.bazel` for the complete list of checksums.\n\n### BUILD.bazel Example\nCreate a `BUILD.bazel` file in your feature directory:\n\n```python\nload(\"@rules_gherkin//gherkin:defs.bzl\", \"gherkin_library\", \"gherkin_test\", \"cc_gherkin_steps\")\n\n# Define your feature files\ngherkin_library(\n    name = \"feature_specs\",\n    srcs = glob([\"**/*.feature\"]),\n)\n\n# Define step implementations in C++\ncc_gherkin_steps(\n    name = \"calculator_steps\",\n    srcs = [\n        \"CalculatorSteps.cpp\",\n    ],\n    visibility = [\"//visibility:public\"],\n    deps = [\n        \"//Calc/src:calculator\",\n        \"@cucumber-cpp//:cucumber-cpp\",\n        \"@googletest//:gtest_main\",\n    ],\n)\n\n# Create test target\ngherkin_test(\n    name = \"calc_test\",\n    steps = \":calculator_steps\",\n    deps = [\":feature_specs\"],\n)\n```\n\n## Configuration Options\n\n### Output Format\nYou can configure the cucumber output format using the `--@rules_gherkin//:cucumber_format` flag:\n\n```bash\nbazel test //path/to:test --@rules_gherkin//:cucumber_format=json\n```\n\nAvailable formats:\n- `pretty` (default) - Human-readable output\n- `json` - JSON format\n- `html` - HTML report\n- `junit` - JUnit XML format\n\n## Attribution\nBig thank you to 'Paolo Ambrosio', who authored the [cucumber-cpp](https://github.com/cucumber/cucumber-cpp) from whom I copied and modified the //examples directory in this repository. The examples/LICENCE.txt has been added to reflect the origins of the example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswift-nav%2Frules_gherkin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswift-nav%2Frules_gherkin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswift-nav%2Frules_gherkin/lists"}