Thank you for considering contributing to Cucumber!
If you are not sure your contribution is related to cucumber-ruby-core
, please
consider taking a look at cucumber-ruby
's CONTRIBUTING.md first.
Everyone interacting in this codebase and issue tracker is expected to follow the Cucumber code of conduct.
If you just want to know how to contribute to the code of cucumber-ruby-core
,
go to Contribute to the code.
The short version is:
- Try to check there is not already an issue or pull request that deals with your bug or request
- Explain your issue and include as much details as possible to help other people reproduce your problem or understand your request
- Consider submitting a pull request if you feel confident enough
You can find more details for each of these steps in the following sections.
Search in the current repository or in the whole cucumber organization if the problem or feature has already been reported. If you find an issue or pull request which is still open, add comments to it instead of opening a new one.
If you're not sure, don't hesitate to just open a new issue. We can always merge and de-duplicate later.
When submitting a pull request:
- create a draft pull request
- try to follow the instructions in the template
- if possible, sign your commits
- update CHANGELOG.md with your changes
- once the PR is ready, request for reviews
More info on how to contribute to the code can be found below.
To open a good issue, be clear and precise.
If you report a problem, the reader must be able to reproduce it easily. Please do your best to create a minimal, reproducible example.
Consider submitting a pull request. Even if you think you cannot fix it by yourself, a pull request with a failing test is always welcome.
If your request is for an enhancement - a new feature - try to be specific and support your request with referenced facts and include examples to illustrate your proposal.
Development environment for cucumber-ruby-core
is a simple Ruby environment with
bundler. Use a supported Ruby version, make
sure bundler is set-up, and voilà!
You can then fork and clone the repository. If your environment is set-up properly, the following commands should install the dependencies and execute all the tests successfully.
bundle install
bundle exec rake
You can now create a branch for your changes and submit a pull request!
You may need to use local dependencies instead of released gems for cucumber-gherkin
or cucumber-messages
. To do so the Gemfile
for cucumber-core
allows you to specify a local path for your gems using environment variables:
CUCUMBER_GHERKIN_RUBY
CUCUMBER_MESSAGES_RUBY
For example, the following would use a local version of cucumber-gherkin
with
the rake
command:
CUCUMBER_GHERKIN_RUBY=../common/gherkin/ruby bundle exec rake
In the same way, if you want to test your changes to cucumber-core
with a local
cucumber-ruby
, checkout cucumber-ruby
and do your tests with
CUCUMBER_RUBY_CORE
pointing to your local cucumber-core
:
~/cucumber-ruby-core> cd ../cucumber-ruby
~/cucumber-ruby> CUCUMBER_RUBY_CORE=../cucumber-ruby-core bundle exec rake
A local Gemfile allows you to use your prefer set of gems for your own
development workflow, like gems dedicated to debugging. Such gems are not part
of cucumber-ruby
standard Gemfile
.
Gemfile.local
, Gemfile.local.lock
and .bundle
have been added to
.gitignore
so local changes cannot be accidentaly commited and pushed to the
repository.
A Gemfile.local
may look like this:
# Gemfile.local
# Include the regular Gemfile
eval File.read('Gemfile')
# Include your favorites development gems
group :development do
gem 'byebug'
gem 'pry'
gem 'pry-byebug'
gem 'debase', require: false
gem 'ruby-debug-ide', require: false
end
Then you can execute bundler with the --gemfile
flag:
bundle install --gemfile Gemfile.local
, or with an environment variable:
BUNDLE_GEMFILE=Gemfile.local bundle [COMMAND]
.
To use your local Gemfile per default, you can also execute
bundle config set --local gemfile Gemfile.local
.
Looking for something simple to begin with? Look at issues with the label 'good first issue'.
If you have trouble setting-up your development environment, or getting started with the code, you can join us on Discord. You will find there a lot of contributors.
Full-time maintainers are also available. We would be please to have 1:1 pairing sessions to help you getting started. Look for Luke Hill or Matt Wynne on Discord.
You can find additional documentation in the docs directory such as (non-exhaustive list):
- How to release cucumber-ruby-core (for maintainers)
- Overview of cucumber-ruby-core