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.
- Install Ruby 2.6.8 - Recommended method is using rbenv
- Fork the repo and clone it
- Install bundler
- Run
bundler install
from inside of the repo directory - 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
- 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
- Create a branch for your contribution
- 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.
- Write your code
- Verify your tests now pass by running
bundle exec cucumber features/<your feature file>.feature
- Update the documentation, run
bundle exec rake docs
to view the rendered documentation locally - Lint your code with
bundle exec rake lint
and ensure you have not created any Rubocop or cuke lint violations - This library follows conventional commits. You can have multiple commits per PR, but each one should map exactly to a fix/feature/breaking change
- Squash your commits if necessary to conform to conventional commits
- Submit your PR(s)!
If you get stuck or need help along the way, please open an issue.