Skip to main content Link Search Menu Expand Document (external link)

Contributions

Contributions, issues and pull requests are welcome. Please visit the GitHub home for this project.

License

This code is under the eclipse v2 license

Source

JRuby Scripting OpenHAB is GitHub repo is here.

Development Environment Setup

The development process has been tested on MacOS, others operating systems may work.

  1. Install Ruby 2.6.8 - Recommended method is using rbenv
  2. Fork the repo and clone it
  3. Install bundler
  4. Run bundler install from inside of the repo directory
  5. To avoid conflicts, the OpenHAB development instance can use custom ports by defining these environment variables:
    • OPENHAB_HTTP_PORT
    • OPENHAB_HTTPS_PORT
    • OPENHAB_SSH_PORT
    • OPENHAB_LSP_PORT
  6. Run bundle exec rake openhab:setup from inside of the repo directory. This will download a copy of OpenHAB local in your development environment, start it and prepare it for JRuby OpenHAB Scripting Development

Code Documentation

Code documentation is written in Yard and the current documentation for this project is available here.

Development Process

  1. Create a branch for your contribution
  2. Write your tests the project uses Behavior Driven Development with Cucumber. The features directory has many examples. Feel free ask in your PR if you need help.
  3. Write your code
  4. Verify your tests now pass by running bundle exec cucumber features/<your feature file>.feature
  5. Update the documentation, run bundle exec rake docs to view the rendered documentation locally
  6. Lint your code with bundle exec rake lint and ensure you have not created any Rubocop or cuke lint violations
  7. This library follows conventional commits. You can have multiple commits per PR, but each one should map exactly to a fix/feature/breaking change
  8. Squash your commits if necessary to conform to conventional commits
  9. Submit your PR(s)!

If you get stuck or need help along the way, please open an issue.