{"id":18700352,"url":"https://github.com/enkessler/cuke_modeler","last_synced_at":"2025-04-05T12:05:08.992Z","repository":{"id":16722268,"uuid":"19479293","full_name":"enkessler/cuke_modeler","owner":"enkessler","description":"A gem to model a Cucumber test suite.","archived":false,"fork":false,"pushed_at":"2025-02-24T16:14:35.000Z","size":1726,"stargazers_count":22,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T11:07:20.517Z","etag":null,"topics":["abstraction-layer","cucumber","gherkin","modeling","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/enkessler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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}},"created_at":"2014-05-06T03:06:44.000Z","updated_at":"2025-02-24T12:50:56.000Z","dependencies_parsed_at":"2023-02-12T14:15:47.411Z","dependency_job_id":"7eb36219-3c5b-4460-be95-de90bb32b092","html_url":"https://github.com/enkessler/cuke_modeler","commit_stats":{"total_commits":701,"total_committers":4,"mean_commits":175.25,"dds":"0.012838801711840264","last_synced_commit":"eba1eeedc2ea74671d90b373d03d3128273e97cc"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_modeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_modeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_modeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_modeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enkessler","download_url":"https://codeload.github.com/enkessler/cuke_modeler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332602,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["abstraction-layer","cucumber","gherkin","modeling","ruby"],"created_at":"2024-11-07T11:36:47.241Z","updated_at":"2025-04-05T12:05:08.968Z","avatar_url":"https://github.com/enkessler.png","language":"Ruby","readme":"Basic stuff:\n[![Gem Version](https://badge.fury.io/rb/cuke_modeler.svg)](https://rubygems.org/gems/cuke_modeler)\n[![Project License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)\n[![Downloads](https://img.shields.io/gem/dt/cuke_modeler.svg)](https://rubygems.org/gems/cuke_modeler)\n\nUser stuff:\n[![Cucumber Docs](http://img.shields.io/badge/Documentation-Features-green.svg)](https://github.com/enkessler/cuke_modeler/tree/master/testing/cucumber/features)\n[![Yard Docs](http://img.shields.io/badge/Documentation-API-blue.svg)](https://www.rubydoc.info/gems/cuke_modeler)\n\nDeveloper stuff:\n[![Build Status](https://github.com/enkessler/cuke_modeler/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/enkessler/cuke_modeler/actions/workflows/ci.yml?query=branch%3Amaster)\n[![Coverage Status](https://coveralls.io/repos/github/enkessler/cuke_modeler/badge.svg?branch=master)](https://coveralls.io/github/enkessler/cuke_modeler?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/83986d8f7a918fed9707/maintainability)](https://codeclimate.com/github/enkessler/cuke_modeler/maintainability)\n\n---\n\n# CukeModeler\n\nThere comes a time in every programmer's adventures with Cucumber when they \nwant to do Really Cool Stuff with their tests. This usually necessitates \nscanning all of their feature files and playing with the output. While the \n**[cucumber-gherkin](https://github.com/cucumber/gherkin)** gem ([previously](https://github.com/enkessler/cuke_modeler/blob/master/CHANGELOG.md#300---2020-06-08) just the `gherkin` gem) does a fine job of parsing feature files, reading or even manipulating \nthe resulting Abstract Syntax Tree is not always fun. **cuke_modeler** comes to \nthe rescue by providing a modeling layer that is easier to work with.\n \nWhether you just want something that will let you easily inspect your test \nsuite or you are looking for a foundation tool upon which to build something \n[Really Neat](#projects), this gem has you covered.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'cuke_modeler'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cuke_modeler\n\n## Usage\n\nFirst, load up the gem code.\n\n    require 'cuke_modeler'\n\nNext, choose what you want to model. Directories and feature files are the most\ncommon thing to model but smaller portions of a test suite can be modeled as \nwell.\n\n    directory = CukeModeler::Directory.new('path/to/the/code_directory')\n    file = CukeModeler::FeatureFile.new('path/to/the/feature_file')\n\n    gherkin = \"Scenario: some test\\n* a step\"\n    test = CukeModeler::Scenario.new(gherkin)\n\nThe models can then be inspected for information.\n\n    directory.path #=\u003e 'path/to/the/code_directory'\n    file.feature.name #=\u003e 'the name of the feature'\n    test.steps.count #=\u003e 1\n\n\nThings can be done in the other direction as well by starting with empty models\nand setting their attributes afterward.\n\n    step = CukeModeler::Step.new\n    step.keyword = 'Given'\n    step.text = 'some step'\n\n    test = CukeModeler::Scenario.new\n    test.steps = [step]\n\n    test.to_s #=\u003e \"Scenario:\\n  Given some step\"\n\nOne could, if so inclined, use this method to dynamically edit or even create \nan entire test suite!\n\nFor more information on the different models (which more or less have the same relation \nto each other as described in the AST [here](https://github.com/cucumber/cucumber/tree/master/gherkin#ast)) and how to use them, see the \n[documentation](https://github.com/enkessler/cuke_modeler/tree/master/testing/cucumber/features).\n\n## Modeling dialects other than English\n\nThe modeling functionality provided by this gem will work with any dialect that \nis supported by the **cucumber-gherkin** gem. For modeling at the feature level or higher, \nno additional effort is needed because the `# language` header at the top of a \nfeature already indicates that a non-default dialect is being used.\n\n    # language: en-au\n    Pretty much: An 'Australian' feature\n    \n      Aww, look mate: An 'Australian' scenario\n        * a step\n \n  In order to model smaller portions of Gherkin, however, the parser will need \n  to be told what dialect is being used.\n\n    # Setting the dialect to 'Australian'\n    CukeModeler::Parsing.dialect = 'en-au'\n    \n    gherkin = \"Awww, look mate: some test\\n* a step\"\n    test = CukeModeler::Scenario.new(gherkin)\n\n\n## Modeling other versions of Cucumber\n\nAlthough this gem is written in Ruby and requires it to run, the modeling \ncapabilities provided are for the feature file layer of a Cucumber test suite. \nAs such, any feature file that is written in Gherkin can be modeled, even if \nthat feature is ultimately run with SpecFlow (Cucumber for C#), Lettuce \n(Cucumber for Python), or some other flavor of Cucumber. \n\n\n### \u003ca id=\"projects\"\u003e\u003c/a\u003eOther gems that are powered by **cuke_modeler**\n\n  * [cql](https://github.com/enkessler/cql) - A convenient DSL for querying modeled Gherkin documents\n  * [cuketagger](https://github.com/enkessler/cuketagger) - A tool for adding tags to feature files\n  * [cuke_cataloger](https://github.com/enkessler/cuke_cataloger) - Easily add uniques IDs to every test case in a suite\n  * [cuke_slicer](https://github.com/enkessler/cuke_slicer) - Break a test suite down into discrete test cases for easy parallel distribution\n  * [cuke_linter](https://github.com/enkessler/cuke_linter) - Identify common code smells in your Gherkin\n\n\n## Development and Contributing\n\nSee [CONTRIBUTING.md](https://github.com/enkessler/cuke_modeler/blob/master/CONTRIBUTING.md)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkessler%2Fcuke_modeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenkessler%2Fcuke_modeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkessler%2Fcuke_modeler/lists"}