Skip to content

Instantly share code, notes, and snippets.

@jonbullock
Last active July 25, 2016 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbullock/528992747fee282061f983fd2daf844b to your computer and use it in GitHub Desktop.
Save jonbullock/528992747fee282061f983fd2daf844b to your computer and use it in GitHub Desktop.
JBake proposed contributors guide

Contributing

First off thanks for your interest in improving JBake! We appreciate you taking the time to contribute to JBake and to ensure that your contribution is easy to review and process we kindly ask that you follow the guidance outlined below.

License Agreement

By contributing changes to this repository, you agree to license your contributions under the MIT license. This ensures your contributions have the same license as the project and that the community is free to use your contributions. You also assert that you are the original author of the work that you are contributing unless otherwise stated.

Raising an Issue

We use the issue tracker on GitHub associated with this project to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn’t already been submitted. When submitting a bug report, please include a Gist that includes any details that may help reproduce the bug, including your local environment details (i.e. installation method, JVM version, and Operating System).

Most importantly, since JBake is a static site generator, reproducing most bugs requires that we have some snippet of content on which triggers the bad behaviour in JBake.

Raising a Pull Request

Prior to starting work on a Pull Request please post a message on the developers mailing list outlining the new feature or bug you are planning to work on. You can then be advised if anyone else is already working on the same topic or if there is any pertinent information that you should be made aware of such as upcoming structural or API changes.

Once you’re ready to start work on your pull request follow the steps outlined below.

  1. Fork the repository.

  2. Create a topic branch.

  3. Add tests for your unimplemented feature or bug fix. (See Writing and Executing Tests)

  4. Implement your feature or bug fix.

  5. Run mvn test to run the tests. If your tests fail, return to step 4.

  6. Add, commit, and push your changes.

  7. Submit a pull request.

For ideas about how to use pull requests, see the post Useful GitHub Patterns.

Writing and Executing Tests

Tests and their resources reside within /src/test and should be written using the JUnit framework, you also have the following testing libraries available to you when writing your tests:

Any resources, such as templates, that your tests require should be placed within /src/test/resources.

To execute the tests from the command line you will require Maven to be installed, once you have Maven installed you can execute the following command from the root folder in the repository:

$ mvn test

You will be able to run the unit tests in most IDE’s such as Eclipse as well.

If you would like to utilise another testing library in your test classes, then please mention this and your reasons for use when posting on the developers mailing list about your planned contribution.

If you would like to use a different testing framework instead of JUnit you may volunteer to convert the existing test suite over to the new framework, we’d prefer not to have multiple test suites in different frameworks.

Supported Java Versions

At present JBake supports Java 6 and above and any contributions shouldn’t use Java 7 or Java 8 syntax, please see the roadmap for when support for Java 7 & 8 is planned.

@ancho
Copy link

ancho commented Jul 25, 2016

You could add mockito to the list of testing libraries.

How about some code style guidelines?

  • wildcard imports no or go?
  • spaces vs. tabs
  • indents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment