{"id":15177466,"url":"https://github.com/enkessler/cql","last_synced_at":"2025-10-25T21:02:40.491Z","repository":{"id":3573556,"uuid":"4636054","full_name":"enkessler/cql","owner":"enkessler","description":"A query language for Gherkin","archived":false,"fork":false,"pushed_at":"2022-07-18T00:28:52.000Z","size":651,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-19T08:49:04.979Z","etag":null,"topics":["cucumber","gherkin"],"latest_commit_sha":null,"homepage":"","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}},"created_at":"2012-06-12T10:28:27.000Z","updated_at":"2024-09-08T02:00:26.000Z","dependencies_parsed_at":"2022-09-13T11:01:16.505Z","dependency_job_id":null,"html_url":"https://github.com/enkessler/cql","commit_stats":null,"previous_names":["jdfolino/cql"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enkessler","download_url":"https://codeload.github.com/enkessler/cql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246268845,"owners_count":20750180,"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":["cucumber","gherkin"],"created_at":"2024-09-27T14:22:55.854Z","updated_at":"2025-10-25T21:02:40.441Z","avatar_url":"https://github.com/enkessler.png","language":"Ruby","funding_links":[],"categories":["Testing"],"sub_categories":[],"readme":"Basic stuff:\n[![Gem Version](https://badge.fury.io/rb/cql.svg)](https://rubygems.org/gems/cql)\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/cql.svg)](https://rubygems.org/gems/cql)\n\nUser stuff:\n[![Cucumber Docs](http://img.shields.io/badge/Documentation-Features-green.svg)](https://github.com/enkessler/cql/tree/master/testing/cucumber/features)\n[![Yard Docs](http://img.shields.io/badge/Documentation-API-blue.svg)](https://www.rubydoc.info/gems/cql)\n\nDeveloper stuff:\n[![Build Status](https://github.com/enkessler/cql/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/enkessler/cql/actions/workflows/ci.yml?query=branch%3Amaster)\n[![Coverage Status](https://coveralls.io/repos/github/enkessler/cql/badge.svg?branch=master)](https://coveralls.io/github/enkessler/cql?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a469e37db8e67c1c989b/maintainability)](https://codeclimate.com/github/enkessler/cql/maintainability)\n[![Inline docs](http://inch-ci.org/github/enkessler/cql.svg?branch=master)](https://inch-ci.org/github/enkessler/cql)\n\n---\n\n\n# CQL (Cucumber Query Language)\n\nCQL is a domain specific language used for querying a Cucumber (or other Gherkin based) test suite. It is written \nin Ruby and powered by the [cuke_modeler](https://github.com/enkessler/cuke_modeler) gem. The goal of CQL is to increase the ease with which \nuseful information can be extracted from a modeled test suite and turned into summarized data or reports.\n\n\nSome uses for example are:\n\n* Build systems\n* Reporting\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'cql'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cql\n\n## Usage\n\n* Create a new ruby file and require the gem\n\n        require 'cql'\n\n* Start querying things!\n\nThe first thing that needs to be done is to create a CQL Repository. This can be done with the following line:\n\n    require 'cql'\n    cql_repo = CQL::Repository.new \"/path-to/my/feature-files\"\n\nRepositories can also be created from an existing model:\n\n    directory = CukeModeler::Directory.new(\"/path-to/my/feature-files\")\n    cql_repo = CQL::Repository.new(directory)\n\nNow that you have a repository you can write a query. A simple example is given below\n\n    cql_repo.query do\n        select name, source_line\n        from features\n    end\n\nThis will return a list of all of the feature names and source lines in the form of a list of hashes.\n\n    [{'name' =\u003e 'Feature 1', 'source_line' =\u003e 1},\n     {'name' =\u003e 'Feature 2', 'source_line' =\u003e 3},\n     {'name' =\u003e 'Feature 3', 'source_line' =\u003e 10}]\n\nAlternatively, you can activate the extensions to the `cuke_modeler` gem and query models directly:\n\n    require 'cql'\n    require 'cql/model_dsl'\n    \n    directory = CukeModeler::Directory.new(\"/path-to/my/feature-files\")\n\n    directory.query do\n        select name, source_line\n        from features\n    end\n\nFor more information on the query options, see the documentation [here](https://github.com/enkessler/cql/tree/master/testing/cucumber/features).\n\n## Development and Contributing\n\nSee [CONTRIBUTING.md](https://github.com/enkessler/cql/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\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkessler%2Fcql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenkessler%2Fcql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkessler%2Fcql/lists"}