-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: maintain docs and fix repository ameba failures (#312)
* ci: use crystal 1.4.0 * docs: fix spelling mistakes, add section links, reword slightly * style: resolve ameba issues * style: use `when`/`in` followed by `then` * ci: remove 1.4.x until we build them
- Loading branch information
Showing
25 changed files
with
220 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,17 @@ | ||
# Setup | ||
|
||
This allows you to build and test drivers without installing or running the complete PlaceOS service. | ||
Usage of [PlaceOS Driver Spec Runner](https://github.com/PlaceOS/driver-spec-runner) allows you to build and test | ||
drivers without installing or running the complete PlaceOS service. | ||
|
||
1. clone the drivers repository: `git clone https://github.com/placeos/drivers drivers` | ||
2. clone private repositories here: `mkdir ./drivers/repositories` | ||
## Installation | ||
|
||
Clone the drivers repository: `git clone https://github.com/placeos/drivers drivers` | ||
|
||
## OSX | ||
## Reports | ||
|
||
Install [Homebrew](https://brew.sh/) to install dependencies | ||
Test your driver with `./harness report <your_spec_file>`. | ||
If the spec file argument is omitted, the harness will run specs for every driver in the current repository. | ||
|
||
* Install [Crystal Lang](https://crystal-lang.org/reference/installation/): `brew install crystal` | ||
* Install libssh2: `brew install libssh2` | ||
* Install redis: `brew install redis` | ||
## Developing | ||
|
||
Ensure the following lines are in your `.bashrc` file | ||
|
||
```shell | ||
export PATH="/usr/local/opt/llvm/bin:$PATH" | ||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig | ||
``` | ||
|
||
|
||
## Running Specs | ||
|
||
1. Ensure redis is running: `redis-server` | ||
2. Install dependencies: `cd drivers; shards update` | ||
3. Launch application: `crystal run ./src/app.cr` | ||
4. Browse to: http://localhost:3000/ | ||
|
||
Now you can build drivers and run specs: | ||
|
||
* Build a drvier or spec: `curl -X POST "http://localhost:3000/build?driver=drivers/helvar/net.cr"` | ||
* Run a spec: `curl -X POST "http://localhost:3000/test?driver=drivers/lutron/lighting.cr&spec=drivers/lutron/lighting_spec.cr"` | ||
|
||
To build or test against drivers in private repositories include the repository param: `repository=private_drivers` | ||
After running `./harness up`, the harness will expose a development interface on [localhost:8085](http://localhost:8085). |
Oops, something went wrong.