If you'd like to submit a patch:
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so that it isn't broken in a future version unintentionally.
- Commit. Do not touch any unrelated code, such as the gemspec or version. If you must change unrelated code, do it in a commit by itself, so that it can be ignored.
- Send a pull request.
Install git on your test system.
Install the latest version of Bundler
$ gem install bundler
Clone the project
$ git clone git://github.com/berkshelf/berkshelf.git
$ cd berkshelf $ bundle install
Bundler will install all gems and their dependencies required for testing and developing.
Running unit (RSpec) and acceptance (Cucumber) tests
We use Chef Zero - an in-memory Chef Server for running tests. It is automatically managed by the Specs and Cukes. Run:
$ bundle exec guard start
$ bundle exec thor spec:ci
See here for a quick way to get a testing chef server up.
By default, Berkshelf will only give you the top-level output from a failed command. If you're working deep inside the core, an error like:
Berkshelf Error: wrong number of arguments (2 for 1)
isn't exactly helpful...
BERKSHELF_DEBUG flag when running your command to see a full stack trace and other helpful debugging information.
Once you are ready to release Berkshelf, perform the following:
CHANGELOG.mdwith a new header indicating the version to be released
- Examine the diff (example) between master and the previous version. Add all merged Pull Requests to the
version.rbto the desired release version
bundle update berkshelf
- Create a PR and review the
- Once the PR is merged to master, run
rake releaseon the master branch