Skip to content

Commit 3e08f81

Browse files
committed
Refresh CONTRIBUTING guide
Update the contributing guide to reflect the project's current tooling and remove stale references: - Replace Travis CI references with GitHub Actions and the actual rake test/lint tasks (rake unit, rake acceptance, rake style). - Point coding standards at Cookstyle instead of the abandoned Cane tool and dead style-guide links. - Fix stale links: chefspec/chefspec -> chef/chefspec, master -> main, the old GitHub fork-a-repo URL, and the legacy ?state=open issue query. - Drop the "cucumber tests" requirement; ChefSpec uses RSpec unit and acceptance suites. Signed-off-by: Tim Smith <tsmith84@proton.me>
1 parent 3272113 commit 3e08f81

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

CONTRIBUTING.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Contributing to ChefSpec
22
========================
3-
Pull requests are merged via Github, you can find the documentation about how to fork a repository and start contributing to ChefSpec here [https://help.github.com/articles/fork-a-repo](https://help.github.com/articles/fork-a-repo).
3+
Pull requests are merged via GitHub. If you're new to contributing, see GitHub's guide on [forking a repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) to get started.
44

55
All contributions are welcome to be submitted for review for inclusion, but before they will be accepted, we ask that you follow these simple steps:
66

@@ -12,41 +12,47 @@ Also, please be patient as not all items will be tested or reviewed immediately
1212

1313
Please be receptive and responsive to feedback about your additions or changes. The core team and/or other community members may make suggestions or ask questions about your change. This is part of the review process, and helps everyone to understand what is happening, why it is happening, and potentially optimizes your code.
1414

15-
If you're looking to contribute but aren't sure where to start, check out the [open issues](https://github.com/chefspec/chefspec/issues?state=open).
15+
If you're looking to contribute but aren't sure where to start, check out the [open issues](https://github.com/chef/chefspec/issues).
1616

1717

1818
Will Not Merge
1919
--------------
2020
This section details, specifically, Pull Requests or features that will _not_ be merged:
2121

22-
1. Matchers for non-Chef core resources. ChefSpec 3.0 introduced a way for cookbook maintainers to [package matchers _with_ their cookbooks](https://github.com/chefspec/chefspec#packaging-custom-matchers) at distribution time.
23-
2. New features without accompanying unit tests, cucumber tests, and documentation.
22+
1. Matchers for non-Chef core resources. ChefSpec provides a way for cookbook maintainers to ship [custom matchers](https://github.com/chef/chefspec#chefspec-matchers) _with_ their cookbooks at distribution time.
23+
2. New features without accompanying unit tests and documentation.
2424

2525

2626
Coding Standards
2727
----------------
28-
The submitted code should be compatible with the standard Ruby coding guidelines. Here are some additional resources:
28+
ChefSpec's code style is enforced with [Cookstyle](https://docs.chef.io/workstation/cookstyle/). Before submitting a pull request, please run the linter and fix any offenses:
2929

30-
* [Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide)
31-
* [Github Styleguide](https://github.com/styleguide/ruby)
30+
```sh
31+
bundle exec rake style
32+
```
3233

33-
There is a tool called [Cane](https://github.com/square/cane) that allows you to validate your code's ABC complexity and documentation.
34+
This runs the same `cookstyle --chefstyle -c .rubocop.yml` check used in CI.
3435

3536

3637
Testing
3738
-------
3839
Whether your pull request is a bug fix or introduces new classes or methods to the project, we kindly ask that you include tests for your changes. Even if it's just a small improvement, a test is necessary to ensure the bug is never re-introduced.
3940

40-
We understand that not all users submitting pull requests will be proficient with RSpec. The maintainers and community as a whole are a helpful group and can help you with writing tests. The [Better Specs](http://betterspecs.org/) site should provide some helpful resources to get you started.
41+
ChefSpec has two test suites, both runnable with Rake:
4142

42-
ChefSpec is tested on [Travis CI](https://travis-ci.org/chefspec/chefspec) against multiple Chef Versions and Ruby Versions. **Your patches must work for all Chef and Ruby Versions on Travis.** This is in an effort to maintain backward compatibility as long as possible. For more information on which Chef and Ruby versions to support, checkout the [`.travis.yml`](https://github.com/chefspec/chefspec/blob/master/.travis.yml) file.
43+
```sh
44+
bundle exec rake unit # fast RSpec unit tests in spec/
45+
bundle exec rake acceptance # end-to-end example cookbooks in examples/
46+
bundle exec rake test # run both
47+
```
48+
49+
We understand that not all users submitting pull requests will be proficient with RSpec. The maintainers and community as a whole are a helpful group and can help you with writing tests. The [Better Specs](https://www.betterspecs.org/) site provides some helpful resources to get you started.
50+
51+
ChefSpec is tested in [GitHub Actions](https://github.com/chef/chefspec/actions) against multiple Ruby versions. **Your patches must pass for all Ruby versions in the CI matrix.** This is in an effort to maintain backward compatibility as long as possible. See the [`.github/workflows/ci.yml`](https://github.com/chef/chefspec/blob/main/.github/workflows/ci.yml) file for the currently supported versions.
4352

4453

4554
Documentation
4655
-------------
47-
Documentation is a crucial part to ChefSpec, especially given its broad depth of features. All documentation is placed inline on the method matcher so it can be generated with Yard. Please see existing matchers for an example and check out the [Yard documentation](http://yardoc.info)
56+
Documentation is a crucial part to ChefSpec, especially given its broad depth of features. All documentation is placed inline on the method matcher so it can be generated with [YARD](https://yardoc.org/). Please see existing matchers for an example.
4857

4958
When contributing new features, please ensure adequate documentation and examples are present.
50-
51-
---
52-
This contributing guide is based off of the [Joomla Contributing Guide](https://raw.github.com/joomla/joomla-framework/master/CONTRIBUTING.markdown).

0 commit comments

Comments
 (0)