{"id":17226842,"url":"https://github.com/dantleech/sphinx-behat","last_synced_at":"2025-10-08T14:18:06.989Z","repository":{"id":19341952,"uuid":"22580999","full_name":"dantleech/sphinx-behat","owner":"dantleech","description":"Sphinx extension for generating Behat features","archived":false,"fork":false,"pushed_at":"2014-08-16T09:28:18.000Z","size":156,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T01:13:03.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dantleech.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-03T18:35:52.000Z","updated_at":"2020-06-10T21:40:19.000Z","dependencies_parsed_at":"2022-09-11T15:03:02.450Z","dependency_job_id":null,"html_url":"https://github.com/dantleech/sphinx-behat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dantleech/sphinx-behat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fsphinx-behat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fsphinx-behat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fsphinx-behat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fsphinx-behat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dantleech","download_url":"https://codeload.github.com/dantleech/sphinx-behat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fsphinx-behat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956388,"owners_count":26075238,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-15T04:17:22.627Z","updated_at":"2025-10-08T14:18:06.955Z","avatar_url":"https://github.com/dantleech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Behat Sphinx Extension\n======================\n\nThis WIP Sphinx Extension adds support for generating behat `.feature`\nfiles from restructured text documentation.\n\nBasically each section of the documentation is interpreted as a `Scenario` and\nthe extension adds a role `:behat:` which enables you to add Behat scenario\nparts (e.g. `Given x`, `Then y`).\n\nSome things to note:\n\n- **Code modification instructions and diffs**: Lots of instructions involve\n  code modification (e.g. add this line to your configuration file). It is\n  tricky (but not impossible) to present this information in a way which is\n  100% acceptable for humans. The compromise is to use the `diff` format in\n  the documenation (this is more precise anyway). But understandably prople\n  won't think this is ideal - but what is more ideal?  That the code works or\n  that it looks nice?\n\n- **Dependencies**: Lots of documentation is made up of a series, with each\n  document building on the result of the previous article. This needs to be\n  implemented somehow.\n\n- **Work in progrss**: This is still a work in progres.\n\nCurrently, given you have the following file::\n\n    Controllers and Templates\n    =========================\n\n    Requirements\n    ------------\n\n    - PHP 5.4 :behat:`Given I execute \"php\"` :behat:`Then the command should not fail`\n\n    Installation\n    ------------\n\n    Clone the repository\n    ~~~~~~~~~~~~~~~~~~~~\n\n    First clone the repository :behat:`Given you execute the following`:\n\n    .. code-block:: bash\n\n        git clone git@github.com:sulu-cmf/sulu-standard.git\n        cd sulu-standard\n\n    and checkout the development branch :behat:`And you execute the following`:\n\n    .. code-block:: bash\n\n        git checkout develop\n\n    :behat:`Then the file \"composer.json\" should exist`\n\n    Create the default configuration\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n    For the project to work you must also create some default configuraiton files,\n    to use doctrine-dbal execute :behat:`Given you execute the following`:\n\n    .. code-block:: bash\n\n        cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml\n\n    Alternatively, if you want to use jackrabbit:\n\n    .. code-block:: bash\n\n        cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml\n\n    :behat:`Then the command should not fail`\n\n    You may want to change the name of the default database :behat:`And you apply the following diff`:\n\n    .. code-block:: diff\n\n        diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist\n        index 2e78e75..1d77cad 100644\n        --- a/app/config/parameters.yml.dist\n        +++ b/app/config/parameters.yml.dist\n        @@ -2,7 +2,7 @@ parameters:\n             database_driver:    pdo_mysql\n             database_host:      127.0.0.1\n             database_port:      ~\n        -    database_name:      sulu\n        +    database_name:      mydatabasename\n             database_user:      root\n             database_password:  ~\n\n    Install the dependencies\n    ~~~~~~~~~~~~~~~~~~~~~~~~\n\n    Make sure the composer is installed :behat:`Given composer is installed` (https://getcomposer.org)\n    for installation instructions)\n\n    Then install the dependencies :behat:`Given you execute the following`:\n\n    .. code-block:: bash\n\n        composer.phar install\n\n    :behat:`Then the command should not fail`\n\n    Initialize the Environment\n    --------------------------\n\n    Create the database and schema :behat:`Given you execute the following`:\n\n    .. code-block:: bash\n\n        php app/console doctrine:database:create\n        php app/console doctrine:schema:create\n\n\nAnd you enable this extension and run::\n\n    sphinx-build -b behat source/ build content-to-controllers.rst\n\nThen it will build the following file::\n\n    Feature: content-to-controllers\n        This document should work\n\n        Scenario: Create the default configuration\n            Given you execute the following (in \"bash\"):\n            \"\"\"\n            cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml\n            \"\"\"\n            Then the command should not fail\n            And you apply the following diff (in \"diff\"):\n            \"\"\"\n            diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist\n            index 2e78e75..1d77cad 100644\n            --- a/app/config/parameters.yml.dist\n            +++ b/app/config/parameters.yml.dist\n            @@ -2,7 +2,7 @@ parameters:\n                 database_driver:    pdo_mysql\n                 database_host:      127.0.0.1\n                 database_port:      ~\n            -    database_name:      sulu\n            +    database_name:      mydatabasename\n                 database_user:      root\n                 database_password:  ~\n            \"\"\"\n\n        Scenario: Install the dependencies\n            Given composer is installed\n            Given you execute the following (in \"bash\"):\n            \"\"\"\n            composer.phar install\n            \"\"\"\n            Then the command should not fail\n\n        Scenario: Requirements\n            Given I execute \"php\"\n            Then the command should not fail\n\n        Scenario: Initialize the Environment\n            Given you execute the following (in \"bash\"):\n            \"\"\"\n            php app/console doctrine:database:create\n            php app/console doctrine:schema:create\n            \"\"\"\n\n        Scenario: Clone the repository\n            Given you execute the following (in \"bash\"):\n            \"\"\"\n            git clone git@github.com:sulu-cmf/sulu-standard.git\n            cd sulu-standard\n            \"\"\"\n            And you execute the following (in \"bash\"):\n            \"\"\"\n            git checkout develop\n            \"\"\"\n            Then the file \"composer.json\" should exist\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantleech%2Fsphinx-behat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdantleech%2Fsphinx-behat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantleech%2Fsphinx-behat/lists"}