This cookbook the following testing components:
- Integration tests: Test Kitchen
- Chef Style lints: Foodcritic
- Sane Ruby Style lints: CookStyle
To develop on this cookbook, you must have a sane Ruby 2.5+ environment.
You should have ChefDK stable release installed
You must also have either Vagrant and VirtualBox installed, or Docker:
Using vagrant, you should install the vagrant-berkshelf
plugin:
$ vagrant plugin install vagrant-berkshelf
-
Clone the git repository from GitHub:
$ git clone git@github.com:t0rrant/cookbook-shifter.git
-
Install the dependencies using bundler:
$ bundle install
-
Create a branch for your changes:
$ git checkout -b my_bug_fix
-
Make any changes
-
Write tests to support those changes. It is highly recommended you write both unit and integration tests.
-
Run the tests:
bundle exec rspec
bundle exec foodcritic .
bundle exec cookstyle .
bundle exec kitchen test
-
Assuming the tests pass, open a Pull Request on GitHub