-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add editorconfig; update documentation
- Loading branch information
Showing
5 changed files
with
67 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[*] | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
/.github/ export-ignore | ||
/bin/ export-ignore | ||
/tests export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/package.xml.tpl export-ignore | ||
/phpdoc.ini.dist export-ignore | ||
/phpunit.dist.xml export-ignore | ||
/.github/ export-ignore | ||
/bin/ export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/CHANGELOG.md export-ignore | ||
/CONTRIBUTING.md export-ignore | ||
/package.xml.tpl export-ignore | ||
/phpdoc.ini.dist export-ignore | ||
/phpunit.dist.xml export-ignore | ||
/README.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
Contributing | ||
------------ | ||
# Contributing | ||
|
||
Gherkin is an open source, community-driven project. If you'd like to contribute, feel free to do this, but remember to follow this few simple rules: | ||
Gherkin is an open source, community-driven project. If you'd like to contribute, feel free to do this, but remember to | ||
follow this few simple rules: | ||
|
||
- Make your feature addition or bug fix, | ||
- Always use the `master` branch as base for your changes (all new development happens in `master`), | ||
- Add tests for those changes (please look into `tests/` folder for some examples). This is important so we don't break it in a future version unintentionally, | ||
- Commit your code, but do not mess with `CHANGES.md`, | ||
- __Remember__: when you create Pull Request, always select `master` branch as target (done by default), otherwise it will be closed. | ||
- Add tests for those changes (please look into `tests/` folder for some examples). This is important so we don't break | ||
it in a future version unintentionally, | ||
- Commit your code, but do not mess with `CHANGELOG.md`, | ||
- _Remember_: when you create a Pull Request, always select `master` branch as target (done by default), otherwise it | ||
will be closed. | ||
|
||
Running tests | ||
------------- | ||
## Running tests | ||
|
||
Make sure that you don't break anything with your changes by running: | ||
|
||
```bash | ||
$> phpunit | ||
```shell | ||
composer test | ||
``` | ||
|
||
Contributing to Gherkin Translations | ||
------------------------------------ | ||
## Running Linters | ||
|
||
Gherkin supports →40 different languages and you could add more! You might notice | ||
`i18n.php` file in the root of the library. This file is downloaded and **autogenerated** | ||
from original [cucumber/gherkin translations](https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin-languages.json). | ||
So, in order to fix/update/add some translation, you should send Pull Request to the | ||
`cucumber/gherkin` repository. `Behat\Gherkin` will redownload/regenerate translations | ||
from there before each release. | ||
We use automated tools to ensure that the code has a consistent style and is of good quality. | ||
|
||
It might sounds difficult, but this way of dictionary sharing gives you ability to | ||
migrate your `*.feature` files from language to language and library to library without | ||
the need to rewrite/modify them - same dictionary (Gherkin) used everywhere. | ||
```shell | ||
composer lint | ||
``` | ||
|
||
## Contributing to Gherkin Translations | ||
|
||
Gherkin supports →40 different languages and you could add more! You might notice `i18n.php` file in the root of | ||
the library. This file is downloaded and **autogenerated** from | ||
original [cucumber/gherkin translations](https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin-languages.json). | ||
So, in order to fix/update/add some translation, you should send a Pull Request to the `cucumber/gherkin` repository. | ||
`Behat\Gherkin` will re-download/regenerate translations from there before each release. | ||
|
||
It might sound difficult, but this way of dictionary-sharing gives us the ability to migrate `*.feature` files from | ||
language to language and library to library without the need to rewrite/modify them - with the same (Gherkin) dictionary | ||
used everywhere. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ | |
"name": "behat/gherkin", | ||
"description": "Gherkin DSL parser for PHP", | ||
"keywords": ["BDD", "parser", "DSL", "Behat", "Gherkin", "Cucumber"], | ||
"homepage": "http://behat.org/", | ||
"homepage": "https://behat.org/", | ||
"type": "library", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Konstantin Kudryashov", | ||
"email": "[email protected]", | ||
"homepage": "http://everzet.com" | ||
"homepage": "https://everzet.com" | ||
} | ||
], | ||
|
||
|
@@ -63,5 +63,15 @@ | |
} | ||
} | ||
} | ||
] | ||
], | ||
|
||
"scripts": { | ||
"lint": [ | ||
"Composer\\Config::disableProcessTimeout" | ||
], | ||
"test": [ | ||
"Composer\\Config::disableProcessTimeout", | ||
"vendor/bin/phpunit ./tests" | ||
] | ||
} | ||
} |